use fully qualified resource in fake clients actions
This commit is contained in:
parent
f8d4f6157f
commit
8537095415
@ -55,6 +55,7 @@ func PackageForGroup(gv unversioned.GroupVersion, typeList []*types.Type, packag
|
||||
},
|
||||
outputPackage: outputPackagePath,
|
||||
group: normalization.BeforeFirstDot(gv.Group),
|
||||
version: gv.Version,
|
||||
typeToMatch: t,
|
||||
imports: generator.NewImportTracker(),
|
||||
})
|
||||
|
@ -31,6 +31,7 @@ type genFakeForType struct {
|
||||
generator.DefaultGen
|
||||
outputPackage string
|
||||
group string
|
||||
version string
|
||||
typeToMatch *types.Type
|
||||
imports namer.ImportTracker
|
||||
}
|
||||
@ -78,16 +79,27 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io.
|
||||
pkg := filepath.Base(t.Name.Package)
|
||||
const pkgTestingCore = "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
namespaced := !(types.ExtractCommentTags("+", t.SecondClosestCommentLines)["nonNamespaced"] == "true")
|
||||
canonicalGroup := g.group
|
||||
if canonicalGroup == "core" {
|
||||
canonicalGroup = ""
|
||||
}
|
||||
canonicalVersion := g.version
|
||||
if canonicalVersion == "unversioned" {
|
||||
canonicalVersion = ""
|
||||
}
|
||||
m := map[string]interface{}{
|
||||
"type": t,
|
||||
"package": pkg,
|
||||
"Package": namer.IC(pkg),
|
||||
"namespaced": namespaced,
|
||||
"Group": namer.IC(g.group),
|
||||
"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"}),
|
||||
"Everything": c.Universe.Function(types.Name{Package: "k8s.io/kubernetes/pkg/labels", Name: "Everything"}),
|
||||
"type": t,
|
||||
"package": pkg,
|
||||
"Package": namer.IC(pkg),
|
||||
"namespaced": namespaced,
|
||||
"Group": namer.IC(g.group),
|
||||
"group": canonicalGroup,
|
||||
"version": canonicalVersion,
|
||||
"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"}),
|
||||
"Everything": c.Universe.Function(types.Name{Package: "k8s.io/kubernetes/pkg/labels", Name: "Everything"}),
|
||||
|
||||
"NewRootListAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewRootListAction"}),
|
||||
"NewListAction": c.Universe.Function(types.Name{Package: pkgTestingCore, Name: "NewListAction"}),
|
||||
@ -116,6 +128,7 @@ func (g *genFakeForType) GenerateType(c *generator.Context, t *types.Type, w io.
|
||||
}
|
||||
|
||||
if !noMethods {
|
||||
sw.Do(resource, m)
|
||||
sw.Do(createTemplate, m)
|
||||
sw.Do(updateTemplate, m)
|
||||
// Generate the UpdateStatus method if the type has a status
|
||||
@ -154,11 +167,15 @@ type Fake$.type|publicPlural$ struct {
|
||||
}
|
||||
`
|
||||
|
||||
var resource = `
|
||||
var $.type|allLowercasePlural$Resource = $.GroupVersionResource|raw${Group: "$.group$", Version: "$.version$", Resource: "$.type|allLowercasePlural$"}
|
||||
`
|
||||
|
||||
var listTemplate = `
|
||||
func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.type|raw$List, err error) {
|
||||
obj, err := c.Fake.
|
||||
$if .namespaced$Invokes($.NewListAction|raw$("$.type|allLowercasePlural$", c.ns, opts), &$.type|raw$List{})
|
||||
$else$Invokes($.NewRootListAction|raw$("$.type|allLowercasePlural$", opts), &$.type|raw$List{})$end$
|
||||
$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$
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -169,8 +186,8 @@ func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.t
|
||||
var listUsingOptionsTemplate = `
|
||||
func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.type|raw$List, err error) {
|
||||
obj, err := c.Fake.
|
||||
$if .namespaced$Invokes($.NewListAction|raw$("$.type|allLowercasePlural$", c.ns, opts), &$.type|raw$List{})
|
||||
$else$Invokes($.NewRootListAction|raw$("$.type|allLowercasePlural$", opts), &$.type|raw$List{})$end$
|
||||
$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$
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -192,8 +209,8 @@ func (c *Fake$.type|publicPlural$) List(opts $.apiListOptions|raw$) (result *$.t
|
||||
var getTemplate = `
|
||||
func (c *Fake$.type|publicPlural$) Get(name string) (result *$.type|raw$, err error) {
|
||||
obj, err := c.Fake.
|
||||
$if .namespaced$Invokes($.NewGetAction|raw$("$.type|allLowercasePlural$", c.ns, name), &$.type|raw${})
|
||||
$else$Invokes($.NewRootGetAction|raw$("$.type|allLowercasePlural$", name), &$.type|raw${})$end$
|
||||
$if .namespaced$Invokes($.NewGetAction|raw$($.type|allLowercasePlural$Resource, c.ns, name), &$.type|raw${})
|
||||
$else$Invokes($.NewRootGetAction|raw$($.type|allLowercasePlural$Resource, name), &$.type|raw${})$end$
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -204,16 +221,16 @@ func (c *Fake$.type|publicPlural$) Get(name string) (result *$.type|raw$, err er
|
||||
var deleteTemplate = `
|
||||
func (c *Fake$.type|publicPlural$) Delete(name string, options *$.apiDeleteOptions|raw$) error {
|
||||
_, err := c.Fake.
|
||||
$if .namespaced$Invokes($.NewDeleteAction|raw$("$.type|allLowercasePlural$", c.ns, name), &$.type|raw${})
|
||||
$else$Invokes($.NewRootDeleteAction|raw$("$.type|allLowercasePlural$", name), &$.type|raw${})$end$
|
||||
$if .namespaced$Invokes($.NewDeleteAction|raw$($.type|allLowercasePlural$Resource, c.ns, name), &$.type|raw${})
|
||||
$else$Invokes($.NewRootDeleteAction|raw$($.type|allLowercasePlural$Resource, name), &$.type|raw${})$end$
|
||||
return err
|
||||
}
|
||||
`
|
||||
|
||||
var deleteCollectionTemplate = `
|
||||
func (c *Fake$.type|publicPlural$) DeleteCollection(options *$.apiDeleteOptions|raw$, listOptions $.apiListOptions|raw$) error {
|
||||
$if .namespaced$action := $.NewDeleteCollectionAction|raw$("$.type|allLowercasePlural$", c.ns, listOptions)
|
||||
$else$action := $.NewRootDeleteCollectionAction|raw$("$.type|allLowercasePlural$", listOptions)
|
||||
$if .namespaced$action := $.NewDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, c.ns, listOptions)
|
||||
$else$action := $.NewRootDeleteCollectionAction|raw$($.type|allLowercasePlural$Resource, listOptions)
|
||||
$end$
|
||||
_, err := c.Fake.Invokes(action, &$.type|raw$List{})
|
||||
return err
|
||||
@ -223,8 +240,8 @@ func (c *Fake$.type|publicPlural$) DeleteCollection(options *$.apiDeleteOptions|
|
||||
var createTemplate = `
|
||||
func (c *Fake$.type|publicPlural$) Create($.type|private$ *$.type|raw$) (result *$.type|raw$, err error) {
|
||||
obj, err := c.Fake.
|
||||
$if .namespaced$Invokes($.NewCreateAction|raw$("$.type|allLowercasePlural$", c.ns, $.type|private$), &$.type|raw${})
|
||||
$else$Invokes($.NewRootCreateAction|raw$("$.type|allLowercasePlural$", $.type|private$), &$.type|raw${})$end$
|
||||
$if .namespaced$Invokes($.NewCreateAction|raw$($.type|allLowercasePlural$Resource, c.ns, $.type|private$), &$.type|raw${})
|
||||
$else$Invokes($.NewRootCreateAction|raw$($.type|allLowercasePlural$Resource, $.type|private$), &$.type|raw${})$end$
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -235,8 +252,8 @@ func (c *Fake$.type|publicPlural$) Create($.type|private$ *$.type|raw$) (result
|
||||
var updateTemplate = `
|
||||
func (c *Fake$.type|publicPlural$) Update($.type|private$ *$.type|raw$) (result *$.type|raw$, err error) {
|
||||
obj, err := c.Fake.
|
||||
$if .namespaced$Invokes($.NewUpdateAction|raw$("$.type|allLowercasePlural$", c.ns, $.type|private$), &$.type|raw${})
|
||||
$else$Invokes($.NewRootUpdateAction|raw$("$.type|allLowercasePlural$", $.type|private$), &$.type|raw${})$end$
|
||||
$if .namespaced$Invokes($.NewUpdateAction|raw$($.type|allLowercasePlural$Resource, c.ns, $.type|private$), &$.type|raw${})
|
||||
$else$Invokes($.NewRootUpdateAction|raw$($.type|allLowercasePlural$Resource, $.type|private$), &$.type|raw${})$end$
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -247,8 +264,8 @@ func (c *Fake$.type|publicPlural$) Update($.type|private$ *$.type|raw$) (result
|
||||
var updateStatusTemplate = `
|
||||
func (c *Fake$.type|publicPlural$) UpdateStatus($.type|private$ *$.type|raw$) (*$.type|raw$, error) {
|
||||
obj, err := c.Fake.
|
||||
$if .namespaced$Invokes($.NewUpdateSubresourceAction|raw$("$.type|allLowercasePlural$", "status", c.ns, $.type|private$), &$.type|raw${})
|
||||
$else$Invokes($.NewRootUpdateSubresourceAction|raw$("$.type|allLowercasePlural$", "status", $.type|private$), &$.type|raw${})$end$
|
||||
$if .namespaced$Invokes($.NewUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "status", c.ns, $.type|private$), &$.type|raw${})
|
||||
$else$Invokes($.NewRootUpdateSubresourceAction|raw$($.type|allLowercasePlural$Resource, "status", $.type|private$), &$.type|raw${})$end$
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -260,7 +277,7 @@ var watchTemplate = `
|
||||
// Watch returns a $.watchInterface|raw$ that watches the requested $.type|privatePlural$.
|
||||
func (c *Fake$.type|publicPlural$) Watch(opts $.apiListOptions|raw$) ($.watchInterface|raw$, error) {
|
||||
return c.Fake.
|
||||
$if .namespaced$InvokesWatch($.NewWatchAction|raw$("$.type|allLowercasePlural$", c.ns, opts))
|
||||
$else$InvokesWatch($.NewRootWatchAction|raw$("$.type|allLowercasePlural$", opts))$end$
|
||||
$if .namespaced$InvokesWatch($.NewWatchAction|raw$($.type|allLowercasePlural$Resource, c.ns, opts))
|
||||
$else$InvokesWatch($.NewRootWatchAction|raw$($.type|allLowercasePlural$Resource, opts))$end$
|
||||
}
|
||||
`
|
||||
|
@ -19,6 +19,7 @@ package fake
|
||||
import (
|
||||
testgroup_k8s_io "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup.k8s.io"
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -30,9 +31,11 @@ type FakeTestTypes struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var testtypesResource = unversioned.GroupVersionResource{Group: "testgroup", Version: "", Resource: "testtypes"}
|
||||
|
||||
func (c *FakeTestTypes) Create(testType *testgroup_k8s_io.TestType) (result *testgroup_k8s_io.TestType, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("testtypes", c.ns, testType), &testgroup_k8s_io.TestType{})
|
||||
Invokes(core.NewCreateAction(testtypesResource, c.ns, testType), &testgroup_k8s_io.TestType{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeTestTypes) Create(testType *testgroup_k8s_io.TestType) (result *tes
|
||||
|
||||
func (c *FakeTestTypes) Update(testType *testgroup_k8s_io.TestType) (result *testgroup_k8s_io.TestType, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("testtypes", c.ns, testType), &testgroup_k8s_io.TestType{})
|
||||
Invokes(core.NewUpdateAction(testtypesResource, c.ns, testType), &testgroup_k8s_io.TestType{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeTestTypes) Update(testType *testgroup_k8s_io.TestType) (result *tes
|
||||
|
||||
func (c *FakeTestTypes) UpdateStatus(testType *testgroup_k8s_io.TestType) (*testgroup_k8s_io.TestType, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("testtypes", "status", c.ns, testType), &testgroup_k8s_io.TestType{})
|
||||
Invokes(core.NewUpdateSubresourceAction(testtypesResource, "status", c.ns, testType), &testgroup_k8s_io.TestType{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeTestTypes) UpdateStatus(testType *testgroup_k8s_io.TestType) (*test
|
||||
|
||||
func (c *FakeTestTypes) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("testtypes", c.ns, name), &testgroup_k8s_io.TestType{})
|
||||
Invokes(core.NewDeleteAction(testtypesResource, c.ns, name), &testgroup_k8s_io.TestType{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeTestTypes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("testtypes", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(testtypesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &testgroup_k8s_io.TestTypeList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeTestTypes) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeTestTypes) Get(name string) (result *testgroup_k8s_io.TestType, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("testtypes", c.ns, name), &testgroup_k8s_io.TestType{})
|
||||
Invokes(core.NewGetAction(testtypesResource, c.ns, name), &testgroup_k8s_io.TestType{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeTestTypes) Get(name string) (result *testgroup_k8s_io.TestType, err
|
||||
|
||||
func (c *FakeTestTypes) List(opts api.ListOptions) (result *testgroup_k8s_io.TestTypeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("testtypes", c.ns, opts), &testgroup_k8s_io.TestTypeList{})
|
||||
Invokes(core.NewListAction(testtypesResource, c.ns, opts), &testgroup_k8s_io.TestTypeList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeTestTypes) List(opts api.ListOptions) (result *testgroup_k8s_io.Tes
|
||||
// Watch returns a watch.Interface that watches the requested testTypes.
|
||||
func (c *FakeTestTypes) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("testtypes", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(testtypesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -28,9 +29,11 @@ type FakeComponentStatuses struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var componentstatusesResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "componentstatuses"}
|
||||
|
||||
func (c *FakeComponentStatuses) Create(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("componentstatuses", componentStatus), &api.ComponentStatus{})
|
||||
Invokes(core.NewRootCreateAction(componentstatusesResource, componentStatus), &api.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -39,7 +42,7 @@ func (c *FakeComponentStatuses) Create(componentStatus *api.ComponentStatus) (re
|
||||
|
||||
func (c *FakeComponentStatuses) Update(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("componentstatuses", componentStatus), &api.ComponentStatus{})
|
||||
Invokes(core.NewRootUpdateAction(componentstatusesResource, componentStatus), &api.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -48,12 +51,12 @@ func (c *FakeComponentStatuses) Update(componentStatus *api.ComponentStatus) (re
|
||||
|
||||
func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("componentstatuses", name), &api.ComponentStatus{})
|
||||
Invokes(core.NewRootDeleteAction(componentstatusesResource, name), &api.ComponentStatus{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("componentstatuses", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.ComponentStatusList{})
|
||||
return err
|
||||
@ -61,7 +64,7 @@ func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, lis
|
||||
|
||||
func (c *FakeComponentStatuses) Get(name string) (result *api.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("componentstatuses", name), &api.ComponentStatus{})
|
||||
Invokes(core.NewRootGetAction(componentstatusesResource, name), &api.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -70,7 +73,7 @@ func (c *FakeComponentStatuses) Get(name string) (result *api.ComponentStatus, e
|
||||
|
||||
func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("componentstatuses", opts), &api.ComponentStatusList{})
|
||||
Invokes(core.NewRootListAction(componentstatusesResource, opts), &api.ComponentStatusList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -91,5 +94,5 @@ func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.Componen
|
||||
// Watch returns a watch.Interface that watches the requested componentStatuses.
|
||||
func (c *FakeComponentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("componentstatuses", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakeConfigMaps struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var configmapsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "configmaps"}
|
||||
|
||||
func (c *FakeConfigMaps) Create(configMap *api.ConfigMap) (result *api.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("configmaps", c.ns, configMap), &api.ConfigMap{})
|
||||
Invokes(core.NewCreateAction(configmapsResource, c.ns, configMap), &api.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakeConfigMaps) Create(configMap *api.ConfigMap) (result *api.ConfigMap
|
||||
|
||||
func (c *FakeConfigMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("configmaps", c.ns, configMap), &api.ConfigMap{})
|
||||
Invokes(core.NewUpdateAction(configmapsResource, c.ns, configMap), &api.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,13 +54,13 @@ func (c *FakeConfigMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap
|
||||
|
||||
func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("configmaps", c.ns, name), &api.ConfigMap{})
|
||||
Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &api.ConfigMap{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("configmaps", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.ConfigMapList{})
|
||||
return err
|
||||
@ -65,7 +68,7 @@ func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeConfigMaps) Get(name string) (result *api.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("configmaps", c.ns, name), &api.ConfigMap{})
|
||||
Invokes(core.NewGetAction(configmapsResource, c.ns, name), &api.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -75,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string) (result *api.ConfigMap, err error) {
|
||||
|
||||
func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("configmaps", c.ns, opts), &api.ConfigMapList{})
|
||||
Invokes(core.NewListAction(configmapsResource, c.ns, opts), &api.ConfigMapList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -97,6 +100,6 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList,
|
||||
// Watch returns a watch.Interface that watches the requested configMaps.
|
||||
func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("configmaps", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakeEndpoints struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var endpointsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "endpoints"}
|
||||
|
||||
func (c *FakeEndpoints) Create(endpoints *api.Endpoints) (result *api.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("endpoints", c.ns, endpoints), &api.Endpoints{})
|
||||
Invokes(core.NewCreateAction(endpointsResource, c.ns, endpoints), &api.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakeEndpoints) Create(endpoints *api.Endpoints) (result *api.Endpoints,
|
||||
|
||||
func (c *FakeEndpoints) Update(endpoints *api.Endpoints) (result *api.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("endpoints", c.ns, endpoints), &api.Endpoints{})
|
||||
Invokes(core.NewUpdateAction(endpointsResource, c.ns, endpoints), &api.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,13 +54,13 @@ func (c *FakeEndpoints) Update(endpoints *api.Endpoints) (result *api.Endpoints,
|
||||
|
||||
func (c *FakeEndpoints) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("endpoints", c.ns, name), &api.Endpoints{})
|
||||
Invokes(core.NewDeleteAction(endpointsResource, c.ns, name), &api.Endpoints{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("endpoints", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.EndpointsList{})
|
||||
return err
|
||||
@ -65,7 +68,7 @@ func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeEndpoints) Get(name string) (result *api.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("endpoints", c.ns, name), &api.Endpoints{})
|
||||
Invokes(core.NewGetAction(endpointsResource, c.ns, name), &api.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -75,7 +78,7 @@ func (c *FakeEndpoints) Get(name string) (result *api.Endpoints, err error) {
|
||||
|
||||
func (c *FakeEndpoints) List(opts api.ListOptions) (result *api.EndpointsList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("endpoints", c.ns, opts), &api.EndpointsList{})
|
||||
Invokes(core.NewListAction(endpointsResource, c.ns, opts), &api.EndpointsList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -97,6 +100,6 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *api.EndpointsList, e
|
||||
// Watch returns a watch.Interface that watches the requested endpoints.
|
||||
func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("endpoints", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakeEvents struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var eventsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "events"}
|
||||
|
||||
func (c *FakeEvents) Create(event *api.Event) (result *api.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("events", c.ns, event), &api.Event{})
|
||||
Invokes(core.NewCreateAction(eventsResource, c.ns, event), &api.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakeEvents) Create(event *api.Event) (result *api.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) Update(event *api.Event) (result *api.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("events", c.ns, event), &api.Event{})
|
||||
Invokes(core.NewUpdateAction(eventsResource, c.ns, event), &api.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,13 +54,13 @@ func (c *FakeEvents) Update(event *api.Event) (result *api.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("events", c.ns, name), &api.Event{})
|
||||
Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &api.Event{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("events", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.EventList{})
|
||||
return err
|
||||
@ -65,7 +68,7 @@ func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions ap
|
||||
|
||||
func (c *FakeEvents) Get(name string) (result *api.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("events", c.ns, name), &api.Event{})
|
||||
Invokes(core.NewGetAction(eventsResource, c.ns, name), &api.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -75,7 +78,7 @@ func (c *FakeEvents) Get(name string) (result *api.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("events", c.ns, opts), &api.EventList{})
|
||||
Invokes(core.NewListAction(eventsResource, c.ns, opts), &api.EventList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -97,6 +100,6 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err erro
|
||||
// Watch returns a watch.Interface that watches the requested events.
|
||||
func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("events", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ import (
|
||||
)
|
||||
|
||||
func (c *FakeEvents) CreateWithEventNamespace(event *api.Event) (*api.Event, error) {
|
||||
action := core.NewRootCreateAction("events", event)
|
||||
action := core.NewRootCreateAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewCreateAction("events", c.ns, event)
|
||||
action = core.NewCreateAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -38,9 +38,9 @@ func (c *FakeEvents) CreateWithEventNamespace(event *api.Event) (*api.Event, err
|
||||
|
||||
// Update replaces an existing event. Returns the copy of the event the server returns, or an error.
|
||||
func (c *FakeEvents) UpdateWithEventNamespace(event *api.Event) (*api.Event, error) {
|
||||
action := core.NewRootUpdateAction("events", event)
|
||||
action := core.NewRootUpdateAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewUpdateAction("events", c.ns, event)
|
||||
action = core.NewUpdateAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -52,9 +52,9 @@ func (c *FakeEvents) UpdateWithEventNamespace(event *api.Event) (*api.Event, err
|
||||
|
||||
// Patch patches an existing event. Returns the copy of the event the server returns, or an error.
|
||||
func (c *FakeEvents) Patch(event *api.Event, data []byte) (*api.Event, error) {
|
||||
action := core.NewRootPatchAction("events", event)
|
||||
action := core.NewRootPatchAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewPatchAction("events", c.ns, event)
|
||||
action = core.NewPatchAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -66,9 +66,9 @@ func (c *FakeEvents) Patch(event *api.Event, data []byte) (*api.Event, error) {
|
||||
|
||||
// Search returns a list of events matching the specified object.
|
||||
func (c *FakeEvents) Search(objOrRef runtime.Object) (*api.EventList, error) {
|
||||
action := core.NewRootListAction("events", api.ListOptions{})
|
||||
action := core.NewRootListAction(eventsResource, api.ListOptions{})
|
||||
if c.ns != "" {
|
||||
action = core.NewListAction("events", c.ns, api.ListOptions{})
|
||||
action = core.NewListAction(eventsResource, c.ns, api.ListOptions{})
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, &api.EventList{})
|
||||
if obj == nil {
|
||||
@ -81,7 +81,7 @@ func (c *FakeEvents) Search(objOrRef runtime.Object) (*api.EventList, error) {
|
||||
func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
|
||||
action := core.GenericActionImpl{}
|
||||
action.Verb = "get-field-selector"
|
||||
action.Resource = "events"
|
||||
action.Resource = eventsResource
|
||||
|
||||
c.Fake.Invokes(action, nil)
|
||||
return fields.Everything()
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakeLimitRanges struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var limitrangesResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "limitranges"}
|
||||
|
||||
func (c *FakeLimitRanges) Create(limitRange *api.LimitRange) (result *api.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("limitranges", c.ns, limitRange), &api.LimitRange{})
|
||||
Invokes(core.NewCreateAction(limitrangesResource, c.ns, limitRange), &api.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakeLimitRanges) Create(limitRange *api.LimitRange) (result *api.LimitR
|
||||
|
||||
func (c *FakeLimitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("limitranges", c.ns, limitRange), &api.LimitRange{})
|
||||
Invokes(core.NewUpdateAction(limitrangesResource, c.ns, limitRange), &api.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,13 +54,13 @@ func (c *FakeLimitRanges) Update(limitRange *api.LimitRange) (result *api.LimitR
|
||||
|
||||
func (c *FakeLimitRanges) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("limitranges", c.ns, name), &api.LimitRange{})
|
||||
Invokes(core.NewDeleteAction(limitrangesResource, c.ns, name), &api.LimitRange{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("limitranges", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.LimitRangeList{})
|
||||
return err
|
||||
@ -65,7 +68,7 @@ func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeLimitRanges) Get(name string) (result *api.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("limitranges", c.ns, name), &api.LimitRange{})
|
||||
Invokes(core.NewGetAction(limitrangesResource, c.ns, name), &api.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -75,7 +78,7 @@ func (c *FakeLimitRanges) Get(name string) (result *api.LimitRange, err error) {
|
||||
|
||||
func (c *FakeLimitRanges) List(opts api.ListOptions) (result *api.LimitRangeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("limitranges", c.ns, opts), &api.LimitRangeList{})
|
||||
Invokes(core.NewListAction(limitrangesResource, c.ns, opts), &api.LimitRangeList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -97,6 +100,6 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *api.LimitRangeList
|
||||
// Watch returns a watch.Interface that watches the requested limitRanges.
|
||||
func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("limitranges", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -28,9 +29,11 @@ type FakeNamespaces struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var namespacesResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "namespaces"}
|
||||
|
||||
func (c *FakeNamespaces) Create(namespace *api.Namespace) (result *api.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("namespaces", namespace), &api.Namespace{})
|
||||
Invokes(core.NewRootCreateAction(namespacesResource, namespace), &api.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -39,7 +42,7 @@ func (c *FakeNamespaces) Create(namespace *api.Namespace) (result *api.Namespace
|
||||
|
||||
func (c *FakeNamespaces) Update(namespace *api.Namespace) (result *api.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("namespaces", namespace), &api.Namespace{})
|
||||
Invokes(core.NewRootUpdateAction(namespacesResource, namespace), &api.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -48,7 +51,7 @@ func (c *FakeNamespaces) Update(namespace *api.Namespace) (result *api.Namespace
|
||||
|
||||
func (c *FakeNamespaces) UpdateStatus(namespace *api.Namespace) (*api.Namespace, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction("namespaces", "status", namespace), &api.Namespace{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &api.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -57,12 +60,12 @@ func (c *FakeNamespaces) UpdateStatus(namespace *api.Namespace) (*api.Namespace,
|
||||
|
||||
func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("namespaces", name), &api.Namespace{})
|
||||
Invokes(core.NewRootDeleteAction(namespacesResource, name), &api.Namespace{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("namespaces", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.NamespaceList{})
|
||||
return err
|
||||
@ -70,7 +73,7 @@ func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeNamespaces) Get(name string) (result *api.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("namespaces", name), &api.Namespace{})
|
||||
Invokes(core.NewRootGetAction(namespacesResource, name), &api.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -79,7 +82,7 @@ func (c *FakeNamespaces) Get(name string) (result *api.Namespace, err error) {
|
||||
|
||||
func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("namespaces", opts), &api.NamespaceList{})
|
||||
Invokes(core.NewRootListAction(namespacesResource, opts), &api.NamespaceList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -100,5 +103,5 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList,
|
||||
// Watch returns a watch.Interface that watches the requested namespaces.
|
||||
func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("namespaces", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(namespacesResource, opts))
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
func (c *FakeNamespaces) Finalize(namespace *api.Namespace) (*api.Namespace, error) {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = "namespaces"
|
||||
action.Resource = namespacesResource
|
||||
action.Subresource = "finalize"
|
||||
action.Object = namespace
|
||||
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -28,9 +29,11 @@ type FakeNodes struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var nodesResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "nodes"}
|
||||
|
||||
func (c *FakeNodes) Create(node *api.Node) (result *api.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("nodes", node), &api.Node{})
|
||||
Invokes(core.NewRootCreateAction(nodesResource, node), &api.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -39,7 +42,7 @@ func (c *FakeNodes) Create(node *api.Node) (result *api.Node, err error) {
|
||||
|
||||
func (c *FakeNodes) Update(node *api.Node) (result *api.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("nodes", node), &api.Node{})
|
||||
Invokes(core.NewRootUpdateAction(nodesResource, node), &api.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -48,7 +51,7 @@ func (c *FakeNodes) Update(node *api.Node) (result *api.Node, err error) {
|
||||
|
||||
func (c *FakeNodes) UpdateStatus(node *api.Node) (*api.Node, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction("nodes", "status", node), &api.Node{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(nodesResource, "status", node), &api.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -57,12 +60,12 @@ func (c *FakeNodes) UpdateStatus(node *api.Node) (*api.Node, error) {
|
||||
|
||||
func (c *FakeNodes) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("nodes", name), &api.Node{})
|
||||
Invokes(core.NewRootDeleteAction(nodesResource, name), &api.Node{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("nodes", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(nodesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.NodeList{})
|
||||
return err
|
||||
@ -70,7 +73,7 @@ func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api
|
||||
|
||||
func (c *FakeNodes) Get(name string) (result *api.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("nodes", name), &api.Node{})
|
||||
Invokes(core.NewRootGetAction(nodesResource, name), &api.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -79,7 +82,7 @@ func (c *FakeNodes) Get(name string) (result *api.Node, err error) {
|
||||
|
||||
func (c *FakeNodes) List(opts api.ListOptions) (result *api.NodeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("nodes", opts), &api.NodeList{})
|
||||
Invokes(core.NewRootListAction(nodesResource, opts), &api.NodeList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -100,5 +103,5 @@ func (c *FakeNodes) List(opts api.ListOptions) (result *api.NodeList, err error)
|
||||
// Watch returns a watch.Interface that watches the requested nodes.
|
||||
func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("nodes", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(nodesResource, opts))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -28,9 +29,11 @@ type FakePersistentVolumes struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var persistentvolumesResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "persistentvolumes"}
|
||||
|
||||
func (c *FakePersistentVolumes) Create(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("persistentvolumes", persistentVolume), &api.PersistentVolume{})
|
||||
Invokes(core.NewRootCreateAction(persistentvolumesResource, persistentVolume), &api.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -39,7 +42,7 @@ func (c *FakePersistentVolumes) Create(persistentVolume *api.PersistentVolume) (
|
||||
|
||||
func (c *FakePersistentVolumes) Update(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("persistentvolumes", persistentVolume), &api.PersistentVolume{})
|
||||
Invokes(core.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &api.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -48,7 +51,7 @@ func (c *FakePersistentVolumes) Update(persistentVolume *api.PersistentVolume) (
|
||||
|
||||
func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *api.PersistentVolume) (*api.PersistentVolume, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction("persistentvolumes", "status", persistentVolume), &api.PersistentVolume{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &api.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -57,12 +60,12 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *api.PersistentVol
|
||||
|
||||
func (c *FakePersistentVolumes) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("persistentvolumes", name), &api.PersistentVolume{})
|
||||
Invokes(core.NewRootDeleteAction(persistentvolumesResource, name), &api.PersistentVolume{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("persistentvolumes", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.PersistentVolumeList{})
|
||||
return err
|
||||
@ -70,7 +73,7 @@ func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, lis
|
||||
|
||||
func (c *FakePersistentVolumes) Get(name string) (result *api.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("persistentvolumes", name), &api.PersistentVolume{})
|
||||
Invokes(core.NewRootGetAction(persistentvolumesResource, name), &api.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -79,7 +82,7 @@ func (c *FakePersistentVolumes) Get(name string) (result *api.PersistentVolume,
|
||||
|
||||
func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *api.PersistentVolumeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("persistentvolumes", opts), &api.PersistentVolumeList{})
|
||||
Invokes(core.NewRootListAction(persistentvolumesResource, opts), &api.PersistentVolumeList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -100,5 +103,5 @@ func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *api.Persiste
|
||||
// Watch returns a watch.Interface that watches the requested persistentVolumes.
|
||||
func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("persistentvolumes", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakePersistentVolumeClaims struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var persistentvolumeclaimsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "persistentvolumeclaims"}
|
||||
|
||||
func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *api.PersistentVolumeClaim) (result *api.PersistentVolumeClaim, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("persistentvolumeclaims", c.ns, persistentVolumeClaim), &api.PersistentVolumeClaim{})
|
||||
Invokes(core.NewCreateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &api.PersistentVolumeClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakePersistentVolumeClaims) Create(persistentVolumeClaim *api.Persisten
|
||||
|
||||
func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *api.PersistentVolumeClaim) (result *api.PersistentVolumeClaim, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("persistentvolumeclaims", c.ns, persistentVolumeClaim), &api.PersistentVolumeClaim{})
|
||||
Invokes(core.NewUpdateAction(persistentvolumeclaimsResource, c.ns, persistentVolumeClaim), &api.PersistentVolumeClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,7 +54,7 @@ func (c *FakePersistentVolumeClaims) Update(persistentVolumeClaim *api.Persisten
|
||||
|
||||
func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("persistentvolumeclaims", "status", c.ns, persistentVolumeClaim), &api.PersistentVolumeClaim{})
|
||||
Invokes(core.NewUpdateSubresourceAction(persistentvolumeclaimsResource, "status", c.ns, persistentVolumeClaim), &api.PersistentVolumeClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -61,13 +64,13 @@ func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *api.Per
|
||||
|
||||
func (c *FakePersistentVolumeClaims) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("persistentvolumeclaims", c.ns, name), &api.PersistentVolumeClaim{})
|
||||
Invokes(core.NewDeleteAction(persistentvolumeclaimsResource, c.ns, name), &api.PersistentVolumeClaim{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumeClaims) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("persistentvolumeclaims", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(persistentvolumeclaimsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.PersistentVolumeClaimList{})
|
||||
return err
|
||||
@ -75,7 +78,7 @@ func (c *FakePersistentVolumeClaims) DeleteCollection(options *api.DeleteOptions
|
||||
|
||||
func (c *FakePersistentVolumeClaims) Get(name string) (result *api.PersistentVolumeClaim, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("persistentvolumeclaims", c.ns, name), &api.PersistentVolumeClaim{})
|
||||
Invokes(core.NewGetAction(persistentvolumeclaimsResource, c.ns, name), &api.PersistentVolumeClaim{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -85,7 +88,7 @@ func (c *FakePersistentVolumeClaims) Get(name string) (result *api.PersistentVol
|
||||
|
||||
func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *api.PersistentVolumeClaimList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("persistentvolumeclaims", c.ns, opts), &api.PersistentVolumeClaimList{})
|
||||
Invokes(core.NewListAction(persistentvolumeclaimsResource, c.ns, opts), &api.PersistentVolumeClaimList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -107,6 +110,6 @@ func (c *FakePersistentVolumeClaims) List(opts api.ListOptions) (result *api.Per
|
||||
// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
|
||||
func (c *FakePersistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("persistentvolumeclaims", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(persistentvolumeclaimsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakePods struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var podsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "pods"}
|
||||
|
||||
func (c *FakePods) Create(pod *api.Pod) (result *api.Pod, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("pods", c.ns, pod), &api.Pod{})
|
||||
Invokes(core.NewCreateAction(podsResource, c.ns, pod), &api.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakePods) Create(pod *api.Pod) (result *api.Pod, err error) {
|
||||
|
||||
func (c *FakePods) Update(pod *api.Pod) (result *api.Pod, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("pods", c.ns, pod), &api.Pod{})
|
||||
Invokes(core.NewUpdateAction(podsResource, c.ns, pod), &api.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,7 +54,7 @@ func (c *FakePods) Update(pod *api.Pod) (result *api.Pod, err error) {
|
||||
|
||||
func (c *FakePods) UpdateStatus(pod *api.Pod) (*api.Pod, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("pods", "status", c.ns, pod), &api.Pod{})
|
||||
Invokes(core.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &api.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -61,13 +64,13 @@ func (c *FakePods) UpdateStatus(pod *api.Pod) (*api.Pod, error) {
|
||||
|
||||
func (c *FakePods) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("pods", c.ns, name), &api.Pod{})
|
||||
Invokes(core.NewDeleteAction(podsResource, c.ns, name), &api.Pod{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePods) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("pods", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(podsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.PodList{})
|
||||
return err
|
||||
@ -75,7 +78,7 @@ func (c *FakePods) DeleteCollection(options *api.DeleteOptions, listOptions api.
|
||||
|
||||
func (c *FakePods) Get(name string) (result *api.Pod, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("pods", c.ns, name), &api.Pod{})
|
||||
Invokes(core.NewGetAction(podsResource, c.ns, name), &api.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -85,7 +88,7 @@ func (c *FakePods) Get(name string) (result *api.Pod, err error) {
|
||||
|
||||
func (c *FakePods) List(opts api.ListOptions) (result *api.PodList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("pods", c.ns, opts), &api.PodList{})
|
||||
Invokes(core.NewListAction(podsResource, c.ns, opts), &api.PodList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -107,6 +110,6 @@ func (c *FakePods) List(opts api.ListOptions) (result *api.PodList, err error) {
|
||||
// Watch returns a watch.Interface that watches the requested pods.
|
||||
func (c *FakePods) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("pods", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(podsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
func (c *FakePods) Bind(binding *api.Binding) error {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = "pods"
|
||||
action.Resource = podsResource
|
||||
action.Subresource = "bindings"
|
||||
action.Object = binding
|
||||
|
||||
@ -37,7 +37,7 @@ func (c *FakePods) GetLogs(name string, opts *api.PodLogOptions) *restclient.Req
|
||||
action := core.GenericActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Namespace = c.ns
|
||||
action.Resource = "pod"
|
||||
action.Resource = podsResource
|
||||
action.Subresource = "logs"
|
||||
action.Value = opts
|
||||
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakePodTemplates struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var podtemplatesResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "podtemplates"}
|
||||
|
||||
func (c *FakePodTemplates) Create(podTemplate *api.PodTemplate) (result *api.PodTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("podtemplates", c.ns, podTemplate), &api.PodTemplate{})
|
||||
Invokes(core.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &api.PodTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakePodTemplates) Create(podTemplate *api.PodTemplate) (result *api.Pod
|
||||
|
||||
func (c *FakePodTemplates) Update(podTemplate *api.PodTemplate) (result *api.PodTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("podtemplates", c.ns, podTemplate), &api.PodTemplate{})
|
||||
Invokes(core.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &api.PodTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,13 +54,13 @@ func (c *FakePodTemplates) Update(podTemplate *api.PodTemplate) (result *api.Pod
|
||||
|
||||
func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("podtemplates", c.ns, name), &api.PodTemplate{})
|
||||
Invokes(core.NewDeleteAction(podtemplatesResource, c.ns, name), &api.PodTemplate{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePodTemplates) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("podtemplates", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.PodTemplateList{})
|
||||
return err
|
||||
@ -65,7 +68,7 @@ func (c *FakePodTemplates) DeleteCollection(options *api.DeleteOptions, listOpti
|
||||
|
||||
func (c *FakePodTemplates) Get(name string) (result *api.PodTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("podtemplates", c.ns, name), &api.PodTemplate{})
|
||||
Invokes(core.NewGetAction(podtemplatesResource, c.ns, name), &api.PodTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -75,7 +78,7 @@ func (c *FakePodTemplates) Get(name string) (result *api.PodTemplate, err error)
|
||||
|
||||
func (c *FakePodTemplates) List(opts api.ListOptions) (result *api.PodTemplateList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("podtemplates", c.ns, opts), &api.PodTemplateList{})
|
||||
Invokes(core.NewListAction(podtemplatesResource, c.ns, opts), &api.PodTemplateList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -97,6 +100,6 @@ func (c *FakePodTemplates) List(opts api.ListOptions) (result *api.PodTemplateLi
|
||||
// Watch returns a watch.Interface that watches the requested podTemplates.
|
||||
func (c *FakePodTemplates) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("podtemplates", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(podtemplatesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakeReplicationControllers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var replicationcontrollersResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "replicationcontrollers"}
|
||||
|
||||
func (c *FakeReplicationControllers) Create(replicationController *api.ReplicationController) (result *api.ReplicationController, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("replicationcontrollers", c.ns, replicationController), &api.ReplicationController{})
|
||||
Invokes(core.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &api.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakeReplicationControllers) Create(replicationController *api.Replicati
|
||||
|
||||
func (c *FakeReplicationControllers) Update(replicationController *api.ReplicationController) (result *api.ReplicationController, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("replicationcontrollers", c.ns, replicationController), &api.ReplicationController{})
|
||||
Invokes(core.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &api.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,7 +54,7 @@ func (c *FakeReplicationControllers) Update(replicationController *api.Replicati
|
||||
|
||||
func (c *FakeReplicationControllers) UpdateStatus(replicationController *api.ReplicationController) (*api.ReplicationController, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("replicationcontrollers", "status", c.ns, replicationController), &api.ReplicationController{})
|
||||
Invokes(core.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &api.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -61,13 +64,13 @@ func (c *FakeReplicationControllers) UpdateStatus(replicationController *api.Rep
|
||||
|
||||
func (c *FakeReplicationControllers) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("replicationcontrollers", c.ns, name), &api.ReplicationController{})
|
||||
Invokes(core.NewDeleteAction(replicationcontrollersResource, c.ns, name), &api.ReplicationController{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeReplicationControllers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("replicationcontrollers", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.ReplicationControllerList{})
|
||||
return err
|
||||
@ -75,7 +78,7 @@ func (c *FakeReplicationControllers) DeleteCollection(options *api.DeleteOptions
|
||||
|
||||
func (c *FakeReplicationControllers) Get(name string) (result *api.ReplicationController, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("replicationcontrollers", c.ns, name), &api.ReplicationController{})
|
||||
Invokes(core.NewGetAction(replicationcontrollersResource, c.ns, name), &api.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -85,7 +88,7 @@ func (c *FakeReplicationControllers) Get(name string) (result *api.ReplicationCo
|
||||
|
||||
func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *api.ReplicationControllerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("replicationcontrollers", c.ns, opts), &api.ReplicationControllerList{})
|
||||
Invokes(core.NewListAction(replicationcontrollersResource, c.ns, opts), &api.ReplicationControllerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -107,6 +110,6 @@ func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *api.Rep
|
||||
// Watch returns a watch.Interface that watches the requested replicationControllers.
|
||||
func (c *FakeReplicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("replicationcontrollers", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(replicationcontrollersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakeResourceQuotas struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var resourcequotasResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "resourcequotas"}
|
||||
|
||||
func (c *FakeResourceQuotas) Create(resourceQuota *api.ResourceQuota) (result *api.ResourceQuota, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("resourcequotas", c.ns, resourceQuota), &api.ResourceQuota{})
|
||||
Invokes(core.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &api.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakeResourceQuotas) Create(resourceQuota *api.ResourceQuota) (result *a
|
||||
|
||||
func (c *FakeResourceQuotas) Update(resourceQuota *api.ResourceQuota) (result *api.ResourceQuota, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("resourcequotas", c.ns, resourceQuota), &api.ResourceQuota{})
|
||||
Invokes(core.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &api.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,7 +54,7 @@ func (c *FakeResourceQuotas) Update(resourceQuota *api.ResourceQuota) (result *a
|
||||
|
||||
func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("resourcequotas", "status", c.ns, resourceQuota), &api.ResourceQuota{})
|
||||
Invokes(core.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &api.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -61,13 +64,13 @@ func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (*ap
|
||||
|
||||
func (c *FakeResourceQuotas) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("resourcequotas", c.ns, name), &api.ResourceQuota{})
|
||||
Invokes(core.NewDeleteAction(resourcequotasResource, c.ns, name), &api.ResourceQuota{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeResourceQuotas) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("resourcequotas", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.ResourceQuotaList{})
|
||||
return err
|
||||
@ -75,7 +78,7 @@ func (c *FakeResourceQuotas) DeleteCollection(options *api.DeleteOptions, listOp
|
||||
|
||||
func (c *FakeResourceQuotas) Get(name string) (result *api.ResourceQuota, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("resourcequotas", c.ns, name), &api.ResourceQuota{})
|
||||
Invokes(core.NewGetAction(resourcequotasResource, c.ns, name), &api.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -85,7 +88,7 @@ func (c *FakeResourceQuotas) Get(name string) (result *api.ResourceQuota, err er
|
||||
|
||||
func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuotaList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("resourcequotas", c.ns, opts), &api.ResourceQuotaList{})
|
||||
Invokes(core.NewListAction(resourcequotasResource, c.ns, opts), &api.ResourceQuotaList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -107,6 +110,6 @@ func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuo
|
||||
// Watch returns a watch.Interface that watches the requested resourceQuotas.
|
||||
func (c *FakeResourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("resourcequotas", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(resourcequotasResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakeSecrets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var secretsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "secrets"}
|
||||
|
||||
func (c *FakeSecrets) Create(secret *api.Secret) (result *api.Secret, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("secrets", c.ns, secret), &api.Secret{})
|
||||
Invokes(core.NewCreateAction(secretsResource, c.ns, secret), &api.Secret{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakeSecrets) Create(secret *api.Secret) (result *api.Secret, err error)
|
||||
|
||||
func (c *FakeSecrets) Update(secret *api.Secret) (result *api.Secret, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("secrets", c.ns, secret), &api.Secret{})
|
||||
Invokes(core.NewUpdateAction(secretsResource, c.ns, secret), &api.Secret{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,13 +54,13 @@ func (c *FakeSecrets) Update(secret *api.Secret) (result *api.Secret, err error)
|
||||
|
||||
func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("secrets", c.ns, name), &api.Secret{})
|
||||
Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &api.Secret{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("secrets", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.SecretList{})
|
||||
return err
|
||||
@ -65,7 +68,7 @@ func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions a
|
||||
|
||||
func (c *FakeSecrets) Get(name string) (result *api.Secret, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("secrets", c.ns, name), &api.Secret{})
|
||||
Invokes(core.NewGetAction(secretsResource, c.ns, name), &api.Secret{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -75,7 +78,7 @@ func (c *FakeSecrets) Get(name string) (result *api.Secret, err error) {
|
||||
|
||||
func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("secrets", c.ns, opts), &api.SecretList{})
|
||||
Invokes(core.NewListAction(secretsResource, c.ns, opts), &api.SecretList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -97,6 +100,6 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *api.SecretList, err er
|
||||
// Watch returns a watch.Interface that watches the requested secrets.
|
||||
func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("secrets", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakeServices struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var servicesResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "services"}
|
||||
|
||||
func (c *FakeServices) Create(service *api.Service) (result *api.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("services", c.ns, service), &api.Service{})
|
||||
Invokes(core.NewCreateAction(servicesResource, c.ns, service), &api.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakeServices) Create(service *api.Service) (result *api.Service, err er
|
||||
|
||||
func (c *FakeServices) Update(service *api.Service) (result *api.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("services", c.ns, service), &api.Service{})
|
||||
Invokes(core.NewUpdateAction(servicesResource, c.ns, service), &api.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,7 +54,7 @@ func (c *FakeServices) Update(service *api.Service) (result *api.Service, err er
|
||||
|
||||
func (c *FakeServices) UpdateStatus(service *api.Service) (*api.Service, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("services", "status", c.ns, service), &api.Service{})
|
||||
Invokes(core.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &api.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -61,13 +64,13 @@ func (c *FakeServices) UpdateStatus(service *api.Service) (*api.Service, error)
|
||||
|
||||
func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("services", c.ns, name), &api.Service{})
|
||||
Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &api.Service{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("services", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.ServiceList{})
|
||||
return err
|
||||
@ -75,7 +78,7 @@ func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeServices) Get(name string) (result *api.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("services", c.ns, name), &api.Service{})
|
||||
Invokes(core.NewGetAction(servicesResource, c.ns, name), &api.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -85,7 +88,7 @@ func (c *FakeServices) Get(name string) (result *api.Service, err error) {
|
||||
|
||||
func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("services", c.ns, opts), &api.ServiceList{})
|
||||
Invokes(core.NewListAction(servicesResource, c.ns, opts), &api.ServiceList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -107,6 +110,6 @@ func (c *FakeServices) List(opts api.ListOptions) (result *api.ServiceList, err
|
||||
// Watch returns a watch.Interface that watches the requested services.
|
||||
func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("services", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -22,5 +22,5 @@ import (
|
||||
)
|
||||
|
||||
func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
|
||||
return c.Fake.InvokesProxy(core.NewProxyGetAction("services", c.ns, scheme, name, port, path, params))
|
||||
return c.Fake.InvokesProxy(core.NewProxyGetAction(servicesResource, c.ns, scheme, name, port, path, params))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -29,9 +30,11 @@ type FakeServiceAccounts struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var serviceaccountsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "serviceaccounts"}
|
||||
|
||||
func (c *FakeServiceAccounts) Create(serviceAccount *api.ServiceAccount) (result *api.ServiceAccount, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("serviceaccounts", c.ns, serviceAccount), &api.ServiceAccount{})
|
||||
Invokes(core.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &api.ServiceAccount{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -41,7 +44,7 @@ func (c *FakeServiceAccounts) Create(serviceAccount *api.ServiceAccount) (result
|
||||
|
||||
func (c *FakeServiceAccounts) Update(serviceAccount *api.ServiceAccount) (result *api.ServiceAccount, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("serviceaccounts", c.ns, serviceAccount), &api.ServiceAccount{})
|
||||
Invokes(core.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &api.ServiceAccount{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -51,13 +54,13 @@ func (c *FakeServiceAccounts) Update(serviceAccount *api.ServiceAccount) (result
|
||||
|
||||
func (c *FakeServiceAccounts) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("serviceaccounts", c.ns, name), &api.ServiceAccount{})
|
||||
Invokes(core.NewDeleteAction(serviceaccountsResource, c.ns, name), &api.ServiceAccount{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeServiceAccounts) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("serviceaccounts", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.ServiceAccountList{})
|
||||
return err
|
||||
@ -65,7 +68,7 @@ func (c *FakeServiceAccounts) DeleteCollection(options *api.DeleteOptions, listO
|
||||
|
||||
func (c *FakeServiceAccounts) Get(name string) (result *api.ServiceAccount, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("serviceaccounts", c.ns, name), &api.ServiceAccount{})
|
||||
Invokes(core.NewGetAction(serviceaccountsResource, c.ns, name), &api.ServiceAccount{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -75,7 +78,7 @@ func (c *FakeServiceAccounts) Get(name string) (result *api.ServiceAccount, err
|
||||
|
||||
func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *api.ServiceAccountList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("serviceaccounts", c.ns, opts), &api.ServiceAccountList{})
|
||||
Invokes(core.NewListAction(serviceaccountsResource, c.ns, opts), &api.ServiceAccountList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -97,6 +100,6 @@ func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *api.ServiceAcc
|
||||
// Watch returns a watch.Interface that watches the requested serviceAccounts.
|
||||
func (c *FakeServiceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("serviceaccounts", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(serviceaccountsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeDaemonSets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var daemonsetsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "daemonsets"}
|
||||
|
||||
func (c *FakeDaemonSets) Create(daemonSet *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("daemonsets", c.ns, daemonSet), &extensions.DaemonSet{})
|
||||
Invokes(core.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &extensions.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeDaemonSets) Create(daemonSet *extensions.DaemonSet) (result *extens
|
||||
|
||||
func (c *FakeDaemonSets) Update(daemonSet *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("daemonsets", c.ns, daemonSet), &extensions.DaemonSet{})
|
||||
Invokes(core.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &extensions.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeDaemonSets) Update(daemonSet *extensions.DaemonSet) (result *extens
|
||||
|
||||
func (c *FakeDaemonSets) UpdateStatus(daemonSet *extensions.DaemonSet) (*extensions.DaemonSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("daemonsets", "status", c.ns, daemonSet), &extensions.DaemonSet{})
|
||||
Invokes(core.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &extensions.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *extensions.DaemonSet) (*extensi
|
||||
|
||||
func (c *FakeDaemonSets) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("daemonsets", c.ns, name), &extensions.DaemonSet{})
|
||||
Invokes(core.NewDeleteAction(daemonsetsResource, c.ns, name), &extensions.DaemonSet{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("daemonsets", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &extensions.DaemonSetList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeDaemonSets) Get(name string) (result *extensions.DaemonSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("daemonsets", c.ns, name), &extensions.DaemonSet{})
|
||||
Invokes(core.NewGetAction(daemonsetsResource, c.ns, name), &extensions.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeDaemonSets) Get(name string) (result *extensions.DaemonSet, err err
|
||||
|
||||
func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("daemonsets", c.ns, opts), &extensions.DaemonSetList{})
|
||||
Invokes(core.NewListAction(daemonsetsResource, c.ns, opts), &extensions.DaemonSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeDaemonSets) List(opts api.ListOptions) (result *extensions.DaemonSe
|
||||
// Watch returns a watch.Interface that watches the requested daemonSets.
|
||||
func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("daemonsets", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(daemonsetsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeDeployments struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var deploymentsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "deployments"}
|
||||
|
||||
func (c *FakeDeployments) Create(deployment *extensions.Deployment) (result *extensions.Deployment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("deployments", c.ns, deployment), &extensions.Deployment{})
|
||||
Invokes(core.NewCreateAction(deploymentsResource, c.ns, deployment), &extensions.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeDeployments) Create(deployment *extensions.Deployment) (result *ext
|
||||
|
||||
func (c *FakeDeployments) Update(deployment *extensions.Deployment) (result *extensions.Deployment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("deployments", c.ns, deployment), &extensions.Deployment{})
|
||||
Invokes(core.NewUpdateAction(deploymentsResource, c.ns, deployment), &extensions.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeDeployments) Update(deployment *extensions.Deployment) (result *ext
|
||||
|
||||
func (c *FakeDeployments) UpdateStatus(deployment *extensions.Deployment) (*extensions.Deployment, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("deployments", "status", c.ns, deployment), &extensions.Deployment{})
|
||||
Invokes(core.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &extensions.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeDeployments) UpdateStatus(deployment *extensions.Deployment) (*exte
|
||||
|
||||
func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("deployments", c.ns, name), &extensions.Deployment{})
|
||||
Invokes(core.NewDeleteAction(deploymentsResource, c.ns, name), &extensions.Deployment{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("deployments", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &extensions.DeploymentList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeDeployments) Get(name string) (result *extensions.Deployment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("deployments", c.ns, name), &extensions.Deployment{})
|
||||
Invokes(core.NewGetAction(deploymentsResource, c.ns, name), &extensions.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeDeployments) Get(name string) (result *extensions.Deployment, err e
|
||||
|
||||
func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("deployments", c.ns, opts), &extensions.DeploymentList{})
|
||||
Invokes(core.NewListAction(deploymentsResource, c.ns, opts), &extensions.DeploymentList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeDeployments) List(opts api.ListOptions) (result *extensions.Deploym
|
||||
// Watch returns a watch.Interface that watches the requested deployments.
|
||||
func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("deployments", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(deploymentsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
func (c *FakeDeployments) Rollback(deploymentRollback *extensions.DeploymentRollback) error {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = "deployments"
|
||||
action.Resource = deploymentsResource
|
||||
action.Subresource = "rollback"
|
||||
action.Object = deploymentRollback
|
||||
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeHorizontalPodAutoscalers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var horizontalpodautoscalersResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "horizontalpodautoscalers"}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (result *extensions.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("horizontalpodautoscalers", c.ns, horizontalPodAutoscaler), &extensions.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &extensions.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *extension
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (result *extensions.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("horizontalpodautoscalers", c.ns, horizontalPodAutoscaler), &extensions.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &extensions.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *extension
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("horizontalpodautoscalers", "status", c.ns, horizontalPodAutoscaler), &extensions.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &extensions.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *ext
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("horizontalpodautoscalers", c.ns, name), &extensions.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &extensions.HorizontalPodAutoscaler{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("horizontalpodautoscalers", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &extensions.HorizontalPodAutoscalerList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptio
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *extensions.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("horizontalpodautoscalers", c.ns, name), &extensions.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &extensions.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *extensions.Hori
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *extensions.HorizontalPodAutoscalerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("horizontalpodautoscalers", c.ns, opts), &extensions.HorizontalPodAutoscalerList{})
|
||||
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &extensions.HorizontalPodAutoscalerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *exten
|
||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||
func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("horizontalpodautoscalers", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeIngresses struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var ingressesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "ingresses"}
|
||||
|
||||
func (c *FakeIngresses) Create(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("ingresses", c.ns, ingress), &extensions.Ingress{})
|
||||
Invokes(core.NewCreateAction(ingressesResource, c.ns, ingress), &extensions.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeIngresses) Create(ingress *extensions.Ingress) (result *extensions.
|
||||
|
||||
func (c *FakeIngresses) Update(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("ingresses", c.ns, ingress), &extensions.Ingress{})
|
||||
Invokes(core.NewUpdateAction(ingressesResource, c.ns, ingress), &extensions.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeIngresses) Update(ingress *extensions.Ingress) (result *extensions.
|
||||
|
||||
func (c *FakeIngresses) UpdateStatus(ingress *extensions.Ingress) (*extensions.Ingress, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("ingresses", "status", c.ns, ingress), &extensions.Ingress{})
|
||||
Invokes(core.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &extensions.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeIngresses) UpdateStatus(ingress *extensions.Ingress) (*extensions.I
|
||||
|
||||
func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("ingresses", c.ns, name), &extensions.Ingress{})
|
||||
Invokes(core.NewDeleteAction(ingressesResource, c.ns, name), &extensions.Ingress{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("ingresses", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &extensions.IngressList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeIngresses) Get(name string) (result *extensions.Ingress, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("ingresses", c.ns, name), &extensions.Ingress{})
|
||||
Invokes(core.NewGetAction(ingressesResource, c.ns, name), &extensions.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeIngresses) Get(name string) (result *extensions.Ingress, err error)
|
||||
|
||||
func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("ingresses", c.ns, opts), &extensions.IngressList{})
|
||||
Invokes(core.NewListAction(ingressesResource, c.ns, opts), &extensions.IngressList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *extensions.IngressLi
|
||||
// Watch returns a watch.Interface that watches the requested ingresses.
|
||||
func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("ingresses", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeJobs struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var jobsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "jobs"}
|
||||
|
||||
func (c *FakeJobs) Create(job *extensions.Job) (result *extensions.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("jobs", c.ns, job), &extensions.Job{})
|
||||
Invokes(core.NewCreateAction(jobsResource, c.ns, job), &extensions.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeJobs) Create(job *extensions.Job) (result *extensions.Job, err erro
|
||||
|
||||
func (c *FakeJobs) Update(job *extensions.Job) (result *extensions.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("jobs", c.ns, job), &extensions.Job{})
|
||||
Invokes(core.NewUpdateAction(jobsResource, c.ns, job), &extensions.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeJobs) Update(job *extensions.Job) (result *extensions.Job, err erro
|
||||
|
||||
func (c *FakeJobs) UpdateStatus(job *extensions.Job) (*extensions.Job, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("jobs", "status", c.ns, job), &extensions.Job{})
|
||||
Invokes(core.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &extensions.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeJobs) UpdateStatus(job *extensions.Job) (*extensions.Job, error) {
|
||||
|
||||
func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("jobs", c.ns, name), &extensions.Job{})
|
||||
Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &extensions.Job{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("jobs", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &extensions.JobList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.
|
||||
|
||||
func (c *FakeJobs) Get(name string) (result *extensions.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("jobs", c.ns, name), &extensions.Job{})
|
||||
Invokes(core.NewGetAction(jobsResource, c.ns, name), &extensions.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeJobs) Get(name string) (result *extensions.Job, err error) {
|
||||
|
||||
func (c *FakeJobs) List(opts api.ListOptions) (result *extensions.JobList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("jobs", c.ns, opts), &extensions.JobList{})
|
||||
Invokes(core.NewListAction(jobsResource, c.ns, opts), &extensions.JobList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *extensions.JobList, err e
|
||||
// Watch returns a watch.Interface that watches the requested jobs.
|
||||
func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("jobs", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeReplicaSets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var replicasetsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "replicasets"}
|
||||
|
||||
func (c *FakeReplicaSets) Create(replicaSet *extensions.ReplicaSet) (result *extensions.ReplicaSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("replicasets", c.ns, replicaSet), &extensions.ReplicaSet{})
|
||||
Invokes(core.NewCreateAction(replicasetsResource, c.ns, replicaSet), &extensions.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeReplicaSets) Create(replicaSet *extensions.ReplicaSet) (result *ext
|
||||
|
||||
func (c *FakeReplicaSets) Update(replicaSet *extensions.ReplicaSet) (result *extensions.ReplicaSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("replicasets", c.ns, replicaSet), &extensions.ReplicaSet{})
|
||||
Invokes(core.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &extensions.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeReplicaSets) Update(replicaSet *extensions.ReplicaSet) (result *ext
|
||||
|
||||
func (c *FakeReplicaSets) UpdateStatus(replicaSet *extensions.ReplicaSet) (*extensions.ReplicaSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("replicasets", "status", c.ns, replicaSet), &extensions.ReplicaSet{})
|
||||
Invokes(core.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &extensions.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *extensions.ReplicaSet) (*exte
|
||||
|
||||
func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("replicasets", c.ns, name), &extensions.ReplicaSet{})
|
||||
Invokes(core.NewDeleteAction(replicasetsResource, c.ns, name), &extensions.ReplicaSet{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("replicasets", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &extensions.ReplicaSetList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeReplicaSets) Get(name string) (result *extensions.ReplicaSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("replicasets", c.ns, name), &extensions.ReplicaSet{})
|
||||
Invokes(core.NewGetAction(replicasetsResource, c.ns, name), &extensions.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeReplicaSets) Get(name string) (result *extensions.ReplicaSet, err e
|
||||
|
||||
func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("replicasets", c.ns, opts), &extensions.ReplicaSetList{})
|
||||
Invokes(core.NewListAction(replicasetsResource, c.ns, opts), &extensions.ReplicaSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *extensions.Replica
|
||||
// Watch returns a watch.Interface that watches the requested replicaSets.
|
||||
func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("replicasets", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
"k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
@ -25,7 +26,7 @@ func (c *FakeScales) Get(kind string, name string) (result *extensions.Scale, er
|
||||
action := core.GetActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Namespace = c.ns
|
||||
action.Resource = kind
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: kind}
|
||||
action.Subresource = "scale"
|
||||
action.Name = name
|
||||
obj, err := c.Fake.Invokes(action, &extensions.Scale{})
|
||||
@ -37,7 +38,7 @@ func (c *FakeScales) Update(kind string, scale *extensions.Scale) (result *exten
|
||||
action := core.UpdateActionImpl{}
|
||||
action.Verb = "update"
|
||||
action.Namespace = c.ns
|
||||
action.Resource = kind
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: kind}
|
||||
action.Subresource = "scale"
|
||||
action.Object = scale
|
||||
obj, err := c.Fake.Invokes(action, scale)
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
extensions "k8s.io/kubernetes/pkg/apis/extensions"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeThirdPartyResources struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var thirdpartyresourcesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "thirdpartyresources"}
|
||||
|
||||
func (c *FakeThirdPartyResources) Create(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("thirdpartyresources", c.ns, thirdPartyResource), &extensions.ThirdPartyResource{})
|
||||
Invokes(core.NewCreateAction(thirdpartyresourcesResource, c.ns, thirdPartyResource), &extensions.ThirdPartyResource{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeThirdPartyResources) Create(thirdPartyResource *extensions.ThirdPar
|
||||
|
||||
func (c *FakeThirdPartyResources) Update(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("thirdpartyresources", c.ns, thirdPartyResource), &extensions.ThirdPartyResource{})
|
||||
Invokes(core.NewUpdateAction(thirdpartyresourcesResource, c.ns, thirdPartyResource), &extensions.ThirdPartyResource{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeThirdPartyResources) Update(thirdPartyResource *extensions.ThirdPar
|
||||
|
||||
func (c *FakeThirdPartyResources) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("thirdpartyresources", c.ns, name), &extensions.ThirdPartyResource{})
|
||||
Invokes(core.NewDeleteAction(thirdpartyresourcesResource, c.ns, name), &extensions.ThirdPartyResource{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeThirdPartyResources) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("thirdpartyresources", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(thirdpartyresourcesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &extensions.ThirdPartyResourceList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeThirdPartyResources) DeleteCollection(options *api.DeleteOptions, l
|
||||
|
||||
func (c *FakeThirdPartyResources) Get(name string) (result *extensions.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("thirdpartyresources", c.ns, name), &extensions.ThirdPartyResource{})
|
||||
Invokes(core.NewGetAction(thirdpartyresourcesResource, c.ns, name), &extensions.ThirdPartyResource{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeThirdPartyResources) Get(name string) (result *extensions.ThirdPart
|
||||
|
||||
func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *extensions.ThirdPartyResourceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("thirdpartyresources", c.ns, opts), &extensions.ThirdPartyResourceList{})
|
||||
Invokes(core.NewListAction(thirdpartyresourcesResource, c.ns, opts), &extensions.ThirdPartyResourceList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *extensions
|
||||
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
|
||||
func (c *FakeThirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("thirdpartyresources", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(thirdpartyresourcesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -29,9 +30,11 @@ type FakeComponentStatuses struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var componentstatusesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "componentstatuses"}
|
||||
|
||||
func (c *FakeComponentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("componentstatuses", componentStatus), &v1.ComponentStatus{})
|
||||
Invokes(core.NewRootCreateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -40,7 +43,7 @@ func (c *FakeComponentStatuses) Create(componentStatus *v1.ComponentStatus) (res
|
||||
|
||||
func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("componentstatuses", componentStatus), &v1.ComponentStatus{})
|
||||
Invokes(core.NewRootUpdateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -49,12 +52,12 @@ func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (res
|
||||
|
||||
func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("componentstatuses", name), &v1.ComponentStatus{})
|
||||
Invokes(core.NewRootDeleteAction(componentstatusesResource, name), &v1.ComponentStatus{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("componentstatuses", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ComponentStatusList{})
|
||||
return err
|
||||
@ -62,7 +65,7 @@ func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, lis
|
||||
|
||||
func (c *FakeComponentStatuses) Get(name string) (result *v1.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("componentstatuses", name), &v1.ComponentStatus{})
|
||||
Invokes(core.NewRootGetAction(componentstatusesResource, name), &v1.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -71,7 +74,7 @@ func (c *FakeComponentStatuses) Get(name string) (result *v1.ComponentStatus, er
|
||||
|
||||
func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *v1.ComponentStatusList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("componentstatuses", opts), &v1.ComponentStatusList{})
|
||||
Invokes(core.NewRootListAction(componentstatusesResource, opts), &v1.ComponentStatusList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -92,5 +95,5 @@ func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *v1.Component
|
||||
// Watch returns a watch.Interface that watches the requested componentStatuses.
|
||||
func (c *FakeComponentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("componentstatuses", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeConfigMaps struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var configmapsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "configmaps"}
|
||||
|
||||
func (c *FakeConfigMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("configmaps", c.ns, configMap), &v1.ConfigMap{})
|
||||
Invokes(core.NewCreateAction(configmapsResource, c.ns, configMap), &v1.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeConfigMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap,
|
||||
|
||||
func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("configmaps", c.ns, configMap), &v1.ConfigMap{})
|
||||
Invokes(core.NewUpdateAction(configmapsResource, c.ns, configMap), &v1.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap,
|
||||
|
||||
func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("configmaps", c.ns, name), &v1.ConfigMap{})
|
||||
Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &v1.ConfigMap{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("configmaps", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ConfigMapList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeConfigMaps) Get(name string) (result *v1.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("configmaps", c.ns, name), &v1.ConfigMap{})
|
||||
Invokes(core.NewGetAction(configmapsResource, c.ns, name), &v1.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeConfigMaps) Get(name string) (result *v1.ConfigMap, err error) {
|
||||
|
||||
func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("configmaps", c.ns, opts), &v1.ConfigMapList{})
|
||||
Invokes(core.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, e
|
||||
// Watch returns a watch.Interface that watches the requested configMaps.
|
||||
func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("configmaps", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeEndpoints struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var endpointsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "endpoints"}
|
||||
|
||||
func (c *FakeEndpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("endpoints", c.ns, endpoints), &v1.Endpoints{})
|
||||
Invokes(core.NewCreateAction(endpointsResource, c.ns, endpoints), &v1.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeEndpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, e
|
||||
|
||||
func (c *FakeEndpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("endpoints", c.ns, endpoints), &v1.Endpoints{})
|
||||
Invokes(core.NewUpdateAction(endpointsResource, c.ns, endpoints), &v1.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeEndpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, e
|
||||
|
||||
func (c *FakeEndpoints) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("endpoints", c.ns, name), &v1.Endpoints{})
|
||||
Invokes(core.NewDeleteAction(endpointsResource, c.ns, name), &v1.Endpoints{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("endpoints", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.EndpointsList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeEndpoints) Get(name string) (result *v1.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("endpoints", c.ns, name), &v1.Endpoints{})
|
||||
Invokes(core.NewGetAction(endpointsResource, c.ns, name), &v1.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeEndpoints) Get(name string) (result *v1.Endpoints, err error) {
|
||||
|
||||
func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("endpoints", c.ns, opts), &v1.EndpointsList{})
|
||||
Invokes(core.NewListAction(endpointsResource, c.ns, opts), &v1.EndpointsList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, er
|
||||
// Watch returns a watch.Interface that watches the requested endpoints.
|
||||
func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("endpoints", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeEvents struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var eventsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "events"}
|
||||
|
||||
func (c *FakeEvents) Create(event *v1.Event) (result *v1.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("events", c.ns, event), &v1.Event{})
|
||||
Invokes(core.NewCreateAction(eventsResource, c.ns, event), &v1.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeEvents) Create(event *v1.Event) (result *v1.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("events", c.ns, event), &v1.Event{})
|
||||
Invokes(core.NewUpdateAction(eventsResource, c.ns, event), &v1.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("events", c.ns, name), &v1.Event{})
|
||||
Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("events", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.EventList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions ap
|
||||
|
||||
func (c *FakeEvents) Get(name string) (result *v1.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("events", c.ns, name), &v1.Event{})
|
||||
Invokes(core.NewGetAction(eventsResource, c.ns, name), &v1.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeEvents) Get(name string) (result *v1.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("events", c.ns, opts), &v1.EventList{})
|
||||
Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error
|
||||
// Watch returns a watch.Interface that watches the requested events.
|
||||
func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("events", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ import (
|
||||
)
|
||||
|
||||
func (c *FakeEvents) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
|
||||
action := core.NewRootCreateAction("events", event)
|
||||
action := core.NewRootCreateAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewCreateAction("events", c.ns, event)
|
||||
action = core.NewCreateAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -39,9 +39,9 @@ func (c *FakeEvents) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error
|
||||
|
||||
// Update replaces an existing event. Returns the copy of the event the server returns, or an error.
|
||||
func (c *FakeEvents) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
|
||||
action := core.NewRootUpdateAction("events", event)
|
||||
action := core.NewRootUpdateAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewUpdateAction("events", c.ns, event)
|
||||
action = core.NewUpdateAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -53,9 +53,9 @@ func (c *FakeEvents) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error
|
||||
|
||||
// Patch patches an existing event. Returns the copy of the event the server returns, or an error.
|
||||
func (c *FakeEvents) Patch(event *v1.Event, data []byte) (*v1.Event, error) {
|
||||
action := core.NewRootPatchAction("events", event)
|
||||
action := core.NewRootPatchAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewPatchAction("events", c.ns, event)
|
||||
action = core.NewPatchAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -67,9 +67,9 @@ func (c *FakeEvents) Patch(event *v1.Event, data []byte) (*v1.Event, error) {
|
||||
|
||||
// Search returns a list of events matching the specified object.
|
||||
func (c *FakeEvents) Search(objOrRef runtime.Object) (*v1.EventList, error) {
|
||||
action := core.NewRootListAction("events", api.ListOptions{})
|
||||
action := core.NewRootListAction(eventsResource, api.ListOptions{})
|
||||
if c.ns != "" {
|
||||
action = core.NewListAction("events", c.ns, api.ListOptions{})
|
||||
action = core.NewListAction(eventsResource, c.ns, api.ListOptions{})
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, &v1.EventList{})
|
||||
if obj == nil {
|
||||
@ -82,7 +82,7 @@ func (c *FakeEvents) Search(objOrRef runtime.Object) (*v1.EventList, error) {
|
||||
func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
|
||||
action := core.GenericActionImpl{}
|
||||
action.Verb = "get-field-selector"
|
||||
action.Resource = "events"
|
||||
action.Resource = eventsResource
|
||||
|
||||
c.Fake.Invokes(action, nil)
|
||||
return fields.Everything()
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeLimitRanges struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var limitrangesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "limitranges"}
|
||||
|
||||
func (c *FakeLimitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("limitranges", c.ns, limitRange), &v1.LimitRange{})
|
||||
Invokes(core.NewCreateAction(limitrangesResource, c.ns, limitRange), &v1.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeLimitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRan
|
||||
|
||||
func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("limitranges", c.ns, limitRange), &v1.LimitRange{})
|
||||
Invokes(core.NewUpdateAction(limitrangesResource, c.ns, limitRange), &v1.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRan
|
||||
|
||||
func (c *FakeLimitRanges) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("limitranges", c.ns, name), &v1.LimitRange{})
|
||||
Invokes(core.NewDeleteAction(limitrangesResource, c.ns, name), &v1.LimitRange{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("limitranges", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.LimitRangeList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeLimitRanges) Get(name string) (result *v1.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("limitranges", c.ns, name), &v1.LimitRange{})
|
||||
Invokes(core.NewGetAction(limitrangesResource, c.ns, name), &v1.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeLimitRanges) Get(name string) (result *v1.LimitRange, err error) {
|
||||
|
||||
func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("limitranges", c.ns, opts), &v1.LimitRangeList{})
|
||||
Invokes(core.NewListAction(limitrangesResource, c.ns, opts), &v1.LimitRangeList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList,
|
||||
// Watch returns a watch.Interface that watches the requested limitRanges.
|
||||
func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("limitranges", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -29,9 +30,11 @@ type FakeNamespaces struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var namespacesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "namespaces"}
|
||||
|
||||
func (c *FakeNamespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("namespaces", namespace), &v1.Namespace{})
|
||||
Invokes(core.NewRootCreateAction(namespacesResource, namespace), &v1.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -40,7 +43,7 @@ func (c *FakeNamespaces) Create(namespace *v1.Namespace) (result *v1.Namespace,
|
||||
|
||||
func (c *FakeNamespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("namespaces", namespace), &v1.Namespace{})
|
||||
Invokes(core.NewRootUpdateAction(namespacesResource, namespace), &v1.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -49,7 +52,7 @@ func (c *FakeNamespaces) Update(namespace *v1.Namespace) (result *v1.Namespace,
|
||||
|
||||
func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction("namespaces", "status", namespace), &v1.Namespace{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &v1.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -58,12 +61,12 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e
|
||||
|
||||
func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("namespaces", name), &v1.Namespace{})
|
||||
Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("namespaces", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.NamespaceList{})
|
||||
return err
|
||||
@ -71,7 +74,7 @@ func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeNamespaces) Get(name string) (result *v1.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("namespaces", name), &v1.Namespace{})
|
||||
Invokes(core.NewRootGetAction(namespacesResource, name), &v1.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -80,7 +83,7 @@ func (c *FakeNamespaces) Get(name string) (result *v1.Namespace, err error) {
|
||||
|
||||
func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("namespaces", opts), &v1.NamespaceList{})
|
||||
Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -101,5 +104,5 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, e
|
||||
// Watch returns a watch.Interface that watches the requested namespaces.
|
||||
func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("namespaces", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(namespacesResource, opts))
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
func (c *FakeNamespaces) Finalize(namespace *v1.Namespace) (*v1.Namespace, error) {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = "namespaces"
|
||||
action.Resource = namespacesResource
|
||||
action.Subresource = "finalize"
|
||||
action.Object = namespace
|
||||
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -29,9 +30,11 @@ type FakeNodes struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var nodesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "nodes"}
|
||||
|
||||
func (c *FakeNodes) Create(node *v1.Node) (result *v1.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("nodes", node), &v1.Node{})
|
||||
Invokes(core.NewRootCreateAction(nodesResource, node), &v1.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -40,7 +43,7 @@ func (c *FakeNodes) Create(node *v1.Node) (result *v1.Node, err error) {
|
||||
|
||||
func (c *FakeNodes) Update(node *v1.Node) (result *v1.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("nodes", node), &v1.Node{})
|
||||
Invokes(core.NewRootUpdateAction(nodesResource, node), &v1.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -49,7 +52,7 @@ func (c *FakeNodes) Update(node *v1.Node) (result *v1.Node, err error) {
|
||||
|
||||
func (c *FakeNodes) UpdateStatus(node *v1.Node) (*v1.Node, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction("nodes", "status", node), &v1.Node{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(nodesResource, "status", node), &v1.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -58,12 +61,12 @@ func (c *FakeNodes) UpdateStatus(node *v1.Node) (*v1.Node, error) {
|
||||
|
||||
func (c *FakeNodes) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("nodes", name), &v1.Node{})
|
||||
Invokes(core.NewRootDeleteAction(nodesResource, name), &v1.Node{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("nodes", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(nodesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.NodeList{})
|
||||
return err
|
||||
@ -71,7 +74,7 @@ func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api
|
||||
|
||||
func (c *FakeNodes) Get(name string) (result *v1.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("nodes", name), &v1.Node{})
|
||||
Invokes(core.NewRootGetAction(nodesResource, name), &v1.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -80,7 +83,7 @@ func (c *FakeNodes) Get(name string) (result *v1.Node, err error) {
|
||||
|
||||
func (c *FakeNodes) List(opts api.ListOptions) (result *v1.NodeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("nodes", opts), &v1.NodeList{})
|
||||
Invokes(core.NewRootListAction(nodesResource, opts), &v1.NodeList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -101,5 +104,5 @@ func (c *FakeNodes) List(opts api.ListOptions) (result *v1.NodeList, err error)
|
||||
// Watch returns a watch.Interface that watches the requested nodes.
|
||||
func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("nodes", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(nodesResource, opts))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -29,9 +30,11 @@ type FakePersistentVolumes struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var persistentvolumesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "persistentvolumes"}
|
||||
|
||||
func (c *FakePersistentVolumes) Create(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("persistentvolumes", persistentVolume), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootCreateAction(persistentvolumesResource, persistentVolume), &v1.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -40,7 +43,7 @@ func (c *FakePersistentVolumes) Create(persistentVolume *v1.PersistentVolume) (r
|
||||
|
||||
func (c *FakePersistentVolumes) Update(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("persistentvolumes", persistentVolume), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &v1.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -49,7 +52,7 @@ func (c *FakePersistentVolumes) Update(persistentVolume *v1.PersistentVolume) (r
|
||||
|
||||
func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) (*v1.PersistentVolume, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction("persistentvolumes", "status", persistentVolume), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &v1.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -58,12 +61,12 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolu
|
||||
|
||||
func (c *FakePersistentVolumes) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("persistentvolumes", name), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootDeleteAction(persistentvolumesResource, name), &v1.PersistentVolume{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("persistentvolumes", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.PersistentVolumeList{})
|
||||
return err
|
||||
@ -71,7 +74,7 @@ func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, lis
|
||||
|
||||
func (c *FakePersistentVolumes) Get(name string) (result *v1.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("persistentvolumes", name), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootGetAction(persistentvolumesResource, name), &v1.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -80,7 +83,7 @@ func (c *FakePersistentVolumes) Get(name string) (result *v1.PersistentVolume, e
|
||||
|
||||
func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *v1.PersistentVolumeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("persistentvolumes", opts), &v1.PersistentVolumeList{})
|
||||
Invokes(core.NewRootListAction(persistentvolumesResource, opts), &v1.PersistentVolumeList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -101,5 +104,5 @@ func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *v1.Persisten
|
||||
// Watch returns a watch.Interface that watches the requested persistentVolumes.
|
||||
func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("persistentvolumes", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakePods struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var podsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}
|
||||
|
||||
func (c *FakePods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("pods", c.ns, pod), &v1.Pod{})
|
||||
Invokes(core.NewCreateAction(podsResource, c.ns, pod), &v1.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakePods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
|
||||
|
||||
func (c *FakePods) Update(pod *v1.Pod) (result *v1.Pod, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("pods", c.ns, pod), &v1.Pod{})
|
||||
Invokes(core.NewUpdateAction(podsResource, c.ns, pod), &v1.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakePods) Update(pod *v1.Pod) (result *v1.Pod, err error) {
|
||||
|
||||
func (c *FakePods) UpdateStatus(pod *v1.Pod) (*v1.Pod, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("pods", "status", c.ns, pod), &v1.Pod{})
|
||||
Invokes(core.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &v1.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakePods) UpdateStatus(pod *v1.Pod) (*v1.Pod, error) {
|
||||
|
||||
func (c *FakePods) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("pods", c.ns, name), &v1.Pod{})
|
||||
Invokes(core.NewDeleteAction(podsResource, c.ns, name), &v1.Pod{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePods) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("pods", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(podsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.PodList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakePods) DeleteCollection(options *api.DeleteOptions, listOptions api.
|
||||
|
||||
func (c *FakePods) Get(name string) (result *v1.Pod, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("pods", c.ns, name), &v1.Pod{})
|
||||
Invokes(core.NewGetAction(podsResource, c.ns, name), &v1.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakePods) Get(name string) (result *v1.Pod, err error) {
|
||||
|
||||
func (c *FakePods) List(opts api.ListOptions) (result *v1.PodList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("pods", c.ns, opts), &v1.PodList{})
|
||||
Invokes(core.NewListAction(podsResource, c.ns, opts), &v1.PodList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakePods) List(opts api.ListOptions) (result *v1.PodList, err error) {
|
||||
// Watch returns a watch.Interface that watches the requested pods.
|
||||
func (c *FakePods) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("pods", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(podsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
func (c *FakePods) Bind(binding *v1.Binding) error {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = "pods"
|
||||
action.Resource = podsResource
|
||||
action.Subresource = "bindings"
|
||||
action.Object = binding
|
||||
|
||||
@ -37,7 +37,7 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Requ
|
||||
action := core.GenericActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Namespace = c.ns
|
||||
action.Resource = "pod"
|
||||
action.Resource = podsResource
|
||||
action.Subresource = "logs"
|
||||
action.Value = opts
|
||||
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakePodTemplates struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var podtemplatesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "podtemplates"}
|
||||
|
||||
func (c *FakePodTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("podtemplates", c.ns, podTemplate), &v1.PodTemplate{})
|
||||
Invokes(core.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &v1.PodTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakePodTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTe
|
||||
|
||||
func (c *FakePodTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("podtemplates", c.ns, podTemplate), &v1.PodTemplate{})
|
||||
Invokes(core.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &v1.PodTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakePodTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTe
|
||||
|
||||
func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("podtemplates", c.ns, name), &v1.PodTemplate{})
|
||||
Invokes(core.NewDeleteAction(podtemplatesResource, c.ns, name), &v1.PodTemplate{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePodTemplates) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("podtemplates", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.PodTemplateList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakePodTemplates) DeleteCollection(options *api.DeleteOptions, listOpti
|
||||
|
||||
func (c *FakePodTemplates) Get(name string) (result *v1.PodTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("podtemplates", c.ns, name), &v1.PodTemplate{})
|
||||
Invokes(core.NewGetAction(podtemplatesResource, c.ns, name), &v1.PodTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakePodTemplates) Get(name string) (result *v1.PodTemplate, err error)
|
||||
|
||||
func (c *FakePodTemplates) List(opts api.ListOptions) (result *v1.PodTemplateList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("podtemplates", c.ns, opts), &v1.PodTemplateList{})
|
||||
Invokes(core.NewListAction(podtemplatesResource, c.ns, opts), &v1.PodTemplateList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakePodTemplates) List(opts api.ListOptions) (result *v1.PodTemplateLis
|
||||
// Watch returns a watch.Interface that watches the requested podTemplates.
|
||||
func (c *FakePodTemplates) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("podtemplates", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(podtemplatesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeReplicationControllers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var replicationcontrollersResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "replicationcontrollers"}
|
||||
|
||||
func (c *FakeReplicationControllers) Create(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("replicationcontrollers", c.ns, replicationController), &v1.ReplicationController{})
|
||||
Invokes(core.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &v1.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeReplicationControllers) Create(replicationController *v1.Replicatio
|
||||
|
||||
func (c *FakeReplicationControllers) Update(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("replicationcontrollers", c.ns, replicationController), &v1.ReplicationController{})
|
||||
Invokes(core.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &v1.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeReplicationControllers) Update(replicationController *v1.Replicatio
|
||||
|
||||
func (c *FakeReplicationControllers) UpdateStatus(replicationController *v1.ReplicationController) (*v1.ReplicationController, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("replicationcontrollers", "status", c.ns, replicationController), &v1.ReplicationController{})
|
||||
Invokes(core.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &v1.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeReplicationControllers) UpdateStatus(replicationController *v1.Repl
|
||||
|
||||
func (c *FakeReplicationControllers) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("replicationcontrollers", c.ns, name), &v1.ReplicationController{})
|
||||
Invokes(core.NewDeleteAction(replicationcontrollersResource, c.ns, name), &v1.ReplicationController{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeReplicationControllers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("replicationcontrollers", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ReplicationControllerList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeReplicationControllers) DeleteCollection(options *api.DeleteOptions
|
||||
|
||||
func (c *FakeReplicationControllers) Get(name string) (result *v1.ReplicationController, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("replicationcontrollers", c.ns, name), &v1.ReplicationController{})
|
||||
Invokes(core.NewGetAction(replicationcontrollersResource, c.ns, name), &v1.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeReplicationControllers) Get(name string) (result *v1.ReplicationCon
|
||||
|
||||
func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *v1.ReplicationControllerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("replicationcontrollers", c.ns, opts), &v1.ReplicationControllerList{})
|
||||
Invokes(core.NewListAction(replicationcontrollersResource, c.ns, opts), &v1.ReplicationControllerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *v1.Repl
|
||||
// Watch returns a watch.Interface that watches the requested replicationControllers.
|
||||
func (c *FakeReplicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("replicationcontrollers", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(replicationcontrollersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeResourceQuotas struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var resourcequotasResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "resourcequotas"}
|
||||
|
||||
func (c *FakeResourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("resourcequotas", c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
Invokes(core.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeResourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1
|
||||
|
||||
func (c *FakeResourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("resourcequotas", c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
Invokes(core.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeResourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1
|
||||
|
||||
func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (*v1.ResourceQuota, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("resourcequotas", "status", c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
Invokes(core.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (*v1.
|
||||
|
||||
func (c *FakeResourceQuotas) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("resourcequotas", c.ns, name), &v1.ResourceQuota{})
|
||||
Invokes(core.NewDeleteAction(resourcequotasResource, c.ns, name), &v1.ResourceQuota{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeResourceQuotas) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("resourcequotas", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ResourceQuotaList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeResourceQuotas) DeleteCollection(options *api.DeleteOptions, listOp
|
||||
|
||||
func (c *FakeResourceQuotas) Get(name string) (result *v1.ResourceQuota, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("resourcequotas", c.ns, name), &v1.ResourceQuota{})
|
||||
Invokes(core.NewGetAction(resourcequotasResource, c.ns, name), &v1.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeResourceQuotas) Get(name string) (result *v1.ResourceQuota, err err
|
||||
|
||||
func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *v1.ResourceQuotaList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("resourcequotas", c.ns, opts), &v1.ResourceQuotaList{})
|
||||
Invokes(core.NewListAction(resourcequotasResource, c.ns, opts), &v1.ResourceQuotaList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *v1.ResourceQuot
|
||||
// Watch returns a watch.Interface that watches the requested resourceQuotas.
|
||||
func (c *FakeResourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("resourcequotas", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(resourcequotasResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeSecrets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var secretsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "secrets"}
|
||||
|
||||
func (c *FakeSecrets) Create(secret *v1.Secret) (result *v1.Secret, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("secrets", c.ns, secret), &v1.Secret{})
|
||||
Invokes(core.NewCreateAction(secretsResource, c.ns, secret), &v1.Secret{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeSecrets) Create(secret *v1.Secret) (result *v1.Secret, err error) {
|
||||
|
||||
func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("secrets", c.ns, secret), &v1.Secret{})
|
||||
Invokes(core.NewUpdateAction(secretsResource, c.ns, secret), &v1.Secret{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
|
||||
|
||||
func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("secrets", c.ns, name), &v1.Secret{})
|
||||
Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &v1.Secret{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("secrets", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.SecretList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions a
|
||||
|
||||
func (c *FakeSecrets) Get(name string) (result *v1.Secret, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("secrets", c.ns, name), &v1.Secret{})
|
||||
Invokes(core.NewGetAction(secretsResource, c.ns, name), &v1.Secret{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeSecrets) Get(name string) (result *v1.Secret, err error) {
|
||||
|
||||
func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("secrets", c.ns, opts), &v1.SecretList{})
|
||||
Invokes(core.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err err
|
||||
// Watch returns a watch.Interface that watches the requested secrets.
|
||||
func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("secrets", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeServices struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var servicesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "services"}
|
||||
|
||||
func (c *FakeServices) Create(service *v1.Service) (result *v1.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("services", c.ns, service), &v1.Service{})
|
||||
Invokes(core.NewCreateAction(servicesResource, c.ns, service), &v1.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeServices) Create(service *v1.Service) (result *v1.Service, err erro
|
||||
|
||||
func (c *FakeServices) Update(service *v1.Service) (result *v1.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("services", c.ns, service), &v1.Service{})
|
||||
Invokes(core.NewUpdateAction(servicesResource, c.ns, service), &v1.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeServices) Update(service *v1.Service) (result *v1.Service, err erro
|
||||
|
||||
func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("services", "status", c.ns, service), &v1.Service{})
|
||||
Invokes(core.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &v1.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) {
|
||||
|
||||
func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("services", c.ns, name), &v1.Service{})
|
||||
Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &v1.Service{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("services", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ServiceList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeServices) Get(name string) (result *v1.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("services", c.ns, name), &v1.Service{})
|
||||
Invokes(core.NewGetAction(servicesResource, c.ns, name), &v1.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeServices) Get(name string) (result *v1.Service, err error) {
|
||||
|
||||
func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("services", c.ns, opts), &v1.ServiceList{})
|
||||
Invokes(core.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err e
|
||||
// Watch returns a watch.Interface that watches the requested services.
|
||||
func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("services", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -22,5 +22,5 @@ import (
|
||||
)
|
||||
|
||||
func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
|
||||
return c.Fake.InvokesProxy(core.NewProxyGetAction("services", c.ns, scheme, name, port, path, params))
|
||||
return c.Fake.InvokesProxy(core.NewProxyGetAction(servicesResource, c.ns, scheme, name, port, path, params))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeServiceAccounts struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var serviceaccountsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "serviceaccounts"}
|
||||
|
||||
func (c *FakeServiceAccounts) Create(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("serviceaccounts", c.ns, serviceAccount), &v1.ServiceAccount{})
|
||||
Invokes(core.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &v1.ServiceAccount{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeServiceAccounts) Create(serviceAccount *v1.ServiceAccount) (result
|
||||
|
||||
func (c *FakeServiceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("serviceaccounts", c.ns, serviceAccount), &v1.ServiceAccount{})
|
||||
Invokes(core.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &v1.ServiceAccount{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeServiceAccounts) Update(serviceAccount *v1.ServiceAccount) (result
|
||||
|
||||
func (c *FakeServiceAccounts) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("serviceaccounts", c.ns, name), &v1.ServiceAccount{})
|
||||
Invokes(core.NewDeleteAction(serviceaccountsResource, c.ns, name), &v1.ServiceAccount{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeServiceAccounts) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("serviceaccounts", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ServiceAccountList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeServiceAccounts) DeleteCollection(options *api.DeleteOptions, listO
|
||||
|
||||
func (c *FakeServiceAccounts) Get(name string) (result *v1.ServiceAccount, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("serviceaccounts", c.ns, name), &v1.ServiceAccount{})
|
||||
Invokes(core.NewGetAction(serviceaccountsResource, c.ns, name), &v1.ServiceAccount{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeServiceAccounts) Get(name string) (result *v1.ServiceAccount, err e
|
||||
|
||||
func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *v1.ServiceAccountList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("serviceaccounts", c.ns, opts), &v1.ServiceAccountList{})
|
||||
Invokes(core.NewListAction(serviceaccountsResource, c.ns, opts), &v1.ServiceAccountList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *v1.ServiceAcco
|
||||
// Watch returns a watch.Interface that watches the requested serviceAccounts.
|
||||
func (c *FakeServiceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("serviceaccounts", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(serviceaccountsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeDaemonSets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var daemonsetsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "daemonsets"}
|
||||
|
||||
func (c *FakeDaemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("daemonsets", c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeDaemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.D
|
||||
|
||||
func (c *FakeDaemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("daemonsets", c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeDaemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.D
|
||||
|
||||
func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("daemonsets", "status", c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (*v1beta1.Da
|
||||
|
||||
func (c *FakeDaemonSets) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("daemonsets", c.ns, name), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewDeleteAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("daemonsets", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.DaemonSetList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeDaemonSets) Get(name string) (result *v1beta1.DaemonSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("daemonsets", c.ns, name), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewGetAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeDaemonSets) Get(name string) (result *v1beta1.DaemonSet, err error)
|
||||
|
||||
func (c *FakeDaemonSets) List(opts api.ListOptions) (result *v1beta1.DaemonSetList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("daemonsets", c.ns, opts), &v1beta1.DaemonSetList{})
|
||||
Invokes(core.NewListAction(daemonsetsResource, c.ns, opts), &v1beta1.DaemonSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeDaemonSets) List(opts api.ListOptions) (result *v1beta1.DaemonSetLi
|
||||
// Watch returns a watch.Interface that watches the requested daemonSets.
|
||||
func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("daemonsets", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(daemonsetsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeDeployments struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var deploymentsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "deployments"}
|
||||
|
||||
func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("deployments", c.ns, deployment), &v1beta1.Deployment{})
|
||||
Invokes(core.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta
|
||||
|
||||
func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("deployments", c.ns, deployment), &v1beta1.Deployment{})
|
||||
Invokes(core.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta
|
||||
|
||||
func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("deployments", "status", c.ns, deployment), &v1beta1.Deployment{})
|
||||
Invokes(core.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1
|
||||
|
||||
func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("deployments", c.ns, name), &v1beta1.Deployment{})
|
||||
Invokes(core.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("deployments", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeDeployments) Get(name string) (result *v1beta1.Deployment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("deployments", c.ns, name), &v1beta1.Deployment{})
|
||||
Invokes(core.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeDeployments) Get(name string) (result *v1beta1.Deployment, err erro
|
||||
|
||||
func (c *FakeDeployments) List(opts api.ListOptions) (result *v1beta1.DeploymentList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("deployments", c.ns, opts), &v1beta1.DeploymentList{})
|
||||
Invokes(core.NewListAction(deploymentsResource, c.ns, opts), &v1beta1.DeploymentList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeDeployments) List(opts api.ListOptions) (result *v1beta1.Deployment
|
||||
// Watch returns a watch.Interface that watches the requested deployments.
|
||||
func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("deployments", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(deploymentsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
func (c *FakeDeployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = "deployments"
|
||||
action.Resource = deploymentsResource
|
||||
action.Subresource = "rollback"
|
||||
action.Object = deploymentRollback
|
||||
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeHorizontalPodAutoscalers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var horizontalpodautoscalersResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "horizontalpodautoscalers"}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("horizontalpodautoscalers", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1beta1.H
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("horizontalpodautoscalers", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1beta1.H
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (*v1beta1.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("horizontalpodautoscalers", "status", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1b
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("horizontalpodautoscalers", c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("horizontalpodautoscalers", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.HorizontalPodAutoscalerList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptio
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("horizontalpodautoscalers", c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1beta1.Horizon
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1beta1.HorizontalPodAutoscalerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("horizontalpodautoscalers", c.ns, opts), &v1beta1.HorizontalPodAutoscalerList{})
|
||||
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1beta1.HorizontalPodAutoscalerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1bet
|
||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||
func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("horizontalpodautoscalers", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeIngresses struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var ingressesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "ingresses"}
|
||||
|
||||
func (c *FakeIngresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("ingresses", c.ns, ingress), &v1beta1.Ingress{})
|
||||
Invokes(core.NewCreateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeIngresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingres
|
||||
|
||||
func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("ingresses", c.ns, ingress), &v1beta1.Ingress{})
|
||||
Invokes(core.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingres
|
||||
|
||||
func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("ingresses", "status", c.ns, ingress), &v1beta1.Ingress{})
|
||||
Invokes(core.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress
|
||||
|
||||
func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("ingresses", c.ns, name), &v1beta1.Ingress{})
|
||||
Invokes(core.NewDeleteAction(ingressesResource, c.ns, name), &v1beta1.Ingress{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("ingresses", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.IngressList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeIngresses) Get(name string) (result *v1beta1.Ingress, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("ingresses", c.ns, name), &v1beta1.Ingress{})
|
||||
Invokes(core.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeIngresses) Get(name string) (result *v1beta1.Ingress, err error) {
|
||||
|
||||
func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("ingresses", c.ns, opts), &v1beta1.IngressList{})
|
||||
Invokes(core.NewListAction(ingressesResource, c.ns, opts), &v1beta1.IngressList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList,
|
||||
// Watch returns a watch.Interface that watches the requested ingresses.
|
||||
func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("ingresses", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeJobs struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var jobsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "jobs"}
|
||||
|
||||
func (c *FakeJobs) Create(job *v1beta1.Job) (result *v1beta1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("jobs", c.ns, job), &v1beta1.Job{})
|
||||
Invokes(core.NewCreateAction(jobsResource, c.ns, job), &v1beta1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeJobs) Create(job *v1beta1.Job) (result *v1beta1.Job, err error) {
|
||||
|
||||
func (c *FakeJobs) Update(job *v1beta1.Job) (result *v1beta1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("jobs", c.ns, job), &v1beta1.Job{})
|
||||
Invokes(core.NewUpdateAction(jobsResource, c.ns, job), &v1beta1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeJobs) Update(job *v1beta1.Job) (result *v1beta1.Job, err error) {
|
||||
|
||||
func (c *FakeJobs) UpdateStatus(job *v1beta1.Job) (*v1beta1.Job, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("jobs", "status", c.ns, job), &v1beta1.Job{})
|
||||
Invokes(core.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &v1beta1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeJobs) UpdateStatus(job *v1beta1.Job) (*v1beta1.Job, error) {
|
||||
|
||||
func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("jobs", c.ns, name), &v1beta1.Job{})
|
||||
Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &v1beta1.Job{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("jobs", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.JobList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.
|
||||
|
||||
func (c *FakeJobs) Get(name string) (result *v1beta1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("jobs", c.ns, name), &v1beta1.Job{})
|
||||
Invokes(core.NewGetAction(jobsResource, c.ns, name), &v1beta1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeJobs) Get(name string) (result *v1beta1.Job, err error) {
|
||||
|
||||
func (c *FakeJobs) List(opts api.ListOptions) (result *v1beta1.JobList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("jobs", c.ns, opts), &v1beta1.JobList{})
|
||||
Invokes(core.NewListAction(jobsResource, c.ns, opts), &v1beta1.JobList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *v1beta1.JobList, err erro
|
||||
// Watch returns a watch.Interface that watches the requested jobs.
|
||||
func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("jobs", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeReplicaSets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var replicasetsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "replicasets"}
|
||||
|
||||
func (c *FakeReplicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("replicasets", c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeReplicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta
|
||||
|
||||
func (c *FakeReplicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("replicasets", c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeReplicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta
|
||||
|
||||
func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("replicasets", "status", c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1
|
||||
|
||||
func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("replicasets", c.ns, name), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("replicasets", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.ReplicaSetList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeReplicaSets) Get(name string) (result *v1beta1.ReplicaSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("replicasets", c.ns, name), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewGetAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeReplicaSets) Get(name string) (result *v1beta1.ReplicaSet, err erro
|
||||
|
||||
func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("replicasets", c.ns, opts), &v1beta1.ReplicaSetList{})
|
||||
Invokes(core.NewListAction(replicasetsResource, c.ns, opts), &v1beta1.ReplicaSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSet
|
||||
// Watch returns a watch.Interface that watches the requested replicaSets.
|
||||
func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("replicasets", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
"k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
@ -25,7 +26,7 @@ func (c *FakeScales) Get(kind string, name string) (result *v1beta1.Scale, err e
|
||||
action := core.GetActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Namespace = c.ns
|
||||
action.Resource = kind
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: kind}
|
||||
action.Subresource = "scale"
|
||||
action.Name = name
|
||||
obj, err := c.Fake.Invokes(action, &v1beta1.Scale{})
|
||||
@ -37,7 +38,7 @@ func (c *FakeScales) Update(kind string, scale *v1beta1.Scale) (result *v1beta1.
|
||||
action := core.UpdateActionImpl{}
|
||||
action.Verb = "update"
|
||||
action.Namespace = c.ns
|
||||
action.Resource = kind
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: kind}
|
||||
action.Subresource = "scale"
|
||||
action.Object = scale
|
||||
obj, err := c.Fake.Invokes(action, scale)
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeThirdPartyResources struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var thirdpartyresourcesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "thirdpartyresources"}
|
||||
|
||||
func (c *FakeThirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("thirdpartyresources", c.ns, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
Invokes(core.NewCreateAction(thirdpartyresourcesResource, c.ns, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeThirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyR
|
||||
|
||||
func (c *FakeThirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("thirdpartyresources", c.ns, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
Invokes(core.NewUpdateAction(thirdpartyresourcesResource, c.ns, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeThirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyR
|
||||
|
||||
func (c *FakeThirdPartyResources) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("thirdpartyresources", c.ns, name), &v1beta1.ThirdPartyResource{})
|
||||
Invokes(core.NewDeleteAction(thirdpartyresourcesResource, c.ns, name), &v1beta1.ThirdPartyResource{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeThirdPartyResources) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("thirdpartyresources", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(thirdpartyresourcesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.ThirdPartyResourceList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeThirdPartyResources) DeleteCollection(options *api.DeleteOptions, l
|
||||
|
||||
func (c *FakeThirdPartyResources) Get(name string) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("thirdpartyresources", c.ns, name), &v1beta1.ThirdPartyResource{})
|
||||
Invokes(core.NewGetAction(thirdpartyresourcesResource, c.ns, name), &v1beta1.ThirdPartyResource{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeThirdPartyResources) Get(name string) (result *v1beta1.ThirdPartyRe
|
||||
|
||||
func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("thirdpartyresources", c.ns, opts), &v1beta1.ThirdPartyResourceList{})
|
||||
Invokes(core.NewListAction(thirdpartyresourcesResource, c.ns, opts), &v1beta1.ThirdPartyResourceList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *v1beta1.Th
|
||||
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
|
||||
func (c *FakeThirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("thirdpartyresources", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(thirdpartyresourcesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -29,9 +30,11 @@ type FakeComponentStatuses struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var componentstatusesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "componentstatuses"}
|
||||
|
||||
func (c *FakeComponentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("componentstatuses", componentStatus), &v1.ComponentStatus{})
|
||||
Invokes(core.NewRootCreateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -40,7 +43,7 @@ func (c *FakeComponentStatuses) Create(componentStatus *v1.ComponentStatus) (res
|
||||
|
||||
func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("componentstatuses", componentStatus), &v1.ComponentStatus{})
|
||||
Invokes(core.NewRootUpdateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -49,12 +52,12 @@ func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (res
|
||||
|
||||
func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("componentstatuses", name), &v1.ComponentStatus{})
|
||||
Invokes(core.NewRootDeleteAction(componentstatusesResource, name), &v1.ComponentStatus{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("componentstatuses", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ComponentStatusList{})
|
||||
return err
|
||||
@ -62,7 +65,7 @@ func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, lis
|
||||
|
||||
func (c *FakeComponentStatuses) Get(name string) (result *v1.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("componentstatuses", name), &v1.ComponentStatus{})
|
||||
Invokes(core.NewRootGetAction(componentstatusesResource, name), &v1.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -71,7 +74,7 @@ func (c *FakeComponentStatuses) Get(name string) (result *v1.ComponentStatus, er
|
||||
|
||||
func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *v1.ComponentStatusList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("componentstatuses", opts), &v1.ComponentStatusList{})
|
||||
Invokes(core.NewRootListAction(componentstatusesResource, opts), &v1.ComponentStatusList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -92,5 +95,5 @@ func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *v1.Component
|
||||
// Watch returns a watch.Interface that watches the requested componentStatuses.
|
||||
func (c *FakeComponentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("componentstatuses", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeConfigMaps struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var configmapsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "configmaps"}
|
||||
|
||||
func (c *FakeConfigMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("configmaps", c.ns, configMap), &v1.ConfigMap{})
|
||||
Invokes(core.NewCreateAction(configmapsResource, c.ns, configMap), &v1.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeConfigMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap,
|
||||
|
||||
func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("configmaps", c.ns, configMap), &v1.ConfigMap{})
|
||||
Invokes(core.NewUpdateAction(configmapsResource, c.ns, configMap), &v1.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeConfigMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap,
|
||||
|
||||
func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("configmaps", c.ns, name), &v1.ConfigMap{})
|
||||
Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &v1.ConfigMap{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("configmaps", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ConfigMapList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeConfigMaps) Get(name string) (result *v1.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("configmaps", c.ns, name), &v1.ConfigMap{})
|
||||
Invokes(core.NewGetAction(configmapsResource, c.ns, name), &v1.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeConfigMaps) Get(name string) (result *v1.ConfigMap, err error) {
|
||||
|
||||
func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("configmaps", c.ns, opts), &v1.ConfigMapList{})
|
||||
Invokes(core.NewListAction(configmapsResource, c.ns, opts), &v1.ConfigMapList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, e
|
||||
// Watch returns a watch.Interface that watches the requested configMaps.
|
||||
func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("configmaps", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeEndpoints struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var endpointsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "endpoints"}
|
||||
|
||||
func (c *FakeEndpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("endpoints", c.ns, endpoints), &v1.Endpoints{})
|
||||
Invokes(core.NewCreateAction(endpointsResource, c.ns, endpoints), &v1.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeEndpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, e
|
||||
|
||||
func (c *FakeEndpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("endpoints", c.ns, endpoints), &v1.Endpoints{})
|
||||
Invokes(core.NewUpdateAction(endpointsResource, c.ns, endpoints), &v1.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeEndpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, e
|
||||
|
||||
func (c *FakeEndpoints) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("endpoints", c.ns, name), &v1.Endpoints{})
|
||||
Invokes(core.NewDeleteAction(endpointsResource, c.ns, name), &v1.Endpoints{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("endpoints", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.EndpointsList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeEndpoints) Get(name string) (result *v1.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("endpoints", c.ns, name), &v1.Endpoints{})
|
||||
Invokes(core.NewGetAction(endpointsResource, c.ns, name), &v1.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeEndpoints) Get(name string) (result *v1.Endpoints, err error) {
|
||||
|
||||
func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("endpoints", c.ns, opts), &v1.EndpointsList{})
|
||||
Invokes(core.NewListAction(endpointsResource, c.ns, opts), &v1.EndpointsList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *v1.EndpointsList, er
|
||||
// Watch returns a watch.Interface that watches the requested endpoints.
|
||||
func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("endpoints", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeEvents struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var eventsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "events"}
|
||||
|
||||
func (c *FakeEvents) Create(event *v1.Event) (result *v1.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("events", c.ns, event), &v1.Event{})
|
||||
Invokes(core.NewCreateAction(eventsResource, c.ns, event), &v1.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeEvents) Create(event *v1.Event) (result *v1.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("events", c.ns, event), &v1.Event{})
|
||||
Invokes(core.NewUpdateAction(eventsResource, c.ns, event), &v1.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeEvents) Update(event *v1.Event) (result *v1.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("events", c.ns, name), &v1.Event{})
|
||||
Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &v1.Event{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("events", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.EventList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions ap
|
||||
|
||||
func (c *FakeEvents) Get(name string) (result *v1.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("events", c.ns, name), &v1.Event{})
|
||||
Invokes(core.NewGetAction(eventsResource, c.ns, name), &v1.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeEvents) Get(name string) (result *v1.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("events", c.ns, opts), &v1.EventList{})
|
||||
Invokes(core.NewListAction(eventsResource, c.ns, opts), &v1.EventList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *v1.EventList, err error
|
||||
// Watch returns a watch.Interface that watches the requested events.
|
||||
func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("events", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ import (
|
||||
)
|
||||
|
||||
func (c *FakeEvents) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
|
||||
action := core.NewRootCreateAction("events", event)
|
||||
action := core.NewRootCreateAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewCreateAction("events", c.ns, event)
|
||||
action = core.NewCreateAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -39,9 +39,9 @@ func (c *FakeEvents) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error
|
||||
|
||||
// Update replaces an existing event. Returns the copy of the event the server returns, or an error.
|
||||
func (c *FakeEvents) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
|
||||
action := core.NewRootUpdateAction("events", event)
|
||||
action := core.NewRootUpdateAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewUpdateAction("events", c.ns, event)
|
||||
action = core.NewUpdateAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -53,9 +53,9 @@ func (c *FakeEvents) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error
|
||||
|
||||
// Patch patches an existing event. Returns the copy of the event the server returns, or an error.
|
||||
func (c *FakeEvents) Patch(event *v1.Event, data []byte) (*v1.Event, error) {
|
||||
action := core.NewRootPatchAction("events", event)
|
||||
action := core.NewRootPatchAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewPatchAction("events", c.ns, event)
|
||||
action = core.NewPatchAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -67,9 +67,9 @@ func (c *FakeEvents) Patch(event *v1.Event, data []byte) (*v1.Event, error) {
|
||||
|
||||
// Search returns a list of events matching the specified object.
|
||||
func (c *FakeEvents) Search(objOrRef runtime.Object) (*v1.EventList, error) {
|
||||
action := core.NewRootListAction("events", api.ListOptions{})
|
||||
action := core.NewRootListAction(eventsResource, api.ListOptions{})
|
||||
if c.ns != "" {
|
||||
action = core.NewListAction("events", c.ns, api.ListOptions{})
|
||||
action = core.NewListAction(eventsResource, c.ns, api.ListOptions{})
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, &v1.EventList{})
|
||||
if obj == nil {
|
||||
@ -82,7 +82,7 @@ func (c *FakeEvents) Search(objOrRef runtime.Object) (*v1.EventList, error) {
|
||||
func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
|
||||
action := core.GenericActionImpl{}
|
||||
action.Verb = "get-field-selector"
|
||||
action.Resource = "events"
|
||||
action.Resource = eventsResource
|
||||
|
||||
c.Fake.Invokes(action, nil)
|
||||
return fields.Everything()
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeLimitRanges struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var limitrangesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "limitranges"}
|
||||
|
||||
func (c *FakeLimitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("limitranges", c.ns, limitRange), &v1.LimitRange{})
|
||||
Invokes(core.NewCreateAction(limitrangesResource, c.ns, limitRange), &v1.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeLimitRanges) Create(limitRange *v1.LimitRange) (result *v1.LimitRan
|
||||
|
||||
func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("limitranges", c.ns, limitRange), &v1.LimitRange{})
|
||||
Invokes(core.NewUpdateAction(limitrangesResource, c.ns, limitRange), &v1.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeLimitRanges) Update(limitRange *v1.LimitRange) (result *v1.LimitRan
|
||||
|
||||
func (c *FakeLimitRanges) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("limitranges", c.ns, name), &v1.LimitRange{})
|
||||
Invokes(core.NewDeleteAction(limitrangesResource, c.ns, name), &v1.LimitRange{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("limitranges", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.LimitRangeList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeLimitRanges) Get(name string) (result *v1.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("limitranges", c.ns, name), &v1.LimitRange{})
|
||||
Invokes(core.NewGetAction(limitrangesResource, c.ns, name), &v1.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeLimitRanges) Get(name string) (result *v1.LimitRange, err error) {
|
||||
|
||||
func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("limitranges", c.ns, opts), &v1.LimitRangeList{})
|
||||
Invokes(core.NewListAction(limitrangesResource, c.ns, opts), &v1.LimitRangeList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *v1.LimitRangeList,
|
||||
// Watch returns a watch.Interface that watches the requested limitRanges.
|
||||
func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("limitranges", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -29,9 +30,11 @@ type FakeNamespaces struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var namespacesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "namespaces"}
|
||||
|
||||
func (c *FakeNamespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("namespaces", namespace), &v1.Namespace{})
|
||||
Invokes(core.NewRootCreateAction(namespacesResource, namespace), &v1.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -40,7 +43,7 @@ func (c *FakeNamespaces) Create(namespace *v1.Namespace) (result *v1.Namespace,
|
||||
|
||||
func (c *FakeNamespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("namespaces", namespace), &v1.Namespace{})
|
||||
Invokes(core.NewRootUpdateAction(namespacesResource, namespace), &v1.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -49,7 +52,7 @@ func (c *FakeNamespaces) Update(namespace *v1.Namespace) (result *v1.Namespace,
|
||||
|
||||
func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction("namespaces", "status", namespace), &v1.Namespace{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(namespacesResource, "status", namespace), &v1.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -58,12 +61,12 @@ func (c *FakeNamespaces) UpdateStatus(namespace *v1.Namespace) (*v1.Namespace, e
|
||||
|
||||
func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("namespaces", name), &v1.Namespace{})
|
||||
Invokes(core.NewRootDeleteAction(namespacesResource, name), &v1.Namespace{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("namespaces", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(namespacesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.NamespaceList{})
|
||||
return err
|
||||
@ -71,7 +74,7 @@ func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeNamespaces) Get(name string) (result *v1.Namespace, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("namespaces", name), &v1.Namespace{})
|
||||
Invokes(core.NewRootGetAction(namespacesResource, name), &v1.Namespace{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -80,7 +83,7 @@ func (c *FakeNamespaces) Get(name string) (result *v1.Namespace, err error) {
|
||||
|
||||
func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("namespaces", opts), &v1.NamespaceList{})
|
||||
Invokes(core.NewRootListAction(namespacesResource, opts), &v1.NamespaceList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -101,5 +104,5 @@ func (c *FakeNamespaces) List(opts api.ListOptions) (result *v1.NamespaceList, e
|
||||
// Watch returns a watch.Interface that watches the requested namespaces.
|
||||
func (c *FakeNamespaces) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("namespaces", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(namespacesResource, opts))
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
func (c *FakeNamespaces) Finalize(namespace *v1.Namespace) (*v1.Namespace, error) {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = "namespaces"
|
||||
action.Resource = namespacesResource
|
||||
action.Subresource = "finalize"
|
||||
action.Object = namespace
|
||||
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -29,9 +30,11 @@ type FakeNodes struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var nodesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "nodes"}
|
||||
|
||||
func (c *FakeNodes) Create(node *v1.Node) (result *v1.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("nodes", node), &v1.Node{})
|
||||
Invokes(core.NewRootCreateAction(nodesResource, node), &v1.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -40,7 +43,7 @@ func (c *FakeNodes) Create(node *v1.Node) (result *v1.Node, err error) {
|
||||
|
||||
func (c *FakeNodes) Update(node *v1.Node) (result *v1.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("nodes", node), &v1.Node{})
|
||||
Invokes(core.NewRootUpdateAction(nodesResource, node), &v1.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -49,7 +52,7 @@ func (c *FakeNodes) Update(node *v1.Node) (result *v1.Node, err error) {
|
||||
|
||||
func (c *FakeNodes) UpdateStatus(node *v1.Node) (*v1.Node, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction("nodes", "status", node), &v1.Node{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(nodesResource, "status", node), &v1.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -58,12 +61,12 @@ func (c *FakeNodes) UpdateStatus(node *v1.Node) (*v1.Node, error) {
|
||||
|
||||
func (c *FakeNodes) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("nodes", name), &v1.Node{})
|
||||
Invokes(core.NewRootDeleteAction(nodesResource, name), &v1.Node{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("nodes", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(nodesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.NodeList{})
|
||||
return err
|
||||
@ -71,7 +74,7 @@ func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api
|
||||
|
||||
func (c *FakeNodes) Get(name string) (result *v1.Node, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("nodes", name), &v1.Node{})
|
||||
Invokes(core.NewRootGetAction(nodesResource, name), &v1.Node{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -80,7 +83,7 @@ func (c *FakeNodes) Get(name string) (result *v1.Node, err error) {
|
||||
|
||||
func (c *FakeNodes) List(opts api.ListOptions) (result *v1.NodeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("nodes", opts), &v1.NodeList{})
|
||||
Invokes(core.NewRootListAction(nodesResource, opts), &v1.NodeList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -101,5 +104,5 @@ func (c *FakeNodes) List(opts api.ListOptions) (result *v1.NodeList, err error)
|
||||
// Watch returns a watch.Interface that watches the requested nodes.
|
||||
func (c *FakeNodes) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("nodes", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(nodesResource, opts))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -29,9 +30,11 @@ type FakePersistentVolumes struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var persistentvolumesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "persistentvolumes"}
|
||||
|
||||
func (c *FakePersistentVolumes) Create(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("persistentvolumes", persistentVolume), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootCreateAction(persistentvolumesResource, persistentVolume), &v1.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -40,7 +43,7 @@ func (c *FakePersistentVolumes) Create(persistentVolume *v1.PersistentVolume) (r
|
||||
|
||||
func (c *FakePersistentVolumes) Update(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("persistentvolumes", persistentVolume), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootUpdateAction(persistentvolumesResource, persistentVolume), &v1.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -49,7 +52,7 @@ func (c *FakePersistentVolumes) Update(persistentVolume *v1.PersistentVolume) (r
|
||||
|
||||
func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolume) (*v1.PersistentVolume, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateSubresourceAction("persistentvolumes", "status", persistentVolume), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootUpdateSubresourceAction(persistentvolumesResource, "status", persistentVolume), &v1.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -58,12 +61,12 @@ func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *v1.PersistentVolu
|
||||
|
||||
func (c *FakePersistentVolumes) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("persistentvolumes", name), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootDeleteAction(persistentvolumesResource, name), &v1.PersistentVolume{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("persistentvolumes", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(persistentvolumesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.PersistentVolumeList{})
|
||||
return err
|
||||
@ -71,7 +74,7 @@ func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, lis
|
||||
|
||||
func (c *FakePersistentVolumes) Get(name string) (result *v1.PersistentVolume, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("persistentvolumes", name), &v1.PersistentVolume{})
|
||||
Invokes(core.NewRootGetAction(persistentvolumesResource, name), &v1.PersistentVolume{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -80,7 +83,7 @@ func (c *FakePersistentVolumes) Get(name string) (result *v1.PersistentVolume, e
|
||||
|
||||
func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *v1.PersistentVolumeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("persistentvolumes", opts), &v1.PersistentVolumeList{})
|
||||
Invokes(core.NewRootListAction(persistentvolumesResource, opts), &v1.PersistentVolumeList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -101,5 +104,5 @@ func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *v1.Persisten
|
||||
// Watch returns a watch.Interface that watches the requested persistentVolumes.
|
||||
func (c *FakePersistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("persistentvolumes", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(persistentvolumesResource, opts))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakePods struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var podsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "pods"}
|
||||
|
||||
func (c *FakePods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("pods", c.ns, pod), &v1.Pod{})
|
||||
Invokes(core.NewCreateAction(podsResource, c.ns, pod), &v1.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakePods) Create(pod *v1.Pod) (result *v1.Pod, err error) {
|
||||
|
||||
func (c *FakePods) Update(pod *v1.Pod) (result *v1.Pod, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("pods", c.ns, pod), &v1.Pod{})
|
||||
Invokes(core.NewUpdateAction(podsResource, c.ns, pod), &v1.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakePods) Update(pod *v1.Pod) (result *v1.Pod, err error) {
|
||||
|
||||
func (c *FakePods) UpdateStatus(pod *v1.Pod) (*v1.Pod, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("pods", "status", c.ns, pod), &v1.Pod{})
|
||||
Invokes(core.NewUpdateSubresourceAction(podsResource, "status", c.ns, pod), &v1.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakePods) UpdateStatus(pod *v1.Pod) (*v1.Pod, error) {
|
||||
|
||||
func (c *FakePods) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("pods", c.ns, name), &v1.Pod{})
|
||||
Invokes(core.NewDeleteAction(podsResource, c.ns, name), &v1.Pod{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePods) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("pods", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(podsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.PodList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakePods) DeleteCollection(options *api.DeleteOptions, listOptions api.
|
||||
|
||||
func (c *FakePods) Get(name string) (result *v1.Pod, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("pods", c.ns, name), &v1.Pod{})
|
||||
Invokes(core.NewGetAction(podsResource, c.ns, name), &v1.Pod{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakePods) Get(name string) (result *v1.Pod, err error) {
|
||||
|
||||
func (c *FakePods) List(opts api.ListOptions) (result *v1.PodList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("pods", c.ns, opts), &v1.PodList{})
|
||||
Invokes(core.NewListAction(podsResource, c.ns, opts), &v1.PodList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakePods) List(opts api.ListOptions) (result *v1.PodList, err error) {
|
||||
// Watch returns a watch.Interface that watches the requested pods.
|
||||
func (c *FakePods) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("pods", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(podsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import (
|
||||
func (c *FakePods) Bind(binding *v1.Binding) error {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = "pods"
|
||||
action.Resource = podsResource
|
||||
action.Subresource = "bindings"
|
||||
action.Object = binding
|
||||
|
||||
@ -37,7 +37,7 @@ func (c *FakePods) GetLogs(name string, opts *v1.PodLogOptions) *restclient.Requ
|
||||
action := core.GenericActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Namespace = c.ns
|
||||
action.Resource = "pod"
|
||||
action.Resource = podsResource
|
||||
action.Subresource = "logs"
|
||||
action.Value = opts
|
||||
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakePodTemplates struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var podtemplatesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "podtemplates"}
|
||||
|
||||
func (c *FakePodTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("podtemplates", c.ns, podTemplate), &v1.PodTemplate{})
|
||||
Invokes(core.NewCreateAction(podtemplatesResource, c.ns, podTemplate), &v1.PodTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakePodTemplates) Create(podTemplate *v1.PodTemplate) (result *v1.PodTe
|
||||
|
||||
func (c *FakePodTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("podtemplates", c.ns, podTemplate), &v1.PodTemplate{})
|
||||
Invokes(core.NewUpdateAction(podtemplatesResource, c.ns, podTemplate), &v1.PodTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakePodTemplates) Update(podTemplate *v1.PodTemplate) (result *v1.PodTe
|
||||
|
||||
func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("podtemplates", c.ns, name), &v1.PodTemplate{})
|
||||
Invokes(core.NewDeleteAction(podtemplatesResource, c.ns, name), &v1.PodTemplate{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakePodTemplates) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("podtemplates", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(podtemplatesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.PodTemplateList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakePodTemplates) DeleteCollection(options *api.DeleteOptions, listOpti
|
||||
|
||||
func (c *FakePodTemplates) Get(name string) (result *v1.PodTemplate, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("podtemplates", c.ns, name), &v1.PodTemplate{})
|
||||
Invokes(core.NewGetAction(podtemplatesResource, c.ns, name), &v1.PodTemplate{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakePodTemplates) Get(name string) (result *v1.PodTemplate, err error)
|
||||
|
||||
func (c *FakePodTemplates) List(opts api.ListOptions) (result *v1.PodTemplateList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("podtemplates", c.ns, opts), &v1.PodTemplateList{})
|
||||
Invokes(core.NewListAction(podtemplatesResource, c.ns, opts), &v1.PodTemplateList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakePodTemplates) List(opts api.ListOptions) (result *v1.PodTemplateLis
|
||||
// Watch returns a watch.Interface that watches the requested podTemplates.
|
||||
func (c *FakePodTemplates) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("podtemplates", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(podtemplatesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeReplicationControllers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var replicationcontrollersResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "replicationcontrollers"}
|
||||
|
||||
func (c *FakeReplicationControllers) Create(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("replicationcontrollers", c.ns, replicationController), &v1.ReplicationController{})
|
||||
Invokes(core.NewCreateAction(replicationcontrollersResource, c.ns, replicationController), &v1.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeReplicationControllers) Create(replicationController *v1.Replicatio
|
||||
|
||||
func (c *FakeReplicationControllers) Update(replicationController *v1.ReplicationController) (result *v1.ReplicationController, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("replicationcontrollers", c.ns, replicationController), &v1.ReplicationController{})
|
||||
Invokes(core.NewUpdateAction(replicationcontrollersResource, c.ns, replicationController), &v1.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeReplicationControllers) Update(replicationController *v1.Replicatio
|
||||
|
||||
func (c *FakeReplicationControllers) UpdateStatus(replicationController *v1.ReplicationController) (*v1.ReplicationController, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("replicationcontrollers", "status", c.ns, replicationController), &v1.ReplicationController{})
|
||||
Invokes(core.NewUpdateSubresourceAction(replicationcontrollersResource, "status", c.ns, replicationController), &v1.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeReplicationControllers) UpdateStatus(replicationController *v1.Repl
|
||||
|
||||
func (c *FakeReplicationControllers) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("replicationcontrollers", c.ns, name), &v1.ReplicationController{})
|
||||
Invokes(core.NewDeleteAction(replicationcontrollersResource, c.ns, name), &v1.ReplicationController{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeReplicationControllers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("replicationcontrollers", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(replicationcontrollersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ReplicationControllerList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeReplicationControllers) DeleteCollection(options *api.DeleteOptions
|
||||
|
||||
func (c *FakeReplicationControllers) Get(name string) (result *v1.ReplicationController, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("replicationcontrollers", c.ns, name), &v1.ReplicationController{})
|
||||
Invokes(core.NewGetAction(replicationcontrollersResource, c.ns, name), &v1.ReplicationController{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeReplicationControllers) Get(name string) (result *v1.ReplicationCon
|
||||
|
||||
func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *v1.ReplicationControllerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("replicationcontrollers", c.ns, opts), &v1.ReplicationControllerList{})
|
||||
Invokes(core.NewListAction(replicationcontrollersResource, c.ns, opts), &v1.ReplicationControllerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeReplicationControllers) List(opts api.ListOptions) (result *v1.Repl
|
||||
// Watch returns a watch.Interface that watches the requested replicationControllers.
|
||||
func (c *FakeReplicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("replicationcontrollers", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(replicationcontrollersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeResourceQuotas struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var resourcequotasResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "resourcequotas"}
|
||||
|
||||
func (c *FakeResourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("resourcequotas", c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
Invokes(core.NewCreateAction(resourcequotasResource, c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeResourceQuotas) Create(resourceQuota *v1.ResourceQuota) (result *v1
|
||||
|
||||
func (c *FakeResourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1.ResourceQuota, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("resourcequotas", c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
Invokes(core.NewUpdateAction(resourcequotasResource, c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeResourceQuotas) Update(resourceQuota *v1.ResourceQuota) (result *v1
|
||||
|
||||
func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (*v1.ResourceQuota, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("resourcequotas", "status", c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
Invokes(core.NewUpdateSubresourceAction(resourcequotasResource, "status", c.ns, resourceQuota), &v1.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *v1.ResourceQuota) (*v1.
|
||||
|
||||
func (c *FakeResourceQuotas) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("resourcequotas", c.ns, name), &v1.ResourceQuota{})
|
||||
Invokes(core.NewDeleteAction(resourcequotasResource, c.ns, name), &v1.ResourceQuota{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeResourceQuotas) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("resourcequotas", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(resourcequotasResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ResourceQuotaList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeResourceQuotas) DeleteCollection(options *api.DeleteOptions, listOp
|
||||
|
||||
func (c *FakeResourceQuotas) Get(name string) (result *v1.ResourceQuota, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("resourcequotas", c.ns, name), &v1.ResourceQuota{})
|
||||
Invokes(core.NewGetAction(resourcequotasResource, c.ns, name), &v1.ResourceQuota{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeResourceQuotas) Get(name string) (result *v1.ResourceQuota, err err
|
||||
|
||||
func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *v1.ResourceQuotaList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("resourcequotas", c.ns, opts), &v1.ResourceQuotaList{})
|
||||
Invokes(core.NewListAction(resourcequotasResource, c.ns, opts), &v1.ResourceQuotaList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeResourceQuotas) List(opts api.ListOptions) (result *v1.ResourceQuot
|
||||
// Watch returns a watch.Interface that watches the requested resourceQuotas.
|
||||
func (c *FakeResourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("resourcequotas", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(resourcequotasResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeSecrets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var secretsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "secrets"}
|
||||
|
||||
func (c *FakeSecrets) Create(secret *v1.Secret) (result *v1.Secret, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("secrets", c.ns, secret), &v1.Secret{})
|
||||
Invokes(core.NewCreateAction(secretsResource, c.ns, secret), &v1.Secret{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeSecrets) Create(secret *v1.Secret) (result *v1.Secret, err error) {
|
||||
|
||||
func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("secrets", c.ns, secret), &v1.Secret{})
|
||||
Invokes(core.NewUpdateAction(secretsResource, c.ns, secret), &v1.Secret{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeSecrets) Update(secret *v1.Secret) (result *v1.Secret, err error) {
|
||||
|
||||
func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("secrets", c.ns, name), &v1.Secret{})
|
||||
Invokes(core.NewDeleteAction(secretsResource, c.ns, name), &v1.Secret{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("secrets", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(secretsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.SecretList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeSecrets) DeleteCollection(options *api.DeleteOptions, listOptions a
|
||||
|
||||
func (c *FakeSecrets) Get(name string) (result *v1.Secret, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("secrets", c.ns, name), &v1.Secret{})
|
||||
Invokes(core.NewGetAction(secretsResource, c.ns, name), &v1.Secret{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeSecrets) Get(name string) (result *v1.Secret, err error) {
|
||||
|
||||
func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("secrets", c.ns, opts), &v1.SecretList{})
|
||||
Invokes(core.NewListAction(secretsResource, c.ns, opts), &v1.SecretList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeSecrets) List(opts api.ListOptions) (result *v1.SecretList, err err
|
||||
// Watch returns a watch.Interface that watches the requested secrets.
|
||||
func (c *FakeSecrets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("secrets", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(secretsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeServices struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var servicesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "services"}
|
||||
|
||||
func (c *FakeServices) Create(service *v1.Service) (result *v1.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("services", c.ns, service), &v1.Service{})
|
||||
Invokes(core.NewCreateAction(servicesResource, c.ns, service), &v1.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeServices) Create(service *v1.Service) (result *v1.Service, err erro
|
||||
|
||||
func (c *FakeServices) Update(service *v1.Service) (result *v1.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("services", c.ns, service), &v1.Service{})
|
||||
Invokes(core.NewUpdateAction(servicesResource, c.ns, service), &v1.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeServices) Update(service *v1.Service) (result *v1.Service, err erro
|
||||
|
||||
func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("services", "status", c.ns, service), &v1.Service{})
|
||||
Invokes(core.NewUpdateSubresourceAction(servicesResource, "status", c.ns, service), &v1.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeServices) UpdateStatus(service *v1.Service) (*v1.Service, error) {
|
||||
|
||||
func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("services", c.ns, name), &v1.Service{})
|
||||
Invokes(core.NewDeleteAction(servicesResource, c.ns, name), &v1.Service{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("services", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(servicesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ServiceList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeServices) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeServices) Get(name string) (result *v1.Service, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("services", c.ns, name), &v1.Service{})
|
||||
Invokes(core.NewGetAction(servicesResource, c.ns, name), &v1.Service{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeServices) Get(name string) (result *v1.Service, err error) {
|
||||
|
||||
func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("services", c.ns, opts), &v1.ServiceList{})
|
||||
Invokes(core.NewListAction(servicesResource, c.ns, opts), &v1.ServiceList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeServices) List(opts api.ListOptions) (result *v1.ServiceList, err e
|
||||
// Watch returns a watch.Interface that watches the requested services.
|
||||
func (c *FakeServices) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("services", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(servicesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -22,5 +22,5 @@ import (
|
||||
)
|
||||
|
||||
func (c *FakeServices) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
|
||||
return c.Fake.InvokesProxy(core.NewProxyGetAction("services", c.ns, scheme, name, port, path, params))
|
||||
return c.Fake.InvokesProxy(core.NewProxyGetAction(servicesResource, c.ns, scheme, name, port, path, params))
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeServiceAccounts struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var serviceaccountsResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "serviceaccounts"}
|
||||
|
||||
func (c *FakeServiceAccounts) Create(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("serviceaccounts", c.ns, serviceAccount), &v1.ServiceAccount{})
|
||||
Invokes(core.NewCreateAction(serviceaccountsResource, c.ns, serviceAccount), &v1.ServiceAccount{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeServiceAccounts) Create(serviceAccount *v1.ServiceAccount) (result
|
||||
|
||||
func (c *FakeServiceAccounts) Update(serviceAccount *v1.ServiceAccount) (result *v1.ServiceAccount, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("serviceaccounts", c.ns, serviceAccount), &v1.ServiceAccount{})
|
||||
Invokes(core.NewUpdateAction(serviceaccountsResource, c.ns, serviceAccount), &v1.ServiceAccount{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeServiceAccounts) Update(serviceAccount *v1.ServiceAccount) (result
|
||||
|
||||
func (c *FakeServiceAccounts) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("serviceaccounts", c.ns, name), &v1.ServiceAccount{})
|
||||
Invokes(core.NewDeleteAction(serviceaccountsResource, c.ns, name), &v1.ServiceAccount{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeServiceAccounts) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("serviceaccounts", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(serviceaccountsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.ServiceAccountList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeServiceAccounts) DeleteCollection(options *api.DeleteOptions, listO
|
||||
|
||||
func (c *FakeServiceAccounts) Get(name string) (result *v1.ServiceAccount, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("serviceaccounts", c.ns, name), &v1.ServiceAccount{})
|
||||
Invokes(core.NewGetAction(serviceaccountsResource, c.ns, name), &v1.ServiceAccount{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeServiceAccounts) Get(name string) (result *v1.ServiceAccount, err e
|
||||
|
||||
func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *v1.ServiceAccountList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("serviceaccounts", c.ns, opts), &v1.ServiceAccountList{})
|
||||
Invokes(core.NewListAction(serviceaccountsResource, c.ns, opts), &v1.ServiceAccountList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeServiceAccounts) List(opts api.ListOptions) (result *v1.ServiceAcco
|
||||
// Watch returns a watch.Interface that watches the requested serviceAccounts.
|
||||
func (c *FakeServiceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("serviceaccounts", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(serviceaccountsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeDaemonSets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var daemonsetsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "daemonsets"}
|
||||
|
||||
func (c *FakeDaemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("daemonsets", c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeDaemonSets) Create(daemonSet *v1beta1.DaemonSet) (result *v1beta1.D
|
||||
|
||||
func (c *FakeDaemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.DaemonSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("daemonsets", c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewUpdateAction(daemonsetsResource, c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeDaemonSets) Update(daemonSet *v1beta1.DaemonSet) (result *v1beta1.D
|
||||
|
||||
func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (*v1beta1.DaemonSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("daemonsets", "status", c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewUpdateSubresourceAction(daemonsetsResource, "status", c.ns, daemonSet), &v1beta1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeDaemonSets) UpdateStatus(daemonSet *v1beta1.DaemonSet) (*v1beta1.Da
|
||||
|
||||
func (c *FakeDaemonSets) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("daemonsets", c.ns, name), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewDeleteAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("daemonsets", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(daemonsetsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.DaemonSetList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeDaemonSets) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeDaemonSets) Get(name string) (result *v1beta1.DaemonSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("daemonsets", c.ns, name), &v1beta1.DaemonSet{})
|
||||
Invokes(core.NewGetAction(daemonsetsResource, c.ns, name), &v1beta1.DaemonSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeDaemonSets) Get(name string) (result *v1beta1.DaemonSet, err error)
|
||||
|
||||
func (c *FakeDaemonSets) List(opts api.ListOptions) (result *v1beta1.DaemonSetList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("daemonsets", c.ns, opts), &v1beta1.DaemonSetList{})
|
||||
Invokes(core.NewListAction(daemonsetsResource, c.ns, opts), &v1beta1.DaemonSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeDaemonSets) List(opts api.ListOptions) (result *v1beta1.DaemonSetLi
|
||||
// Watch returns a watch.Interface that watches the requested daemonSets.
|
||||
func (c *FakeDaemonSets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("daemonsets", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(daemonsetsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeDeployments struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var deploymentsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "deployments"}
|
||||
|
||||
func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("deployments", c.ns, deployment), &v1beta1.Deployment{})
|
||||
Invokes(core.NewCreateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeDeployments) Create(deployment *v1beta1.Deployment) (result *v1beta
|
||||
|
||||
func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta1.Deployment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("deployments", c.ns, deployment), &v1beta1.Deployment{})
|
||||
Invokes(core.NewUpdateAction(deploymentsResource, c.ns, deployment), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeDeployments) Update(deployment *v1beta1.Deployment) (result *v1beta
|
||||
|
||||
func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1.Deployment, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("deployments", "status", c.ns, deployment), &v1beta1.Deployment{})
|
||||
Invokes(core.NewUpdateSubresourceAction(deploymentsResource, "status", c.ns, deployment), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeDeployments) UpdateStatus(deployment *v1beta1.Deployment) (*v1beta1
|
||||
|
||||
func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("deployments", c.ns, name), &v1beta1.Deployment{})
|
||||
Invokes(core.NewDeleteAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("deployments", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(deploymentsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.DeploymentList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeDeployments) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeDeployments) Get(name string) (result *v1beta1.Deployment, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("deployments", c.ns, name), &v1beta1.Deployment{})
|
||||
Invokes(core.NewGetAction(deploymentsResource, c.ns, name), &v1beta1.Deployment{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeDeployments) Get(name string) (result *v1beta1.Deployment, err erro
|
||||
|
||||
func (c *FakeDeployments) List(opts api.ListOptions) (result *v1beta1.DeploymentList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("deployments", c.ns, opts), &v1beta1.DeploymentList{})
|
||||
Invokes(core.NewListAction(deploymentsResource, c.ns, opts), &v1beta1.DeploymentList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeDeployments) List(opts api.ListOptions) (result *v1beta1.Deployment
|
||||
// Watch returns a watch.Interface that watches the requested deployments.
|
||||
func (c *FakeDeployments) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("deployments", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(deploymentsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import (
|
||||
func (c *FakeDeployments) Rollback(deploymentRollback *v1beta1.DeploymentRollback) error {
|
||||
action := core.CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = "deployments"
|
||||
action.Resource = deploymentsResource
|
||||
action.Subresource = "rollback"
|
||||
action.Object = deploymentRollback
|
||||
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeHorizontalPodAutoscalers struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var horizontalpodautoscalersResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "horizontalpodautoscalers"}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("horizontalpodautoscalers", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewCreateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeHorizontalPodAutoscalers) Create(horizontalPodAutoscaler *v1beta1.H
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("horizontalpodautoscalers", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewUpdateAction(horizontalpodautoscalersResource, c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeHorizontalPodAutoscalers) Update(horizontalPodAutoscaler *v1beta1.H
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1beta1.HorizontalPodAutoscaler) (*v1beta1.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("horizontalpodautoscalers", "status", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewUpdateSubresourceAction(horizontalpodautoscalersResource, "status", c.ns, horizontalPodAutoscaler), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *v1b
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("horizontalpodautoscalers", c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewDeleteAction(horizontalpodautoscalersResource, c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("horizontalpodautoscalers", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(horizontalpodautoscalersResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.HorizontalPodAutoscalerList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeHorizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptio
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1beta1.HorizontalPodAutoscaler, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("horizontalpodautoscalers", c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
||||
Invokes(core.NewGetAction(horizontalpodautoscalersResource, c.ns, name), &v1beta1.HorizontalPodAutoscaler{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *v1beta1.Horizon
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1beta1.HorizontalPodAutoscalerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("horizontalpodautoscalers", c.ns, opts), &v1beta1.HorizontalPodAutoscalerList{})
|
||||
Invokes(core.NewListAction(horizontalpodautoscalersResource, c.ns, opts), &v1beta1.HorizontalPodAutoscalerList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (result *v1bet
|
||||
// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
|
||||
func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("horizontalpodautoscalers", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(horizontalpodautoscalersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeIngresses struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var ingressesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "ingresses"}
|
||||
|
||||
func (c *FakeIngresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("ingresses", c.ns, ingress), &v1beta1.Ingress{})
|
||||
Invokes(core.NewCreateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeIngresses) Create(ingress *v1beta1.Ingress) (result *v1beta1.Ingres
|
||||
|
||||
func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingress, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("ingresses", c.ns, ingress), &v1beta1.Ingress{})
|
||||
Invokes(core.NewUpdateAction(ingressesResource, c.ns, ingress), &v1beta1.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeIngresses) Update(ingress *v1beta1.Ingress) (result *v1beta1.Ingres
|
||||
|
||||
func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("ingresses", "status", c.ns, ingress), &v1beta1.Ingress{})
|
||||
Invokes(core.NewUpdateSubresourceAction(ingressesResource, "status", c.ns, ingress), &v1beta1.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeIngresses) UpdateStatus(ingress *v1beta1.Ingress) (*v1beta1.Ingress
|
||||
|
||||
func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("ingresses", c.ns, name), &v1beta1.Ingress{})
|
||||
Invokes(core.NewDeleteAction(ingressesResource, c.ns, name), &v1beta1.Ingress{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("ingresses", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(ingressesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.IngressList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeIngresses) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeIngresses) Get(name string) (result *v1beta1.Ingress, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("ingresses", c.ns, name), &v1beta1.Ingress{})
|
||||
Invokes(core.NewGetAction(ingressesResource, c.ns, name), &v1beta1.Ingress{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeIngresses) Get(name string) (result *v1beta1.Ingress, err error) {
|
||||
|
||||
func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("ingresses", c.ns, opts), &v1beta1.IngressList{})
|
||||
Invokes(core.NewListAction(ingressesResource, c.ns, opts), &v1beta1.IngressList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeIngresses) List(opts api.ListOptions) (result *v1beta1.IngressList,
|
||||
// Watch returns a watch.Interface that watches the requested ingresses.
|
||||
func (c *FakeIngresses) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("ingresses", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(ingressesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeJobs struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var jobsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "jobs"}
|
||||
|
||||
func (c *FakeJobs) Create(job *v1beta1.Job) (result *v1beta1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("jobs", c.ns, job), &v1beta1.Job{})
|
||||
Invokes(core.NewCreateAction(jobsResource, c.ns, job), &v1beta1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeJobs) Create(job *v1beta1.Job) (result *v1beta1.Job, err error) {
|
||||
|
||||
func (c *FakeJobs) Update(job *v1beta1.Job) (result *v1beta1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("jobs", c.ns, job), &v1beta1.Job{})
|
||||
Invokes(core.NewUpdateAction(jobsResource, c.ns, job), &v1beta1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeJobs) Update(job *v1beta1.Job) (result *v1beta1.Job, err error) {
|
||||
|
||||
func (c *FakeJobs) UpdateStatus(job *v1beta1.Job) (*v1beta1.Job, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("jobs", "status", c.ns, job), &v1beta1.Job{})
|
||||
Invokes(core.NewUpdateSubresourceAction(jobsResource, "status", c.ns, job), &v1beta1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeJobs) UpdateStatus(job *v1beta1.Job) (*v1beta1.Job, error) {
|
||||
|
||||
func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("jobs", c.ns, name), &v1beta1.Job{})
|
||||
Invokes(core.NewDeleteAction(jobsResource, c.ns, name), &v1beta1.Job{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("jobs", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(jobsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.JobList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeJobs) DeleteCollection(options *api.DeleteOptions, listOptions api.
|
||||
|
||||
func (c *FakeJobs) Get(name string) (result *v1beta1.Job, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("jobs", c.ns, name), &v1beta1.Job{})
|
||||
Invokes(core.NewGetAction(jobsResource, c.ns, name), &v1beta1.Job{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeJobs) Get(name string) (result *v1beta1.Job, err error) {
|
||||
|
||||
func (c *FakeJobs) List(opts api.ListOptions) (result *v1beta1.JobList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("jobs", c.ns, opts), &v1beta1.JobList{})
|
||||
Invokes(core.NewListAction(jobsResource, c.ns, opts), &v1beta1.JobList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeJobs) List(opts api.ListOptions) (result *v1beta1.JobList, err erro
|
||||
// Watch returns a watch.Interface that watches the requested jobs.
|
||||
func (c *FakeJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("jobs", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(jobsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeReplicaSets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var replicasetsResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "replicasets"}
|
||||
|
||||
func (c *FakeReplicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("replicasets", c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewCreateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeReplicaSets) Create(replicaSet *v1beta1.ReplicaSet) (result *v1beta
|
||||
|
||||
func (c *FakeReplicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta1.ReplicaSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("replicasets", c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewUpdateAction(replicasetsResource, c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,7 +55,7 @@ func (c *FakeReplicaSets) Update(replicaSet *v1beta1.ReplicaSet) (result *v1beta
|
||||
|
||||
func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1.ReplicaSet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateSubresourceAction("replicasets", "status", c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewUpdateSubresourceAction(replicasetsResource, "status", c.ns, replicaSet), &v1beta1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -62,13 +65,13 @@ func (c *FakeReplicaSets) UpdateStatus(replicaSet *v1beta1.ReplicaSet) (*v1beta1
|
||||
|
||||
func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("replicasets", c.ns, name), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewDeleteAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("replicasets", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(replicasetsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.ReplicaSetList{})
|
||||
return err
|
||||
@ -76,7 +79,7 @@ func (c *FakeReplicaSets) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeReplicaSets) Get(name string) (result *v1beta1.ReplicaSet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("replicasets", c.ns, name), &v1beta1.ReplicaSet{})
|
||||
Invokes(core.NewGetAction(replicasetsResource, c.ns, name), &v1beta1.ReplicaSet{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -86,7 +89,7 @@ func (c *FakeReplicaSets) Get(name string) (result *v1beta1.ReplicaSet, err erro
|
||||
|
||||
func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSetList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("replicasets", c.ns, opts), &v1beta1.ReplicaSetList{})
|
||||
Invokes(core.NewListAction(replicasetsResource, c.ns, opts), &v1beta1.ReplicaSetList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -108,6 +111,6 @@ func (c *FakeReplicaSets) List(opts api.ListOptions) (result *v1beta1.ReplicaSet
|
||||
// Watch returns a watch.Interface that watches the requested replicaSets.
|
||||
func (c *FakeReplicaSets) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("replicasets", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(replicasetsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
"k8s.io/kubernetes/pkg/client/testing/core"
|
||||
)
|
||||
@ -25,7 +26,7 @@ func (c *FakeScales) Get(kind string, name string) (result *v1beta1.Scale, err e
|
||||
action := core.GetActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Namespace = c.ns
|
||||
action.Resource = kind
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: kind}
|
||||
action.Subresource = "scale"
|
||||
action.Name = name
|
||||
obj, err := c.Fake.Invokes(action, &v1beta1.Scale{})
|
||||
@ -37,7 +38,7 @@ func (c *FakeScales) Update(kind string, scale *v1beta1.Scale) (result *v1beta1.
|
||||
action := core.UpdateActionImpl{}
|
||||
action.Verb = "update"
|
||||
action.Namespace = c.ns
|
||||
action.Resource = kind
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: kind}
|
||||
action.Subresource = "scale"
|
||||
action.Object = scale
|
||||
obj, err := c.Fake.Invokes(action, scale)
|
||||
|
@ -18,6 +18,7 @@ package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
v1beta1 "k8s.io/kubernetes/pkg/apis/extensions/v1beta1"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
@ -30,9 +31,11 @@ type FakeThirdPartyResources struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var thirdpartyresourcesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "v1beta1", Resource: "thirdpartyresources"}
|
||||
|
||||
func (c *FakeThirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("thirdpartyresources", c.ns, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
Invokes(core.NewCreateAction(thirdpartyresourcesResource, c.ns, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -42,7 +45,7 @@ func (c *FakeThirdPartyResources) Create(thirdPartyResource *v1beta1.ThirdPartyR
|
||||
|
||||
func (c *FakeThirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyResource) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("thirdpartyresources", c.ns, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
Invokes(core.NewUpdateAction(thirdpartyresourcesResource, c.ns, thirdPartyResource), &v1beta1.ThirdPartyResource{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -52,13 +55,13 @@ func (c *FakeThirdPartyResources) Update(thirdPartyResource *v1beta1.ThirdPartyR
|
||||
|
||||
func (c *FakeThirdPartyResources) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("thirdpartyresources", c.ns, name), &v1beta1.ThirdPartyResource{})
|
||||
Invokes(core.NewDeleteAction(thirdpartyresourcesResource, c.ns, name), &v1beta1.ThirdPartyResource{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeThirdPartyResources) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("thirdpartyresources", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(thirdpartyresourcesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.ThirdPartyResourceList{})
|
||||
return err
|
||||
@ -66,7 +69,7 @@ func (c *FakeThirdPartyResources) DeleteCollection(options *api.DeleteOptions, l
|
||||
|
||||
func (c *FakeThirdPartyResources) Get(name string) (result *v1beta1.ThirdPartyResource, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("thirdpartyresources", c.ns, name), &v1beta1.ThirdPartyResource{})
|
||||
Invokes(core.NewGetAction(thirdpartyresourcesResource, c.ns, name), &v1beta1.ThirdPartyResource{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -76,7 +79,7 @@ func (c *FakeThirdPartyResources) Get(name string) (result *v1beta1.ThirdPartyRe
|
||||
|
||||
func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *v1beta1.ThirdPartyResourceList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("thirdpartyresources", c.ns, opts), &v1beta1.ThirdPartyResourceList{})
|
||||
Invokes(core.NewListAction(thirdpartyresourcesResource, c.ns, opts), &v1beta1.ThirdPartyResourceList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -98,6 +101,6 @@ func (c *FakeThirdPartyResources) List(opts api.ListOptions) (result *v1beta1.Th
|
||||
// Watch returns a watch.Interface that watches the requested thirdPartyResources.
|
||||
func (c *FakeThirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("thirdpartyresources", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(thirdpartyresourcesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -20,12 +20,13 @@ import (
|
||||
"strings"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/fields"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
func NewRootGetAction(resource, name string) GetActionImpl {
|
||||
func NewRootGetAction(resource unversioned.GroupVersionResource, name string) GetActionImpl {
|
||||
action := GetActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Resource = resource
|
||||
@ -34,7 +35,7 @@ func NewRootGetAction(resource, name string) GetActionImpl {
|
||||
return action
|
||||
}
|
||||
|
||||
func NewGetAction(resource, namespace, name string) GetActionImpl {
|
||||
func NewGetAction(resource unversioned.GroupVersionResource, namespace, name string) GetActionImpl {
|
||||
action := GetActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Resource = resource
|
||||
@ -44,7 +45,7 @@ func NewGetAction(resource, namespace, name string) GetActionImpl {
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootListAction(resource string, opts api.ListOptions) ListActionImpl {
|
||||
func NewRootListAction(resource unversioned.GroupVersionResource, opts api.ListOptions) ListActionImpl {
|
||||
action := ListActionImpl{}
|
||||
action.Verb = "list"
|
||||
action.Resource = resource
|
||||
@ -61,7 +62,7 @@ func NewRootListAction(resource string, opts api.ListOptions) ListActionImpl {
|
||||
return action
|
||||
}
|
||||
|
||||
func NewListAction(resource, namespace string, opts api.ListOptions) ListActionImpl {
|
||||
func NewListAction(resource unversioned.GroupVersionResource, namespace string, opts api.ListOptions) ListActionImpl {
|
||||
action := ListActionImpl{}
|
||||
action.Verb = "list"
|
||||
action.Resource = resource
|
||||
@ -79,7 +80,7 @@ func NewListAction(resource, namespace string, opts api.ListOptions) ListActionI
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootCreateAction(resource string, object runtime.Object) CreateActionImpl {
|
||||
func NewRootCreateAction(resource unversioned.GroupVersionResource, object runtime.Object) CreateActionImpl {
|
||||
action := CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = resource
|
||||
@ -88,7 +89,7 @@ func NewRootCreateAction(resource string, object runtime.Object) CreateActionImp
|
||||
return action
|
||||
}
|
||||
|
||||
func NewCreateAction(resource, namespace string, object runtime.Object) CreateActionImpl {
|
||||
func NewCreateAction(resource unversioned.GroupVersionResource, namespace string, object runtime.Object) CreateActionImpl {
|
||||
action := CreateActionImpl{}
|
||||
action.Verb = "create"
|
||||
action.Resource = resource
|
||||
@ -98,7 +99,7 @@ func NewCreateAction(resource, namespace string, object runtime.Object) CreateAc
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootUpdateAction(resource string, object runtime.Object) UpdateActionImpl {
|
||||
func NewRootUpdateAction(resource unversioned.GroupVersionResource, object runtime.Object) UpdateActionImpl {
|
||||
action := UpdateActionImpl{}
|
||||
action.Verb = "update"
|
||||
action.Resource = resource
|
||||
@ -107,7 +108,7 @@ func NewRootUpdateAction(resource string, object runtime.Object) UpdateActionImp
|
||||
return action
|
||||
}
|
||||
|
||||
func NewUpdateAction(resource, namespace string, object runtime.Object) UpdateActionImpl {
|
||||
func NewUpdateAction(resource unversioned.GroupVersionResource, namespace string, object runtime.Object) UpdateActionImpl {
|
||||
action := UpdateActionImpl{}
|
||||
action.Verb = "update"
|
||||
action.Resource = resource
|
||||
@ -117,7 +118,7 @@ func NewUpdateAction(resource, namespace string, object runtime.Object) UpdateAc
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootPatchAction(resource string, object runtime.Object) PatchActionImpl {
|
||||
func NewRootPatchAction(resource unversioned.GroupVersionResource, object runtime.Object) PatchActionImpl {
|
||||
action := PatchActionImpl{}
|
||||
action.Verb = "patch"
|
||||
action.Resource = resource
|
||||
@ -126,7 +127,7 @@ func NewRootPatchAction(resource string, object runtime.Object) PatchActionImpl
|
||||
return action
|
||||
}
|
||||
|
||||
func NewPatchAction(resource, namespace string, object runtime.Object) PatchActionImpl {
|
||||
func NewPatchAction(resource unversioned.GroupVersionResource, namespace string, object runtime.Object) PatchActionImpl {
|
||||
action := PatchActionImpl{}
|
||||
action.Verb = "patch"
|
||||
action.Resource = resource
|
||||
@ -136,7 +137,7 @@ func NewPatchAction(resource, namespace string, object runtime.Object) PatchActi
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootUpdateSubresourceAction(resource, subresource string, object runtime.Object) UpdateActionImpl {
|
||||
func NewRootUpdateSubresourceAction(resource unversioned.GroupVersionResource, subresource string, object runtime.Object) UpdateActionImpl {
|
||||
action := UpdateActionImpl{}
|
||||
action.Verb = "update"
|
||||
action.Resource = resource
|
||||
@ -145,7 +146,7 @@ func NewRootUpdateSubresourceAction(resource, subresource string, object runtime
|
||||
|
||||
return action
|
||||
}
|
||||
func NewUpdateSubresourceAction(resource, subresource, namespace string, object runtime.Object) UpdateActionImpl {
|
||||
func NewUpdateSubresourceAction(resource unversioned.GroupVersionResource, subresource string, namespace string, object runtime.Object) UpdateActionImpl {
|
||||
action := UpdateActionImpl{}
|
||||
action.Verb = "update"
|
||||
action.Resource = resource
|
||||
@ -156,7 +157,7 @@ func NewUpdateSubresourceAction(resource, subresource, namespace string, object
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootDeleteAction(resource, name string) DeleteActionImpl {
|
||||
func NewRootDeleteAction(resource unversioned.GroupVersionResource, name string) DeleteActionImpl {
|
||||
action := DeleteActionImpl{}
|
||||
action.Verb = "delete"
|
||||
action.Resource = resource
|
||||
@ -165,7 +166,7 @@ func NewRootDeleteAction(resource, name string) DeleteActionImpl {
|
||||
return action
|
||||
}
|
||||
|
||||
func NewDeleteAction(resource, namespace, name string) DeleteActionImpl {
|
||||
func NewDeleteAction(resource unversioned.GroupVersionResource, namespace, name string) DeleteActionImpl {
|
||||
action := DeleteActionImpl{}
|
||||
action.Verb = "delete"
|
||||
action.Resource = resource
|
||||
@ -175,7 +176,7 @@ func NewDeleteAction(resource, namespace, name string) DeleteActionImpl {
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootDeleteCollectionAction(resource string, opts api.ListOptions) DeleteCollectionActionImpl {
|
||||
func NewRootDeleteCollectionAction(resource unversioned.GroupVersionResource, opts api.ListOptions) DeleteCollectionActionImpl {
|
||||
action := DeleteCollectionActionImpl{}
|
||||
action.Verb = "delete-collection"
|
||||
action.Resource = resource
|
||||
@ -192,7 +193,7 @@ func NewRootDeleteCollectionAction(resource string, opts api.ListOptions) Delete
|
||||
return action
|
||||
}
|
||||
|
||||
func NewDeleteCollectionAction(resource, namespace string, opts api.ListOptions) DeleteCollectionActionImpl {
|
||||
func NewDeleteCollectionAction(resource unversioned.GroupVersionResource, namespace string, opts api.ListOptions) DeleteCollectionActionImpl {
|
||||
action := DeleteCollectionActionImpl{}
|
||||
action.Verb = "delete-collection"
|
||||
action.Resource = resource
|
||||
@ -210,7 +211,7 @@ func NewDeleteCollectionAction(resource, namespace string, opts api.ListOptions)
|
||||
return action
|
||||
}
|
||||
|
||||
func NewRootWatchAction(resource string, opts api.ListOptions) WatchActionImpl {
|
||||
func NewRootWatchAction(resource unversioned.GroupVersionResource, opts api.ListOptions) WatchActionImpl {
|
||||
action := WatchActionImpl{}
|
||||
action.Verb = "watch"
|
||||
action.Resource = resource
|
||||
@ -227,7 +228,7 @@ func NewRootWatchAction(resource string, opts api.ListOptions) WatchActionImpl {
|
||||
return action
|
||||
}
|
||||
|
||||
func NewWatchAction(resource, namespace string, opts api.ListOptions) WatchActionImpl {
|
||||
func NewWatchAction(resource unversioned.GroupVersionResource, namespace string, opts api.ListOptions) WatchActionImpl {
|
||||
action := WatchActionImpl{}
|
||||
action.Verb = "watch"
|
||||
action.Resource = resource
|
||||
@ -245,7 +246,7 @@ func NewWatchAction(resource, namespace string, opts api.ListOptions) WatchActio
|
||||
return action
|
||||
}
|
||||
|
||||
func NewProxyGetAction(resource, namespace, scheme, name, port, path string, params map[string]string) ProxyGetActionImpl {
|
||||
func NewProxyGetAction(resource unversioned.GroupVersionResource, namespace, scheme, name, port, path string, params map[string]string) ProxyGetActionImpl {
|
||||
action := ProxyGetActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Resource = resource
|
||||
@ -271,7 +272,7 @@ type WatchRestrictions struct {
|
||||
type Action interface {
|
||||
GetNamespace() string
|
||||
GetVerb() string
|
||||
GetResource() string
|
||||
GetResource() unversioned.GroupVersionResource
|
||||
GetSubresource() string
|
||||
Matches(verb, resource string) bool
|
||||
}
|
||||
@ -323,7 +324,7 @@ type ProxyGetAction interface {
|
||||
type ActionImpl struct {
|
||||
Namespace string
|
||||
Verb string
|
||||
Resource string
|
||||
Resource unversioned.GroupVersionResource
|
||||
Subresource string
|
||||
}
|
||||
|
||||
@ -333,7 +334,7 @@ func (a ActionImpl) GetNamespace() string {
|
||||
func (a ActionImpl) GetVerb() string {
|
||||
return a.Verb
|
||||
}
|
||||
func (a ActionImpl) GetResource() string {
|
||||
func (a ActionImpl) GetResource() unversioned.GroupVersionResource {
|
||||
return a.Resource
|
||||
}
|
||||
func (a ActionImpl) GetSubresource() string {
|
||||
@ -341,7 +342,7 @@ func (a ActionImpl) GetSubresource() string {
|
||||
}
|
||||
func (a ActionImpl) Matches(verb, resource string) bool {
|
||||
return strings.ToLower(verb) == strings.ToLower(a.Verb) &&
|
||||
strings.ToLower(resource) == strings.ToLower(a.Resource)
|
||||
strings.ToLower(resource) == strings.ToLower(a.Resource.Resource)
|
||||
}
|
||||
|
||||
type GenericActionImpl struct {
|
||||
|
@ -201,7 +201,7 @@ type FakeDiscovery struct {
|
||||
func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) {
|
||||
action := ActionImpl{
|
||||
Verb: "get",
|
||||
Resource: "resource",
|
||||
Resource: unversioned.GroupVersionResource{Resource: "resource"},
|
||||
}
|
||||
c.Invokes(action, nil)
|
||||
return c.Resources[groupVersion], nil
|
||||
@ -210,7 +210,7 @@ func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*un
|
||||
func (c *FakeDiscovery) ServerResources() (map[string]*unversioned.APIResourceList, error) {
|
||||
action := ActionImpl{
|
||||
Verb: "get",
|
||||
Resource: "resource",
|
||||
Resource: unversioned.GroupVersionResource{Resource: "resource"},
|
||||
}
|
||||
c.Invokes(action, nil)
|
||||
return c.Resources, nil
|
||||
@ -223,7 +223,7 @@ func (c *FakeDiscovery) ServerGroups() (*unversioned.APIGroupList, error) {
|
||||
func (c *FakeDiscovery) ServerVersion() (*version.Info, error) {
|
||||
action := ActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Resource = "version"
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: "version"}
|
||||
|
||||
c.Invokes(action, nil)
|
||||
versionInfo := version.Get()
|
||||
|
@ -57,7 +57,13 @@ type ObjectScheme interface {
|
||||
// TODO: add support for sub resources
|
||||
func ObjectReaction(o ObjectRetriever, mapper meta.RESTMapper) ReactionFunc {
|
||||
return func(action Action) (bool, runtime.Object, error) {
|
||||
kind, err := mapper.KindFor(unversioned.GroupVersionResource{Resource: action.GetResource()})
|
||||
resource := action.GetResource()
|
||||
kind, err := mapper.KindFor(resource)
|
||||
// This is a temporary fix. Because there is no internal resource, so
|
||||
// the caller has no way to express that it expects to get an internal
|
||||
// kind back. A more proper fix will be directly specify the Kind when
|
||||
// build the action.
|
||||
kind.Version = resource.Version
|
||||
if err != nil {
|
||||
return false, nil, fmt.Errorf("unrecognized action %s: %v", action.GetResource(), err)
|
||||
}
|
||||
@ -149,7 +155,9 @@ func NewObjects(scheme ObjectScheme, decoder runtime.Decoder) ObjectRetriever {
|
||||
}
|
||||
|
||||
func (o objects) Kind(kind unversioned.GroupVersionKind, name string) (runtime.Object, error) {
|
||||
kind.Version = runtime.APIVersionInternal
|
||||
if len(kind.Version) == 0 {
|
||||
kind.Version = runtime.APIVersionInternal
|
||||
}
|
||||
empty, err := o.scheme.New(kind)
|
||||
nilValue := reflect.Zero(reflect.TypeOf(empty)).Interface().(runtime.Object)
|
||||
|
||||
@ -256,7 +264,7 @@ func (r *SimpleReactor) Handles(action Action) bool {
|
||||
if !verbCovers {
|
||||
return false
|
||||
}
|
||||
resourceCovers := r.Resource == "*" || r.Resource == action.GetResource()
|
||||
resourceCovers := r.Resource == "*" || r.Resource == action.GetResource().Resource
|
||||
if !resourceCovers {
|
||||
return false
|
||||
}
|
||||
@ -277,7 +285,7 @@ type SimpleWatchReactor struct {
|
||||
}
|
||||
|
||||
func (r *SimpleWatchReactor) Handles(action Action) bool {
|
||||
resourceCovers := r.Resource == "*" || r.Resource == action.GetResource()
|
||||
resourceCovers := r.Resource == "*" || r.Resource == action.GetResource().Resource
|
||||
if !resourceCovers {
|
||||
return false
|
||||
}
|
||||
@ -298,7 +306,7 @@ type SimpleProxyReactor struct {
|
||||
}
|
||||
|
||||
func (r *SimpleProxyReactor) Handles(action Action) bool {
|
||||
resourceCovers := r.Resource == "*" || r.Resource == action.GetResource()
|
||||
resourceCovers := r.Resource == "*" || r.Resource == action.GetResource().Resource
|
||||
if !resourceCovers {
|
||||
return false
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ type FakeDiscovery struct {
|
||||
func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) {
|
||||
action := core.ActionImpl{
|
||||
Verb: "get",
|
||||
Resource: "resource",
|
||||
Resource: unversioned.GroupVersionResource{Resource: "resource"},
|
||||
}
|
||||
c.Invokes(action, nil)
|
||||
return c.Resources[groupVersion], nil
|
||||
@ -40,7 +40,7 @@ func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*un
|
||||
func (c *FakeDiscovery) ServerResources() (map[string]*unversioned.APIResourceList, error) {
|
||||
action := core.ActionImpl{
|
||||
Verb: "get",
|
||||
Resource: "resource",
|
||||
Resource: unversioned.GroupVersionResource{Resource: "resource"},
|
||||
}
|
||||
c.Invokes(action, nil)
|
||||
return c.Resources, nil
|
||||
@ -53,7 +53,7 @@ func (c *FakeDiscovery) ServerGroups() (*unversioned.APIGroupList, error) {
|
||||
func (c *FakeDiscovery) ServerVersion() (*version.Info, error) {
|
||||
action := core.ActionImpl{}
|
||||
action.Verb = "get"
|
||||
action.Resource = "version"
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: "version"}
|
||||
|
||||
c.Invokes(action, nil)
|
||||
versionInfo := version.Get()
|
||||
@ -64,9 +64,9 @@ func (c *FakeDiscovery) SwaggerSchema(version unversioned.GroupVersion) (*swagge
|
||||
action := core.ActionImpl{}
|
||||
action.Verb = "get"
|
||||
if version == v1.SchemeGroupVersion {
|
||||
action.Resource = "/swaggerapi/api/" + version.Version
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: "/swaggerapi/api/" + version.Version}
|
||||
} else {
|
||||
action.Resource = "/swaggerapi/apis/" + version.Group + "/" + version.Version
|
||||
action.Resource = unversioned.GroupVersionResource{Resource: "/swaggerapi/apis/" + version.Group + "/" + version.Version}
|
||||
}
|
||||
|
||||
c.Invokes(action, nil)
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
// This package is generated by client-gen with the default arguments.
|
||||
|
||||
// Package fake has the automatically generated clients.
|
||||
package fake
|
||||
|
@ -14,12 +14,11 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -30,9 +29,11 @@ type FakeComponentStatuses struct {
|
||||
Fake *FakeCore
|
||||
}
|
||||
|
||||
var componentstatusesResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "componentstatuses"}
|
||||
|
||||
func (c *FakeComponentStatuses) Create(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootCreateAction("componentstatuses", componentStatus), &api.ComponentStatus{})
|
||||
Invokes(core.NewRootCreateAction(componentstatusesResource, componentStatus), &api.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -41,7 +42,7 @@ func (c *FakeComponentStatuses) Create(componentStatus *api.ComponentStatus) (re
|
||||
|
||||
func (c *FakeComponentStatuses) Update(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootUpdateAction("componentstatuses", componentStatus), &api.ComponentStatus{})
|
||||
Invokes(core.NewRootUpdateAction(componentstatusesResource, componentStatus), &api.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -50,12 +51,12 @@ func (c *FakeComponentStatuses) Update(componentStatus *api.ComponentStatus) (re
|
||||
|
||||
func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewRootDeleteAction("componentstatuses", name), &api.ComponentStatus{})
|
||||
Invokes(core.NewRootDeleteAction(componentstatusesResource, name), &api.ComponentStatus{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewRootDeleteCollectionAction("componentstatuses", listOptions)
|
||||
action := core.NewRootDeleteCollectionAction(componentstatusesResource, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.ComponentStatusList{})
|
||||
return err
|
||||
@ -63,7 +64,7 @@ func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, lis
|
||||
|
||||
func (c *FakeComponentStatuses) Get(name string) (result *api.ComponentStatus, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootGetAction("componentstatuses", name), &api.ComponentStatus{})
|
||||
Invokes(core.NewRootGetAction(componentstatusesResource, name), &api.ComponentStatus{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -72,7 +73,7 @@ func (c *FakeComponentStatuses) Get(name string) (result *api.ComponentStatus, e
|
||||
|
||||
func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewRootListAction("componentstatuses", opts), &api.ComponentStatusList{})
|
||||
Invokes(core.NewRootListAction(componentstatusesResource, opts), &api.ComponentStatusList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -93,5 +94,5 @@ func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.Componen
|
||||
// Watch returns a watch.Interface that watches the requested componentStatuses.
|
||||
func (c *FakeComponentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewRootWatchAction("componentstatuses", opts))
|
||||
InvokesWatch(core.NewRootWatchAction(componentstatusesResource, opts))
|
||||
}
|
||||
|
@ -14,12 +14,11 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -31,9 +30,11 @@ type FakeConfigMaps struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var configmapsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "configmaps"}
|
||||
|
||||
func (c *FakeConfigMaps) Create(configMap *api.ConfigMap) (result *api.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("configmaps", c.ns, configMap), &api.ConfigMap{})
|
||||
Invokes(core.NewCreateAction(configmapsResource, c.ns, configMap), &api.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -43,7 +44,7 @@ func (c *FakeConfigMaps) Create(configMap *api.ConfigMap) (result *api.ConfigMap
|
||||
|
||||
func (c *FakeConfigMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("configmaps", c.ns, configMap), &api.ConfigMap{})
|
||||
Invokes(core.NewUpdateAction(configmapsResource, c.ns, configMap), &api.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -53,13 +54,13 @@ func (c *FakeConfigMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap
|
||||
|
||||
func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("configmaps", c.ns, name), &api.ConfigMap{})
|
||||
Invokes(core.NewDeleteAction(configmapsResource, c.ns, name), &api.ConfigMap{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("configmaps", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(configmapsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.ConfigMapList{})
|
||||
return err
|
||||
@ -67,7 +68,7 @@ func (c *FakeConfigMaps) DeleteCollection(options *api.DeleteOptions, listOption
|
||||
|
||||
func (c *FakeConfigMaps) Get(name string) (result *api.ConfigMap, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("configmaps", c.ns, name), &api.ConfigMap{})
|
||||
Invokes(core.NewGetAction(configmapsResource, c.ns, name), &api.ConfigMap{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -77,7 +78,7 @@ func (c *FakeConfigMaps) Get(name string) (result *api.ConfigMap, err error) {
|
||||
|
||||
func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("configmaps", c.ns, opts), &api.ConfigMapList{})
|
||||
Invokes(core.NewListAction(configmapsResource, c.ns, opts), &api.ConfigMapList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -99,6 +100,6 @@ func (c *FakeConfigMaps) List(opts api.ListOptions) (result *api.ConfigMapList,
|
||||
// Watch returns a watch.Interface that watches the requested configMaps.
|
||||
func (c *FakeConfigMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("configmaps", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(configmapsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -14,13 +14,11 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
unversioned "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
unversioned "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
|
||||
)
|
||||
|
||||
type FakeCore struct {
|
||||
|
@ -14,12 +14,11 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -31,9 +30,11 @@ type FakeEndpoints struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var endpointsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "endpoints"}
|
||||
|
||||
func (c *FakeEndpoints) Create(endpoints *api.Endpoints) (result *api.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("endpoints", c.ns, endpoints), &api.Endpoints{})
|
||||
Invokes(core.NewCreateAction(endpointsResource, c.ns, endpoints), &api.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -43,7 +44,7 @@ func (c *FakeEndpoints) Create(endpoints *api.Endpoints) (result *api.Endpoints,
|
||||
|
||||
func (c *FakeEndpoints) Update(endpoints *api.Endpoints) (result *api.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("endpoints", c.ns, endpoints), &api.Endpoints{})
|
||||
Invokes(core.NewUpdateAction(endpointsResource, c.ns, endpoints), &api.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -53,13 +54,13 @@ func (c *FakeEndpoints) Update(endpoints *api.Endpoints) (result *api.Endpoints,
|
||||
|
||||
func (c *FakeEndpoints) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("endpoints", c.ns, name), &api.Endpoints{})
|
||||
Invokes(core.NewDeleteAction(endpointsResource, c.ns, name), &api.Endpoints{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("endpoints", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(endpointsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.EndpointsList{})
|
||||
return err
|
||||
@ -67,7 +68,7 @@ func (c *FakeEndpoints) DeleteCollection(options *api.DeleteOptions, listOptions
|
||||
|
||||
func (c *FakeEndpoints) Get(name string) (result *api.Endpoints, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("endpoints", c.ns, name), &api.Endpoints{})
|
||||
Invokes(core.NewGetAction(endpointsResource, c.ns, name), &api.Endpoints{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -77,7 +78,7 @@ func (c *FakeEndpoints) Get(name string) (result *api.Endpoints, err error) {
|
||||
|
||||
func (c *FakeEndpoints) List(opts api.ListOptions) (result *api.EndpointsList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("endpoints", c.ns, opts), &api.EndpointsList{})
|
||||
Invokes(core.NewListAction(endpointsResource, c.ns, opts), &api.EndpointsList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -99,6 +100,6 @@ func (c *FakeEndpoints) List(opts api.ListOptions) (result *api.EndpointsList, e
|
||||
// Watch returns a watch.Interface that watches the requested endpoints.
|
||||
func (c *FakeEndpoints) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("endpoints", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(endpointsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -14,12 +14,11 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -31,9 +30,11 @@ type FakeEvents struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var eventsResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "events"}
|
||||
|
||||
func (c *FakeEvents) Create(event *api.Event) (result *api.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("events", c.ns, event), &api.Event{})
|
||||
Invokes(core.NewCreateAction(eventsResource, c.ns, event), &api.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -43,7 +44,7 @@ func (c *FakeEvents) Create(event *api.Event) (result *api.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) Update(event *api.Event) (result *api.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("events", c.ns, event), &api.Event{})
|
||||
Invokes(core.NewUpdateAction(eventsResource, c.ns, event), &api.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -53,13 +54,13 @@ func (c *FakeEvents) Update(event *api.Event) (result *api.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("events", c.ns, name), &api.Event{})
|
||||
Invokes(core.NewDeleteAction(eventsResource, c.ns, name), &api.Event{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("events", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(eventsResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.EventList{})
|
||||
return err
|
||||
@ -67,7 +68,7 @@ func (c *FakeEvents) DeleteCollection(options *api.DeleteOptions, listOptions ap
|
||||
|
||||
func (c *FakeEvents) Get(name string) (result *api.Event, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("events", c.ns, name), &api.Event{})
|
||||
Invokes(core.NewGetAction(eventsResource, c.ns, name), &api.Event{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -77,7 +78,7 @@ func (c *FakeEvents) Get(name string) (result *api.Event, err error) {
|
||||
|
||||
func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("events", c.ns, opts), &api.EventList{})
|
||||
Invokes(core.NewListAction(eventsResource, c.ns, opts), &api.EventList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -99,6 +100,6 @@ func (c *FakeEvents) List(opts api.ListOptions) (result *api.EventList, err erro
|
||||
// Watch returns a watch.Interface that watches the requested events.
|
||||
func (c *FakeEvents) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("events", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(eventsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ import (
|
||||
)
|
||||
|
||||
func (c *FakeEvents) CreateWithEventNamespace(event *api.Event) (*api.Event, error) {
|
||||
action := core.NewRootCreateAction("events", event)
|
||||
action := core.NewRootCreateAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewCreateAction("events", c.ns, event)
|
||||
action = core.NewCreateAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -38,9 +38,9 @@ func (c *FakeEvents) CreateWithEventNamespace(event *api.Event) (*api.Event, err
|
||||
|
||||
// Update replaces an existing event. Returns the copy of the event the server returns, or an error.
|
||||
func (c *FakeEvents) UpdateWithEventNamespace(event *api.Event) (*api.Event, error) {
|
||||
action := core.NewRootUpdateAction("events", event)
|
||||
action := core.NewRootUpdateAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewUpdateAction("events", c.ns, event)
|
||||
action = core.NewUpdateAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -52,9 +52,9 @@ func (c *FakeEvents) UpdateWithEventNamespace(event *api.Event) (*api.Event, err
|
||||
|
||||
// Patch patches an existing event. Returns the copy of the event the server returns, or an error.
|
||||
func (c *FakeEvents) Patch(event *api.Event, data []byte) (*api.Event, error) {
|
||||
action := core.NewRootPatchAction("events", event)
|
||||
action := core.NewRootPatchAction(eventsResource, event)
|
||||
if c.ns != "" {
|
||||
action = core.NewPatchAction("events", c.ns, event)
|
||||
action = core.NewPatchAction(eventsResource, c.ns, event)
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, event)
|
||||
if obj == nil {
|
||||
@ -66,9 +66,9 @@ func (c *FakeEvents) Patch(event *api.Event, data []byte) (*api.Event, error) {
|
||||
|
||||
// Search returns a list of events matching the specified object.
|
||||
func (c *FakeEvents) Search(objOrRef runtime.Object) (*api.EventList, error) {
|
||||
action := core.NewRootListAction("events", api.ListOptions{})
|
||||
action := core.NewRootListAction(eventsResource, api.ListOptions{})
|
||||
if c.ns != "" {
|
||||
action = core.NewListAction("events", c.ns, api.ListOptions{})
|
||||
action = core.NewListAction(eventsResource, c.ns, api.ListOptions{})
|
||||
}
|
||||
obj, err := c.Fake.Invokes(action, &api.EventList{})
|
||||
if obj == nil {
|
||||
@ -81,7 +81,7 @@ func (c *FakeEvents) Search(objOrRef runtime.Object) (*api.EventList, error) {
|
||||
func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
|
||||
action := core.GenericActionImpl{}
|
||||
action.Verb = "get-field-selector"
|
||||
action.Resource = "events"
|
||||
action.Resource = eventsResource
|
||||
|
||||
c.Fake.Invokes(action, nil)
|
||||
return fields.Everything()
|
||||
|
@ -14,12 +14,11 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This file is generated by client-gen with the default arguments.
|
||||
|
||||
package fake
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
core "k8s.io/kubernetes/pkg/client/testing/core"
|
||||
labels "k8s.io/kubernetes/pkg/labels"
|
||||
watch "k8s.io/kubernetes/pkg/watch"
|
||||
@ -31,9 +30,11 @@ type FakeLimitRanges struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var limitrangesResource = unversioned.GroupVersionResource{Group: "", Version: "", Resource: "limitranges"}
|
||||
|
||||
func (c *FakeLimitRanges) Create(limitRange *api.LimitRange) (result *api.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewCreateAction("limitranges", c.ns, limitRange), &api.LimitRange{})
|
||||
Invokes(core.NewCreateAction(limitrangesResource, c.ns, limitRange), &api.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -43,7 +44,7 @@ func (c *FakeLimitRanges) Create(limitRange *api.LimitRange) (result *api.LimitR
|
||||
|
||||
func (c *FakeLimitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewUpdateAction("limitranges", c.ns, limitRange), &api.LimitRange{})
|
||||
Invokes(core.NewUpdateAction(limitrangesResource, c.ns, limitRange), &api.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -53,13 +54,13 @@ func (c *FakeLimitRanges) Update(limitRange *api.LimitRange) (result *api.LimitR
|
||||
|
||||
func (c *FakeLimitRanges) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(core.NewDeleteAction("limitranges", c.ns, name), &api.LimitRange{})
|
||||
Invokes(core.NewDeleteAction(limitrangesResource, c.ns, name), &api.LimitRange{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
|
||||
action := core.NewDeleteCollectionAction("limitranges", c.ns, listOptions)
|
||||
action := core.NewDeleteCollectionAction(limitrangesResource, c.ns, listOptions)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &api.LimitRangeList{})
|
||||
return err
|
||||
@ -67,7 +68,7 @@ func (c *FakeLimitRanges) DeleteCollection(options *api.DeleteOptions, listOptio
|
||||
|
||||
func (c *FakeLimitRanges) Get(name string) (result *api.LimitRange, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewGetAction("limitranges", c.ns, name), &api.LimitRange{})
|
||||
Invokes(core.NewGetAction(limitrangesResource, c.ns, name), &api.LimitRange{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -77,7 +78,7 @@ func (c *FakeLimitRanges) Get(name string) (result *api.LimitRange, err error) {
|
||||
|
||||
func (c *FakeLimitRanges) List(opts api.ListOptions) (result *api.LimitRangeList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(core.NewListAction("limitranges", c.ns, opts), &api.LimitRangeList{})
|
||||
Invokes(core.NewListAction(limitrangesResource, c.ns, opts), &api.LimitRangeList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@ -99,6 +100,6 @@ func (c *FakeLimitRanges) List(opts api.ListOptions) (result *api.LimitRangeList
|
||||
// Watch returns a watch.Interface that watches the requested limitRanges.
|
||||
func (c *FakeLimitRanges) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(core.NewWatchAction("limitranges", c.ns, opts))
|
||||
InvokesWatch(core.NewWatchAction(limitrangesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user