remove registry from testing/fixture.go; update client-gen to not use

registry in the generated clients

Kubernetes-commit: bbb94e42c108840c540c5667f8da97c33b81d84a
This commit is contained in:
Chao Xu
2017-04-29 15:43:28 -07:00
committed by Kubernetes Publisher
parent ede4e68eb7
commit 85c50f4ccb
2 changed files with 118 additions and 165 deletions

View File

@@ -47,20 +47,22 @@ func NewGetAction(resource schema.GroupVersionResource, namespace, name string)
return action
}
func NewRootListAction(resource schema.GroupVersionResource, opts interface{}) ListActionImpl {
func NewRootListAction(resource schema.GroupVersionResource, kind schema.GroupVersionKind, opts interface{}) ListActionImpl {
action := ListActionImpl{}
action.Verb = "list"
action.Resource = resource
action.Kind = kind
labelSelector, fieldSelector, _ := ExtractFromListOptions(opts)
action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector}
return action
}
func NewListAction(resource schema.GroupVersionResource, namespace string, opts interface{}) ListActionImpl {
func NewListAction(resource schema.GroupVersionResource, kind schema.GroupVersionKind, namespace string, opts interface{}) ListActionImpl {
action := ListActionImpl{}
action.Verb = "list"
action.Resource = resource
action.Kind = kind
action.Namespace = namespace
labelSelector, fieldSelector, _ := ExtractFromListOptions(opts)
action.ListRestrictions = ListRestrictions{labelSelector, fieldSelector}
@@ -375,9 +377,14 @@ func (a GetActionImpl) GetName() string {
type ListActionImpl struct {
ActionImpl
Kind schema.GroupVersionKind
ListRestrictions ListRestrictions
}
func (a ListActionImpl) GetKind() schema.GroupVersionKind {
return a.Kind
}
func (a ListActionImpl) GetListRestrictions() ListRestrictions {
return a.ListRestrictions
}