-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 Group kind #3909
add Group kind #3909
Conversation
bf0e575
to
efb80e7
Compare
@Kargakis you're on the card, how about a review? |
Get(name string) (*userapi.Group, error) | ||
Create(group *userapi.Group) (*userapi.Group, error) | ||
Update(group *userapi.Group) (*userapi.Group, error) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A method for deleting groups?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A method for deleting groups?
done
@@ -7,6 +7,63 @@ import ( | |||
"github.com/openshift/origin/pkg/user/api" | |||
) | |||
|
|||
func TestValidateGroup(t *testing.T) { | |||
validObj := func() *api.Group { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test invalid names in groups too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test invalid names in groups too
done
ba13626
to
ed670c6
Compare
@@ -2303,6 +2303,52 @@ func deepCopy_api_TemplateList(in templateapi.TemplateList, out *templateapi.Tem | |||
return nil | |||
} | |||
|
|||
func deepCopy_api_Group(in userapi.Group, out *userapi.Group, c *conversion.Cloner) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these automatically generated? How?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these automatically generated? How?
hack/update-generated-deep-copies.sh
Not sure what else needs tbd when adding a new resource. So far this code LGTM |
A few standards (json tags, descriptions, more?) are enforced via unit tests as well. Basically, if you expose things to the point of being available, unit tests will start to smack you until you're in good shape. |
Thanks! This post should be documented somewhere. |
22e0852
to
4cb6740
Compare
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/2846/) (Image: devenv-fedora_2062) |
Evaluated for origin up to f809414 |
Merged by openshift-bot
Adds the
Group
kind and thegroups
resource.@stevekuznetsov fyi