Skip to content

Show the status of pools with floaty status #38

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
merged 1 commit into from
Dec 5, 2016

Conversation

nicklewis
Copy link
Contributor

Previously, floaty status would simply pretty-print the JSON output of
the status request to the pooler. That data requires additional
parsing, either human or machine, in order to be able to deduce any
meaningful information about the state of the pooler.

This commit updates floaty status to visually represent the state of
pools, indicating which pools have nodes missing or being built. It also
prints the status summary message returned by the pooler, providing an
easy way to tell if everything is okay.

By default, this command will only show the state of pools that aren't
full. If --verbose is passed, it will show all pools. If the complete
status information provided by the API is desired, the --json option
will print the raw JSON output, preserving the previous functionality.

This also updates the status command to exit non-zero if the status is
not ok.

@nicklewis
Copy link
Contributor Author

Sample output:

image

I'm not sure if it's necessary to color the pool names yellow/red, since the bar sort of makes that obvious.

Previously, `floaty status` would simply pretty-print the JSON output of
the status request to the pooler. That data requires additional
parsing, either human or machine, in order to be able to deduce any
meaningful information about the state of the pooler.

This commit updates `floaty status` to visually represent the state of
pools, indicating which pools have nodes missing or being built. It also
prints the status summary message returned by the pooler, providing an
easy way to tell if everything is okay.

By default, this command will only show the state of pools that aren't
full. If `--verbose` is passed, it will show all pools. If the complete
status information provided by the API is desired, the `--json` option
will print the raw JSON output, preserving the previous functionality.

This also updates the status command to exit non-zero if the status is
not ok.
@nicklewis nicklewis force-pushed the improved-status-command branch from 86e73ca to 7ee7308 Compare December 2, 2016 21:48
@nicklewis
Copy link
Contributor Author

Updated to not color the names.

image

@briancain
Copy link
Contributor

Woot! Thanks @nicklewis ! This is pretty handy. And I like the color. I don't have vpn right now so I can't test it, but I'll try it out on Monday.

@briancain briancain merged commit 5cfac37 into puppetlabs:master Dec 5, 2016
@briancain
Copy link
Contributor

@nicklewis this will be in release 0.7.3

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