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

cloudctl machine ls shows two different kinds of output with conflicting template vars #300

Open
TLINDEN opened this issue May 8, 2024 · 0 comments

Comments

@TLINDEN
Copy link

TLINDEN commented May 8, 2024

The command cloudctl machine ls $cluster shows 2 outputs: first the one of cloudctl cluster describe $cluster and then the actual machine status.

This is all fine and dandy unless you want to post-process the output using template vars. E.g.:

c cluster machine ls $cluster -o template --template "{{.Status.lastOperation.progress}} {{.hardware.cpu_cores}}"
Cluster:
100 <no value>

Machines:
<no value> 8
<no value> 24
<no value> 24
<no value> 24

Obviously the "describe cluster" output doesn't have a .hardware.cpu_cores and the "machine ls" output has no .Status.lastOperation.progress. Also the template I used here didn't mention Cluster: or Machines:, these headers had been printed directly and independently from the output type as it seems.

So, it would be nice to omit the "describe cluster" output with an option so that only the machine status list is being displayed. Or - maybe better - make this the default as the command name "cluster machine ls" suggests it anyway, and add an option to include the "describe cluster" output.

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

No branches or pull requests

1 participant