-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[merged] status: Support --json option #315
Conversation
It's really simple to reflect the DBus API into JSON, which tools like Ansible or `jq` from the command line or whatever can parse to find interesting things like the current version. Closes: coreos#301
Things like: https://github.com/projectatomic/atomic-host-tests/blob/master/tests/upgrade-interrupt/main.yaml#L65 will need to be ported to see if |
Thanks for pointing that out. Happy to see machine readable output for scripting purposes. 😄 |
I tested this and saw that some of the field names in the JSON are different from the normal status:
Would it be possible to have the names of the fields be the same in both cases? |
I know it would be nice if they matched...but we can't change the DBus API since Cockpit uses it (plus various internal consumers). Trying to align them just for We can easily change some of the status nouns like using |
I'm in favor of easier maintenance, so the explanation suits me fine. |
Awesome, quite surprising how easy it is. |
☀️ Test successful - status-atomicjenkins |
It's really simple to reflect the DBus API into JSON, which tools like
Ansible or
jq
from the command line or whatever can parse to findinteresting things like the current version.
Closes: #301