nanovms / ops

ops - build and run nanos unikernels
https://ops.city
MIT License
1.3k stars 132 forks source link

add global json flag support for listing do images and instances #1415

Closed geoah closed 1 year ago

geoah commented 1 year ago

Hey, this is a continuation of https://github.com/nanovms/ops/pull/1240 that enabled the DO list instances and images commands to use the global --json flag.

I'm just playing around with ops, and needed json support for do commands, and it seemed easier to make a PR than make a ticket to ask for support for this in DO, hope that's ok.

~geoah

eyberg commented 1 year ago

this is fine although I don't think the JSON bool belongs in runconfig as that really deals with a particular instance configuration not cli output that can span not just instances/images but pretty much anything; this ties into https://github.com/nanovms/ops/issues/1200

we'd prob refactor this in the future to some output config of some kind