Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Add filter positional argument to clusters list #52

Merged
merged 2 commits into from
Aug 13, 2019
Merged

Add filter positional argument to clusters list #52

merged 2 commits into from
Aug 13, 2019

Conversation

cblecker
Copy link
Contributor

@cblecker cblecker commented Aug 9, 2019

If there is a positional argument, use it as a name or ID filter. Compatible with the --managed flag too.

Copy link
Collaborator

@jhernand jhernand left a comment

Choose a reason for hiding this comment

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

Looks good. Just a very minor suggestion about comments.

@ALimaRedHat please take a look.

cmd/uhc/cluster/list/list.go Outdated Show resolved Hide resolved
Short: "List clusters",
Long: "List clusters by ID and Name",
Run: run,
Args: cobra.RangeArgs(0, 1),
RunE: run,
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change to RunE is nice. Is there any chance that you can do the same in all the other commands?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Absolutely. Would that be better done in a follow up PR though (as to not balloon the size of this PR)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, sure. A separate PR is better.

Copy link
Collaborator

@jhernand jhernand left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @cblecker. I will wait a bit for @ALimaRedHat to review.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Looks good to me too

@jhernand jhernand merged commit d634ed4 into openshift-online:master Aug 13, 2019
@cblecker cblecker deleted the cluster-list-search branch August 13, 2019 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants