feat: add device status, steps, and statediff subcommands

Summary

  • Adds pvr device status <device> [--rev=N] — shows step info (without bulky state field) for the current running revision or a specific one
  • Adds pvr device steps <device> [--rev=N] — lists all steps or shows a specific step
  • Adds pvr device statediff <device> <REV1> <REV2> [--format=unified|jsondiff] — diffs state between two revisions
  • All three commands support 4 input formats: device ID, device nick, pvr URL, pvr URL with revision

Test plan

  • pvr device status 69bf4ccec0329e0009885cb9 — shows current running rev
  • pvr device status labslave_var-som-mx8mn — nick resolves to ID
  • pvr device status https://pvr.pantahub.com/asacasa/labslave_var-som-mx8mn — pvr URL
  • pvr device status https://pvr.pantahub.com/asacasa/labslave_var-som-mx8mn/4 — pvr URL with rev
  • pvr device steps <device> --rev=4 — specific step
  • pvr device statediff <device> 9 10 — unified diff
  • pvr device statediff <device> 9 10 --format=jsondiff — JSON patch format

Merge request reports

Loading