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

add oc create clusterquota #9588

Merged
merged 1 commit into from
Jun 29, 2016

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jun 27, 2016

Added shortcut for clusterresourcequota called clusterquota to match resourcequota to quota. Added create subcommand.

@derekwaynecarr this incorporates your comments from the previous pull. --project-selector --hard.

@deads2k
Copy link
Contributor Author

deads2k commented Jun 27, 2016

@enj ptal.

cmdutil.CheckErr(o.Validate())
cmdutil.CheckErr(o.Run())
},
Aliases: []string{"clusterquota"},
Copy link
Contributor

Choose a reason for hiding this comment

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

I would have this as the name and "clusterresourcequota" as a suggestion but that's just me conforming to kubectl conventions of no aliases. Nevermind that suggestions don't currently work for nested 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.

I would have this as the name and "clusterresourcequota" as a suggestion but that's just me conforming to kubectl conventions of no aliases. Nevermind that suggestions don't currently work for nested commands.

We've done this for short names before. See oc create deploymentconfig and oc create dc. Since the resource shortname is unambiguous I think this is more userfriendly.

@fabianofranz

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 29, 2016
@deads2k
Copy link
Contributor Author

deads2k commented Jun 29, 2016

@Kargakis anything else on this? Turns out its really handy :)

@0xmichalis
Copy link
Contributor

No, LGTM

@deads2k deads2k force-pushed the cq-04-create-command branch from 6549bac to ee5e6a8 Compare June 29, 2016 12:15
@deads2k
Copy link
Contributor Author

deads2k commented Jun 29, 2016

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 29, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5543/) (Image: devenv-rhel7_4486)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to ee5e6a8

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to ee5e6a8

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/5543/)

@openshift-bot openshift-bot merged commit ec2c6ff into openshift:master Jun 29, 2016
return nil
}

func (o *CreateClusterQuotaOptions) Validate() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Validate and Run should be non-pointers method, if following the kubectl conventions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Validate and Run should be non-pointers method, if following the kubectl conventions.

That's of less utility when your struct contains multiple pointers itself.

Copy link
Contributor

Choose a reason for hiding this comment

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

The idea is that you should setup whatever needed in Complete and the others should just use it without ever touching them.

@soltysh
Copy link
Contributor

soltysh commented Jun 29, 2016

As usual, me too late ;)

@deads2k
Copy link
Contributor Author

deads2k commented Jun 29, 2016

The checks are needed to cover delegation cases. That's why the messages there match the fields.

@deads2k deads2k deleted the cq-04-create-command branch September 6, 2016 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants