Skip to content

Support JSON output in stolonctl status#628

Merged
sgotti merged 1 commit into
sorintlab:masterfrom
gocardless:hmac/status-json
Apr 13, 2019
Merged

Support JSON output in stolonctl status#628
sgotti merged 1 commit into
sorintlab:masterfrom
gocardless:hmac/status-json

Conversation

@hmac

@hmac hmac commented Mar 27, 2019

Copy link
Copy Markdown
Contributor

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

sgotti commented Mar 28, 2019

Copy link
Copy Markdown
Member

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

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

@hmac

hmac commented Mar 28, 2019

Copy link
Copy Markdown
Contributor Author

Thanks! And apologies, missed that issue!

@sgotti sgotti left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

hmac commented Apr 12, 2019

Copy link
Copy Markdown
Contributor Author

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

@sgotti

sgotti commented Apr 13, 2019

Copy link
Copy Markdown
Member

@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