Skip to content

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

Description

@TLINDEN

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions