Skip to content

Commit d5b5633

Browse files
mfojtikdeads2k
authored andcommittedNov 20, 2017
UPSTREAM: <carry>: update clientset generator for openshift groups
:100644 100644 e0d958fbf6... 8239bd5ea1... M cmd/client-gen/generators/client_generator.go :100644 100644 4054b577d4... f2e64d6c44... M cmd/informer-gen/generators/generic.go :100644 100644 593e56a2b5... 949fe74215... M cmd/informer-gen/generators/packages.go :100644 100644 9466e3cb07... 65e5ed6a59... M cmd/lister-gen/generators/lister.go
1 parent 599e804 commit d5b5633

File tree

4 files changed

+40
-12
lines changed

4 files changed

+40
-12
lines changed
 

Diff for: ‎cmd/client-gen/generators/client_generator.go

+34-9
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,29 @@ import (
3939
// NameSystems returns the name system used by the generators in this package.
4040
func NameSystems() namer.NameSystems {
4141
pluralExceptions := map[string]string{
42-
"Endpoints": "Endpoints",
42+
"Endpoints": "Endpoints",
43+
"SecurityContextConstraints": "SecurityContextConstraints",
4344
}
4445
lowercaseNamer := namer.NewAllLowercasePluralNamer(pluralExceptions)
4546

4647
publicNamer := &ExceptionNamer{
4748
Exceptions: map[string]string{
48-
// these exceptions are used to deconflict the generated code
49-
// you can put your fully qualified package like
50-
// to generate a name that doesn't conflict with your group.
51-
// "k8s.io/apis/events/v1alpha1.Event": "EventResource"
49+
// these exceptions are used to deconflict the generated code
50+
// you can put your fully qualified package like
51+
// to generate a name that doesn't conflict with your group.
52+
// "k8s.io/apis/events/v1alpha1.Event": "EventResource"
53+
"github.com/openshift/origin/pkg/build/apis/build/v1.Build": "BuildResource",
54+
"github.com/openshift/origin/pkg/build/apis/build.Build": "BuildResource",
55+
"github.com/openshift/origin/pkg/image/apis/image/v1.Image": "ImageResource",
56+
"github.com/openshift/origin/pkg/image/apis/image.Image": "ImageResource",
57+
"github.com/openshift/origin/pkg/project/apis/project/v1.Project": "ProjectResource",
58+
"github.com/openshift/origin/pkg/project/apis/project.Project": "ProjectResource",
59+
"github.com/openshift/origin/pkg/route/apis/route/v1.Route": "RouteResource",
60+
"github.com/openshift/origin/pkg/route/apis/route.Route": "RouteResource",
61+
"github.com/openshift/origin/pkg/template/apis/template/v1.Template": "TemplateResource",
62+
"github.com/openshift/origin/pkg/template/apis/template.Template": "TemplateResource",
63+
"github.com/openshift/origin/pkg/user/apis/user/v1.User": "UserResource",
64+
"github.com/openshift/origin/pkg/user/apis/user.User": "UserResource",
5265
},
5366
KeyFunc: func(t *types.Type) string {
5467
return t.Name.Package + "." + t.Name.Name
@@ -57,10 +70,22 @@ func NameSystems() namer.NameSystems {
5770
}
5871
privateNamer := &ExceptionNamer{
5972
Exceptions: map[string]string{
60-
// these exceptions are used to deconflict the generated code
61-
// you can put your fully qualified package like
62-
// to generate a name that doesn't conflict with your group.
63-
// "k8s.io/apis/events/v1alpha1.Event": "eventResource"
73+
// these exceptions are used to deconflict the generated code
74+
// you can put your fully qualified package like
75+
// to generate a name that doesn't conflict with your group.
76+
// "k8s.io/apis/events/v1alpha1.Event": "eventResource"
77+
"github.com/openshift/origin/pkg/build/apis/build/v1.Build": "buildResource",
78+
"github.com/openshift/origin/pkg/build/apis/build.Build": "buildResource",
79+
"github.com/openshift/origin/pkg/image/apis/image/v1.Image": "imageResource",
80+
"github.com/openshift/origin/pkg/image/apis/image.Image": "imageResource",
81+
"github.com/openshift/origin/pkg/project/apis/project/v1.Project": "projectResource",
82+
"github.com/openshift/origin/pkg/project/apis/project.Project": "projectResource",
83+
"github.com/openshift/origin/pkg/route/apis/route/v1.Route": "routeResource",
84+
"github.com/openshift/origin/pkg/route/apis/route.Route": "routeResource",
85+
"github.com/openshift/origin/pkg/template/apis/template/v1.Template": "templateResource",
86+
"github.com/openshift/origin/pkg/template/apis/template.Template": "templateResource",
87+
"github.com/openshift/origin/pkg/user/apis/user/v1.User": "userResource",
88+
"github.com/openshift/origin/pkg/user/apis/user.User": "userResource",
6489
},
6590
KeyFunc: func(t *types.Type) string {
6691
return t.Name.Package + "." + t.Name.Name

Diff for: ‎cmd/informer-gen/generators/generic.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ func (g *genericGenerator) Filter(c *generator.Context, t *types.Type) bool {
4949

5050
func (g *genericGenerator) Namers(c *generator.Context) namer.NameSystems {
5151
pluralExceptions := map[string]string{
52-
"Endpoints": "Endpoints",
52+
"Endpoints": "Endpoints",
53+
"SecurityContextConstraints": "SecurityContextConstraints",
5354
}
5455
return namer.NameSystems{
5556
"raw": namer.NewRawNamer(g.outputPackage, g.imports),

Diff for: ‎cmd/informer-gen/generators/packages.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ import (
3535
// NameSystems returns the name system used by the generators in this package.
3636
func NameSystems() namer.NameSystems {
3737
pluralExceptions := map[string]string{
38-
"Endpoints": "Endpoints",
38+
"Endpoints": "Endpoints",
39+
"SecurityContextConstraints": "SecurityContextConstraints",
3940
}
4041
return namer.NameSystems{
4142
"public": namer.NewPublicNamer(0),

Diff for: ‎cmd/lister-gen/generators/lister.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ import (
3636
// NameSystems returns the name system used by the generators in this package.
3737
func NameSystems() namer.NameSystems {
3838
pluralExceptions := map[string]string{
39-
"Endpoints": "Endpoints",
39+
"Endpoints": "Endpoints",
40+
"SecurityContextConstraints": "SecurityContextConstraints",
4041
}
4142
return namer.NameSystems{
4243
"public": namer.NewPublicNamer(0),

0 commit comments

Comments
 (0)
Please sign in to comment.