Skip to content
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

Support JSON output in stolonctl status #628

Merged
merged 1 commit into from
Apr 13, 2019

Conversation

hmac
Copy link
Contributor

@hmac hmac commented Mar 27, 2019

This change allows you to pass a --format flag to stolonctl status to specify the output format. The available options are text (the current output format) and json, which produces the same data but in a structured format. The idea is that you can build automation around this information without relying on the semi-structured human-readable format.

@hmac hmac force-pushed the hmac/status-json branch from c8c2c3a to bf05f69 Compare March 27, 2019 16:09
@sgotti
Copy link
Member

sgotti commented Mar 28, 2019

@hmac Thanks for your PR! I'll review it in the next days.

As a note there was a related issue here: #358

@hmac
Copy link
Contributor Author

hmac commented Mar 28, 2019

Thanks! And apologies, missed that issue!

Copy link
Member

@sgotti sgotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hmac Just a small issue with cluster.Available value. It looks good to me after that change (please squash your future changes in a single commit). Thanks!

} else {
stdout("Master Keeper: (none)")
}
master := cd.Cluster.Status.Master
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cluster.Available should be set to true here or it'll always be false

@hmac hmac force-pushed the hmac/status-json branch from bf05f69 to faa7f52 Compare April 10, 2019 08:57
@hmac
Copy link
Contributor Author

hmac commented Apr 12, 2019

@sgotti thanks for the review and bug spot! I've updated this and it looks like CI has passed now.

@sgotti
Copy link
Member

sgotti commented Apr 13, 2019

@hmac Thanks! Merging.

@sgotti sgotti merged commit 298f170 into sorintlab:master Apr 13, 2019
@sgotti sgotti added this to the v0.14.0 milestone Apr 19, 2019
@hmac hmac deleted the hmac/status-json branch April 23, 2019 16:29
@sgotti sgotti modified the milestone: v0.14.0 Jun 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants