Commit 092b2cc0 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #31994 from caesarxuchao/client-gen-versioned-options

Automatic merge from submit-queue [Client-gen] Let versioned client use versioned options i.e., use v1.ListOptions, v1.DeleteOptions when possible. Remove the extension/v1beta1.ListOptions, because it's exactly the same as v1.ListOptions, and is not referred throughout the code base. After its removal, I register v1.ListOptions during extensions/v1beta1 scheme registration. First three commits are manual changes. Fix #27753 cc @lavalamp
parents 457d3785 a3861b9c
...@@ -88,6 +88,7 @@ func packageForGroup(gv unversioned.GroupVersion, typeList []*types.Type, packag ...@@ -88,6 +88,7 @@ func packageForGroup(gv unversioned.GroupVersion, typeList []*types.Type, packag
}, },
outputPackage: outputPackagePath, outputPackage: outputPackagePath,
group: normalization.BeforeFirstDot(gv.Group), group: normalization.BeforeFirstDot(gv.Group),
version: gv.Version,
typeToMatch: t, typeToMatch: t,
imports: generator.NewImportTracker(), imports: generator.NewImportTracker(),
}) })
......
...@@ -110,8 +110,6 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. ...@@ -110,8 +110,6 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io.
"groupName": groupName, "groupName": groupName,
"version": canonicalVersion, "version": canonicalVersion,
"watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/watch", Name: "Interface"}), "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/watch", Name: "Interface"}),
"apiDeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"}),
"apiListOptions": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"}),
"GroupVersionResource": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/unversioned", Name: "GroupVersionResource"}), "GroupVersionResource": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/unversioned", Name: "GroupVersionResource"}),
"PatchType": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "PatchType"}), "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "PatchType"}),
"Everything": c.Universe.Function(types.Name{Package: "k8s.io/kubernetes/pkg/labels", Name: "Everything"}), "Everything": c.Universe.Function(types.Name{Package: "k8s.io/kubernetes/pkg/labels", Name: "Everything"}),
...@@ -136,6 +134,15 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io. ...@@ -136,6 +134,15 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io.
"NewPatchAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewPatchAction"}), "NewPatchAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewPatchAction"}),
"NewRootPatchSubresourceAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewRootPatchSubresourceAction"}), "NewRootPatchSubresourceAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewRootPatchSubresourceAction"}),
"NewPatchSubresourceAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewPatchSubresourceAction"}), "NewPatchSubresourceAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewPatchSubresourceAction"}),
"ExtractFromListOptions": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "ExtractFromListOptions"}),
}
if g.version == "unversioned" {
m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"})
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"})
} else {
m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "DeleteOptions"})
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "ListOptions"})
} }
noMethods := extractBoolTagOrDie("noMethods", t.SecondClosestCommentLines) == true noMethods := extractBoolTagOrDie("noMethods", t.SecondClosestCommentLines) == true
...@@ -191,7 +198,7 @@ var $.type|allLowercasePlural$Resource = $.GroupVersionResource|raw${Group: "$.g ...@@ -191,7 +198,7 @@ var $.type|allLowercasePlural$Resource = $.GroupVersionResource|raw${Group: "$.g
` `
var listTemplate = ` var listTemplate = `
func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.type|raw$List, err error) { func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type|raw$List, err error) {
obj, err := c.Fake. obj, err := c.Fake.
$if .namespaced$Invokes($.NewListAction|raw$($.type|allLowercasePlural$Resource, c.ns, opts), &$.type|raw$List{}) $if .namespaced$Invokes($.NewListAction|raw$($.type|allLowercasePlural$Resource, c.ns, opts), &$.type|raw$List{})
$else$Invokes($.NewRootListAction|raw$($.type|allLowercasePlural$Resource, opts), &$.type|raw$List{})$end$ $else$Invokes($.NewRootListAction|raw$($.type|allLowercasePlural$Resource, opts), &$.type|raw$List{})$end$
...@@ -203,7 +210,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.t ...@@ -203,7 +210,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.t
` `
var listUsingOptionsTemplate = ` var listUsingOptionsTemplate = `
func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.type|raw$List, err error) { func (c *Fake$.type|publicPlural$) List(opts $.ListOptions|raw$) (result *$.type|raw$List, err error) {
obj, err := c.Fake. obj, err := c.Fake.
$if .namespaced$Invokes($.NewListAction|raw$($.type|allLowercasePlural$Resource, c.ns, opts), &$.type|raw$List{}) $if .namespaced$Invokes($.NewListAction|raw$($.type|allLowercasePlural$Resource, c.ns, opts), &$.type|raw$List{})
$else$Invokes($.NewRootListAction|raw$($.type|allLowercasePlural$Resource, opts), &$.type|raw$List{})$end$ $else$Invokes($.NewRootListAction|raw$($.type|allLowercasePlural$Resource, opts), &$.type|raw$List{})$end$
...@@ -211,7 +218,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.t ...@@ -211,7 +218,7 @@ func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.t
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := $.ExtractFromListOptions|raw$(opts)
if label == nil { if label == nil {
label = $.Everything|raw$() label = $.Everything|raw$()
} }
...@@ -238,7 +245,7 @@ func (c *Fake$.type|publicPlural$) Get(name string) (result *$.type|raw$, err er ...@@ -238,7 +245,7 @@ func (c *Fake$.type|publicPlural$) Get(name string) (result *$.type|raw$, err er
` `
var deleteTemplate = ` var deleteTemplate = `
func (c *Fake$.type|publicPlural$) Delete(name string, options *$.apiDeleteOptions|raw$) error { func (c *Fake$.type|publicPlural$) Delete(name string, options *$.DeleteOptions|raw$) error {
_, err := c.Fake. _, err := c.Fake.
$if .namespaced$Invokes($.NewDeleteAction|raw$($.type|allLowercasePlural$Resource, c.ns, name), &$.type|raw${}) $if .namespaced$Invokes($.NewDeleteAction|raw$($.type|allLowercasePlural$Resource, c.ns, name), &$.type|raw${})
$else$Invokes($.NewRootDeleteAction|raw$($.type|allLowercasePlural$Resource, name), &$.type|raw${})$end$ $else$Invokes($.NewRootDeleteAction|raw$($.type|allLowercasePlural$Resource, name), &$.type|raw${})$end$
...@@ -247,7 +254,7 @@ func (c *Fake$.type|publicPlural$) Delete(name string, options *$.apiDeleteOptio ...@@ -247,7 +254,7 @@ func (c *Fake$.type|publicPlural$) Delete(name string, options *$.apiDeleteOptio
` `
var deleteCollectionTemplate = ` var deleteCollectionTemplate = `
func (c *Fake$.type|publicPlural$) DeleteCollection(options *$.apiDeleteOptions|raw$, listOptions $.apiListOptions|raw$) error { func (c *Fake$.type|publicPlural$) DeleteCollection(options *$.DeleteOptions|raw$, listOptions $.ListOptions|raw$) error {
$if .namespaced$action := $.NewDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, c.ns, listOptions) $if .namespaced$action := $.NewDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, c.ns, listOptions)
$else$action := $.NewRootDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, listOptions) $else$action := $.NewRootDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, listOptions)
$end$ $end$
...@@ -294,7 +301,7 @@ func (c *Fake$.type|publicPlural$) UpdateStatus($.type|private$ *$.type|raw$) (* ...@@ -294,7 +301,7 @@ func (c *Fake$.type|publicPlural$) UpdateStatus($.type|private$ *$.type|raw$) (*
var watchTemplate = ` var watchTemplate = `
// Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. // Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$.
func (c *Fake$.type|publicPlural$) Watch(opts $.apiListOptions|raw$) ($.watchInterface|raw$, error) { func (c *Fake$.type|publicPlural$) Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error) {
return c.Fake. return c.Fake.
$if .namespaced$InvokesWatch($.NewWatchAction|raw$($.type|allLowercasePlural$Resource, c.ns, opts)) $if .namespaced$InvokesWatch($.NewWatchAction|raw$($.type|allLowercasePlural$Resource, c.ns, opts))
$else$InvokesWatch($.NewRootWatchAction|raw$($.type|allLowercasePlural$Resource, opts))$end$ $else$InvokesWatch($.NewRootWatchAction|raw$($.type|allLowercasePlural$Resource, opts))$end$
......
...@@ -31,6 +31,7 @@ type genClientForType struct { ...@@ -31,6 +31,7 @@ type genClientForType struct {
generator.DefaultGen generator.DefaultGen
outputPackage string outputPackage string
group string group string
version string
typeToMatch *types.Type typeToMatch *types.Type
imports namer.ImportTracker imports namer.ImportTracker
} }
...@@ -73,13 +74,19 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i ...@@ -73,13 +74,19 @@ func (g *genClientForType) GenerateType(c *generator.Context, t *types.Type, w i
"Package": namer.IC(pkg), "Package": namer.IC(pkg),
"Group": namer.IC(g.group), "Group": namer.IC(g.group),
"watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/watch", Name: "Interface"}), "watchInterface": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/watch", Name: "Interface"}),
"apiDeleteOptions": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"}),
"apiListOptions": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"}),
"apiParameterCodec": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ParameterCodec"}), "apiParameterCodec": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ParameterCodec"}),
"PatchType": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "PatchType"}), "PatchType": c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "PatchType"}),
"namespaced": namespaced, "namespaced": namespaced,
} }
if g.version == "unversioned" {
m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "DeleteOptions"})
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api", Name: "ListOptions"})
} else {
m["DeleteOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "DeleteOptions"})
m["ListOptions"] = c.Universe.Type(types.Name{Package: "k8s.io/kubernetes/pkg/api/v1", Name: "ListOptions"})
}
sw.Do(getterComment, m) sw.Do(getterComment, m)
if namespaced { if namespaced {
sw.Do(getterNamesapced, m) sw.Do(getterNamesapced, m)
...@@ -156,11 +163,11 @@ var interfaceUpdateStatusTemplate = ` ...@@ -156,11 +163,11 @@ var interfaceUpdateStatusTemplate = `
// template for the Interface // template for the Interface
var interfaceTemplate3 = ` var interfaceTemplate3 = `
Delete(name string, options *$.apiDeleteOptions|raw$) error Delete(name string, options *$.DeleteOptions|raw$) error
DeleteCollection(options *$.apiDeleteOptions|raw$, listOptions $.apiListOptions|raw$) error DeleteCollection(options *$.DeleteOptions|raw$, listOptions $.ListOptions|raw$) error
Get(name string) (*$.type|raw$, error) Get(name string) (*$.type|raw$, error)
List(opts $.apiListOptions|raw$) (*$.type|raw$List, error) List(opts $.ListOptions|raw$) (*$.type|raw$List, error)
Watch(opts $.apiListOptions|raw$) ($.watchInterface|raw$, error) Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error)
Patch(name string, pt $.PatchType|raw$, data []byte, subresources ...string) (result *$.type|raw$, err error)` Patch(name string, pt $.PatchType|raw$, data []byte, subresources ...string) (result *$.type|raw$, err error)`
var interfaceTemplate4 = ` var interfaceTemplate4 = `
...@@ -206,7 +213,7 @@ func new$.type|publicPlural$(c *$.Group$Client) *$.type|privatePlural$ { ...@@ -206,7 +213,7 @@ func new$.type|publicPlural$(c *$.Group$Client) *$.type|privatePlural$ {
var listTemplate = ` var listTemplate = `
// List takes label and field selectors, and returns the list of $.type|publicPlural$ that match those selectors. // List takes label and field selectors, and returns the list of $.type|publicPlural$ that match those selectors.
func (c *$.type|privatePlural$) List(opts $.apiListOptions|raw$) (result *$.type|raw$List, err error) { func (c *$.type|privatePlural$) List(opts $.ListOptions|raw$) (result *$.type|raw$List, err error) {
result = &$.type|raw$List{} result = &$.type|raw$List{}
err = c.client.Get(). err = c.client.Get().
$if .namespaced$Namespace(c.ns).$end$ $if .namespaced$Namespace(c.ns).$end$
...@@ -233,7 +240,7 @@ func (c *$.type|privatePlural$) Get(name string) (result *$.type|raw$, err error ...@@ -233,7 +240,7 @@ func (c *$.type|privatePlural$) Get(name string) (result *$.type|raw$, err error
var deleteTemplate = ` var deleteTemplate = `
// Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs. // Delete takes name of the $.type|private$ and deletes it. Returns an error if one occurs.
func (c *$.type|privatePlural$) Delete(name string, options *$.apiDeleteOptions|raw$) error { func (c *$.type|privatePlural$) Delete(name string, options *$.DeleteOptions|raw$) error {
return c.client.Delete(). return c.client.Delete().
$if .namespaced$Namespace(c.ns).$end$ $if .namespaced$Namespace(c.ns).$end$
Resource("$.type|allLowercasePlural$"). Resource("$.type|allLowercasePlural$").
...@@ -246,7 +253,7 @@ func (c *$.type|privatePlural$) Delete(name string, options *$.apiDeleteOptions| ...@@ -246,7 +253,7 @@ func (c *$.type|privatePlural$) Delete(name string, options *$.apiDeleteOptions|
var deleteCollectionTemplate = ` var deleteCollectionTemplate = `
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *$.type|privatePlural$) DeleteCollection(options *$.apiDeleteOptions|raw$, listOptions $.apiListOptions|raw$) error { func (c *$.type|privatePlural$) DeleteCollection(options *$.DeleteOptions|raw$, listOptions $.ListOptions|raw$) error {
return c.client.Delete(). return c.client.Delete().
$if .namespaced$Namespace(c.ns).$end$ $if .namespaced$Namespace(c.ns).$end$
Resource("$.type|allLowercasePlural$"). Resource("$.type|allLowercasePlural$").
...@@ -303,7 +310,7 @@ func (c *$.type|privatePlural$) UpdateStatus($.type|private$ *$.type|raw$) (resu ...@@ -303,7 +310,7 @@ func (c *$.type|privatePlural$) UpdateStatus($.type|private$ *$.type|raw$) (resu
var watchTemplate = ` var watchTemplate = `
// Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$. // Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$.
func (c *$.type|privatePlural$) Watch(opts $.apiListOptions|raw$) ($.watchInterface|raw$, error) { func (c *$.type|privatePlural$) Watch(opts $.ListOptions|raw$) ($.watchInterface|raw$, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
$if .namespaced$Namespace(c.ns).$end$ $if .namespaced$Namespace(c.ns).$end$
......
...@@ -95,7 +95,7 @@ func (c *FakeTestTypes) List(opts api.ListOptions) (result *testgroup_k8s_io.Tes ...@@ -95,7 +95,7 @@ func (c *FakeTestTypes) List(opts api.ListOptions) (result *testgroup_k8s_io.Tes
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -84,7 +84,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err erro ...@@ -84,7 +84,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err erro
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -87,7 +87,7 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList, ...@@ -87,7 +87,7 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList,
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -84,7 +84,7 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err er ...@@ -84,7 +84,7 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err er
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -94,7 +94,7 @@ func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err ...@@ -94,7 +94,7 @@ func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressLi ...@@ -95,7 +95,7 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressLi
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.Replica ...@@ -95,7 +95,7 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.Replica
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -88,7 +88,7 @@ func (c *FakeClusters) List(opts api.ListOptions) (result *federation.ClusterLis ...@@ -88,7 +88,7 @@ func (c *FakeClusters) List(opts api.ListOptions) (result *federation.ClusterLis
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -32,11 +32,11 @@ type EventsGetter interface { ...@@ -32,11 +32,11 @@ type EventsGetter interface {
type EventInterface interface { type EventInterface interface {
Create(*v1.Event) (*v1.Event, error) Create(*v1.Event) (*v1.Event, error)
Update(*v1.Event) (*v1.Event, error) Update(*v1.Event) (*v1.Event, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1.Event, error) Get(name string) (*v1.Event, error)
List(opts api.ListOptions) (*v1.EventList, error) List(opts v1.ListOptions) (*v1.EventList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
EventExpansion EventExpansion
} }
...@@ -81,7 +81,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) { ...@@ -81,7 +81,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) {
} }
// Delete takes name of the event and deletes it. Returns an error if one occurs. // Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *events) Delete(name string, options *api.DeleteOptions) error { func (c *events) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("events"). Resource("events").
...@@ -92,7 +92,7 @@ func (c *events) Delete(name string, options *api.DeleteOptions) error { ...@@ -92,7 +92,7 @@ func (c *events) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("events"). Resource("events").
...@@ -115,7 +115,7 @@ func (c *events) Get(name string) (result *v1.Event, err error) { ...@@ -115,7 +115,7 @@ func (c *events) Get(name string) (result *v1.Event, err error) {
} }
// List takes label and field selectors, and returns the list of Events that match those selectors. // List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *events) List(opts api.ListOptions) (result *v1.EventList, err error) { func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) {
result = &v1.EventList{} result = &v1.EventList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -127,7 +127,7 @@ func (c *events) List(opts api.ListOptions) (result *v1.EventList, err error) { ...@@ -127,7 +127,7 @@ func (c *events) List(opts api.ListOptions) (result *v1.EventList, err error) {
} }
// Watch returns a watch.Interface that watches the requested events. // Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -53,14 +53,14 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) { ...@@ -53,14 +53,14 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
return obj.(*v1.Event), err return obj.(*v1.Event), err
} }
func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error { func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{}) Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{})
return err return err
} }
func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.EventList{}) _, err := c.Fake.Invokes(action, &v1.EventList{})
...@@ -77,7 +77,7 @@ func (c *FakeEvents) Get(name string) (result *v1.Event, err error) { ...@@ -77,7 +77,7 @@ func (c *FakeEvents) Get(name string) (result *v1.Event, err error) {
return obj.(*v1.Event), err return obj.(*v1.Event), err
} }
func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error) { func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{}) Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{})
...@@ -85,7 +85,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error ...@@ -85,7 +85,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -99,7 +99,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error ...@@ -99,7 +99,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error
} }
// Watch returns a watch.Interface that watches the requested events. // Watch returns a watch.Interface that watches the requested events.
func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))
......
...@@ -59,13 +59,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e ...@@ -59,13 +59,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e
return obj.(*v1.Namespace), err return obj.(*v1.Namespace), err
} }
func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error { func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{}) Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{})
return err return err
} }
func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions) action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1.NamespaceList{}) _, err := c.Fake.Invokes(action, &v1.NamespaceList{})
...@@ -81,14 +81,14 @@ func (c *FakeNamespaces) Get(name string) (result *v1.Namespace, err error) { ...@@ -81,14 +81,14 @@ func (c *FakeNamespaces) Get(name string) (result *v1.Namespace, err error) {
return obj.(*v1.Namespace), err return obj.(*v1.Namespace), err
} }
func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err error) { func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{}) Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -102,7 +102,7 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, e ...@@ -102,7 +102,7 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, e
} }
// Watch returns a watch.Interface that watches the requested namespaces. // Watch returns a watch.Interface that watches the requested namespaces.
func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewRootWatchAction(namespacesResource, opts)) InvokesWatch(core.NewRootWatchAction(namespacesResource, opts))
} }
......
...@@ -53,14 +53,14 @@ func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { ...@@ -53,14 +53,14 @@ func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
return obj.(*v1.Secret), err return obj.(*v1.Secret), err
} }
func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error { func (c *FakeSecrets) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &v1.Secret{}) Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &v1.Secret{})
return err return err
} }
func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeSecrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.SecretList{}) _, err := c.Fake.Invokes(action, &v1.SecretList{})
...@@ -77,7 +77,7 @@ func (c *FakeSecrets) Get(name string) (result *v1.Secret, err error) { ...@@ -77,7 +77,7 @@ func (c *FakeSecrets) Get(name string) (result *v1.Secret, err error) {
return obj.(*v1.Secret), err return obj.(*v1.Secret), err
} }
func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err error) { func (c *FakeSecrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{}) Invokes(core.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{})
...@@ -85,7 +85,7 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err err ...@@ -85,7 +85,7 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err err
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -99,7 +99,7 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err err ...@@ -99,7 +99,7 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err err
} }
// Watch returns a watch.Interface that watches the requested secrets. // Watch returns a watch.Interface that watches the requested secrets.
func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeSecrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts))
......
...@@ -63,14 +63,14 @@ func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) { ...@@ -63,14 +63,14 @@ func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) {
return obj.(*v1.Service), err return obj.(*v1.Service), err
} }
func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error { func (c *FakeServices) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &v1.Service{}) Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &v1.Service{})
return err return err
} }
func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeServices) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.ServiceList{}) _, err := c.Fake.Invokes(action, &v1.ServiceList{})
...@@ -87,7 +87,7 @@ func (c *FakeServices) Get(name string) (result *v1.Service, err error) { ...@@ -87,7 +87,7 @@ func (c *FakeServices) Get(name string) (result *v1.Service, err error) {
return obj.(*v1.Service), err return obj.(*v1.Service), err
} }
func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err error) { func (c *FakeServices) List(opts v1.ListOptions) (result *v1.ServiceList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{}) Invokes(core.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{})
...@@ -95,7 +95,7 @@ func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err e ...@@ -95,7 +95,7 @@ func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err e
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -109,7 +109,7 @@ func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err e ...@@ -109,7 +109,7 @@ func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err e
} }
// Watch returns a watch.Interface that watches the requested services. // Watch returns a watch.Interface that watches the requested services.
func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeServices) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts))
......
...@@ -33,11 +33,11 @@ type NamespaceInterface interface { ...@@ -33,11 +33,11 @@ type NamespaceInterface interface {
Create(*v1.Namespace) (*v1.Namespace, error) Create(*v1.Namespace) (*v1.Namespace, error)
Update(*v1.Namespace) (*v1.Namespace, error) Update(*v1.Namespace) (*v1.Namespace, error)
UpdateStatus(*v1.Namespace) (*v1.Namespace, error) UpdateStatus(*v1.Namespace) (*v1.Namespace, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1.Namespace, error) Get(name string) (*v1.Namespace, error)
List(opts api.ListOptions) (*v1.NamespaceList, error) List(opts v1.ListOptions) (*v1.NamespaceList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Namespace, err error)
NamespaceExpansion NamespaceExpansion
} }
...@@ -90,7 +90,7 @@ func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace ...@@ -90,7 +90,7 @@ func (c *namespaces) UpdateStatus(namespace *v1.Namespace) (result *v1.Namespace
} }
// Delete takes name of the namespace and deletes it. Returns an error if one occurs. // Delete takes name of the namespace and deletes it. Returns an error if one occurs.
func (c *namespaces) Delete(name string, options *api.DeleteOptions) error { func (c *namespaces) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("namespaces"). Resource("namespaces").
Name(name). Name(name).
...@@ -100,7 +100,7 @@ func (c *namespaces) Delete(name string, options *api.DeleteOptions) error { ...@@ -100,7 +100,7 @@ func (c *namespaces) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *namespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *namespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("namespaces"). Resource("namespaces").
VersionedParams(&listOptions, api.ParameterCodec). VersionedParams(&listOptions, api.ParameterCodec).
...@@ -121,7 +121,7 @@ func (c *namespaces) Get(name string) (result *v1.Namespace, err error) { ...@@ -121,7 +121,7 @@ func (c *namespaces) Get(name string) (result *v1.Namespace, err error) {
} }
// List takes label and field selectors, and returns the list of Namespaces that match those selectors. // List takes label and field selectors, and returns the list of Namespaces that match those selectors.
func (c *namespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err error) { func (c *namespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) {
result = &v1.NamespaceList{} result = &v1.NamespaceList{}
err = c.client.Get(). err = c.client.Get().
Resource("namespaces"). Resource("namespaces").
...@@ -132,7 +132,7 @@ func (c *namespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err e ...@@ -132,7 +132,7 @@ func (c *namespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err e
} }
// Watch returns a watch.Interface that watches the requested namespaces. // Watch returns a watch.Interface that watches the requested namespaces.
func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *namespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Resource("namespaces"). Resource("namespaces").
......
...@@ -32,11 +32,11 @@ type SecretsGetter interface { ...@@ -32,11 +32,11 @@ type SecretsGetter interface {
type SecretInterface interface { type SecretInterface interface {
Create(*v1.Secret) (*v1.Secret, error) Create(*v1.Secret) (*v1.Secret, error)
Update(*v1.Secret) (*v1.Secret, error) Update(*v1.Secret) (*v1.Secret, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1.Secret, error) Get(name string) (*v1.Secret, error)
List(opts api.ListOptions) (*v1.SecretList, error) List(opts v1.ListOptions) (*v1.SecretList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Secret, err error)
SecretExpansion SecretExpansion
} }
...@@ -81,7 +81,7 @@ func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) { ...@@ -81,7 +81,7 @@ func (c *secrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
} }
// Delete takes name of the secret and deletes it. Returns an error if one occurs. // Delete takes name of the secret and deletes it. Returns an error if one occurs.
func (c *secrets) Delete(name string, options *api.DeleteOptions) error { func (c *secrets) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("secrets"). Resource("secrets").
...@@ -92,7 +92,7 @@ func (c *secrets) Delete(name string, options *api.DeleteOptions) error { ...@@ -92,7 +92,7 @@ func (c *secrets) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *secrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *secrets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("secrets"). Resource("secrets").
...@@ -115,7 +115,7 @@ func (c *secrets) Get(name string) (result *v1.Secret, err error) { ...@@ -115,7 +115,7 @@ func (c *secrets) Get(name string) (result *v1.Secret, err error) {
} }
// List takes label and field selectors, and returns the list of Secrets that match those selectors. // List takes label and field selectors, and returns the list of Secrets that match those selectors.
func (c *secrets) List(opts api.ListOptions) (result *v1.SecretList, err error) { func (c *secrets) List(opts v1.ListOptions) (result *v1.SecretList, err error) {
result = &v1.SecretList{} result = &v1.SecretList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -127,7 +127,7 @@ func (c *secrets) List(opts api.ListOptions) (result *v1.SecretList, err error) ...@@ -127,7 +127,7 @@ func (c *secrets) List(opts api.ListOptions) (result *v1.SecretList, err error)
} }
// Watch returns a watch.Interface that watches the requested secrets. // Watch returns a watch.Interface that watches the requested secrets.
func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *secrets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -33,11 +33,11 @@ type ServiceInterface interface { ...@@ -33,11 +33,11 @@ type ServiceInterface interface {
Create(*v1.Service) (*v1.Service, error) Create(*v1.Service) (*v1.Service, error)
Update(*v1.Service) (*v1.Service, error) Update(*v1.Service) (*v1.Service, error)
UpdateStatus(*v1.Service) (*v1.Service, error) UpdateStatus(*v1.Service) (*v1.Service, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1.Service, error) Get(name string) (*v1.Service, error)
List(opts api.ListOptions) (*v1.ServiceList, error) List(opts v1.ListOptions) (*v1.ServiceList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Service, err error)
ServiceExpansion ServiceExpansion
} }
...@@ -95,7 +95,7 @@ func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err er ...@@ -95,7 +95,7 @@ func (c *services) UpdateStatus(service *v1.Service) (result *v1.Service, err er
} }
// Delete takes name of the service and deletes it. Returns an error if one occurs. // Delete takes name of the service and deletes it. Returns an error if one occurs.
func (c *services) Delete(name string, options *api.DeleteOptions) error { func (c *services) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("services"). Resource("services").
...@@ -106,7 +106,7 @@ func (c *services) Delete(name string, options *api.DeleteOptions) error { ...@@ -106,7 +106,7 @@ func (c *services) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *services) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *services) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("services"). Resource("services").
...@@ -129,7 +129,7 @@ func (c *services) Get(name string) (result *v1.Service, err error) { ...@@ -129,7 +129,7 @@ func (c *services) Get(name string) (result *v1.Service, err error) {
} }
// List takes label and field selectors, and returns the list of Services that match those selectors. // List takes label and field selectors, and returns the list of Services that match those selectors.
func (c *services) List(opts api.ListOptions) (result *v1.ServiceList, err error) { func (c *services) List(opts v1.ListOptions) (result *v1.ServiceList, err error) {
result = &v1.ServiceList{} result = &v1.ServiceList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -141,7 +141,7 @@ func (c *services) List(opts api.ListOptions) (result *v1.ServiceList, err error ...@@ -141,7 +141,7 @@ func (c *services) List(opts api.ListOptions) (result *v1.ServiceList, err error
} }
// Watch returns a watch.Interface that watches the requested services. // Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *services) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -19,6 +19,7 @@ package fake ...@@ -19,6 +19,7 @@ package fake
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
core "k8s.io/kubernetes/pkg/client/testing/core" core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels" labels "k8s.io/kubernetes/pkg/labels"
...@@ -63,14 +64,14 @@ func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress ...@@ -63,14 +64,14 @@ func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress
return obj.(*v1beta1.Ingress), err return obj.(*v1beta1.Ingress), err
} }
func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error { func (c *FakeIngresses) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(ingressesResource, c.ns, name), &v1beta1.Ingress{}) Invokes(core.NewDeleteAction(ingressesResource, c.ns, name), &v1beta1.Ingress{})
return err return err
} }
func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeIngresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.IngressList{}) _, err := c.Fake.Invokes(action, &v1beta1.IngressList{})
...@@ -87,7 +88,7 @@ func (c *FakeIngresses) Get(name string) (result *v1beta1.Ingress, err error) { ...@@ -87,7 +88,7 @@ func (c *FakeIngresses) Get(name string) (result *v1beta1.Ingress, err error) {
return obj.(*v1beta1.Ingress), err return obj.(*v1beta1.Ingress), err
} }
func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList, err error) { func (c *FakeIngresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(ingressesResource, c.ns, opts), &v1beta1.IngressList{}) Invokes(core.NewListAction(ingressesResource, c.ns, opts), &v1beta1.IngressList{})
...@@ -95,7 +96,7 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList, ...@@ -95,7 +96,7 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList,
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -109,7 +110,7 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList, ...@@ -109,7 +110,7 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList,
} }
// Watch returns a watch.Interface that watches the requested ingresses. // Watch returns a watch.Interface that watches the requested ingresses.
func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeIngresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts))
......
...@@ -19,6 +19,7 @@ package fake ...@@ -19,6 +19,7 @@ package fake
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
core "k8s.io/kubernetes/pkg/client/testing/core" core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels" labels "k8s.io/kubernetes/pkg/labels"
...@@ -63,14 +64,14 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1 ...@@ -63,14 +64,14 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1
return obj.(*v1beta1.ReplicaSet), err return obj.(*v1beta1.ReplicaSet), err
} }
func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error { func (c *FakeReplicaSets) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{}) Invokes(core.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{})
return err return err
} }
func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeReplicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.ReplicaSetList{}) _, err := c.Fake.Invokes(action, &v1beta1.ReplicaSetList{})
...@@ -87,7 +88,7 @@ func (c *FakeReplicaSets) Get(name string) (result *v1beta1.ReplicaSet, err erro ...@@ -87,7 +88,7 @@ func (c *FakeReplicaSets) Get(name string) (result *v1beta1.ReplicaSet, err erro
return obj.(*v1beta1.ReplicaSet), err return obj.(*v1beta1.ReplicaSet), err
} }
func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSetList, err error) { func (c *FakeReplicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(replicasetsResource, c.ns, opts), &v1beta1.ReplicaSetList{}) Invokes(core.NewListAction(replicasetsResource, c.ns, opts), &v1beta1.ReplicaSetList{})
...@@ -95,7 +96,7 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSet ...@@ -95,7 +96,7 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSet
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -109,7 +110,7 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSet ...@@ -109,7 +110,7 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSet
} }
// Watch returns a watch.Interface that watches the requested replicaSets. // Watch returns a watch.Interface that watches the requested replicaSets.
func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeReplicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts))
......
...@@ -18,6 +18,7 @@ package v1beta1 ...@@ -18,6 +18,7 @@ package v1beta1
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
watch "k8s.io/kubernetes/pkg/watch" watch "k8s.io/kubernetes/pkg/watch"
) )
...@@ -33,11 +34,11 @@ type IngressInterface interface { ...@@ -33,11 +34,11 @@ type IngressInterface interface {
Create(*v1beta1.Ingress) (*v1beta1.Ingress, error) Create(*v1beta1.Ingress) (*v1beta1.Ingress, error)
Update(*v1beta1.Ingress) (*v1beta1.Ingress, error) Update(*v1beta1.Ingress) (*v1beta1.Ingress, error)
UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error) UpdateStatus(*v1beta1.Ingress) (*v1beta1.Ingress, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1beta1.Ingress, error) Get(name string) (*v1beta1.Ingress, error)
List(opts api.ListOptions) (*v1beta1.IngressList, error) List(opts v1.ListOptions) (*v1beta1.IngressList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Ingress, err error)
IngressExpansion IngressExpansion
} }
...@@ -95,7 +96,7 @@ func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingr ...@@ -95,7 +96,7 @@ func (c *ingresses) UpdateStatus(ingress *v1beta1.Ingress) (result *v1beta1.Ingr
} }
// Delete takes name of the ingress and deletes it. Returns an error if one occurs. // Delete takes name of the ingress and deletes it. Returns an error if one occurs.
func (c *ingresses) Delete(name string, options *api.DeleteOptions) error { func (c *ingresses) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("ingresses"). Resource("ingresses").
...@@ -106,7 +107,7 @@ func (c *ingresses) Delete(name string, options *api.DeleteOptions) error { ...@@ -106,7 +107,7 @@ func (c *ingresses) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *ingresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *ingresses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("ingresses"). Resource("ingresses").
...@@ -129,7 +130,7 @@ func (c *ingresses) Get(name string) (result *v1beta1.Ingress, err error) { ...@@ -129,7 +130,7 @@ func (c *ingresses) Get(name string) (result *v1beta1.Ingress, err error) {
} }
// List takes label and field selectors, and returns the list of Ingresses that match those selectors. // List takes label and field selectors, and returns the list of Ingresses that match those selectors.
func (c *ingresses) List(opts api.ListOptions) (result *v1beta1.IngressList, err error) { func (c *ingresses) List(opts v1.ListOptions) (result *v1beta1.IngressList, err error) {
result = &v1beta1.IngressList{} result = &v1beta1.IngressList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -141,7 +142,7 @@ func (c *ingresses) List(opts api.ListOptions) (result *v1beta1.IngressList, err ...@@ -141,7 +142,7 @@ func (c *ingresses) List(opts api.ListOptions) (result *v1beta1.IngressList, err
} }
// Watch returns a watch.Interface that watches the requested ingresses. // Watch returns a watch.Interface that watches the requested ingresses.
func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *ingresses) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -18,6 +18,7 @@ package v1beta1 ...@@ -18,6 +18,7 @@ package v1beta1
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1" v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
watch "k8s.io/kubernetes/pkg/watch" watch "k8s.io/kubernetes/pkg/watch"
) )
...@@ -33,11 +34,11 @@ type ReplicaSetInterface interface { ...@@ -33,11 +34,11 @@ type ReplicaSetInterface interface {
Create(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) Create(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
Update(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) Update(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) UpdateStatus(*v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1beta1.ReplicaSet, error) Get(name string) (*v1beta1.ReplicaSet, error)
List(opts api.ListOptions) (*v1beta1.ReplicaSetList, error) List(opts v1.ListOptions) (*v1beta1.ReplicaSetList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error)
ReplicaSetExpansion ReplicaSetExpansion
} }
...@@ -95,7 +96,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (result *v1be ...@@ -95,7 +96,7 @@ func (c *replicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (result *v1be
} }
// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs. // Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error { func (c *replicaSets) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
...@@ -106,7 +107,7 @@ func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error { ...@@ -106,7 +107,7 @@ func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *replicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *replicaSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("replicasets"). Resource("replicasets").
...@@ -129,7 +130,7 @@ func (c *replicaSets) Get(name string) (result *v1beta1.ReplicaSet, err error) { ...@@ -129,7 +130,7 @@ func (c *replicaSets) Get(name string) (result *v1beta1.ReplicaSet, err error) {
} }
// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors. // List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
func (c *replicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSetList, err error) { func (c *replicaSets) List(opts v1.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
result = &v1beta1.ReplicaSetList{} result = &v1beta1.ReplicaSetList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -141,7 +142,7 @@ func (c *replicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSetList ...@@ -141,7 +142,7 @@ func (c *replicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSetList
} }
// Watch returns a watch.Interface that watches the requested replicaSets. // Watch returns a watch.Interface that watches the requested replicaSets.
func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *replicaSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -19,6 +19,7 @@ package v1beta1 ...@@ -19,6 +19,7 @@ package v1beta1
import ( import (
v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1"
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
watch "k8s.io/kubernetes/pkg/watch" watch "k8s.io/kubernetes/pkg/watch"
) )
...@@ -33,11 +34,11 @@ type ClusterInterface interface { ...@@ -33,11 +34,11 @@ type ClusterInterface interface {
Create(*v1beta1.Cluster) (*v1beta1.Cluster, error) Create(*v1beta1.Cluster) (*v1beta1.Cluster, error)
Update(*v1beta1.Cluster) (*v1beta1.Cluster, error) Update(*v1beta1.Cluster) (*v1beta1.Cluster, error)
UpdateStatus(*v1beta1.Cluster) (*v1beta1.Cluster, error) UpdateStatus(*v1beta1.Cluster) (*v1beta1.Cluster, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1beta1.Cluster, error) Get(name string) (*v1beta1.Cluster, error)
List(opts api.ListOptions) (*v1beta1.ClusterList, error) List(opts v1.ListOptions) (*v1beta1.ClusterList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Cluster, err error)
ClusterExpansion ClusterExpansion
} }
...@@ -90,7 +91,7 @@ func (c *clusters) UpdateStatus(cluster *v1beta1.Cluster) (result *v1beta1.Clust ...@@ -90,7 +91,7 @@ func (c *clusters) UpdateStatus(cluster *v1beta1.Cluster) (result *v1beta1.Clust
} }
// Delete takes name of the cluster and deletes it. Returns an error if one occurs. // Delete takes name of the cluster and deletes it. Returns an error if one occurs.
func (c *clusters) Delete(name string, options *api.DeleteOptions) error { func (c *clusters) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("clusters"). Resource("clusters").
Name(name). Name(name).
...@@ -100,7 +101,7 @@ func (c *clusters) Delete(name string, options *api.DeleteOptions) error { ...@@ -100,7 +101,7 @@ func (c *clusters) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *clusters) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *clusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("clusters"). Resource("clusters").
VersionedParams(&listOptions, api.ParameterCodec). VersionedParams(&listOptions, api.ParameterCodec).
...@@ -121,7 +122,7 @@ func (c *clusters) Get(name string) (result *v1beta1.Cluster, err error) { ...@@ -121,7 +122,7 @@ func (c *clusters) Get(name string) (result *v1beta1.Cluster, err error) {
} }
// List takes label and field selectors, and returns the list of Clusters that match those selectors. // List takes label and field selectors, and returns the list of Clusters that match those selectors.
func (c *clusters) List(opts api.ListOptions) (result *v1beta1.ClusterList, err error) { func (c *clusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, err error) {
result = &v1beta1.ClusterList{} result = &v1beta1.ClusterList{}
err = c.client.Get(). err = c.client.Get().
Resource("clusters"). Resource("clusters").
...@@ -132,7 +133,7 @@ func (c *clusters) List(opts api.ListOptions) (result *v1beta1.ClusterList, err ...@@ -132,7 +133,7 @@ func (c *clusters) List(opts api.ListOptions) (result *v1beta1.ClusterList, err
} }
// Watch returns a watch.Interface that watches the requested clusters. // Watch returns a watch.Interface that watches the requested clusters.
func (c *clusters) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *clusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Resource("clusters"). Resource("clusters").
......
...@@ -20,6 +20,7 @@ import ( ...@@ -20,6 +20,7 @@ import (
v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1"
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
v1 "k8s.io/kubernetes/pkg/api/v1"
core "k8s.io/kubernetes/pkg/client/testing/core" core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels" labels "k8s.io/kubernetes/pkg/labels"
watch "k8s.io/kubernetes/pkg/watch" watch "k8s.io/kubernetes/pkg/watch"
...@@ -59,13 +60,13 @@ func (c *FakeClusters) UpdateStatus(cluster *v1beta1.Cluster) (*v1beta1.Cluster, ...@@ -59,13 +60,13 @@ func (c *FakeClusters) UpdateStatus(cluster *v1beta1.Cluster) (*v1beta1.Cluster,
return obj.(*v1beta1.Cluster), err return obj.(*v1beta1.Cluster), err
} }
func (c *FakeClusters) Delete(name string, options *api.DeleteOptions) error { func (c *FakeClusters) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewRootDeleteAction(clustersResource, name), &v1beta1.Cluster{}) Invokes(core.NewRootDeleteAction(clustersResource, name), &v1beta1.Cluster{})
return err return err
} }
func (c *FakeClusters) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeClusters) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(clustersResource, listOptions) action := core.NewRootDeleteCollectionAction(clustersResource, listOptions)
_, err := c.Fake.Invokes(action, &v1beta1.ClusterList{}) _, err := c.Fake.Invokes(action, &v1beta1.ClusterList{})
...@@ -81,14 +82,14 @@ func (c *FakeClusters) Get(name string) (result *v1beta1.Cluster, err error) { ...@@ -81,14 +82,14 @@ func (c *FakeClusters) Get(name string) (result *v1beta1.Cluster, err error) {
return obj.(*v1beta1.Cluster), err return obj.(*v1beta1.Cluster), err
} }
func (c *FakeClusters) List(opts api.ListOptions) (result *v1beta1.ClusterList, err error) { func (c *FakeClusters) List(opts v1.ListOptions) (result *v1beta1.ClusterList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewRootListAction(clustersResource, opts), &v1beta1.ClusterList{}) Invokes(core.NewRootListAction(clustersResource, opts), &v1beta1.ClusterList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -102,7 +103,7 @@ func (c *FakeClusters) List(opts api.ListOptions) (result *v1beta1.ClusterList, ...@@ -102,7 +103,7 @@ func (c *FakeClusters) List(opts api.ListOptions) (result *v1beta1.ClusterList,
} }
// Watch returns a watch.Interface that watches the requested clusters. // Watch returns a watch.Interface that watches the requested clusters.
func (c *FakeClusters) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeClusters) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewRootWatchAction(clustersResource, opts)) InvokesWatch(core.NewRootWatchAction(clustersResource, opts))
} }
......
...@@ -24,7 +24,9 @@ import ( ...@@ -24,7 +24,9 @@ import (
federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1" federation_v1beta1 "k8s.io/kubernetes/federation/apis/federation/v1beta1"
cluster_cache "k8s.io/kubernetes/federation/client/cache" cluster_cache "k8s.io/kubernetes/federation/client/cache"
federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_5" federationclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_5"
"k8s.io/kubernetes/federation/pkg/federation-controller/util"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
"k8s.io/kubernetes/pkg/client/cache" "k8s.io/kubernetes/pkg/client/cache"
"k8s.io/kubernetes/pkg/controller" "k8s.io/kubernetes/pkg/controller"
"k8s.io/kubernetes/pkg/runtime" "k8s.io/kubernetes/pkg/runtime"
...@@ -65,10 +67,12 @@ func NewclusterController(federationClient federationclientset.Interface, cluste ...@@ -65,10 +67,12 @@ func NewclusterController(federationClient federationclientset.Interface, cluste
cc.clusterStore.Store, cc.clusterController = cache.NewInformer( cc.clusterStore.Store, cc.clusterController = cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (runtime.Object, error) { ListFunc: func(options api.ListOptions) (runtime.Object, error) {
return cc.federationClient.Federation().Clusters().List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return cc.federationClient.Federation().Clusters().List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return cc.federationClient.Federation().Clusters().Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return cc.federationClient.Federation().Clusters().Watch(versionedOptions)
}, },
}, },
&federation_v1beta1.Cluster{}, &federation_v1beta1.Cluster{},
...@@ -134,7 +138,7 @@ func (cc *ClusterController) GetClusterStatus(cluster *federation_v1beta1.Cluste ...@@ -134,7 +138,7 @@ func (cc *ClusterController) GetClusterStatus(cluster *federation_v1beta1.Cluste
// UpdateClusterStatus checks cluster status and get the metrics from cluster's restapi // UpdateClusterStatus checks cluster status and get the metrics from cluster's restapi
func (cc *ClusterController) UpdateClusterStatus() error { func (cc *ClusterController) UpdateClusterStatus() error {
clusters, err := cc.federationClient.Federation().Clusters().List(api.ListOptions{}) clusters, err := cc.federationClient.Federation().Clusters().List(v1.ListOptions{})
if err != nil { if err != nil {
return err return err
} }
......
...@@ -127,10 +127,12 @@ func NewIngressController(client federationclientset.Interface) *IngressControll ...@@ -127,10 +127,12 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
ic.ingressInformerStore, ic.ingressInformerController = cache.NewInformer( ic.ingressInformerStore, ic.ingressInformerController = cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return client.Extensions().Ingresses(api.NamespaceAll).List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return client.Extensions().Ingresses(api.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return client.Extensions().Ingresses(api.NamespaceAll).Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return client.Extensions().Ingresses(api.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&extensions_v1beta1.Ingress{}, &extensions_v1beta1.Ingress{},
...@@ -148,10 +150,12 @@ func NewIngressController(client federationclientset.Interface) *IngressControll ...@@ -148,10 +150,12 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
return cache.NewInformer( return cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return targetClient.Extensions().Ingresses(api.NamespaceAll).List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return targetClient.Extensions().Ingresses(api.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return targetClient.Extensions().Ingresses(api.NamespaceAll).Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return targetClient.Extensions().Ingresses(api.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&extensions_v1beta1.Ingress{}, &extensions_v1beta1.Ingress{},
...@@ -184,13 +188,15 @@ func NewIngressController(client federationclientset.Interface) *IngressControll ...@@ -184,13 +188,15 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
if targetClient == nil { if targetClient == nil {
glog.Errorf("Internal error: targetClient is nil") glog.Errorf("Internal error: targetClient is nil")
} }
return targetClient.Core().ConfigMaps(uidConfigMapNamespace).List(options) // we only want to list one by name - unfortunately Kubernetes don't have a selector for that. versionedOptions := util.VersionizeV1ListOptions(options)
return targetClient.Core().ConfigMaps(uidConfigMapNamespace).List(versionedOptions) // we only want to list one by name - unfortunately Kubernetes don't have a selector for that.
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
if targetClient == nil { if targetClient == nil {
glog.Errorf("Internal error: targetClient is nil") glog.Errorf("Internal error: targetClient is nil")
} }
return targetClient.Core().ConfigMaps(uidConfigMapNamespace).Watch(options) // as above versionedOptions := util.VersionizeV1ListOptions(options)
return targetClient.Core().ConfigMaps(uidConfigMapNamespace).Watch(versionedOptions) // as above
}, },
}, },
&v1.ConfigMap{}, &v1.ConfigMap{},
...@@ -238,7 +244,7 @@ func NewIngressController(client federationclientset.Interface) *IngressControll ...@@ -238,7 +244,7 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
func(client kubeclientset.Interface, obj pkg_runtime.Object) error { func(client kubeclientset.Interface, obj pkg_runtime.Object) error {
ingress := obj.(*extensions_v1beta1.Ingress) ingress := obj.(*extensions_v1beta1.Ingress)
glog.V(4).Infof("Attempting to delete Ingress: %v", ingress) glog.V(4).Infof("Attempting to delete Ingress: %v", ingress)
err := client.Extensions().Ingresses(ingress.Namespace).Delete(ingress.Name, &api.DeleteOptions{}) err := client.Extensions().Ingresses(ingress.Namespace).Delete(ingress.Name, &v1.DeleteOptions{})
return err return err
}) })
...@@ -267,7 +273,7 @@ func NewIngressController(client federationclientset.Interface) *IngressControll ...@@ -267,7 +273,7 @@ func NewIngressController(client federationclientset.Interface) *IngressControll
configMap := obj.(*v1.ConfigMap) configMap := obj.(*v1.ConfigMap)
configMapName := types.NamespacedName{Name: configMap.Name, Namespace: configMap.Namespace} configMapName := types.NamespacedName{Name: configMap.Name, Namespace: configMap.Namespace}
glog.Errorf("Internal error: Incorrectly attempting to delete ConfigMap: %q", configMapName) glog.Errorf("Internal error: Incorrectly attempting to delete ConfigMap: %q", configMapName)
err := client.Core().ConfigMaps(configMap.Namespace).Delete(configMap.Name, &api.DeleteOptions{}) err := client.Core().ConfigMaps(configMap.Namespace).Delete(configMap.Name, &v1.DeleteOptions{})
return err return err
}) })
return ic return ic
......
...@@ -102,10 +102,12 @@ func NewNamespaceController(client federationclientset.Interface) *NamespaceCont ...@@ -102,10 +102,12 @@ func NewNamespaceController(client federationclientset.Interface) *NamespaceCont
nc.namespaceInformerStore, nc.namespaceInformerController = cache.NewInformer( nc.namespaceInformerStore, nc.namespaceInformerController = cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return client.Core().Namespaces().List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return client.Core().Namespaces().List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return client.Core().Namespaces().Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return client.Core().Namespaces().Watch(versionedOptions)
}, },
}, },
&api_v1.Namespace{}, &api_v1.Namespace{},
...@@ -119,10 +121,12 @@ func NewNamespaceController(client federationclientset.Interface) *NamespaceCont ...@@ -119,10 +121,12 @@ func NewNamespaceController(client federationclientset.Interface) *NamespaceCont
return cache.NewInformer( return cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return targetClient.Core().Namespaces().List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return targetClient.Core().Namespaces().List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return targetClient.Core().Namespaces().Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return targetClient.Core().Namespaces().Watch(versionedOptions)
}, },
}, },
&api_v1.Namespace{}, &api_v1.Namespace{},
...@@ -156,7 +160,7 @@ func NewNamespaceController(client federationclientset.Interface) *NamespaceCont ...@@ -156,7 +160,7 @@ func NewNamespaceController(client federationclientset.Interface) *NamespaceCont
}, },
func(client kubeclientset.Interface, obj pkg_runtime.Object) error { func(client kubeclientset.Interface, obj pkg_runtime.Object) error {
namespace := obj.(*api_v1.Namespace) namespace := obj.(*api_v1.Namespace)
err := client.Core().Namespaces().Delete(namespace.Name, &api.DeleteOptions{}) err := client.Core().Namespaces().Delete(namespace.Name, &api_v1.DeleteOptions{})
return err return err
}) })
return nc return nc
...@@ -345,23 +349,23 @@ func (nc *NamespaceController) delete(namespace *api_v1.Namespace) error { ...@@ -345,23 +349,23 @@ func (nc *NamespaceController) delete(namespace *api_v1.Namespace) error {
// Right now there is just 5 types of objects: ReplicaSet, Secret, Ingress, Events and Service. // Right now there is just 5 types of objects: ReplicaSet, Secret, Ingress, Events and Service.
// Temporarly these items are simply deleted one by one to squeeze this code into 1.4. // Temporarly these items are simply deleted one by one to squeeze this code into 1.4.
// TODO: Make it generic (like in the regular namespace controller) and parallel. // TODO: Make it generic (like in the regular namespace controller) and parallel.
err := nc.federatedApiClient.Core().Services(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) err := nc.federatedApiClient.Core().Services(namespace.Name).DeleteCollection(&api_v1.DeleteOptions{}, api_v1.ListOptions{})
if err != nil { if err != nil {
return fmt.Errorf("failed to delete service list: %v", err) return fmt.Errorf("failed to delete service list: %v", err)
} }
err = nc.federatedApiClient.Extensions().ReplicaSets(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) err = nc.federatedApiClient.Extensions().ReplicaSets(namespace.Name).DeleteCollection(&api_v1.DeleteOptions{}, api_v1.ListOptions{})
if err != nil { if err != nil {
return fmt.Errorf("failed to delete replicaset list from namespace: %v", err) return fmt.Errorf("failed to delete replicaset list from namespace: %v", err)
} }
err = nc.federatedApiClient.Core().Secrets(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) err = nc.federatedApiClient.Core().Secrets(namespace.Name).DeleteCollection(&api_v1.DeleteOptions{}, api_v1.ListOptions{})
if err != nil { if err != nil {
return fmt.Errorf("failed to delete secret list from namespace: %v", err) return fmt.Errorf("failed to delete secret list from namespace: %v", err)
} }
err = nc.federatedApiClient.Extensions().Ingresses(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) err = nc.federatedApiClient.Extensions().Ingresses(namespace.Name).DeleteCollection(&api_v1.DeleteOptions{}, api_v1.ListOptions{})
if err != nil { if err != nil {
return fmt.Errorf("failed to delete ingresses list from namespace: %v", err) return fmt.Errorf("failed to delete ingresses list from namespace: %v", err)
} }
err = nc.federatedApiClient.Core().Events(namespace.Name).DeleteCollection(&api.DeleteOptions{}, api.ListOptions{}) err = nc.federatedApiClient.Core().Events(namespace.Name).DeleteCollection(&api_v1.DeleteOptions{}, api_v1.ListOptions{})
if err != nil { if err != nil {
return fmt.Errorf("failed to delete events list from namespace: %v", err) return fmt.Errorf("failed to delete events list from namespace: %v", err)
} }
...@@ -385,7 +389,7 @@ func (nc *NamespaceController) delete(namespace *api_v1.Namespace) error { ...@@ -385,7 +389,7 @@ func (nc *NamespaceController) delete(namespace *api_v1.Namespace) error {
} }
// TODO: What about namespaces in subclusters ??? // TODO: What about namespaces in subclusters ???
err = nc.federatedApiClient.Core().Namespaces().Delete(updatedNamespace.Name, &api.DeleteOptions{}) err = nc.federatedApiClient.Core().Namespaces().Delete(updatedNamespace.Name, &api_v1.DeleteOptions{})
if err != nil { if err != nil {
// Its all good if the error is not found error. That means it is deleted already and we do not have to do anything. // Its all good if the error is not found error. That means it is deleted already and we do not have to do anything.
// This is expected when we are processing an update as a result of namespace finalizer deletion. // This is expected when we are processing an update as a result of namespace finalizer deletion.
......
...@@ -121,10 +121,12 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe ...@@ -121,10 +121,12 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe
return cache.NewInformer( return cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (runtime.Object, error) { ListFunc: func(options api.ListOptions) (runtime.Object, error) {
return clientset.Extensions().ReplicaSets(apiv1.NamespaceAll).List(options) versionedOptions := fedutil.VersionizeV1ListOptions(options)
return clientset.Extensions().ReplicaSets(apiv1.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return clientset.Extensions().ReplicaSets(apiv1.NamespaceAll).Watch(options) versionedOptions := fedutil.VersionizeV1ListOptions(options)
return clientset.Extensions().ReplicaSets(apiv1.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&extensionsv1.ReplicaSet{}, &extensionsv1.ReplicaSet{},
...@@ -148,10 +150,12 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe ...@@ -148,10 +150,12 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe
return cache.NewInformer( return cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (runtime.Object, error) { ListFunc: func(options api.ListOptions) (runtime.Object, error) {
return clientset.Core().Pods(apiv1.NamespaceAll).List(options) versionedOptions := fedutil.VersionizeV1ListOptions(options)
return clientset.Core().Pods(apiv1.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return clientset.Core().Pods(apiv1.NamespaceAll).Watch(options) versionedOptions := fedutil.VersionizeV1ListOptions(options)
return clientset.Core().Pods(apiv1.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&apiv1.Pod{}, &apiv1.Pod{},
...@@ -168,10 +172,12 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe ...@@ -168,10 +172,12 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe
frsc.replicaSetStore.Store, frsc.replicaSetController = cache.NewInformer( frsc.replicaSetStore.Store, frsc.replicaSetController = cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (runtime.Object, error) { ListFunc: func(options api.ListOptions) (runtime.Object, error) {
return frsc.fedClient.Extensions().ReplicaSets(apiv1.NamespaceAll).List(options) versionedOptions := fedutil.VersionizeV1ListOptions(options)
return frsc.fedClient.Extensions().ReplicaSets(apiv1.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return frsc.fedClient.Extensions().ReplicaSets(apiv1.NamespaceAll).Watch(options) versionedOptions := fedutil.VersionizeV1ListOptions(options)
return frsc.fedClient.Extensions().ReplicaSets(apiv1.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&extensionsv1.ReplicaSet{}, &extensionsv1.ReplicaSet{},
...@@ -194,7 +200,7 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe ...@@ -194,7 +200,7 @@ func NewReplicaSetController(federationClient fedclientset.Interface) *ReplicaSe
}, },
func(client kubeclientset.Interface, obj runtime.Object) error { func(client kubeclientset.Interface, obj runtime.Object) error {
rs := obj.(*extensionsv1.ReplicaSet) rs := obj.(*extensionsv1.ReplicaSet)
err := client.Extensions().ReplicaSets(rs.Namespace).Delete(rs.Name, &api.DeleteOptions{}) err := client.Extensions().ReplicaSets(rs.Namespace).Delete(rs.Name, &apiv1.DeleteOptions{})
return err return err
}) })
......
...@@ -99,10 +99,12 @@ func NewSecretController(client federationclientset.Interface) *SecretController ...@@ -99,10 +99,12 @@ func NewSecretController(client federationclientset.Interface) *SecretController
secretcontroller.secretInformerStore, secretcontroller.secretInformerController = cache.NewInformer( secretcontroller.secretInformerStore, secretcontroller.secretInformerController = cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return client.Core().Secrets(api_v1.NamespaceAll).List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return client.Core().Secrets(api_v1.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return client.Core().Secrets(api_v1.NamespaceAll).Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return client.Core().Secrets(api_v1.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&api_v1.Secret{}, &api_v1.Secret{},
...@@ -116,10 +118,12 @@ func NewSecretController(client federationclientset.Interface) *SecretController ...@@ -116,10 +118,12 @@ func NewSecretController(client federationclientset.Interface) *SecretController
return cache.NewInformer( return cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return targetClient.Core().Secrets(api_v1.NamespaceAll).List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return targetClient.Core().Secrets(api_v1.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return targetClient.Core().Secrets(api_v1.NamespaceAll).Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return targetClient.Core().Secrets(api_v1.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&api_v1.Secret{}, &api_v1.Secret{},
...@@ -155,7 +159,7 @@ func NewSecretController(client federationclientset.Interface) *SecretController ...@@ -155,7 +159,7 @@ func NewSecretController(client federationclientset.Interface) *SecretController
}, },
func(client kubeclientset.Interface, obj pkg_runtime.Object) error { func(client kubeclientset.Interface, obj pkg_runtime.Object) error {
secret := obj.(*api_v1.Secret) secret := obj.(*api_v1.Secret)
err := client.Core().Secrets(secret.Namespace).Delete(secret.Name, &api.DeleteOptions{}) err := client.Core().Secrets(secret.Namespace).Delete(secret.Name, &api_v1.DeleteOptions{})
return err return err
}) })
return secretcontroller return secretcontroller
......
...@@ -93,10 +93,12 @@ func (cc *clusterClientCache) startClusterLW(cluster *v1beta1.Cluster, clusterNa ...@@ -93,10 +93,12 @@ func (cc *clusterClientCache) startClusterLW(cluster *v1beta1.Cluster, clusterNa
cachedClusterClient.endpointStore.Store, cachedClusterClient.endpointController = cache.NewInformer( cachedClusterClient.endpointStore.Store, cachedClusterClient.endpointController = cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return clientset.Core().Endpoints(v1.NamespaceAll).List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return clientset.Core().Endpoints(v1.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return clientset.Core().Endpoints(v1.NamespaceAll).Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return clientset.Core().Endpoints(v1.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&v1.Endpoints{}, &v1.Endpoints{},
...@@ -117,10 +119,12 @@ func (cc *clusterClientCache) startClusterLW(cluster *v1beta1.Cluster, clusterNa ...@@ -117,10 +119,12 @@ func (cc *clusterClientCache) startClusterLW(cluster *v1beta1.Cluster, clusterNa
cachedClusterClient.serviceStore.Indexer, cachedClusterClient.serviceController = cache.NewIndexerInformer( cachedClusterClient.serviceStore.Indexer, cachedClusterClient.serviceController = cache.NewIndexerInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return clientset.Core().Services(v1.NamespaceAll).List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return clientset.Core().Services(v1.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return clientset.Core().Services(v1.NamespaceAll).Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return clientset.Core().Services(v1.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&v1.Service{}, &v1.Service{},
......
...@@ -28,6 +28,7 @@ import ( ...@@ -28,6 +28,7 @@ import (
federationcache "k8s.io/kubernetes/federation/client/cache" federationcache "k8s.io/kubernetes/federation/client/cache"
fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_5" fedclientset "k8s.io/kubernetes/federation/client/clientset_generated/federation_release_1_5"
"k8s.io/kubernetes/federation/pkg/dnsprovider" "k8s.io/kubernetes/federation/pkg/dnsprovider"
"k8s.io/kubernetes/federation/pkg/federation-controller/util"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/api/errors"
v1 "k8s.io/kubernetes/pkg/api/v1" v1 "k8s.io/kubernetes/pkg/api/v1"
...@@ -159,10 +160,12 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface, fed ...@@ -159,10 +160,12 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface, fed
s.serviceStore.Indexer, s.serviceController = cache.NewIndexerInformer( s.serviceStore.Indexer, s.serviceController = cache.NewIndexerInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return s.federationClient.Core().Services(v1.NamespaceAll).List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return s.federationClient.Core().Services(v1.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return s.federationClient.Core().Services(v1.NamespaceAll).Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return s.federationClient.Core().Services(v1.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&v1.Service{}, &v1.Service{},
...@@ -182,10 +185,12 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface, fed ...@@ -182,10 +185,12 @@ func New(federationClient fedclientset.Interface, dns dnsprovider.Interface, fed
s.clusterStore.Store, s.clusterController = cache.NewInformer( s.clusterStore.Store, s.clusterController = cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return s.federationClient.Federation().Clusters().List(options) versionedOptions := util.VersionizeV1ListOptions(options)
return s.federationClient.Federation().Clusters().List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return s.federationClient.Federation().Clusters().Watch(options) versionedOptions := util.VersionizeV1ListOptions(options)
return s.federationClient.Federation().Clusters().Watch(versionedOptions)
}, },
}, },
&v1beta1.Cluster{}, &v1beta1.Cluster{},
...@@ -387,7 +392,7 @@ func (s *ServiceController) deleteClusterService(clusterName string, cachedServi ...@@ -387,7 +392,7 @@ func (s *ServiceController) deleteClusterService(clusterName string, cachedServi
glog.V(4).Infof("Deleting service %s/%s from cluster %s", service.Namespace, service.Name, clusterName) glog.V(4).Infof("Deleting service %s/%s from cluster %s", service.Namespace, service.Name, clusterName)
var err error var err error
for i := 0; i < clientRetryCount; i++ { for i := 0; i < clientRetryCount; i++ {
err = clientset.Core().Services(service.Namespace).Delete(service.Name, &api.DeleteOptions{}) err = clientset.Core().Services(service.Namespace).Delete(service.Name, &v1.DeleteOptions{})
if err == nil || errors.IsNotFound(err) { if err == nil || errors.IsNotFound(err) {
glog.V(4).Infof("Service %s/%s deleted from cluster %s", service.Namespace, service.Name, clusterName) glog.V(4).Infof("Service %s/%s deleted from cluster %s", service.Namespace, service.Name, clusterName)
delete(cachedService.endpointMap, clusterName) delete(cachedService.endpointMap, clusterName)
......
...@@ -156,10 +156,12 @@ func NewFederatedInformer( ...@@ -156,10 +156,12 @@ func NewFederatedInformer(
federatedInformer.clusterInformer.store, federatedInformer.clusterInformer.controller = cache.NewInformer( federatedInformer.clusterInformer.store, federatedInformer.clusterInformer.controller = cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) { ListFunc: func(options api.ListOptions) (pkg_runtime.Object, error) {
return federationClient.Federation().Clusters().List(options) versionedOptions := VersionizeV1ListOptions(options)
return federationClient.Federation().Clusters().List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return federationClient.Federation().Clusters().Watch(options) versionedOptions := VersionizeV1ListOptions(options)
return federationClient.Federation().Clusters().Watch(versionedOptions)
}, },
}, },
&federation_api.Cluster{}, &federation_api.Cluster{},
......
...@@ -82,10 +82,12 @@ func TestFederatedInformer(t *testing.T) { ...@@ -82,10 +82,12 @@ func TestFederatedInformer(t *testing.T) {
return cache.NewInformer( return cache.NewInformer(
&cache.ListWatch{ &cache.ListWatch{
ListFunc: func(options api.ListOptions) (runtime.Object, error) { ListFunc: func(options api.ListOptions) (runtime.Object, error) {
return clientset.Core().Services(api_v1.NamespaceAll).List(options) versionedOptions := VersionizeV1ListOptions(options)
return clientset.Core().Services(api_v1.NamespaceAll).List(versionedOptions)
}, },
WatchFunc: func(options api.ListOptions) (watch.Interface, error) { WatchFunc: func(options api.ListOptions) (watch.Interface, error) {
return clientset.Core().Services(api_v1.NamespaceAll).Watch(options) versionedOptions := VersionizeV1ListOptions(options)
return clientset.Core().Services(api_v1.NamespaceAll).Watch(versionedOptions)
}, },
}, },
&api_v1.Service{}, &api_v1.Service{},
......
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package util
import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
)
// TODO: remove this when Reflector takes an interface rather than a particular ListOptions as input parameter.
func VersionizeV1ListOptions(in api.ListOptions) (out v1.ListOptions) {
if in.LabelSelector != nil {
out.LabelSelector = in.LabelSelector.String()
} else {
out.LabelSelector = ""
}
if in.FieldSelector != nil {
out.FieldSelector = in.FieldSelector.String()
} else {
out.FieldSelector = ""
}
out.Watch = in.Watch
out.ResourceVersion = in.ResourceVersion
out.TimeoutSeconds = in.TimeoutSeconds
return out
}
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import "k8s.io/kubernetes/pkg/types"
// NewDeleteOptions returns a DeleteOptions indicating the resource should
// be deleted within the specified grace period. Use zero to indicate
// immediate deletion. If you would prefer to use the default grace period,
// use &v1.DeleteOptions{} directly.
func NewDeleteOptions(grace int64) *DeleteOptions {
return &DeleteOptions{GracePeriodSeconds: &grace}
}
// NewUIDPreconditions returns a Preconditions with UID set.
func NewUIDPreconditions(uid string) *Preconditions {
u := types.UID(uid)
return &Preconditions{UID: &u}
}
...@@ -603,28 +603,6 @@ message LabelSelectorRequirement { ...@@ -603,28 +603,6 @@ message LabelSelectorRequirement {
repeated string values = 3; repeated string values = 3;
} }
// ListOptions is the query options to a standard REST list call.
message ListOptions {
// A selector to restrict the list of returned objects by their labels.
// Defaults to everything.
optional string labelSelector = 1;
// A selector to restrict the list of returned objects by their fields.
// Defaults to everything.
optional string fieldSelector = 2;
// Watch for changes to the described resources and return them as a stream of
// add, update, and remove notifications. Specify resourceVersion.
optional bool watch = 3;
// When specified with a watch call, shows changes that occur after that particular version of a resource.
// Defaults to changes from the beginning of history.
optional string resourceVersion = 4;
// Timeout for the list/watch call.
optional int64 timeoutSeconds = 5;
}
message NetworkPolicy { message NetworkPolicy {
// Standard object's metadata. // Standard object's metadata.
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata // More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
......
...@@ -54,7 +54,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { ...@@ -54,7 +54,7 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&ThirdPartyResourceDataList{}, &ThirdPartyResourceDataList{},
&Ingress{}, &Ingress{},
&IngressList{}, &IngressList{},
&ListOptions{}, &v1.ListOptions{},
&v1.DeleteOptions{}, &v1.DeleteOptions{},
&ReplicaSet{}, &ReplicaSet{},
&ReplicaSetList{}, &ReplicaSetList{},
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -787,26 +787,6 @@ type ExportOptions struct { ...@@ -787,26 +787,6 @@ type ExportOptions struct {
Exact bool `json:"exact" protobuf:"varint,2,opt,name=exact"` Exact bool `json:"exact" protobuf:"varint,2,opt,name=exact"`
} }
// ListOptions is the query options to a standard REST list call.
type ListOptions struct {
unversioned.TypeMeta `json:",inline"`
// A selector to restrict the list of returned objects by their labels.
// Defaults to everything.
LabelSelector string `json:"labelSelector,omitempty" protobuf:"bytes,1,opt,name=labelSelector"`
// A selector to restrict the list of returned objects by their fields.
// Defaults to everything.
FieldSelector string `json:"fieldSelector,omitempty" protobuf:"bytes,2,opt,name=fieldSelector"`
// Watch for changes to the described resources and return them as a stream of
// add, update, and remove notifications. Specify resourceVersion.
Watch bool `json:"watch,omitempty" protobuf:"varint,3,opt,name=watch"`
// When specified with a watch call, shows changes that occur after that particular version of a resource.
// Defaults to changes from the beginning of history.
ResourceVersion string `json:"resourceVersion,omitempty" protobuf:"bytes,4,opt,name=resourceVersion"`
// Timeout for the list/watch call.
TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,5,opt,name=timeoutSeconds"`
}
// A label selector is a label query over a set of resources. The result of matchLabels and // A label selector is a label query over a set of resources. The result of matchLabels and
// matchExpressions are ANDed. An empty label selector matches all objects. A null // matchExpressions are ANDed. An empty label selector matches all objects. A null
// label selector matches no objects. // label selector matches no objects.
......
...@@ -443,19 +443,6 @@ func (LabelSelectorRequirement) SwaggerDoc() map[string]string { ...@@ -443,19 +443,6 @@ func (LabelSelectorRequirement) SwaggerDoc() map[string]string {
return map_LabelSelectorRequirement return map_LabelSelectorRequirement
} }
var map_ListOptions = map[string]string{
"": "ListOptions is the query options to a standard REST list call.",
"labelSelector": "A selector to restrict the list of returned objects by their labels. Defaults to everything.",
"fieldSelector": "A selector to restrict the list of returned objects by their fields. Defaults to everything.",
"watch": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.",
"resourceVersion": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.",
"timeoutSeconds": "Timeout for the list/watch call.",
}
func (ListOptions) SwaggerDoc() map[string]string {
return map_ListOptions
}
var map_NetworkPolicy = map[string]string{ var map_NetworkPolicy = map[string]string{
"metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata", "metadata": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata",
"spec": "Specification of the desired behavior for this NetworkPolicy.", "spec": "Specification of the desired behavior for this NetworkPolicy.",
......
...@@ -119,8 +119,6 @@ func RegisterConversions(scheme *runtime.Scheme) error { ...@@ -119,8 +119,6 @@ func RegisterConversions(scheme *runtime.Scheme) error {
Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector, Convert_unversioned_LabelSelector_To_v1beta1_LabelSelector,
Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement, Convert_v1beta1_LabelSelectorRequirement_To_unversioned_LabelSelectorRequirement,
Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement, Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement,
Convert_v1beta1_ListOptions_To_api_ListOptions,
Convert_api_ListOptions_To_v1beta1_ListOptions,
Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy, Convert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy,
Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy, Convert_extensions_NetworkPolicy_To_v1beta1_NetworkPolicy,
Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule, Convert_v1beta1_NetworkPolicyIngressRule_To_extensions_NetworkPolicyIngressRule,
...@@ -1598,46 +1596,6 @@ func Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequir ...@@ -1598,46 +1596,6 @@ func Convert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequir
return autoConvert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(in, out, s) return autoConvert_unversioned_LabelSelectorRequirement_To_v1beta1_LabelSelectorRequirement(in, out, s)
} }
func autoConvert_v1beta1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error {
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := api.Convert_string_To_labels_Selector(&in.LabelSelector, &out.LabelSelector, s); err != nil {
return err
}
if err := api.Convert_string_To_fields_Selector(&in.FieldSelector, &out.FieldSelector, s); err != nil {
return err
}
out.Watch = in.Watch
out.ResourceVersion = in.ResourceVersion
out.TimeoutSeconds = in.TimeoutSeconds
return nil
}
func Convert_v1beta1_ListOptions_To_api_ListOptions(in *ListOptions, out *api.ListOptions, s conversion.Scope) error {
return autoConvert_v1beta1_ListOptions_To_api_ListOptions(in, out, s)
}
func autoConvert_api_ListOptions_To_v1beta1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error {
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err
}
if err := api.Convert_labels_Selector_To_string(&in.LabelSelector, &out.LabelSelector, s); err != nil {
return err
}
if err := api.Convert_fields_Selector_To_string(&in.FieldSelector, &out.FieldSelector, s); err != nil {
return err
}
out.Watch = in.Watch
out.ResourceVersion = in.ResourceVersion
out.TimeoutSeconds = in.TimeoutSeconds
return nil
}
func Convert_api_ListOptions_To_v1beta1_ListOptions(in *api.ListOptions, out *ListOptions, s conversion.Scope) error {
return autoConvert_api_ListOptions_To_v1beta1_ListOptions(in, out, s)
}
func autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error { func autoConvert_v1beta1_NetworkPolicy_To_extensions_NetworkPolicy(in *NetworkPolicy, out *extensions.NetworkPolicy, s conversion.Scope) error {
SetDefaults_NetworkPolicy(in) SetDefaults_NetworkPolicy(in)
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
......
...@@ -78,7 +78,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error { ...@@ -78,7 +78,6 @@ func RegisterDeepCopies(scheme *runtime.Scheme) error {
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_JobStatus, InType: reflect.TypeOf(&JobStatus{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_JobStatus, InType: reflect.TypeOf(&JobStatus{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LabelSelector, InType: reflect.TypeOf(&LabelSelector{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_LabelSelectorRequirement, InType: reflect.TypeOf(&LabelSelectorRequirement{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_ListOptions, InType: reflect.TypeOf(&ListOptions{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicy, InType: reflect.TypeOf(&NetworkPolicy{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyIngressRule, InType: reflect.TypeOf(&NetworkPolicyIngressRule{})},
conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})}, conversion.GeneratedDeepCopyFunc{Fn: DeepCopy_v1beta1_NetworkPolicyList, InType: reflect.TypeOf(&NetworkPolicyList{})},
...@@ -881,26 +880,6 @@ func DeepCopy_v1beta1_LabelSelectorRequirement(in interface{}, out interface{}, ...@@ -881,26 +880,6 @@ func DeepCopy_v1beta1_LabelSelectorRequirement(in interface{}, out interface{},
} }
} }
func DeepCopy_v1beta1_ListOptions(in interface{}, out interface{}, c *conversion.Cloner) error {
{
in := in.(*ListOptions)
out := out.(*ListOptions)
out.TypeMeta = in.TypeMeta
out.LabelSelector = in.LabelSelector
out.FieldSelector = in.FieldSelector
out.Watch = in.Watch
out.ResourceVersion = in.ResourceVersion
if in.TimeoutSeconds != nil {
in, out := &in.TimeoutSeconds, &out.TimeoutSeconds
*out = new(int64)
**out = **in
} else {
out.TimeoutSeconds = nil
}
return nil
}
}
func DeepCopy_v1beta1_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error { func DeepCopy_v1beta1_NetworkPolicy(in interface{}, out interface{}, c *conversion.Cloner) error {
{ {
in := in.(*NetworkPolicy) in := in.(*NetworkPolicy)
......
...@@ -95,7 +95,7 @@ func (c *FakePetSets) List(opts api.ListOptions) (result *apps.PetSetList, err e ...@@ -95,7 +95,7 @@ func (c *FakePetSets) List(opts api.ListOptions) (result *apps.PetSetList, err e
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *autos ...@@ -95,7 +95,7 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *autos
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *batch.JobList, err error) ...@@ -95,7 +95,7 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *batch.JobList, err error)
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakeScheduledJobs) List(opts api.ListOptions) (result *batch.ScheduledJ ...@@ -95,7 +95,7 @@ func (c *FakeScheduledJobs) List(opts api.ListOptions) (result *batch.ScheduledJ
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -88,7 +88,7 @@ func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *cer ...@@ -88,7 +88,7 @@ func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *cer
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -78,7 +78,7 @@ func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.Componen ...@@ -78,7 +78,7 @@ func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.Componen
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -84,7 +84,7 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList, ...@@ -84,7 +84,7 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList,
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -84,7 +84,7 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *api.EndpointsList, e ...@@ -84,7 +84,7 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *api.EndpointsList, e
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -84,7 +84,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err erro ...@@ -84,7 +84,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err erro
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -84,7 +84,7 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *api.LimitRangeList ...@@ -84,7 +84,7 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *api.LimitRangeList
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -87,7 +87,7 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList, ...@@ -87,7 +87,7 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList,
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -87,7 +87,7 @@ func (c *FakeNodes) List(opts api.ListOptions) (result *api.NodeList, err error) ...@@ -87,7 +87,7 @@ func (c *FakeNodes) List(opts api.ListOptions) (result *api.NodeList, err error)
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -87,7 +87,7 @@ func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *api.Persiste ...@@ -87,7 +87,7 @@ func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *api.Persiste
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -94,7 +94,7 @@ func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *api.Per ...@@ -94,7 +94,7 @@ func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *api.Per
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -94,7 +94,7 @@ func (c *FakePods) List(opts api.ListOptions) (result *api.PodList, err error) { ...@@ -94,7 +94,7 @@ func (c *FakePods) List(opts api.ListOptions) (result *api.PodList, err error) {
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -84,7 +84,7 @@ func (c *FakePodTemplates) List(opts api.ListOptions) (result *api.PodTemplateLi ...@@ -84,7 +84,7 @@ func (c *FakePodTemplates) List(opts api.ListOptions) (result *api.PodTemplateLi
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -94,7 +94,7 @@ func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *api.Rep ...@@ -94,7 +94,7 @@ func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *api.Rep
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -94,7 +94,7 @@ func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuo ...@@ -94,7 +94,7 @@ func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuo
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -84,7 +84,7 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err er ...@@ -84,7 +84,7 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err er
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -94,7 +94,7 @@ func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err ...@@ -94,7 +94,7 @@ func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -84,7 +84,7 @@ func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *api.ServiceAcc ...@@ -84,7 +84,7 @@ func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *api.ServiceAcc
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSe ...@@ -95,7 +95,7 @@ func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSe
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.Deploym ...@@ -95,7 +95,7 @@ func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.Deploym
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressLi ...@@ -95,7 +95,7 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressLi
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -85,7 +85,7 @@ func (c *FakeNetworkPolicies) List(opts api.ListOptions) (result *extensions.Net ...@@ -85,7 +85,7 @@ func (c *FakeNetworkPolicies) List(opts api.ListOptions) (result *extensions.Net
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -79,7 +79,7 @@ func (c *FakePodSecurityPolicies) List(opts api.ListOptions) (result *extensions ...@@ -79,7 +79,7 @@ func (c *FakePodSecurityPolicies) List(opts api.ListOptions) (result *extensions
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.Replica ...@@ -95,7 +95,7 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.Replica
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -79,7 +79,7 @@ func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *extensions ...@@ -79,7 +79,7 @@ func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *extensions
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -95,7 +95,7 @@ func (c *FakePodDisruptionBudgets) List(opts api.ListOptions) (result *policy.Po ...@@ -95,7 +95,7 @@ func (c *FakePodDisruptionBudgets) List(opts api.ListOptions) (result *policy.Po
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -79,7 +79,7 @@ func (c *FakeClusterRoles) List(opts api.ListOptions) (result *rbac.ClusterRoleL ...@@ -79,7 +79,7 @@ func (c *FakeClusterRoles) List(opts api.ListOptions) (result *rbac.ClusterRoleL
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -79,7 +79,7 @@ func (c *FakeClusterRoleBindings) List(opts api.ListOptions) (result *rbac.Clust ...@@ -79,7 +79,7 @@ func (c *FakeClusterRoleBindings) List(opts api.ListOptions) (result *rbac.Clust
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -85,7 +85,7 @@ func (c *FakeRoles) List(opts api.ListOptions) (result *rbac.RoleList, err error ...@@ -85,7 +85,7 @@ func (c *FakeRoles) List(opts api.ListOptions) (result *rbac.RoleList, err error
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -85,7 +85,7 @@ func (c *FakeRoleBindings) List(opts api.ListOptions) (result *rbac.RoleBindingL ...@@ -85,7 +85,7 @@ func (c *FakeRoleBindings) List(opts api.ListOptions) (result *rbac.RoleBindingL
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -79,7 +79,7 @@ func (c *FakeStorageClasses) List(opts api.ListOptions) (result *storage.Storage ...@@ -79,7 +79,7 @@ func (c *FakeStorageClasses) List(opts api.ListOptions) (result *storage.Storage
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
......
...@@ -19,6 +19,7 @@ package fake ...@@ -19,6 +19,7 @@ package fake
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1alpha1 "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" v1alpha1 "k8s.io/kubernetes/pkg/apis/apps/v1alpha1"
core "k8s.io/kubernetes/pkg/client/testing/core" core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels" labels "k8s.io/kubernetes/pkg/labels"
...@@ -63,14 +64,14 @@ func (c *FakePetSets) UpdateStatus(petSet *v1alpha1.PetSet) (*v1alpha1.PetSet, e ...@@ -63,14 +64,14 @@ func (c *FakePetSets) UpdateStatus(petSet *v1alpha1.PetSet) (*v1alpha1.PetSet, e
return obj.(*v1alpha1.PetSet), err return obj.(*v1alpha1.PetSet), err
} }
func (c *FakePetSets) Delete(name string, options *api.DeleteOptions) error { func (c *FakePetSets) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(petsetsResource, c.ns, name), &v1alpha1.PetSet{}) Invokes(core.NewDeleteAction(petsetsResource, c.ns, name), &v1alpha1.PetSet{})
return err return err
} }
func (c *FakePetSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakePetSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(petsetsResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(petsetsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.PetSetList{}) _, err := c.Fake.Invokes(action, &v1alpha1.PetSetList{})
...@@ -87,7 +88,7 @@ func (c *FakePetSets) Get(name string) (result *v1alpha1.PetSet, err error) { ...@@ -87,7 +88,7 @@ func (c *FakePetSets) Get(name string) (result *v1alpha1.PetSet, err error) {
return obj.(*v1alpha1.PetSet), err return obj.(*v1alpha1.PetSet), err
} }
func (c *FakePetSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, err error) { func (c *FakePetSets) List(opts v1.ListOptions) (result *v1alpha1.PetSetList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(petsetsResource, c.ns, opts), &v1alpha1.PetSetList{}) Invokes(core.NewListAction(petsetsResource, c.ns, opts), &v1alpha1.PetSetList{})
...@@ -95,7 +96,7 @@ func (c *FakePetSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, e ...@@ -95,7 +96,7 @@ func (c *FakePetSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, e
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -109,7 +110,7 @@ func (c *FakePetSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, e ...@@ -109,7 +110,7 @@ func (c *FakePetSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, e
} }
// Watch returns a watch.Interface that watches the requested petSets. // Watch returns a watch.Interface that watches the requested petSets.
func (c *FakePetSets) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakePetSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(petsetsResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(petsetsResource, c.ns, opts))
......
...@@ -18,6 +18,7 @@ package v1alpha1 ...@@ -18,6 +18,7 @@ package v1alpha1
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1alpha1 "k8s.io/kubernetes/pkg/apis/apps/v1alpha1" v1alpha1 "k8s.io/kubernetes/pkg/apis/apps/v1alpha1"
watch "k8s.io/kubernetes/pkg/watch" watch "k8s.io/kubernetes/pkg/watch"
) )
...@@ -33,11 +34,11 @@ type PetSetInterface interface { ...@@ -33,11 +34,11 @@ type PetSetInterface interface {
Create(*v1alpha1.PetSet) (*v1alpha1.PetSet, error) Create(*v1alpha1.PetSet) (*v1alpha1.PetSet, error)
Update(*v1alpha1.PetSet) (*v1alpha1.PetSet, error) Update(*v1alpha1.PetSet) (*v1alpha1.PetSet, error)
UpdateStatus(*v1alpha1.PetSet) (*v1alpha1.PetSet, error) UpdateStatus(*v1alpha1.PetSet) (*v1alpha1.PetSet, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1alpha1.PetSet, error) Get(name string) (*v1alpha1.PetSet, error)
List(opts api.ListOptions) (*v1alpha1.PetSetList, error) List(opts v1.ListOptions) (*v1alpha1.PetSetList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PetSet, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PetSet, err error)
PetSetExpansion PetSetExpansion
} }
...@@ -95,7 +96,7 @@ func (c *petSets) UpdateStatus(petSet *v1alpha1.PetSet) (result *v1alpha1.PetSet ...@@ -95,7 +96,7 @@ func (c *petSets) UpdateStatus(petSet *v1alpha1.PetSet) (result *v1alpha1.PetSet
} }
// Delete takes name of the petSet and deletes it. Returns an error if one occurs. // Delete takes name of the petSet and deletes it. Returns an error if one occurs.
func (c *petSets) Delete(name string, options *api.DeleteOptions) error { func (c *petSets) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("petsets"). Resource("petsets").
...@@ -106,7 +107,7 @@ func (c *petSets) Delete(name string, options *api.DeleteOptions) error { ...@@ -106,7 +107,7 @@ func (c *petSets) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *petSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *petSets) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("petsets"). Resource("petsets").
...@@ -129,7 +130,7 @@ func (c *petSets) Get(name string) (result *v1alpha1.PetSet, err error) { ...@@ -129,7 +130,7 @@ func (c *petSets) Get(name string) (result *v1alpha1.PetSet, err error) {
} }
// List takes label and field selectors, and returns the list of PetSets that match those selectors. // List takes label and field selectors, and returns the list of PetSets that match those selectors.
func (c *petSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, err error) { func (c *petSets) List(opts v1.ListOptions) (result *v1alpha1.PetSetList, err error) {
result = &v1alpha1.PetSetList{} result = &v1alpha1.PetSetList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -141,7 +142,7 @@ func (c *petSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, err e ...@@ -141,7 +142,7 @@ func (c *petSets) List(opts api.ListOptions) (result *v1alpha1.PetSetList, err e
} }
// Watch returns a watch.Interface that watches the requested petSets. // Watch returns a watch.Interface that watches the requested petSets.
func (c *petSets) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *petSets) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -19,6 +19,7 @@ package fake ...@@ -19,6 +19,7 @@ package fake
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
api_v1 "k8s.io/kubernetes/pkg/api/v1"
v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
core "k8s.io/kubernetes/pkg/client/testing/core" core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels" labels "k8s.io/kubernetes/pkg/labels"
...@@ -63,14 +64,14 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1. ...@@ -63,14 +64,14 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.
return obj.(*v1.HorizontalPodAutoscaler), err return obj.(*v1.HorizontalPodAutoscaler), err
} }
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error { func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{}) Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1.HorizontalPodAutoscaler{})
return err return err
} }
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{}) _, err := c.Fake.Invokes(action, &v1.HorizontalPodAutoscalerList{})
...@@ -87,7 +88,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1.HorizontalPo ...@@ -87,7 +88,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1.HorizontalPo
return obj.(*v1.HorizontalPodAutoscaler), err return obj.(*v1.HorizontalPodAutoscaler), err
} }
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { func (c *FakeHorizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{}) Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1.HorizontalPodAutoscalerList{})
...@@ -95,7 +96,7 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.Ho ...@@ -95,7 +96,7 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.Ho
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -109,7 +110,7 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.Ho ...@@ -109,7 +110,7 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.Ho
} }
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeHorizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
......
...@@ -18,6 +18,7 @@ package v1 ...@@ -18,6 +18,7 @@ package v1
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
api_v1 "k8s.io/kubernetes/pkg/api/v1"
v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1" v1 "k8s.io/kubernetes/pkg/apis/autoscaling/v1"
watch "k8s.io/kubernetes/pkg/watch" watch "k8s.io/kubernetes/pkg/watch"
) )
...@@ -33,11 +34,11 @@ type HorizontalPodAutoscalerInterface interface { ...@@ -33,11 +34,11 @@ type HorizontalPodAutoscalerInterface interface {
Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) Create(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) Update(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error) UpdateStatus(*v1.HorizontalPodAutoscaler) (*v1.HorizontalPodAutoscaler, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *api_v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error
Get(name string) (*v1.HorizontalPodAutoscaler, error) Get(name string) (*v1.HorizontalPodAutoscaler, error)
List(opts api.ListOptions) (*v1.HorizontalPodAutoscalerList, error) List(opts api_v1.ListOptions) (*v1.HorizontalPodAutoscalerList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts api_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.HorizontalPodAutoscaler, err error)
HorizontalPodAutoscalerExpansion HorizontalPodAutoscalerExpansion
} }
...@@ -95,7 +96,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.Hori ...@@ -95,7 +96,7 @@ func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1.Hori
} }
// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs. // Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error { func (c *horizontalPodAutoscalers) Delete(name string, options *api_v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
...@@ -106,7 +107,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOption ...@@ -106,7 +107,7 @@ func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOption
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *horizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *horizontalPodAutoscalers) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("horizontalpodautoscalers"). Resource("horizontalpodautoscalers").
...@@ -129,7 +130,7 @@ func (c *horizontalPodAutoscalers) Get(name string) (result *v1.HorizontalPodAut ...@@ -129,7 +130,7 @@ func (c *horizontalPodAutoscalers) Get(name string) (result *v1.HorizontalPodAut
} }
// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors. // List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) { func (c *horizontalPodAutoscalers) List(opts api_v1.ListOptions) (result *v1.HorizontalPodAutoscalerList, err error) {
result = &v1.HorizontalPodAutoscalerList{} result = &v1.HorizontalPodAutoscalerList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -141,7 +142,7 @@ func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.Horizo ...@@ -141,7 +142,7 @@ func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *v1.Horizo
} }
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers. // Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *horizontalPodAutoscalers) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -19,6 +19,7 @@ package fake ...@@ -19,6 +19,7 @@ package fake
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
api_v1 "k8s.io/kubernetes/pkg/api/v1"
v1 "k8s.io/kubernetes/pkg/apis/batch/v1" v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
core "k8s.io/kubernetes/pkg/client/testing/core" core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels" labels "k8s.io/kubernetes/pkg/labels"
...@@ -63,14 +64,14 @@ func (c *FakeJobs) UpdateStatus(job *v1.Job) (*v1.Job, error) { ...@@ -63,14 +64,14 @@ func (c *FakeJobs) UpdateStatus(job *v1.Job) (*v1.Job, error) {
return obj.(*v1.Job), err return obj.(*v1.Job), err
} }
func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error { func (c *FakeJobs) Delete(name string, options *api_v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &v1.Job{}) Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &v1.Job{})
return err return err
} }
func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeJobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.JobList{}) _, err := c.Fake.Invokes(action, &v1.JobList{})
...@@ -87,7 +88,7 @@ func (c *FakeJobs) Get(name string) (result *v1.Job, err error) { ...@@ -87,7 +88,7 @@ func (c *FakeJobs) Get(name string) (result *v1.Job, err error) {
return obj.(*v1.Job), err return obj.(*v1.Job), err
} }
func (c *FakeJobs) List(opts api.ListOptions) (result *v1.JobList, err error) { func (c *FakeJobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(jobsResource, c.ns, opts), &v1.JobList{}) Invokes(core.NewListAction(jobsResource, c.ns, opts), &v1.JobList{})
...@@ -95,7 +96,7 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *v1.JobList, err error) { ...@@ -95,7 +96,7 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *v1.JobList, err error) {
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -109,7 +110,7 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *v1.JobList, err error) { ...@@ -109,7 +110,7 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *v1.JobList, err error) {
} }
// Watch returns a watch.Interface that watches the requested jobs. // Watch returns a watch.Interface that watches the requested jobs.
func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeJobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts))
......
...@@ -18,6 +18,7 @@ package v1 ...@@ -18,6 +18,7 @@ package v1
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
api_v1 "k8s.io/kubernetes/pkg/api/v1"
v1 "k8s.io/kubernetes/pkg/apis/batch/v1" v1 "k8s.io/kubernetes/pkg/apis/batch/v1"
watch "k8s.io/kubernetes/pkg/watch" watch "k8s.io/kubernetes/pkg/watch"
) )
...@@ -33,11 +34,11 @@ type JobInterface interface { ...@@ -33,11 +34,11 @@ type JobInterface interface {
Create(*v1.Job) (*v1.Job, error) Create(*v1.Job) (*v1.Job, error)
Update(*v1.Job) (*v1.Job, error) Update(*v1.Job) (*v1.Job, error)
UpdateStatus(*v1.Job) (*v1.Job, error) UpdateStatus(*v1.Job) (*v1.Job, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *api_v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error
Get(name string) (*v1.Job, error) Get(name string) (*v1.Job, error)
List(opts api.ListOptions) (*v1.JobList, error) List(opts api_v1.ListOptions) (*v1.JobList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts api_v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Job, err error)
JobExpansion JobExpansion
} }
...@@ -95,7 +96,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) { ...@@ -95,7 +96,7 @@ func (c *jobs) UpdateStatus(job *v1.Job) (result *v1.Job, err error) {
} }
// Delete takes name of the job and deletes it. Returns an error if one occurs. // Delete takes name of the job and deletes it. Returns an error if one occurs.
func (c *jobs) Delete(name string, options *api.DeleteOptions) error { func (c *jobs) Delete(name string, options *api_v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("jobs"). Resource("jobs").
...@@ -106,7 +107,7 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) error { ...@@ -106,7 +107,7 @@ func (c *jobs) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *jobs) DeleteCollection(options *api_v1.DeleteOptions, listOptions api_v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("jobs"). Resource("jobs").
...@@ -129,7 +130,7 @@ func (c *jobs) Get(name string) (result *v1.Job, err error) { ...@@ -129,7 +130,7 @@ func (c *jobs) Get(name string) (result *v1.Job, err error) {
} }
// List takes label and field selectors, and returns the list of Jobs that match those selectors. // List takes label and field selectors, and returns the list of Jobs that match those selectors.
func (c *jobs) List(opts api.ListOptions) (result *v1.JobList, err error) { func (c *jobs) List(opts api_v1.ListOptions) (result *v1.JobList, err error) {
result = &v1.JobList{} result = &v1.JobList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -141,7 +142,7 @@ func (c *jobs) List(opts api.ListOptions) (result *v1.JobList, err error) { ...@@ -141,7 +142,7 @@ func (c *jobs) List(opts api.ListOptions) (result *v1.JobList, err error) {
} }
// Watch returns a watch.Interface that watches the requested jobs. // Watch returns a watch.Interface that watches the requested jobs.
func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *jobs) Watch(opts api_v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -18,6 +18,7 @@ package v1alpha1 ...@@ -18,6 +18,7 @@ package v1alpha1
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
watch "k8s.io/kubernetes/pkg/watch" watch "k8s.io/kubernetes/pkg/watch"
) )
...@@ -33,11 +34,11 @@ type CertificateSigningRequestInterface interface { ...@@ -33,11 +34,11 @@ type CertificateSigningRequestInterface interface {
Create(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) Create(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error)
Update(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) Update(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error)
UpdateStatus(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error) UpdateStatus(*v1alpha1.CertificateSigningRequest) (*v1alpha1.CertificateSigningRequest, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1alpha1.CertificateSigningRequest, error) Get(name string) (*v1alpha1.CertificateSigningRequest, error)
List(opts api.ListOptions) (*v1alpha1.CertificateSigningRequestList, error) List(opts v1.ListOptions) (*v1alpha1.CertificateSigningRequestList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.CertificateSigningRequest, err error)
CertificateSigningRequestExpansion CertificateSigningRequestExpansion
} }
...@@ -90,7 +91,7 @@ func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1a ...@@ -90,7 +91,7 @@ func (c *certificateSigningRequests) UpdateStatus(certificateSigningRequest *v1a
} }
// Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs. // Delete takes name of the certificateSigningRequest and deletes it. Returns an error if one occurs.
func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOptions) error { func (c *certificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("certificatesigningrequests"). Resource("certificatesigningrequests").
Name(name). Name(name).
...@@ -100,7 +101,7 @@ func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOpti ...@@ -100,7 +101,7 @@ func (c *certificateSigningRequests) Delete(name string, options *api.DeleteOpti
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *certificateSigningRequests) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *certificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("certificatesigningrequests"). Resource("certificatesigningrequests").
VersionedParams(&listOptions, api.ParameterCodec). VersionedParams(&listOptions, api.ParameterCodec).
...@@ -121,7 +122,7 @@ func (c *certificateSigningRequests) Get(name string) (result *v1alpha1.Certific ...@@ -121,7 +122,7 @@ func (c *certificateSigningRequests) Get(name string) (result *v1alpha1.Certific
} }
// List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors. // List takes label and field selectors, and returns the list of CertificateSigningRequests that match those selectors.
func (c *certificateSigningRequests) List(opts api.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) { func (c *certificateSigningRequests) List(opts v1.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) {
result = &v1alpha1.CertificateSigningRequestList{} result = &v1alpha1.CertificateSigningRequestList{}
err = c.client.Get(). err = c.client.Get().
Resource("certificatesigningrequests"). Resource("certificatesigningrequests").
...@@ -132,7 +133,7 @@ func (c *certificateSigningRequests) List(opts api.ListOptions) (result *v1alpha ...@@ -132,7 +133,7 @@ func (c *certificateSigningRequests) List(opts api.ListOptions) (result *v1alpha
} }
// Watch returns a watch.Interface that watches the requested certificateSigningRequests. // Watch returns a watch.Interface that watches the requested certificateSigningRequests.
func (c *certificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *certificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Resource("certificatesigningrequests"). Resource("certificatesigningrequests").
......
...@@ -19,6 +19,7 @@ package fake ...@@ -19,6 +19,7 @@ package fake
import ( import (
api "k8s.io/kubernetes/pkg/api" api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned" unversioned "k8s.io/kubernetes/pkg/api/unversioned"
v1 "k8s.io/kubernetes/pkg/api/v1"
v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1" v1alpha1 "k8s.io/kubernetes/pkg/apis/certificates/v1alpha1"
core "k8s.io/kubernetes/pkg/client/testing/core" core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels" labels "k8s.io/kubernetes/pkg/labels"
...@@ -59,13 +60,13 @@ func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest ...@@ -59,13 +60,13 @@ func (c *FakeCertificateSigningRequests) UpdateStatus(certificateSigningRequest
return obj.(*v1alpha1.CertificateSigningRequest), err return obj.(*v1alpha1.CertificateSigningRequest), err
} }
func (c *FakeCertificateSigningRequests) Delete(name string, options *api.DeleteOptions) error { func (c *FakeCertificateSigningRequests) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{}) Invokes(core.NewRootDeleteAction(certificatesigningrequestsResource, name), &v1alpha1.CertificateSigningRequest{})
return err return err
} }
func (c *FakeCertificateSigningRequests) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeCertificateSigningRequests) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions) action := core.NewRootDeleteCollectionAction(certificatesigningrequestsResource, listOptions)
_, err := c.Fake.Invokes(action, &v1alpha1.CertificateSigningRequestList{}) _, err := c.Fake.Invokes(action, &v1alpha1.CertificateSigningRequestList{})
...@@ -81,14 +82,14 @@ func (c *FakeCertificateSigningRequests) Get(name string) (result *v1alpha1.Cert ...@@ -81,14 +82,14 @@ func (c *FakeCertificateSigningRequests) Get(name string) (result *v1alpha1.Cert
return obj.(*v1alpha1.CertificateSigningRequest), err return obj.(*v1alpha1.CertificateSigningRequest), err
} }
func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) { func (c *FakeCertificateSigningRequests) List(opts v1.ListOptions) (result *v1alpha1.CertificateSigningRequestList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewRootListAction(certificatesigningrequestsResource, opts), &v1alpha1.CertificateSigningRequestList{}) Invokes(core.NewRootListAction(certificatesigningrequestsResource, opts), &v1alpha1.CertificateSigningRequestList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -102,7 +103,7 @@ func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *v1a ...@@ -102,7 +103,7 @@ func (c *FakeCertificateSigningRequests) List(opts api.ListOptions) (result *v1a
} }
// Watch returns a watch.Interface that watches the requested certificateSigningRequests. // Watch returns a watch.Interface that watches the requested certificateSigningRequests.
func (c *FakeCertificateSigningRequests) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeCertificateSigningRequests) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewRootWatchAction(certificatesigningrequestsResource, opts)) InvokesWatch(core.NewRootWatchAction(certificatesigningrequestsResource, opts))
} }
......
...@@ -32,11 +32,11 @@ type ComponentStatusesGetter interface { ...@@ -32,11 +32,11 @@ type ComponentStatusesGetter interface {
type ComponentStatusInterface interface { type ComponentStatusInterface interface {
Create(*v1.ComponentStatus) (*v1.ComponentStatus, error) Create(*v1.ComponentStatus) (*v1.ComponentStatus, error)
Update(*v1.ComponentStatus) (*v1.ComponentStatus, error) Update(*v1.ComponentStatus) (*v1.ComponentStatus, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1.ComponentStatus, error) Get(name string) (*v1.ComponentStatus, error)
List(opts api.ListOptions) (*v1.ComponentStatusList, error) List(opts v1.ListOptions) (*v1.ComponentStatusList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error)
ComponentStatusExpansion ComponentStatusExpansion
} }
...@@ -77,7 +77,7 @@ func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result ...@@ -77,7 +77,7 @@ func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result
} }
// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs. // Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) error { func (c *componentStatuses) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("componentstatuses"). Resource("componentstatuses").
Name(name). Name(name).
...@@ -87,7 +87,7 @@ func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) erro ...@@ -87,7 +87,7 @@ func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) erro
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *componentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *componentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Resource("componentstatuses"). Resource("componentstatuses").
VersionedParams(&listOptions, api.ParameterCodec). VersionedParams(&listOptions, api.ParameterCodec).
...@@ -108,7 +108,7 @@ func (c *componentStatuses) Get(name string) (result *v1.ComponentStatus, err er ...@@ -108,7 +108,7 @@ func (c *componentStatuses) Get(name string) (result *v1.ComponentStatus, err er
} }
// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors. // List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
func (c *componentStatuses) List(opts api.ListOptions) (result *v1.ComponentStatusList, err error) { func (c *componentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatusList, err error) {
result = &v1.ComponentStatusList{} result = &v1.ComponentStatusList{}
err = c.client.Get(). err = c.client.Get().
Resource("componentstatuses"). Resource("componentstatuses").
...@@ -119,7 +119,7 @@ func (c *componentStatuses) List(opts api.ListOptions) (result *v1.ComponentStat ...@@ -119,7 +119,7 @@ func (c *componentStatuses) List(opts api.ListOptions) (result *v1.ComponentStat
} }
// Watch returns a watch.Interface that watches the requested componentStatuses. // Watch returns a watch.Interface that watches the requested componentStatuses.
func (c *componentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *componentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Resource("componentstatuses"). Resource("componentstatuses").
......
...@@ -32,11 +32,11 @@ type ConfigMapsGetter interface { ...@@ -32,11 +32,11 @@ type ConfigMapsGetter interface {
type ConfigMapInterface interface { type ConfigMapInterface interface {
Create(*v1.ConfigMap) (*v1.ConfigMap, error) Create(*v1.ConfigMap) (*v1.ConfigMap, error)
Update(*v1.ConfigMap) (*v1.ConfigMap, error) Update(*v1.ConfigMap) (*v1.ConfigMap, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1.ConfigMap, error) Get(name string) (*v1.ConfigMap, error)
List(opts api.ListOptions) (*v1.ConfigMapList, error) List(opts v1.ListOptions) (*v1.ConfigMapList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error)
ConfigMapExpansion ConfigMapExpansion
} }
...@@ -81,7 +81,7 @@ func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err ...@@ -81,7 +81,7 @@ func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err
} }
// Delete takes name of the configMap and deletes it. Returns an error if one occurs. // Delete takes name of the configMap and deletes it. Returns an error if one occurs.
func (c *configMaps) Delete(name string, options *api.DeleteOptions) error { func (c *configMaps) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("configmaps"). Resource("configmaps").
...@@ -92,7 +92,7 @@ func (c *configMaps) Delete(name string, options *api.DeleteOptions) error { ...@@ -92,7 +92,7 @@ func (c *configMaps) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *configMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("configmaps"). Resource("configmaps").
...@@ -115,7 +115,7 @@ func (c *configMaps) Get(name string) (result *v1.ConfigMap, err error) { ...@@ -115,7 +115,7 @@ func (c *configMaps) Get(name string) (result *v1.ConfigMap, err error) {
} }
// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors. // List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
func (c *configMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, err error) { func (c *configMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) {
result = &v1.ConfigMapList{} result = &v1.ConfigMapList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -127,7 +127,7 @@ func (c *configMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, err e ...@@ -127,7 +127,7 @@ func (c *configMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, err e
} }
// Watch returns a watch.Interface that watches the requested configMaps. // Watch returns a watch.Interface that watches the requested configMaps.
func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *configMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -32,11 +32,11 @@ type EndpointsGetter interface { ...@@ -32,11 +32,11 @@ type EndpointsGetter interface {
type EndpointsInterface interface { type EndpointsInterface interface {
Create(*v1.Endpoints) (*v1.Endpoints, error) Create(*v1.Endpoints) (*v1.Endpoints, error)
Update(*v1.Endpoints) (*v1.Endpoints, error) Update(*v1.Endpoints) (*v1.Endpoints, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1.Endpoints, error) Get(name string) (*v1.Endpoints, error)
List(opts api.ListOptions) (*v1.EndpointsList, error) List(opts v1.ListOptions) (*v1.EndpointsList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error)
EndpointsExpansion EndpointsExpansion
} }
...@@ -81,7 +81,7 @@ func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err e ...@@ -81,7 +81,7 @@ func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err e
} }
// Delete takes name of the endpoints and deletes it. Returns an error if one occurs. // Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
func (c *endpoints) Delete(name string, options *api.DeleteOptions) error { func (c *endpoints) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("endpoints"). Resource("endpoints").
...@@ -92,7 +92,7 @@ func (c *endpoints) Delete(name string, options *api.DeleteOptions) error { ...@@ -92,7 +92,7 @@ func (c *endpoints) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *endpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *endpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("endpoints"). Resource("endpoints").
...@@ -115,7 +115,7 @@ func (c *endpoints) Get(name string) (result *v1.Endpoints, err error) { ...@@ -115,7 +115,7 @@ func (c *endpoints) Get(name string) (result *v1.Endpoints, err error) {
} }
// List takes label and field selectors, and returns the list of Endpoints that match those selectors. // List takes label and field selectors, and returns the list of Endpoints that match those selectors.
func (c *endpoints) List(opts api.ListOptions) (result *v1.EndpointsList, err error) { func (c *endpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err error) {
result = &v1.EndpointsList{} result = &v1.EndpointsList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -127,7 +127,7 @@ func (c *endpoints) List(opts api.ListOptions) (result *v1.EndpointsList, err er ...@@ -127,7 +127,7 @@ func (c *endpoints) List(opts api.ListOptions) (result *v1.EndpointsList, err er
} }
// Watch returns a watch.Interface that watches the requested endpoints. // Watch returns a watch.Interface that watches the requested endpoints.
func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *endpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -32,11 +32,11 @@ type EventsGetter interface { ...@@ -32,11 +32,11 @@ type EventsGetter interface {
type EventInterface interface { type EventInterface interface {
Create(*v1.Event) (*v1.Event, error) Create(*v1.Event) (*v1.Event, error)
Update(*v1.Event) (*v1.Event, error) Update(*v1.Event) (*v1.Event, error)
Delete(name string, options *api.DeleteOptions) error Delete(name string, options *v1.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error
Get(name string) (*v1.Event, error) Get(name string) (*v1.Event, error)
List(opts api.ListOptions) (*v1.EventList, error) List(opts v1.ListOptions) (*v1.EventList, error)
Watch(opts api.ListOptions) (watch.Interface, error) Watch(opts v1.ListOptions) (watch.Interface, error)
Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Event, err error)
EventExpansion EventExpansion
} }
...@@ -81,7 +81,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) { ...@@ -81,7 +81,7 @@ func (c *events) Update(event *v1.Event) (result *v1.Event, err error) {
} }
// Delete takes name of the event and deletes it. Returns an error if one occurs. // Delete takes name of the event and deletes it. Returns an error if one occurs.
func (c *events) Delete(name string, options *api.DeleteOptions) error { func (c *events) Delete(name string, options *v1.DeleteOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("events"). Resource("events").
...@@ -92,7 +92,7 @@ func (c *events) Delete(name string, options *api.DeleteOptions) error { ...@@ -92,7 +92,7 @@ func (c *events) Delete(name string, options *api.DeleteOptions) error {
} }
// DeleteCollection deletes a collection of objects. // DeleteCollection deletes a collection of objects.
func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *events) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
return c.client.Delete(). return c.client.Delete().
Namespace(c.ns). Namespace(c.ns).
Resource("events"). Resource("events").
...@@ -115,7 +115,7 @@ func (c *events) Get(name string) (result *v1.Event, err error) { ...@@ -115,7 +115,7 @@ func (c *events) Get(name string) (result *v1.Event, err error) {
} }
// List takes label and field selectors, and returns the list of Events that match those selectors. // List takes label and field selectors, and returns the list of Events that match those selectors.
func (c *events) List(opts api.ListOptions) (result *v1.EventList, err error) { func (c *events) List(opts v1.ListOptions) (result *v1.EventList, err error) {
result = &v1.EventList{} result = &v1.EventList{}
err = c.client.Get(). err = c.client.Get().
Namespace(c.ns). Namespace(c.ns).
...@@ -127,7 +127,7 @@ func (c *events) List(opts api.ListOptions) (result *v1.EventList, err error) { ...@@ -127,7 +127,7 @@ func (c *events) List(opts api.ListOptions) (result *v1.EventList, err error) {
} }
// Watch returns a watch.Interface that watches the requested events. // Watch returns a watch.Interface that watches the requested events.
func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *events) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.client.Get(). return c.client.Get().
Prefix("watch"). Prefix("watch").
Namespace(c.ns). Namespace(c.ns).
......
...@@ -116,7 +116,7 @@ func (e *events) Search(objOrRef runtime.Object) (*v1.EventList, error) { ...@@ -116,7 +116,7 @@ func (e *events) Search(objOrRef runtime.Object) (*v1.EventList, error) {
refUID = &stringRefUID refUID = &stringRefUID
} }
fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID) fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID)
return e.List(api.ListOptions{FieldSelector: fieldSelector}) return e.List(v1.ListOptions{FieldSelector: fieldSelector.String()})
} }
// Returns the appropriate field selector based on the API version being used to communicate with the server. // Returns the appropriate field selector based on the API version being used to communicate with the server.
......
...@@ -50,13 +50,13 @@ func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (res ...@@ -50,13 +50,13 @@ func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (res
return obj.(*v1.ComponentStatus), err return obj.(*v1.ComponentStatus), err
} }
func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) error { func (c *FakeComponentStatuses) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewRootDeleteAction(componentstatusesResource, name), &v1.ComponentStatus{}) Invokes(core.NewRootDeleteAction(componentstatusesResource, name), &v1.ComponentStatus{})
return err return err
} }
func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeComponentStatuses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(componentstatusesResource, listOptions) action := core.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1.ComponentStatusList{}) _, err := c.Fake.Invokes(action, &v1.ComponentStatusList{})
...@@ -72,14 +72,14 @@ func (c *FakeComponentStatuses) Get(name string) (result *v1.ComponentStatus, er ...@@ -72,14 +72,14 @@ func (c *FakeComponentStatuses) Get(name string) (result *v1.ComponentStatus, er
return obj.(*v1.ComponentStatus), err return obj.(*v1.ComponentStatus), err
} }
func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *v1.ComponentStatusList, err error) { func (c *FakeComponentStatuses) List(opts v1.ListOptions) (result *v1.ComponentStatusList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewRootListAction(componentstatusesResource, opts), &v1.ComponentStatusList{}) Invokes(core.NewRootListAction(componentstatusesResource, opts), &v1.ComponentStatusList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -93,7 +93,7 @@ func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *v1.Component ...@@ -93,7 +93,7 @@ func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *v1.Component
} }
// Watch returns a watch.Interface that watches the requested componentStatuses. // Watch returns a watch.Interface that watches the requested componentStatuses.
func (c *FakeComponentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeComponentStatuses) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts)) InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts))
} }
......
...@@ -53,14 +53,14 @@ func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, ...@@ -53,14 +53,14 @@ func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap,
return obj.(*v1.ConfigMap), err return obj.(*v1.ConfigMap), err
} }
func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error { func (c *FakeConfigMaps) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &v1.ConfigMap{}) Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &v1.ConfigMap{})
return err return err
} }
func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeConfigMaps) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.ConfigMapList{}) _, err := c.Fake.Invokes(action, &v1.ConfigMapList{})
...@@ -77,7 +77,7 @@ func (c *FakeConfigMaps) Get(name string) (result *v1.ConfigMap, err error) { ...@@ -77,7 +77,7 @@ func (c *FakeConfigMaps) Get(name string) (result *v1.ConfigMap, err error) {
return obj.(*v1.ConfigMap), err return obj.(*v1.ConfigMap), err
} }
func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, err error) { func (c *FakeConfigMaps) List(opts v1.ListOptions) (result *v1.ConfigMapList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{}) Invokes(core.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{})
...@@ -85,7 +85,7 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, e ...@@ -85,7 +85,7 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, e
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -99,7 +99,7 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, e ...@@ -99,7 +99,7 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, e
} }
// Watch returns a watch.Interface that watches the requested configMaps. // Watch returns a watch.Interface that watches the requested configMaps.
func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeConfigMaps) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts))
......
...@@ -53,14 +53,14 @@ func (c *FakeEndpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, e ...@@ -53,14 +53,14 @@ func (c *FakeEndpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, e
return obj.(*v1.Endpoints), err return obj.(*v1.Endpoints), err
} }
func (c *FakeEndpoints) Delete(name string, options *api.DeleteOptions) error { func (c *FakeEndpoints) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(endpointsResource, c.ns, name), &v1.Endpoints{}) Invokes(core.NewDeleteAction(endpointsResource, c.ns, name), &v1.Endpoints{})
return err return err
} }
func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeEndpoints) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.EndpointsList{}) _, err := c.Fake.Invokes(action, &v1.EndpointsList{})
...@@ -77,7 +77,7 @@ func (c *FakeEndpoints) Get(name string) (result *v1.Endpoints, err error) { ...@@ -77,7 +77,7 @@ func (c *FakeEndpoints) Get(name string) (result *v1.Endpoints, err error) {
return obj.(*v1.Endpoints), err return obj.(*v1.Endpoints), err
} }
func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, err error) { func (c *FakeEndpoints) List(opts v1.ListOptions) (result *v1.EndpointsList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(endpointsResource, c.ns, opts), &v1.EndpointsList{}) Invokes(core.NewListAction(endpointsResource, c.ns, opts), &v1.EndpointsList{})
...@@ -85,7 +85,7 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, er ...@@ -85,7 +85,7 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, er
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -99,7 +99,7 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, er ...@@ -99,7 +99,7 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, er
} }
// Watch returns a watch.Interface that watches the requested endpoints. // Watch returns a watch.Interface that watches the requested endpoints.
func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeEndpoints) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts))
......
...@@ -53,14 +53,14 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) { ...@@ -53,14 +53,14 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
return obj.(*v1.Event), err return obj.(*v1.Event), err
} }
func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error { func (c *FakeEvents) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{}) Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{})
return err return err
} }
func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeEvents) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.EventList{}) _, err := c.Fake.Invokes(action, &v1.EventList{})
...@@ -77,7 +77,7 @@ func (c *FakeEvents) Get(name string) (result *v1.Event, err error) { ...@@ -77,7 +77,7 @@ func (c *FakeEvents) Get(name string) (result *v1.Event, err error) {
return obj.(*v1.Event), err return obj.(*v1.Event), err
} }
func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error) { func (c *FakeEvents) List(opts v1.ListOptions) (result *v1.EventList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{}) Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{})
...@@ -85,7 +85,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error ...@@ -85,7 +85,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -99,7 +99,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error ...@@ -99,7 +99,7 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error
} }
// Watch returns a watch.Interface that watches the requested events. // Watch returns a watch.Interface that watches the requested events.
func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeEvents) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))
......
...@@ -53,14 +53,14 @@ func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRan ...@@ -53,14 +53,14 @@ func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRan
return obj.(*v1.LimitRange), err return obj.(*v1.LimitRange), err
} }
func (c *FakeLimitRanges) Delete(name string, options *api.DeleteOptions) error { func (c *FakeLimitRanges) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(limitrangesResource, c.ns, name), &v1.LimitRange{}) Invokes(core.NewDeleteAction(limitrangesResource, c.ns, name), &v1.LimitRange{})
return err return err
} }
func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeLimitRanges) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.LimitRangeList{}) _, err := c.Fake.Invokes(action, &v1.LimitRangeList{})
...@@ -77,7 +77,7 @@ func (c *FakeLimitRanges) Get(name string) (result *v1.LimitRange, err error) { ...@@ -77,7 +77,7 @@ func (c *FakeLimitRanges) Get(name string) (result *v1.LimitRange, err error) {
return obj.(*v1.LimitRange), err return obj.(*v1.LimitRange), err
} }
func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList, err error) { func (c *FakeLimitRanges) List(opts v1.ListOptions) (result *v1.LimitRangeList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(limitrangesResource, c.ns, opts), &v1.LimitRangeList{}) Invokes(core.NewListAction(limitrangesResource, c.ns, opts), &v1.LimitRangeList{})
...@@ -85,7 +85,7 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList, ...@@ -85,7 +85,7 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList,
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -99,7 +99,7 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList, ...@@ -99,7 +99,7 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList,
} }
// Watch returns a watch.Interface that watches the requested limitRanges. // Watch returns a watch.Interface that watches the requested limitRanges.
func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeLimitRanges) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts))
......
...@@ -59,13 +59,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e ...@@ -59,13 +59,13 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e
return obj.(*v1.Namespace), err return obj.(*v1.Namespace), err
} }
func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error { func (c *FakeNamespaces) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{}) Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{})
return err return err
} }
func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeNamespaces) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions) action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1.NamespaceList{}) _, err := c.Fake.Invokes(action, &v1.NamespaceList{})
...@@ -81,14 +81,14 @@ func (c *FakeNamespaces) Get(name string) (result *v1.Namespace, err error) { ...@@ -81,14 +81,14 @@ func (c *FakeNamespaces) Get(name string) (result *v1.Namespace, err error) {
return obj.(*v1.Namespace), err return obj.(*v1.Namespace), err
} }
func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err error) { func (c *FakeNamespaces) List(opts v1.ListOptions) (result *v1.NamespaceList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{}) Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -102,7 +102,7 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, e ...@@ -102,7 +102,7 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, e
} }
// Watch returns a watch.Interface that watches the requested namespaces. // Watch returns a watch.Interface that watches the requested namespaces.
func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeNamespaces) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewRootWatchAction(namespacesResource, opts)) InvokesWatch(core.NewRootWatchAction(namespacesResource, opts))
} }
......
...@@ -59,13 +59,13 @@ func (c *FakeNodes) UpdateStatus(node *v1.Node) (*v1.Node, error) { ...@@ -59,13 +59,13 @@ func (c *FakeNodes) UpdateStatus(node *v1.Node) (*v1.Node, error) {
return obj.(*v1.Node), err return obj.(*v1.Node), err
} }
func (c *FakeNodes) Delete(name string, options *api.DeleteOptions) error { func (c *FakeNodes) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewRootDeleteAction(nodesResource, name), &v1.Node{}) Invokes(core.NewRootDeleteAction(nodesResource, name), &v1.Node{})
return err return err
} }
func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakeNodes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(nodesResource, listOptions) action := core.NewRootDeleteCollectionAction(nodesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1.NodeList{}) _, err := c.Fake.Invokes(action, &v1.NodeList{})
...@@ -81,14 +81,14 @@ func (c *FakeNodes) Get(name string) (result *v1.Node, err error) { ...@@ -81,14 +81,14 @@ func (c *FakeNodes) Get(name string) (result *v1.Node, err error) {
return obj.(*v1.Node), err return obj.(*v1.Node), err
} }
func (c *FakeNodes) List(opts api.ListOptions) (result *v1.NodeList, err error) { func (c *FakeNodes) List(opts v1.ListOptions) (result *v1.NodeList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewRootListAction(nodesResource, opts), &v1.NodeList{}) Invokes(core.NewRootListAction(nodesResource, opts), &v1.NodeList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -102,7 +102,7 @@ func (c *FakeNodes) List(opts api.ListOptions) (result *v1.NodeList, err error) ...@@ -102,7 +102,7 @@ func (c *FakeNodes) List(opts api.ListOptions) (result *v1.NodeList, err error)
} }
// Watch returns a watch.Interface that watches the requested nodes. // Watch returns a watch.Interface that watches the requested nodes.
func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakeNodes) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewRootWatchAction(nodesResource, opts)) InvokesWatch(core.NewRootWatchAction(nodesResource, opts))
} }
......
...@@ -59,13 +59,13 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolu ...@@ -59,13 +59,13 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolu
return obj.(*v1.PersistentVolume), err return obj.(*v1.PersistentVolume), err
} }
func (c *FakePersistentVolumes) Delete(name string, options *api.DeleteOptions) error { func (c *FakePersistentVolumes) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewRootDeleteAction(persistentvolumesResource, name), &v1.PersistentVolume{}) Invokes(core.NewRootDeleteAction(persistentvolumesResource, name), &v1.PersistentVolume{})
return err return err
} }
func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakePersistentVolumes) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions) action := core.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions)
_, err := c.Fake.Invokes(action, &v1.PersistentVolumeList{}) _, err := c.Fake.Invokes(action, &v1.PersistentVolumeList{})
...@@ -81,14 +81,14 @@ func (c *FakePersistentVolumes) Get(name string) (result *v1.PersistentVolume, e ...@@ -81,14 +81,14 @@ func (c *FakePersistentVolumes) Get(name string) (result *v1.PersistentVolume, e
return obj.(*v1.PersistentVolume), err return obj.(*v1.PersistentVolume), err
} }
func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *v1.PersistentVolumeList, err error) { func (c *FakePersistentVolumes) List(opts v1.ListOptions) (result *v1.PersistentVolumeList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewRootListAction(persistentvolumesResource, opts), &v1.PersistentVolumeList{}) Invokes(core.NewRootListAction(persistentvolumesResource, opts), &v1.PersistentVolumeList{})
if obj == nil { if obj == nil {
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -102,7 +102,7 @@ func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *v1.Persisten ...@@ -102,7 +102,7 @@ func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *v1.Persisten
} }
// Watch returns a watch.Interface that watches the requested persistentVolumes. // Watch returns a watch.Interface that watches the requested persistentVolumes.
func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakePersistentVolumes) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts)) InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts))
} }
......
...@@ -63,14 +63,14 @@ func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.Pers ...@@ -63,14 +63,14 @@ func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *v1.Pers
return obj.(*v1.PersistentVolumeClaim), err return obj.(*v1.PersistentVolumeClaim), err
} }
func (c *FakePersistentVolumeClaims) Delete(name string, options *api.DeleteOptions) error { func (c *FakePersistentVolumeClaims) Delete(name string, options *v1.DeleteOptions) error {
_, err := c.Fake. _, err := c.Fake.
Invokes(core.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &v1.PersistentVolumeClaim{}) Invokes(core.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &v1.PersistentVolumeClaim{})
return err return err
} }
func (c *FakePersistentVolumeClaims) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { func (c *FakePersistentVolumeClaims) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
action := core.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions) action := core.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions)
_, err := c.Fake.Invokes(action, &v1.PersistentVolumeClaimList{}) _, err := c.Fake.Invokes(action, &v1.PersistentVolumeClaimList{})
...@@ -87,7 +87,7 @@ func (c *FakePersistentVolumeClaims) Get(name string) (result *v1.PersistentVolu ...@@ -87,7 +87,7 @@ func (c *FakePersistentVolumeClaims) Get(name string) (result *v1.PersistentVolu
return obj.(*v1.PersistentVolumeClaim), err return obj.(*v1.PersistentVolumeClaim), err
} }
func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *v1.PersistentVolumeClaimList, err error) { func (c *FakePersistentVolumeClaims) List(opts v1.ListOptions) (result *v1.PersistentVolumeClaimList, err error) {
obj, err := c.Fake. obj, err := c.Fake.
Invokes(core.NewListAction(persistentvolumeclaimsResource, c.ns, opts), &v1.PersistentVolumeClaimList{}) Invokes(core.NewListAction(persistentvolumeclaimsResource, c.ns, opts), &v1.PersistentVolumeClaimList{})
...@@ -95,7 +95,7 @@ func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *v1.Pers ...@@ -95,7 +95,7 @@ func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *v1.Pers
return nil, err return nil, err
} }
label := opts.LabelSelector label, _, _ := core.ExtractFromListOptions(opts)
if label == nil { if label == nil {
label = labels.Everything() label = labels.Everything()
} }
...@@ -109,7 +109,7 @@ func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *v1.Pers ...@@ -109,7 +109,7 @@ func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *v1.Pers
} }
// Watch returns a watch.Interface that watches the requested persistentVolumeClaims. // Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
func (c *FakePersistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) { func (c *FakePersistentVolumeClaims) Watch(opts v1.ListOptions) (watch.Interface, error) {
return c.Fake. return c.Fake.
InvokesWatch(core.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts)) InvokesWatch(core.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment