mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-01 23:31:51 +00:00
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:
committed by
Kubernetes Publisher
parent
ede4e68eb7
commit
85c50f4ccb
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user