mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #23608 from caesarxuchao/mv-typed-clients
Automatic merge from submit-queue
Move typed clients into clientset folder
Move typed clients from `pkg/client/typed/` to `pkg/client/clientset_generated/${clientset_name}/typed`.
The first commit changes the client-gen, the last commit updates the doc, other commits are just moving things around.
@lavalamp @krousey
			
			
This commit is contained in:
		@@ -40,9 +40,9 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/capabilities"
 | 
						"k8s.io/kubernetes/pkg/capabilities"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/chaosclient"
 | 
						"k8s.io/kubernetes/pkg/client/chaosclient"
 | 
				
			||||||
	clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
 | 
						clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
 | 
				
			||||||
 | 
						unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/record"
 | 
						"k8s.io/kubernetes/pkg/client/record"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/restclient"
 | 
						"k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
	unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
 | 
					 | 
				
			||||||
	clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth"
 | 
						clientauth "k8s.io/kubernetes/pkg/client/unversioned/auth"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
 | 
						"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
 | 
				
			||||||
	clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
 | 
						clientcmdapi "k8s.io/kubernetes/pkg/client/unversioned/clientcmd/api"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -174,10 +174,11 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	var packageList []generator.Package
 | 
						var packageList []generator.Package
 | 
				
			||||||
 | 
						typedClientBasePath := filepath.Join(customArgs.ClientsetOutputPath, customArgs.ClientsetName, "typed")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	packageList = append(packageList, packageForClientset(customArgs, arguments.OutputPackagePath, boilerplate))
 | 
						packageList = append(packageList, packageForClientset(customArgs, typedClientBasePath, boilerplate))
 | 
				
			||||||
	if customArgs.FakeClient {
 | 
						if customArgs.FakeClient {
 | 
				
			||||||
		packageList = append(packageList, fake.PackageForClientset(customArgs, arguments.OutputPackagePath, boilerplate))
 | 
							packageList = append(packageList, fake.PackageForClientset(customArgs, typedClientBasePath, boilerplate))
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// If --clientset-only=true, we don't regenerate the individual typed clients.
 | 
						// If --clientset-only=true, we don't regenerate the individual typed clients.
 | 
				
			||||||
@@ -188,9 +189,9 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
 | 
				
			|||||||
	orderer := namer.Orderer{namer.NewPrivateNamer(0)}
 | 
						orderer := namer.Orderer{namer.NewPrivateNamer(0)}
 | 
				
			||||||
	for _, gv := range customArgs.GroupVersions {
 | 
						for _, gv := range customArgs.GroupVersions {
 | 
				
			||||||
		types := gvToTypes[gv]
 | 
							types := gvToTypes[gv]
 | 
				
			||||||
		packageList = append(packageList, packageForGroup(normalization.GroupVersion(gv), orderer.OrderTypes(types), arguments.OutputPackagePath, arguments.OutputBase, boilerplate))
 | 
							packageList = append(packageList, packageForGroup(normalization.GroupVersion(gv), orderer.OrderTypes(types), typedClientBasePath, arguments.OutputBase, boilerplate))
 | 
				
			||||||
		if customArgs.FakeClient {
 | 
							if customArgs.FakeClient {
 | 
				
			||||||
			packageList = append(packageList, fake.PackageForGroup(normalization.GroupVersion(gv), orderer.OrderTypes(types), arguments.OutputPackagePath, arguments.OutputBase, boilerplate))
 | 
								packageList = append(packageList, fake.PackageForGroup(normalization.GroupVersion(gv), orderer.OrderTypes(types), typedClientBasePath, arguments.OutputBase, boilerplate))
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -94,8 +94,6 @@ func main() {
 | 
				
			|||||||
		arguments.InputDirs = append(dependencies, []string{
 | 
							arguments.InputDirs = append(dependencies, []string{
 | 
				
			||||||
			"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup",
 | 
								"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup",
 | 
				
			||||||
		}...)
 | 
							}...)
 | 
				
			||||||
		// We may change the output path later.
 | 
					 | 
				
			||||||
		arguments.OutputPackagePath = "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput"
 | 
					 | 
				
			||||||
		arguments.CustomArgs = clientgenargs.Args{
 | 
							arguments.CustomArgs = clientgenargs.Args{
 | 
				
			||||||
			[]unversioned.GroupVersion{{Group: "testgroup", Version: ""}},
 | 
								[]unversioned.GroupVersion{{Group: "testgroup", Version: ""}},
 | 
				
			||||||
			map[unversioned.GroupVersion]string{
 | 
								map[unversioned.GroupVersion]string{
 | 
				
			||||||
@@ -114,12 +112,6 @@ func main() {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
		glog.Infof("going to generate clientset from these input paths: %v", inputPath)
 | 
							glog.Infof("going to generate clientset from these input paths: %v", inputPath)
 | 
				
			||||||
		arguments.InputDirs = append(inputPath, dependencies...)
 | 
							arguments.InputDirs = append(inputPath, dependencies...)
 | 
				
			||||||
		// TODO: we need to make OutPackagePath a map[string]string. For example,
 | 
					 | 
				
			||||||
		// we need clientset and the individual typed clients be output to different
 | 
					 | 
				
			||||||
		// output path.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		// We may change the output path later.
 | 
					 | 
				
			||||||
		arguments.OutputPackagePath = "k8s.io/kubernetes/pkg/client/typed/generated"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		arguments.CustomArgs = clientgenargs.Args{
 | 
							arguments.CustomArgs = clientgenargs.Args{
 | 
				
			||||||
			groupVersions,
 | 
								groupVersions,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,7 @@ package test_internalclientset
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"github.com/golang/glog"
 | 
						"github.com/golang/glog"
 | 
				
			||||||
	unversionedtestgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/testgroup/unversioned"
 | 
						unversionedtestgroup "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/unversioned"
 | 
				
			||||||
	restclient "k8s.io/kubernetes/pkg/client/restclient"
 | 
						restclient "k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
	discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
						discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@ import (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup"
 | 
						"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup"
 | 
				
			||||||
	_ "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup/install"
 | 
						_ "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testdata/apis/testgroup/install"
 | 
				
			||||||
	. "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/testgroup/unversioned"
 | 
						. "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/testoutput/clientset_generated/test_internalclientset/typed/testgroup/unversioned"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/api"
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/api/testapi"
 | 
						"k8s.io/kubernetes/pkg/api/testapi"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/api/unversioned"
 | 
						"k8s.io/kubernetes/pkg/api/unversioned"
 | 
				
			||||||
@@ -19,7 +19,7 @@ package executor
 | 
				
			|||||||
import (
 | 
					import (
 | 
				
			||||||
	"k8s.io/kubernetes/contrib/mesos/pkg/node"
 | 
						"k8s.io/kubernetes/contrib/mesos/pkg/node"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/api"
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
	unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
 | 
						unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type kubeAPI interface {
 | 
					type kubeAPI interface {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@ import (
 | 
				
			|||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
 | 
						unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log "github.com/golang/glog"
 | 
						log "github.com/golang/glog"
 | 
				
			||||||
	mesos "github.com/mesos/mesos-go/mesosproto"
 | 
						mesos "github.com/mesos/mesos-go/mesosproto"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,7 +20,7 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
 | 
						unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log "github.com/golang/glog"
 | 
						log "github.com/golang/glog"
 | 
				
			||||||
	"k8s.io/kubernetes/contrib/mesos/pkg/queue"
 | 
						"k8s.io/kubernetes/contrib/mesos/pkg/queue"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,9 +22,9 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/api"
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/api/errors"
 | 
						"k8s.io/kubernetes/pkg/api/errors"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/api/unversioned"
 | 
						"k8s.io/kubernetes/pkg/api/unversioned"
 | 
				
			||||||
 | 
						unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/testing/core"
 | 
						"k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
	unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
 | 
					 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned/fake"
 | 
					 | 
				
			||||||
	"k8s.io/kubernetes/pkg/runtime"
 | 
						"k8s.io/kubernetes/pkg/runtime"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -74,9 +74,9 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/api/resource"
 | 
						"k8s.io/kubernetes/pkg/api/resource"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/cache"
 | 
						"k8s.io/kubernetes/pkg/client/cache"
 | 
				
			||||||
	clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
 | 
						clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
 | 
				
			||||||
 | 
						unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/record"
 | 
						"k8s.io/kubernetes/pkg/client/record"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/restclient"
 | 
						"k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
	unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
 | 
					 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
 | 
						"k8s.io/kubernetes/pkg/client/unversioned/clientcmd"
 | 
				
			||||||
	cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/mesos"
 | 
						cloud "k8s.io/kubernetes/pkg/cloudprovider/providers/mesos"
 | 
				
			||||||
	controllerfw "k8s.io/kubernetes/pkg/controller/framework"
 | 
						controllerfw "k8s.io/kubernetes/pkg/controller/framework"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -47,12 +47,12 @@ $ client-gen --input="api/v1,extensions/v1beta1" --clientset-name="my_release"
 | 
				
			|||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
will generate a clientset named "my_release" which includes clients for api/v1 objects and extensions/v1beta1 objects. You can run `$ client-gen --help` to see other command line arguments.
 | 
					will generate a clientset named "my_release" which includes clients for api/v1 objects and extensions/v1beta1 objects. You can run `$ client-gen --help` to see other command line arguments.
 | 
				
			||||||
- Adding expansion methods: client-gen only generates the common methods, such as `Create()` and `Delete()`. You can manually add additional methods through the expansion interface. For example, this [file](../../pkg/client/typed/generated/core/v1/pod_expansion.go) adds additional methods to Pod's client. As a convention, we put the expansion interface and its methods in file ${TYPE}_expansion.go.
 | 
					- Adding expansion methods: client-gen only generates the common methods, such as `Create()` and `Delete()`. You can manually add additional methods through the expansion interface. For example, this [file](../../pkg/client/clientset_generated/release_1_2/typed/core/v1/pod_expansion.go) adds additional methods to Pod's client. As a convention, we put the expansion interface and its methods in file ${TYPE}_expansion.go.
 | 
				
			||||||
- Generating Fake clients for testing purposes: client-gen will generate a fake clientset if the command line argument `--fake-clientset` is set. The fake clientset provides the default implementation, you only need to fake out the methods you care about when writing test cases.
 | 
					- Generating Fake clients for testing purposes: client-gen will generate a fake clientset if the command line argument `--fake-clientset` is set. The fake clientset provides the default implementation, you only need to fake out the methods you care about when writing test cases.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The output of client-gen inlcudes:
 | 
					The output of client-gen inlcudes:
 | 
				
			||||||
- Individual typed clients and client for group: They will be generated at `pkg/client/typed/generated/${GROUP}/${VERSION}/`
 | 
					- clientset: the clientset will be generated at `pkg/client/clientset_generated/` by default, and you can change the path via the `--clientset-path` command line argument.
 | 
				
			||||||
- clientset: the top-level clientset will be generated at `pkg/client/clientset_generated` by default, and you can change the path via the `--clientset-path` command line argument.
 | 
					- Individual typed clients and client for group: They will be generated at `pkg/client/clientset_generated/${clientset_name}/typed/generated/${GROUP}/${VERSION}/`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Released clientsets
 | 
					## Released clientsets
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,10 +20,10 @@ package internalclientset
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"github.com/golang/glog"
 | 
						"github.com/golang/glog"
 | 
				
			||||||
 | 
						unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
 | 
				
			||||||
 | 
						unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned"
 | 
				
			||||||
	restclient "k8s.io/kubernetes/pkg/client/restclient"
 | 
						restclient "k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
	discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
						discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
				
			||||||
	unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
 | 
					 | 
				
			||||||
	unversionedextensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned"
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Interface interface {
 | 
					type Interface interface {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,13 +22,13 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/api"
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/apimachinery/registered"
 | 
						"k8s.io/kubernetes/pkg/apimachinery/registered"
 | 
				
			||||||
	clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
 | 
						clientset "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset"
 | 
				
			||||||
 | 
						unversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned"
 | 
				
			||||||
 | 
						fakeunversionedcore "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/unversioned/fake"
 | 
				
			||||||
 | 
						unversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned"
 | 
				
			||||||
 | 
						fakeunversionedextensions "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned/fake"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/testing/core"
 | 
						"k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
						"k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
				
			||||||
	fakediscovery "k8s.io/kubernetes/pkg/client/typed/discovery/fake"
 | 
						fakediscovery "k8s.io/kubernetes/pkg/client/typed/discovery/fake"
 | 
				
			||||||
	unversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned"
 | 
					 | 
				
			||||||
	fakeunversionedcore "k8s.io/kubernetes/pkg/client/typed/generated/core/unversioned/fake"
 | 
					 | 
				
			||||||
	unversionedextensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned"
 | 
					 | 
				
			||||||
	fakeunversionedextensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/unversioned/fake"
 | 
					 | 
				
			||||||
	"k8s.io/kubernetes/pkg/runtime"
 | 
						"k8s.io/kubernetes/pkg/runtime"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/watch"
 | 
						"k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,128 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ComponentStatusesGetter has a method to return a ComponentStatusInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ComponentStatusesGetter interface {
 | 
				
			||||||
 | 
						ComponentStatuses() ComponentStatusInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ComponentStatusInterface has methods to work with ComponentStatus resources.
 | 
				
			||||||
 | 
					type ComponentStatusInterface interface {
 | 
				
			||||||
 | 
						Create(*api.ComponentStatus) (*api.ComponentStatus, error)
 | 
				
			||||||
 | 
						Update(*api.ComponentStatus) (*api.ComponentStatus, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.ComponentStatus, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.ComponentStatusList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ComponentStatusExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// componentStatuses implements ComponentStatusInterface
 | 
				
			||||||
 | 
					type componentStatuses struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newComponentStatuses returns a ComponentStatuses
 | 
				
			||||||
 | 
					func newComponentStatuses(c *CoreClient) *componentStatuses {
 | 
				
			||||||
 | 
						return &componentStatuses{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a componentStatus and creates it.  Returns the server's representation of the componentStatus, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Create(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						result = &api.ComponentStatus{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							Body(componentStatus).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Update(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						result = &api.ComponentStatus{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							Name(componentStatus.Name).
 | 
				
			||||||
 | 
							Body(componentStatus).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *componentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Get(name string) (result *api.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						result = &api.ComponentStatus{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
 | 
				
			||||||
 | 
					func (c *componentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) {
 | 
				
			||||||
 | 
						result = &api.ComponentStatusList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested componentStatuses.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,137 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ConfigMapsGetter has a method to return a ConfigMapInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ConfigMapsGetter interface {
 | 
				
			||||||
 | 
						ConfigMaps(namespace string) ConfigMapInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ConfigMapInterface has methods to work with ConfigMap resources.
 | 
				
			||||||
 | 
					type ConfigMapInterface interface {
 | 
				
			||||||
 | 
						Create(*api.ConfigMap) (*api.ConfigMap, error)
 | 
				
			||||||
 | 
						Update(*api.ConfigMap) (*api.ConfigMap, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.ConfigMap, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.ConfigMapList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ConfigMapExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// configMaps implements ConfigMapInterface
 | 
				
			||||||
 | 
					type configMaps struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newConfigMaps returns a ConfigMaps
 | 
				
			||||||
 | 
					func newConfigMaps(c *CoreClient, namespace string) *configMaps {
 | 
				
			||||||
 | 
						return &configMaps{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a configMap and creates it.  Returns the server's representation of the configMap, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *configMaps) Create(configMap *api.ConfigMap) (result *api.ConfigMap, err error) {
 | 
				
			||||||
 | 
						result = &api.ConfigMap{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							Body(configMap).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *configMaps) Update(configMap *api.ConfigMap) (result *api.ConfigMap, err error) {
 | 
				
			||||||
 | 
						result = &api.ConfigMap{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							Name(configMap.Name).
 | 
				
			||||||
 | 
							Body(configMap).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *configMaps) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *configMaps) Get(name string) (result *api.ConfigMap, err error) {
 | 
				
			||||||
 | 
						result = &api.ConfigMap{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
 | 
				
			||||||
 | 
					func (c *configMaps) List(opts api.ListOptions) (result *api.ConfigMapList, err error) {
 | 
				
			||||||
 | 
						result = &api.ConfigMapList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested configMaps.
 | 
				
			||||||
 | 
					func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,167 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						registered "k8s.io/kubernetes/pkg/apimachinery/registered"
 | 
				
			||||||
 | 
						restclient "k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type CoreInterface interface {
 | 
				
			||||||
 | 
						ComponentStatusesGetter
 | 
				
			||||||
 | 
						ConfigMapsGetter
 | 
				
			||||||
 | 
						EndpointsGetter
 | 
				
			||||||
 | 
						EventsGetter
 | 
				
			||||||
 | 
						LimitRangesGetter
 | 
				
			||||||
 | 
						NamespacesGetter
 | 
				
			||||||
 | 
						NodesGetter
 | 
				
			||||||
 | 
						PersistentVolumesGetter
 | 
				
			||||||
 | 
						PersistentVolumeClaimsGetter
 | 
				
			||||||
 | 
						PodsGetter
 | 
				
			||||||
 | 
						PodTemplatesGetter
 | 
				
			||||||
 | 
						ReplicationControllersGetter
 | 
				
			||||||
 | 
						ResourceQuotasGetter
 | 
				
			||||||
 | 
						SecretsGetter
 | 
				
			||||||
 | 
						ServicesGetter
 | 
				
			||||||
 | 
						ServiceAccountsGetter
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CoreClient is used to interact with features provided by the Core group.
 | 
				
			||||||
 | 
					type CoreClient struct {
 | 
				
			||||||
 | 
						*restclient.RESTClient
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ComponentStatuses() ComponentStatusInterface {
 | 
				
			||||||
 | 
						return newComponentStatuses(c)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ConfigMaps(namespace string) ConfigMapInterface {
 | 
				
			||||||
 | 
						return newConfigMaps(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Endpoints(namespace string) EndpointsInterface {
 | 
				
			||||||
 | 
						return newEndpoints(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Events(namespace string) EventInterface {
 | 
				
			||||||
 | 
						return newEvents(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) LimitRanges(namespace string) LimitRangeInterface {
 | 
				
			||||||
 | 
						return newLimitRanges(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Namespaces() NamespaceInterface {
 | 
				
			||||||
 | 
						return newNamespaces(c)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Nodes() NodeInterface {
 | 
				
			||||||
 | 
						return newNodes(c)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) PersistentVolumes() PersistentVolumeInterface {
 | 
				
			||||||
 | 
						return newPersistentVolumes(c)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface {
 | 
				
			||||||
 | 
						return newPersistentVolumeClaims(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Pods(namespace string) PodInterface {
 | 
				
			||||||
 | 
						return newPods(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) PodTemplates(namespace string) PodTemplateInterface {
 | 
				
			||||||
 | 
						return newPodTemplates(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ReplicationControllers(namespace string) ReplicationControllerInterface {
 | 
				
			||||||
 | 
						return newReplicationControllers(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ResourceQuotas(namespace string) ResourceQuotaInterface {
 | 
				
			||||||
 | 
						return newResourceQuotas(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Secrets(namespace string) SecretInterface {
 | 
				
			||||||
 | 
						return newSecrets(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Services(namespace string) ServiceInterface {
 | 
				
			||||||
 | 
						return newServices(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ServiceAccounts(namespace string) ServiceAccountInterface {
 | 
				
			||||||
 | 
						return newServiceAccounts(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewForConfig creates a new CoreClient for the given config.
 | 
				
			||||||
 | 
					func NewForConfig(c *restclient.Config) (*CoreClient, error) {
 | 
				
			||||||
 | 
						config := *c
 | 
				
			||||||
 | 
						if err := setConfigDefaults(&config); err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						client, err := restclient.RESTClientFor(&config)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return &CoreClient{client}, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewForConfigOrDie creates a new CoreClient for the given config and
 | 
				
			||||||
 | 
					// panics if there is an error in the config.
 | 
				
			||||||
 | 
					func NewForConfigOrDie(c *restclient.Config) *CoreClient {
 | 
				
			||||||
 | 
						client, err := NewForConfig(c)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							panic(err)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return client
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// New creates a new CoreClient for the given RESTClient.
 | 
				
			||||||
 | 
					func New(c *restclient.RESTClient) *CoreClient {
 | 
				
			||||||
 | 
						return &CoreClient{c}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func setConfigDefaults(config *restclient.Config) error {
 | 
				
			||||||
 | 
						// if core group is not registered, return an error
 | 
				
			||||||
 | 
						g, err := registered.Group("")
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						config.APIPath = "/api"
 | 
				
			||||||
 | 
						if config.UserAgent == "" {
 | 
				
			||||||
 | 
							config.UserAgent = restclient.DefaultKubernetesUserAgent()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						// TODO: Unconditionally set the config.Version, until we fix the config.
 | 
				
			||||||
 | 
						//if config.Version == "" {
 | 
				
			||||||
 | 
						copyGroupVersion := g.GroupVersion
 | 
				
			||||||
 | 
						config.GroupVersion = ©GroupVersion
 | 
				
			||||||
 | 
						//}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
 | 
				
			||||||
 | 
						if config.QPS == 0 {
 | 
				
			||||||
 | 
							config.QPS = 5
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if config.Burst == 0 {
 | 
				
			||||||
 | 
							config.Burst = 10
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Package unversioned has the automatically generated clients for unversioned resources.
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
@@ -0,0 +1,137 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// EndpointsGetter has a method to return a EndpointsInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type EndpointsGetter interface {
 | 
				
			||||||
 | 
						Endpoints(namespace string) EndpointsInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// EndpointsInterface has methods to work with Endpoints resources.
 | 
				
			||||||
 | 
					type EndpointsInterface interface {
 | 
				
			||||||
 | 
						Create(*api.Endpoints) (*api.Endpoints, error)
 | 
				
			||||||
 | 
						Update(*api.Endpoints) (*api.Endpoints, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.Endpoints, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.EndpointsList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						EndpointsExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// endpoints implements EndpointsInterface
 | 
				
			||||||
 | 
					type endpoints struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newEndpoints returns a Endpoints
 | 
				
			||||||
 | 
					func newEndpoints(c *CoreClient, namespace string) *endpoints {
 | 
				
			||||||
 | 
						return &endpoints{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a endpoints and creates it.  Returns the server's representation of the endpoints, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *endpoints) Create(endpoints *api.Endpoints) (result *api.Endpoints, err error) {
 | 
				
			||||||
 | 
						result = &api.Endpoints{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							Body(endpoints).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *endpoints) Update(endpoints *api.Endpoints) (result *api.Endpoints, err error) {
 | 
				
			||||||
 | 
						result = &api.Endpoints{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							Name(endpoints.Name).
 | 
				
			||||||
 | 
							Body(endpoints).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *endpoints) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *endpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *endpoints) Get(name string) (result *api.Endpoints, err error) {
 | 
				
			||||||
 | 
						result = &api.Endpoints{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Endpoints that match those selectors.
 | 
				
			||||||
 | 
					func (c *endpoints) List(opts api.ListOptions) (result *api.EndpointsList, err error) {
 | 
				
			||||||
 | 
						result = &api.EndpointsList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested endpoints.
 | 
				
			||||||
 | 
					func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,137 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// EventsGetter has a method to return a EventInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type EventsGetter interface {
 | 
				
			||||||
 | 
						Events(namespace string) EventInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// EventInterface has methods to work with Event resources.
 | 
				
			||||||
 | 
					type EventInterface interface {
 | 
				
			||||||
 | 
						Create(*api.Event) (*api.Event, error)
 | 
				
			||||||
 | 
						Update(*api.Event) (*api.Event, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.Event, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.EventList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						EventExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// events implements EventInterface
 | 
				
			||||||
 | 
					type events struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newEvents returns a Events
 | 
				
			||||||
 | 
					func newEvents(c *CoreClient, namespace string) *events {
 | 
				
			||||||
 | 
						return &events{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a event and creates it.  Returns the server's representation of the event, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *events) Create(event *api.Event) (result *api.Event, err error) {
 | 
				
			||||||
 | 
						result = &api.Event{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Body(event).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *events) Update(event *api.Event) (result *api.Event, err error) {
 | 
				
			||||||
 | 
						result = &api.Event{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(event.Name).
 | 
				
			||||||
 | 
							Body(event).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the event and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *events) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *events) Get(name string) (result *api.Event, err error) {
 | 
				
			||||||
 | 
						result = &api.Event{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Events that match those selectors.
 | 
				
			||||||
 | 
					func (c *events) List(opts api.ListOptions) (result *api.EventList, err error) {
 | 
				
			||||||
 | 
						result = &api.EventList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested events.
 | 
				
			||||||
 | 
					func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,157 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/fields"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/runtime"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// The EventExpansion interface allows manually adding extra methods to the EventInterface.
 | 
				
			||||||
 | 
					type EventExpansion interface {
 | 
				
			||||||
 | 
						// CreateWithEventNamespace is the same as a Create, except that it sends the request to the event.Namespace.
 | 
				
			||||||
 | 
						CreateWithEventNamespace(event *api.Event) (*api.Event, error)
 | 
				
			||||||
 | 
						// UpdateWithEventNamespace is the same as a Update, except that it sends the request to the event.Namespace.
 | 
				
			||||||
 | 
						UpdateWithEventNamespace(event *api.Event) (*api.Event, error)
 | 
				
			||||||
 | 
						Patch(event *api.Event, data []byte) (*api.Event, error)
 | 
				
			||||||
 | 
						// Search finds events about the specified object
 | 
				
			||||||
 | 
						Search(objOrRef runtime.Object) (*api.EventList, error)
 | 
				
			||||||
 | 
						// Returns the appropriate field selector based on the API version being used to communicate with the server.
 | 
				
			||||||
 | 
						// The returned field selector can be used with List and Watch to filter desired events.
 | 
				
			||||||
 | 
						GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CreateWithEventNamespace makes a new event. Returns the copy of the event the server returns,
 | 
				
			||||||
 | 
					// or an error. The namespace to create the event within is deduced from the
 | 
				
			||||||
 | 
					// event; it must either match this event client's namespace, or this event
 | 
				
			||||||
 | 
					// client must have been created with the "" namespace.
 | 
				
			||||||
 | 
					func (e *events) CreateWithEventNamespace(event *api.Event) (*api.Event, error) {
 | 
				
			||||||
 | 
						if e.ns != "" && event.Namespace != e.ns {
 | 
				
			||||||
 | 
							return nil, fmt.Errorf("can't create an event with namespace '%v' in namespace '%v'", event.Namespace, e.ns)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						result := &api.Event{}
 | 
				
			||||||
 | 
						err := e.client.Post().
 | 
				
			||||||
 | 
							NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Body(event).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return result, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// UpdateWithEventNamespace modifies an existing event. It returns the copy of the event that the server returns,
 | 
				
			||||||
 | 
					// or an error. The namespace and key to update the event within is deduced from the event. The
 | 
				
			||||||
 | 
					// namespace must either match this event client's namespace, or this event client must have been
 | 
				
			||||||
 | 
					// created with the "" namespace. Update also requires the ResourceVersion to be set in the event
 | 
				
			||||||
 | 
					// object.
 | 
				
			||||||
 | 
					func (e *events) UpdateWithEventNamespace(event *api.Event) (*api.Event, error) {
 | 
				
			||||||
 | 
						result := &api.Event{}
 | 
				
			||||||
 | 
						err := e.client.Put().
 | 
				
			||||||
 | 
							NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(event.Name).
 | 
				
			||||||
 | 
							Body(event).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return result, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Patch modifies an existing event. It returns the copy of the event that the server returns, or an
 | 
				
			||||||
 | 
					// error. The namespace and name of the target event is deduced from the incompleteEvent. The
 | 
				
			||||||
 | 
					// namespace must either match this event client's namespace, or this event client must have been
 | 
				
			||||||
 | 
					// created with the "" namespace.
 | 
				
			||||||
 | 
					func (e *events) Patch(incompleteEvent *api.Event, data []byte) (*api.Event, error) {
 | 
				
			||||||
 | 
						result := &api.Event{}
 | 
				
			||||||
 | 
						err := e.client.Patch(api.StrategicMergePatchType).
 | 
				
			||||||
 | 
							NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(incompleteEvent.Name).
 | 
				
			||||||
 | 
							Body(data).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return result, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Search finds events about the specified object. The namespace of the
 | 
				
			||||||
 | 
					// object must match this event's client namespace unless the event client
 | 
				
			||||||
 | 
					// was made with the "" namespace.
 | 
				
			||||||
 | 
					func (e *events) Search(objOrRef runtime.Object) (*api.EventList, error) {
 | 
				
			||||||
 | 
						ref, err := api.GetReference(objOrRef)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if e.ns != "" && ref.Namespace != e.ns {
 | 
				
			||||||
 | 
							return nil, fmt.Errorf("won't be able to find any events of namespace '%v' in namespace '%v'", ref.Namespace, e.ns)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						stringRefKind := string(ref.Kind)
 | 
				
			||||||
 | 
						var refKind *string
 | 
				
			||||||
 | 
						if stringRefKind != "" {
 | 
				
			||||||
 | 
							refKind = &stringRefKind
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						stringRefUID := string(ref.UID)
 | 
				
			||||||
 | 
						var refUID *string
 | 
				
			||||||
 | 
						if stringRefUID != "" {
 | 
				
			||||||
 | 
							refUID = &stringRefUID
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID)
 | 
				
			||||||
 | 
						return e.List(api.ListOptions{FieldSelector: fieldSelector})
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Returns the appropriate field selector based on the API version being used to communicate with the server.
 | 
				
			||||||
 | 
					// The returned field selector can be used with List and Watch to filter desired events.
 | 
				
			||||||
 | 
					func (e *events) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
 | 
				
			||||||
 | 
						apiVersion := e.client.APIVersion().String()
 | 
				
			||||||
 | 
						field := fields.Set{}
 | 
				
			||||||
 | 
						if involvedObjectName != nil {
 | 
				
			||||||
 | 
							field[GetInvolvedObjectNameFieldLabel(apiVersion)] = *involvedObjectName
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if involvedObjectNamespace != nil {
 | 
				
			||||||
 | 
							field["involvedObject.namespace"] = *involvedObjectNamespace
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if involvedObjectKind != nil {
 | 
				
			||||||
 | 
							field["involvedObject.kind"] = *involvedObjectKind
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if involvedObjectUID != nil {
 | 
				
			||||||
 | 
							field["involvedObject.uid"] = *involvedObjectUID
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return field.AsSelector()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Returns the appropriate field label to use for name of the involved object as per the given API version.
 | 
				
			||||||
 | 
					func GetInvolvedObjectNameFieldLabel(version string) string {
 | 
				
			||||||
 | 
						return "involvedObject.name"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// TODO: This is a temporary arrangement and will be removed once all clients are moved to use the clientset.
 | 
				
			||||||
 | 
					type EventSinkImpl struct {
 | 
				
			||||||
 | 
						Interface EventInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (e *EventSinkImpl) Create(event *api.Event) (*api.Event, error) {
 | 
				
			||||||
 | 
						return e.Interface.CreateWithEventNamespace(event)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (e *EventSinkImpl) Update(event *api.Event) (*api.Event, error) {
 | 
				
			||||||
 | 
						return e.Interface.UpdateWithEventNamespace(event)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (e *EventSinkImpl) Patch(event *api.Event, data []byte) (*api.Event, error) {
 | 
				
			||||||
 | 
						return e.Interface.Patch(event, data)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Package fake has the automatically generated clients.
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
@@ -0,0 +1,97 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeComponentStatuses implements ComponentStatusInterface
 | 
				
			||||||
 | 
					type FakeComponentStatuses struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) Create(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootCreateAction("componentstatuses", componentStatus), &api.ComponentStatus{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ComponentStatus), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) Update(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootUpdateAction("componentstatuses", componentStatus), &api.ComponentStatus{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ComponentStatus), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootDeleteAction("componentstatuses", name), &api.ComponentStatus{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						action := core.NewRootDeleteCollectionAction("componentstatuses", listOptions)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.ComponentStatusList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) Get(name string) (result *api.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootGetAction("componentstatuses", name), &api.ComponentStatus{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ComponentStatus), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *api.ComponentStatusList, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootListAction("componentstatuses", opts), &api.ComponentStatusList{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.ComponentStatusList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.ComponentStatusList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,104 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeConfigMaps implements ConfigMapInterface
 | 
				
			||||||
 | 
					type FakeConfigMaps struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ConfigMap), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ConfigMap), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("configmaps", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.ConfigMapList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeConfigMaps) Get(name string) (result *api.ConfigMap, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("configmaps", c.ns, name), &api.ConfigMap{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ConfigMap), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.ConfigMapList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.ConfigMapList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,92 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type FakeCore struct {
 | 
				
			||||||
 | 
						*core.Fake
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) ComponentStatuses() unversioned.ComponentStatusInterface {
 | 
				
			||||||
 | 
						return &FakeComponentStatuses{c}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) ConfigMaps(namespace string) unversioned.ConfigMapInterface {
 | 
				
			||||||
 | 
						return &FakeConfigMaps{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) Endpoints(namespace string) unversioned.EndpointsInterface {
 | 
				
			||||||
 | 
						return &FakeEndpoints{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) Events(namespace string) unversioned.EventInterface {
 | 
				
			||||||
 | 
						return &FakeEvents{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) LimitRanges(namespace string) unversioned.LimitRangeInterface {
 | 
				
			||||||
 | 
						return &FakeLimitRanges{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) Namespaces() unversioned.NamespaceInterface {
 | 
				
			||||||
 | 
						return &FakeNamespaces{c}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) Nodes() unversioned.NodeInterface {
 | 
				
			||||||
 | 
						return &FakeNodes{c}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) PersistentVolumes() unversioned.PersistentVolumeInterface {
 | 
				
			||||||
 | 
						return &FakePersistentVolumes{c}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) PersistentVolumeClaims(namespace string) unversioned.PersistentVolumeClaimInterface {
 | 
				
			||||||
 | 
						return &FakePersistentVolumeClaims{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) Pods(namespace string) unversioned.PodInterface {
 | 
				
			||||||
 | 
						return &FakePods{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) PodTemplates(namespace string) unversioned.PodTemplateInterface {
 | 
				
			||||||
 | 
						return &FakePodTemplates{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) ReplicationControllers(namespace string) unversioned.ReplicationControllerInterface {
 | 
				
			||||||
 | 
						return &FakeReplicationControllers{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) ResourceQuotas(namespace string) unversioned.ResourceQuotaInterface {
 | 
				
			||||||
 | 
						return &FakeResourceQuotas{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) Secrets(namespace string) unversioned.SecretInterface {
 | 
				
			||||||
 | 
						return &FakeSecrets{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) Services(namespace string) unversioned.ServiceInterface {
 | 
				
			||||||
 | 
						return &FakeServices{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeCore) ServiceAccounts(namespace string) unversioned.ServiceAccountInterface {
 | 
				
			||||||
 | 
						return &FakeServiceAccounts{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,104 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeEndpoints implements EndpointsInterface
 | 
				
			||||||
 | 
					type FakeEndpoints struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Endpoints), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Endpoints), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeEndpoints) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("endpoints", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.EndpointsList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeEndpoints) Get(name string) (result *api.Endpoints, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("endpoints", c.ns, name), &api.Endpoints{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Endpoints), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.EndpointsList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.EndpointsList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,104 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeEvents implements EventInterface
 | 
				
			||||||
 | 
					type FakeEvents struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Event), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Event), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeEvents) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("events", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.EventList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeEvents) Get(name string) (result *api.Event, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("events", c.ns, name), &api.Event{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Event), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.EventList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.EventList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,88 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2014 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/fields"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/runtime"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeEvents) CreateWithEventNamespace(event *api.Event) (*api.Event, error) {
 | 
				
			||||||
 | 
						action := core.NewRootCreateAction("events", event)
 | 
				
			||||||
 | 
						if c.ns != "" {
 | 
				
			||||||
 | 
							action = core.NewCreateAction("events", c.ns, event)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						obj, err := c.Fake.Invokes(action, event)
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return obj.(*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)
 | 
				
			||||||
 | 
						if c.ns != "" {
 | 
				
			||||||
 | 
							action = core.NewUpdateAction("events", c.ns, event)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						obj, err := c.Fake.Invokes(action, event)
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return obj.(*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)
 | 
				
			||||||
 | 
						if c.ns != "" {
 | 
				
			||||||
 | 
							action = core.NewPatchAction("events", c.ns, event)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						obj, err := c.Fake.Invokes(action, event)
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return obj.(*api.Event), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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{})
 | 
				
			||||||
 | 
						if c.ns != "" {
 | 
				
			||||||
 | 
							action = core.NewListAction("events", c.ns, api.ListOptions{})
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						obj, err := c.Fake.Invokes(action, &api.EventList{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return obj.(*api.EventList), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeEvents) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
 | 
				
			||||||
 | 
						action := core.GenericActionImpl{}
 | 
				
			||||||
 | 
						action.Verb = "get-field-selector"
 | 
				
			||||||
 | 
						action.Resource = "events"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						c.Fake.Invokes(action, nil)
 | 
				
			||||||
 | 
						return fields.Everything()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,104 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeLimitRanges implements LimitRangeInterface
 | 
				
			||||||
 | 
					type FakeLimitRanges struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.LimitRange), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.LimitRange), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeLimitRanges) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("limitranges", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.LimitRangeList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeLimitRanges) Get(name string) (result *api.LimitRange, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("limitranges", c.ns, name), &api.LimitRange{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.LimitRange), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.LimitRangeList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.LimitRangeList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,106 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeNamespaces implements NamespaceInterface
 | 
				
			||||||
 | 
					type FakeNamespaces struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNamespaces) Create(namespace *api.Namespace) (result *api.Namespace, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootCreateAction("namespaces", namespace), &api.Namespace{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Namespace), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNamespaces) Update(namespace *api.Namespace) (result *api.Namespace, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootUpdateAction("namespaces", namespace), &api.Namespace{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Namespace), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNamespaces) UpdateStatus(namespace *api.Namespace) (*api.Namespace, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootUpdateSubresourceAction("namespaces", "status", namespace), &api.Namespace{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Namespace), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNamespaces) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootDeleteAction("namespaces", name), &api.Namespace{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNamespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						action := core.NewRootDeleteCollectionAction("namespaces", listOptions)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.NamespaceList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNamespaces) Get(name string) (result *api.Namespace, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootGetAction("namespaces", name), &api.Namespace{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Namespace), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNamespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootListAction("namespaces", opts), &api.NamespaceList{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.NamespaceList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.NamespaceList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,37 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2014 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNamespaces) Finalize(namespace *api.Namespace) (*api.Namespace, error) {
 | 
				
			||||||
 | 
						action := core.CreateActionImpl{}
 | 
				
			||||||
 | 
						action.Verb = "create"
 | 
				
			||||||
 | 
						action.Resource = "namespaces"
 | 
				
			||||||
 | 
						action.Subresource = "finalize"
 | 
				
			||||||
 | 
						action.Object = namespace
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						obj, err := c.Fake.Invokes(action, namespace)
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return obj.(*api.Namespace), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,106 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeNodes implements NodeInterface
 | 
				
			||||||
 | 
					type FakeNodes struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNodes) Create(node *api.Node) (result *api.Node, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootCreateAction("nodes", node), &api.Node{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Node), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNodes) Update(node *api.Node) (result *api.Node, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootUpdateAction("nodes", node), &api.Node{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Node), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNodes) UpdateStatus(node *api.Node) (*api.Node, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootUpdateSubresourceAction("nodes", "status", node), &api.Node{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Node), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNodes) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootDeleteAction("nodes", name), &api.Node{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						action := core.NewRootDeleteCollectionAction("nodes", listOptions)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.NodeList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNodes) Get(name string) (result *api.Node, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootGetAction("nodes", name), &api.Node{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Node), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeNodes) List(opts api.ListOptions) (result *api.NodeList, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootListAction("nodes", opts), &api.NodeList{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.NodeList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.NodeList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,106 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakePersistentVolumes implements PersistentVolumeInterface
 | 
				
			||||||
 | 
					type FakePersistentVolumes struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumes) Create(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootCreateAction("persistentvolumes", persistentVolume), &api.PersistentVolume{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PersistentVolume), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumes) Update(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootUpdateAction("persistentvolumes", persistentVolume), &api.PersistentVolume{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PersistentVolume), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumes) UpdateStatus(persistentVolume *api.PersistentVolume) (*api.PersistentVolume, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootUpdateSubresourceAction("persistentvolumes", "status", persistentVolume), &api.PersistentVolume{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PersistentVolume), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumes) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootDeleteAction("persistentvolumes", name), &api.PersistentVolume{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						action := core.NewRootDeleteCollectionAction("persistentvolumes", listOptions)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.PersistentVolumeList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumes) Get(name string) (result *api.PersistentVolume, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootGetAction("persistentvolumes", name), &api.PersistentVolume{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PersistentVolume), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumes) List(opts api.ListOptions) (result *api.PersistentVolumeList, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootListAction("persistentvolumes", opts), &api.PersistentVolumeList{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.PersistentVolumeList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.PersistentVolumeList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,114 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakePersistentVolumeClaims implements PersistentVolumeClaimInterface
 | 
				
			||||||
 | 
					type FakePersistentVolumeClaims struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PersistentVolumeClaim), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PersistentVolumeClaim), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumeClaims) UpdateStatus(persistentVolumeClaim *api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("persistentvolumeclaims", "status", c.ns, persistentVolumeClaim), &api.PersistentVolumeClaim{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PersistentVolumeClaim), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumeClaims) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("persistentvolumeclaims", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.PersistentVolumeClaimList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePersistentVolumeClaims) Get(name string) (result *api.PersistentVolumeClaim, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("persistentvolumeclaims", c.ns, name), &api.PersistentVolumeClaim{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PersistentVolumeClaim), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.PersistentVolumeClaimList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.PersistentVolumeClaimList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,114 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakePods implements PodInterface
 | 
				
			||||||
 | 
					type FakePods struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Pod), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Pod), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePods) UpdateStatus(pod *api.Pod) (*api.Pod, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("pods", "status", c.ns, pod), &api.Pod{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Pod), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePods) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("pods", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.PodList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePods) Get(name string) (result *api.Pod, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("pods", c.ns, name), &api.Pod{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Pod), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.PodList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.PodList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,46 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2014 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePods) Bind(binding *api.Binding) error {
 | 
				
			||||||
 | 
						action := core.CreateActionImpl{}
 | 
				
			||||||
 | 
						action.Verb = "create"
 | 
				
			||||||
 | 
						action.Resource = "pods"
 | 
				
			||||||
 | 
						action.Subresource = "bindings"
 | 
				
			||||||
 | 
						action.Object = binding
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, binding)
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePods) GetLogs(name string, opts *api.PodLogOptions) *restclient.Request {
 | 
				
			||||||
 | 
						action := core.GenericActionImpl{}
 | 
				
			||||||
 | 
						action.Verb = "get"
 | 
				
			||||||
 | 
						action.Namespace = c.ns
 | 
				
			||||||
 | 
						action.Resource = "pod"
 | 
				
			||||||
 | 
						action.Subresource = "logs"
 | 
				
			||||||
 | 
						action.Value = opts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, _ = c.Fake.Invokes(action, &api.Pod{})
 | 
				
			||||||
 | 
						return &restclient.Request{}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,104 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakePodTemplates implements PodTemplateInterface
 | 
				
			||||||
 | 
					type FakePodTemplates struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PodTemplate), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PodTemplate), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePodTemplates) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("podtemplates", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.PodTemplateList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakePodTemplates) Get(name string) (result *api.PodTemplate, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("podtemplates", c.ns, name), &api.PodTemplate{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.PodTemplate), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.PodTemplateList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.PodTemplateList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,114 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeReplicationControllers implements ReplicationControllerInterface
 | 
				
			||||||
 | 
					type FakeReplicationControllers struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ReplicationController), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ReplicationController), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeReplicationControllers) UpdateStatus(replicationController *api.ReplicationController) (*api.ReplicationController, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("replicationcontrollers", "status", c.ns, replicationController), &api.ReplicationController{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ReplicationController), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeReplicationControllers) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("replicationcontrollers", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.ReplicationControllerList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeReplicationControllers) Get(name string) (result *api.ReplicationController, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("replicationcontrollers", c.ns, name), &api.ReplicationController{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ReplicationController), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.ReplicationControllerList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.ReplicationControllerList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,114 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeResourceQuotas implements ResourceQuotaInterface
 | 
				
			||||||
 | 
					type FakeResourceQuotas struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ResourceQuota), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ResourceQuota), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeResourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (*api.ResourceQuota, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("resourcequotas", "status", c.ns, resourceQuota), &api.ResourceQuota{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ResourceQuota), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeResourceQuotas) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("resourcequotas", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.ResourceQuotaList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeResourceQuotas) Get(name string) (result *api.ResourceQuota, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("resourcequotas", c.ns, name), &api.ResourceQuota{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ResourceQuota), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.ResourceQuotaList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.ResourceQuotaList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,104 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeSecrets implements SecretInterface
 | 
				
			||||||
 | 
					type FakeSecrets struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Secret), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Secret), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeSecrets) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("secrets", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.SecretList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeSecrets) Get(name string) (result *api.Secret, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("secrets", c.ns, name), &api.Secret{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Secret), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.SecretList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.SecretList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,114 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeServices implements ServiceInterface
 | 
				
			||||||
 | 
					type FakeServices struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Service), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Service), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeServices) UpdateStatus(service *api.Service) (*api.Service, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("services", "status", c.ns, service), &api.Service{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Service), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeServices) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("services", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.ServiceList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeServices) Get(name string) (result *api.Service, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("services", c.ns, name), &api.Service{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.Service), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.ServiceList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.ServiceList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2014 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,104 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeServiceAccounts implements ServiceAccountInterface
 | 
				
			||||||
 | 
					type FakeServiceAccounts struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ServiceAccount), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*api.ServiceAccount), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeServiceAccounts) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("serviceaccounts", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &api.ServiceAccountList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeServiceAccounts) Get(name string) (result *api.ServiceAccount, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("serviceaccounts", c.ns, name), &api.ServiceAccount{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &api.ServiceAccountList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*api.ServiceAccountList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ComponentStatusExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type EndpointsExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type LimitRangeExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type NodeExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type PersistentVolumeExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type PersistentVolumeClaimExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type PodTemplateExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ReplicationControllerExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ResourceQuotaExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type SecretExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ServiceAccountExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ConfigMapExpansion interface{}
 | 
				
			||||||
@@ -0,0 +1,137 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// LimitRangesGetter has a method to return a LimitRangeInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type LimitRangesGetter interface {
 | 
				
			||||||
 | 
						LimitRanges(namespace string) LimitRangeInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// LimitRangeInterface has methods to work with LimitRange resources.
 | 
				
			||||||
 | 
					type LimitRangeInterface interface {
 | 
				
			||||||
 | 
						Create(*api.LimitRange) (*api.LimitRange, error)
 | 
				
			||||||
 | 
						Update(*api.LimitRange) (*api.LimitRange, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.LimitRange, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.LimitRangeList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						LimitRangeExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// limitRanges implements LimitRangeInterface
 | 
				
			||||||
 | 
					type limitRanges struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newLimitRanges returns a LimitRanges
 | 
				
			||||||
 | 
					func newLimitRanges(c *CoreClient, namespace string) *limitRanges {
 | 
				
			||||||
 | 
						return &limitRanges{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a limitRange and creates it.  Returns the server's representation of the limitRange, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *limitRanges) Create(limitRange *api.LimitRange) (result *api.LimitRange, err error) {
 | 
				
			||||||
 | 
						result = &api.LimitRange{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("limitranges").
 | 
				
			||||||
 | 
							Body(limitRange).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a limitRange and updates it. Returns the server's representation of the limitRange, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *limitRanges) Update(limitRange *api.LimitRange) (result *api.LimitRange, err error) {
 | 
				
			||||||
 | 
						result = &api.LimitRange{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("limitranges").
 | 
				
			||||||
 | 
							Name(limitRange.Name).
 | 
				
			||||||
 | 
							Body(limitRange).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the limitRange and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *limitRanges) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("limitranges").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *limitRanges) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("limitranges").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the limitRange, and returns the corresponding limitRange object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *limitRanges) Get(name string) (result *api.LimitRange, err error) {
 | 
				
			||||||
 | 
						result = &api.LimitRange{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("limitranges").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of LimitRanges that match those selectors.
 | 
				
			||||||
 | 
					func (c *limitRanges) List(opts api.ListOptions) (result *api.LimitRangeList, err error) {
 | 
				
			||||||
 | 
						result = &api.LimitRangeList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("limitranges").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested limitRanges.
 | 
				
			||||||
 | 
					func (c *limitRanges) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("limitranges").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,141 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NamespacesGetter has a method to return a NamespaceInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type NamespacesGetter interface {
 | 
				
			||||||
 | 
						Namespaces() NamespaceInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NamespaceInterface has methods to work with Namespace resources.
 | 
				
			||||||
 | 
					type NamespaceInterface interface {
 | 
				
			||||||
 | 
						Create(*api.Namespace) (*api.Namespace, error)
 | 
				
			||||||
 | 
						Update(*api.Namespace) (*api.Namespace, error)
 | 
				
			||||||
 | 
						UpdateStatus(*api.Namespace) (*api.Namespace, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.Namespace, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.NamespaceList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						NamespaceExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// namespaces implements NamespaceInterface
 | 
				
			||||||
 | 
					type namespaces struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newNamespaces returns a Namespaces
 | 
				
			||||||
 | 
					func newNamespaces(c *CoreClient) *namespaces {
 | 
				
			||||||
 | 
						return &namespaces{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a namespace and creates it.  Returns the server's representation of the namespace, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *namespaces) Create(namespace *api.Namespace) (result *api.Namespace, err error) {
 | 
				
			||||||
 | 
						result = &api.Namespace{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Resource("namespaces").
 | 
				
			||||||
 | 
							Body(namespace).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a namespace and updates it. Returns the server's representation of the namespace, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *namespaces) Update(namespace *api.Namespace) (result *api.Namespace, err error) {
 | 
				
			||||||
 | 
						result = &api.Namespace{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Resource("namespaces").
 | 
				
			||||||
 | 
							Name(namespace.Name).
 | 
				
			||||||
 | 
							Body(namespace).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *namespaces) UpdateStatus(namespace *api.Namespace) (result *api.Namespace, err error) {
 | 
				
			||||||
 | 
						result = &api.Namespace{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Resource("namespaces").
 | 
				
			||||||
 | 
							Name(namespace.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(namespace).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the namespace and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *namespaces) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("namespaces").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *namespaces) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("namespaces").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the namespace, and returns the corresponding namespace object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *namespaces) Get(name string) (result *api.Namespace, err error) {
 | 
				
			||||||
 | 
						result = &api.Namespace{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("namespaces").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Namespaces that match those selectors.
 | 
				
			||||||
 | 
					func (c *namespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) {
 | 
				
			||||||
 | 
						result = &api.NamespaceList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("namespaces").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested namespaces.
 | 
				
			||||||
 | 
					func (c *namespaces) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Resource("namespaces").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,31 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// The NamespaceExpansion interface allows manually adding extra methods to the NamespaceInterface.
 | 
				
			||||||
 | 
					type NamespaceExpansion interface {
 | 
				
			||||||
 | 
						Finalize(item *api.Namespace) (*api.Namespace, error)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Finalize takes the representation of a namespace to update.  Returns the server's representation of the namespace, and an error, if it occurs.
 | 
				
			||||||
 | 
					func (c *namespaces) Finalize(namespace *api.Namespace) (result *api.Namespace, err error) {
 | 
				
			||||||
 | 
						result = &api.Namespace{}
 | 
				
			||||||
 | 
						err = c.client.Put().Resource("namespaces").Name(namespace.Name).SubResource("finalize").Body(namespace).Do().Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,141 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NodesGetter has a method to return a NodeInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type NodesGetter interface {
 | 
				
			||||||
 | 
						Nodes() NodeInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NodeInterface has methods to work with Node resources.
 | 
				
			||||||
 | 
					type NodeInterface interface {
 | 
				
			||||||
 | 
						Create(*api.Node) (*api.Node, error)
 | 
				
			||||||
 | 
						Update(*api.Node) (*api.Node, error)
 | 
				
			||||||
 | 
						UpdateStatus(*api.Node) (*api.Node, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.Node, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.NodeList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						NodeExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// nodes implements NodeInterface
 | 
				
			||||||
 | 
					type nodes struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newNodes returns a Nodes
 | 
				
			||||||
 | 
					func newNodes(c *CoreClient) *nodes {
 | 
				
			||||||
 | 
						return &nodes{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a node and creates it.  Returns the server's representation of the node, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *nodes) Create(node *api.Node) (result *api.Node, err error) {
 | 
				
			||||||
 | 
						result = &api.Node{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Resource("nodes").
 | 
				
			||||||
 | 
							Body(node).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a node and updates it. Returns the server's representation of the node, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *nodes) Update(node *api.Node) (result *api.Node, err error) {
 | 
				
			||||||
 | 
						result = &api.Node{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Resource("nodes").
 | 
				
			||||||
 | 
							Name(node.Name).
 | 
				
			||||||
 | 
							Body(node).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *nodes) UpdateStatus(node *api.Node) (result *api.Node, err error) {
 | 
				
			||||||
 | 
						result = &api.Node{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Resource("nodes").
 | 
				
			||||||
 | 
							Name(node.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(node).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the node and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *nodes) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("nodes").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *nodes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("nodes").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the node, and returns the corresponding node object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *nodes) Get(name string) (result *api.Node, err error) {
 | 
				
			||||||
 | 
						result = &api.Node{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("nodes").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Nodes that match those selectors.
 | 
				
			||||||
 | 
					func (c *nodes) List(opts api.ListOptions) (result *api.NodeList, err error) {
 | 
				
			||||||
 | 
						result = &api.NodeList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("nodes").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested nodes.
 | 
				
			||||||
 | 
					func (c *nodes) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Resource("nodes").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,141 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// PersistentVolumesGetter has a method to return a PersistentVolumeInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type PersistentVolumesGetter interface {
 | 
				
			||||||
 | 
						PersistentVolumes() PersistentVolumeInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// PersistentVolumeInterface has methods to work with PersistentVolume resources.
 | 
				
			||||||
 | 
					type PersistentVolumeInterface interface {
 | 
				
			||||||
 | 
						Create(*api.PersistentVolume) (*api.PersistentVolume, error)
 | 
				
			||||||
 | 
						Update(*api.PersistentVolume) (*api.PersistentVolume, error)
 | 
				
			||||||
 | 
						UpdateStatus(*api.PersistentVolume) (*api.PersistentVolume, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.PersistentVolume, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.PersistentVolumeList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						PersistentVolumeExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// persistentVolumes implements PersistentVolumeInterface
 | 
				
			||||||
 | 
					type persistentVolumes struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newPersistentVolumes returns a PersistentVolumes
 | 
				
			||||||
 | 
					func newPersistentVolumes(c *CoreClient) *persistentVolumes {
 | 
				
			||||||
 | 
						return &persistentVolumes{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a persistentVolume and creates it.  Returns the server's representation of the persistentVolume, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *persistentVolumes) Create(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolume{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Resource("persistentvolumes").
 | 
				
			||||||
 | 
							Body(persistentVolume).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a persistentVolume and updates it. Returns the server's representation of the persistentVolume, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *persistentVolumes) Update(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolume{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Resource("persistentvolumes").
 | 
				
			||||||
 | 
							Name(persistentVolume.Name).
 | 
				
			||||||
 | 
							Body(persistentVolume).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *persistentVolumes) UpdateStatus(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolume{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Resource("persistentvolumes").
 | 
				
			||||||
 | 
							Name(persistentVolume.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(persistentVolume).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the persistentVolume and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *persistentVolumes) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("persistentvolumes").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *persistentVolumes) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("persistentvolumes").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the persistentVolume, and returns the corresponding persistentVolume object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *persistentVolumes) Get(name string) (result *api.PersistentVolume, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolume{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("persistentvolumes").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of PersistentVolumes that match those selectors.
 | 
				
			||||||
 | 
					func (c *persistentVolumes) List(opts api.ListOptions) (result *api.PersistentVolumeList, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolumeList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("persistentvolumes").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested persistentVolumes.
 | 
				
			||||||
 | 
					func (c *persistentVolumes) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Resource("persistentvolumes").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,151 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// PersistentVolumeClaimsGetter has a method to return a PersistentVolumeClaimInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type PersistentVolumeClaimsGetter interface {
 | 
				
			||||||
 | 
						PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// PersistentVolumeClaimInterface has methods to work with PersistentVolumeClaim resources.
 | 
				
			||||||
 | 
					type PersistentVolumeClaimInterface interface {
 | 
				
			||||||
 | 
						Create(*api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
 | 
				
			||||||
 | 
						Update(*api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
 | 
				
			||||||
 | 
						UpdateStatus(*api.PersistentVolumeClaim) (*api.PersistentVolumeClaim, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.PersistentVolumeClaim, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.PersistentVolumeClaimList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						PersistentVolumeClaimExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// persistentVolumeClaims implements PersistentVolumeClaimInterface
 | 
				
			||||||
 | 
					type persistentVolumeClaims struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newPersistentVolumeClaims returns a PersistentVolumeClaims
 | 
				
			||||||
 | 
					func newPersistentVolumeClaims(c *CoreClient, namespace string) *persistentVolumeClaims {
 | 
				
			||||||
 | 
						return &persistentVolumeClaims{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a persistentVolumeClaim and creates it.  Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *persistentVolumeClaims) Create(persistentVolumeClaim *api.PersistentVolumeClaim) (result *api.PersistentVolumeClaim, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolumeClaim{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("persistentvolumeclaims").
 | 
				
			||||||
 | 
							Body(persistentVolumeClaim).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a persistentVolumeClaim and updates it. Returns the server's representation of the persistentVolumeClaim, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *persistentVolumeClaims) Update(persistentVolumeClaim *api.PersistentVolumeClaim) (result *api.PersistentVolumeClaim, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolumeClaim{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("persistentvolumeclaims").
 | 
				
			||||||
 | 
							Name(persistentVolumeClaim.Name).
 | 
				
			||||||
 | 
							Body(persistentVolumeClaim).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *persistentVolumeClaims) UpdateStatus(persistentVolumeClaim *api.PersistentVolumeClaim) (result *api.PersistentVolumeClaim, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolumeClaim{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("persistentvolumeclaims").
 | 
				
			||||||
 | 
							Name(persistentVolumeClaim.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(persistentVolumeClaim).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the persistentVolumeClaim and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *persistentVolumeClaims) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("persistentvolumeclaims").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *persistentVolumeClaims) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("persistentvolumeclaims").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the persistentVolumeClaim, and returns the corresponding persistentVolumeClaim object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *persistentVolumeClaims) Get(name string) (result *api.PersistentVolumeClaim, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolumeClaim{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("persistentvolumeclaims").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of PersistentVolumeClaims that match those selectors.
 | 
				
			||||||
 | 
					func (c *persistentVolumeClaims) List(opts api.ListOptions) (result *api.PersistentVolumeClaimList, err error) {
 | 
				
			||||||
 | 
						result = &api.PersistentVolumeClaimList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("persistentvolumeclaims").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested persistentVolumeClaims.
 | 
				
			||||||
 | 
					func (c *persistentVolumeClaims) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("persistentvolumeclaims").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,151 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// PodsGetter has a method to return a PodInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type PodsGetter interface {
 | 
				
			||||||
 | 
						Pods(namespace string) PodInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// PodInterface has methods to work with Pod resources.
 | 
				
			||||||
 | 
					type PodInterface interface {
 | 
				
			||||||
 | 
						Create(*api.Pod) (*api.Pod, error)
 | 
				
			||||||
 | 
						Update(*api.Pod) (*api.Pod, error)
 | 
				
			||||||
 | 
						UpdateStatus(*api.Pod) (*api.Pod, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.Pod, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.PodList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						PodExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// pods implements PodInterface
 | 
				
			||||||
 | 
					type pods struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newPods returns a Pods
 | 
				
			||||||
 | 
					func newPods(c *CoreClient, namespace string) *pods {
 | 
				
			||||||
 | 
						return &pods{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a pod and creates it.  Returns the server's representation of the pod, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *pods) Create(pod *api.Pod) (result *api.Pod, err error) {
 | 
				
			||||||
 | 
						result = &api.Pod{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("pods").
 | 
				
			||||||
 | 
							Body(pod).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a pod and updates it. Returns the server's representation of the pod, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *pods) Update(pod *api.Pod) (result *api.Pod, err error) {
 | 
				
			||||||
 | 
						result = &api.Pod{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("pods").
 | 
				
			||||||
 | 
							Name(pod.Name).
 | 
				
			||||||
 | 
							Body(pod).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *pods) UpdateStatus(pod *api.Pod) (result *api.Pod, err error) {
 | 
				
			||||||
 | 
						result = &api.Pod{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("pods").
 | 
				
			||||||
 | 
							Name(pod.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(pod).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the pod and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *pods) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("pods").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *pods) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("pods").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the pod, and returns the corresponding pod object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *pods) Get(name string) (result *api.Pod, err error) {
 | 
				
			||||||
 | 
						result = &api.Pod{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("pods").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Pods that match those selectors.
 | 
				
			||||||
 | 
					func (c *pods) List(opts api.ListOptions) (result *api.PodList, err error) {
 | 
				
			||||||
 | 
						result = &api.PodList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("pods").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested pods.
 | 
				
			||||||
 | 
					func (c *pods) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("pods").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,38 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// The PodExpansion interface allows manually adding extra methods to the PodInterface.
 | 
				
			||||||
 | 
					type PodExpansion interface {
 | 
				
			||||||
 | 
						Bind(binding *api.Binding) error
 | 
				
			||||||
 | 
						GetLogs(name string, opts *api.PodLogOptions) *restclient.Request
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Bind applies the provided binding to the named pod in the current namespace (binding.Namespace is ignored).
 | 
				
			||||||
 | 
					func (c *pods) Bind(binding *api.Binding) error {
 | 
				
			||||||
 | 
						return c.client.Post().Namespace(c.ns).Resource("pods").Name(binding.Name).SubResource("binding").Body(binding).Do().Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get constructs a request for getting the logs for a pod
 | 
				
			||||||
 | 
					func (c *pods) GetLogs(name string, opts *api.PodLogOptions) *restclient.Request {
 | 
				
			||||||
 | 
						return c.client.Get().Namespace(c.ns).Name(name).Resource("pods").SubResource("log").VersionedParams(opts, api.ParameterCodec)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,137 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// PodTemplatesGetter has a method to return a PodTemplateInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type PodTemplatesGetter interface {
 | 
				
			||||||
 | 
						PodTemplates(namespace string) PodTemplateInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// PodTemplateInterface has methods to work with PodTemplate resources.
 | 
				
			||||||
 | 
					type PodTemplateInterface interface {
 | 
				
			||||||
 | 
						Create(*api.PodTemplate) (*api.PodTemplate, error)
 | 
				
			||||||
 | 
						Update(*api.PodTemplate) (*api.PodTemplate, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.PodTemplate, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.PodTemplateList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						PodTemplateExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// podTemplates implements PodTemplateInterface
 | 
				
			||||||
 | 
					type podTemplates struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newPodTemplates returns a PodTemplates
 | 
				
			||||||
 | 
					func newPodTemplates(c *CoreClient, namespace string) *podTemplates {
 | 
				
			||||||
 | 
						return &podTemplates{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a podTemplate and creates it.  Returns the server's representation of the podTemplate, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *podTemplates) Create(podTemplate *api.PodTemplate) (result *api.PodTemplate, err error) {
 | 
				
			||||||
 | 
						result = &api.PodTemplate{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("podtemplates").
 | 
				
			||||||
 | 
							Body(podTemplate).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a podTemplate and updates it. Returns the server's representation of the podTemplate, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *podTemplates) Update(podTemplate *api.PodTemplate) (result *api.PodTemplate, err error) {
 | 
				
			||||||
 | 
						result = &api.PodTemplate{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("podtemplates").
 | 
				
			||||||
 | 
							Name(podTemplate.Name).
 | 
				
			||||||
 | 
							Body(podTemplate).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the podTemplate and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *podTemplates) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("podtemplates").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *podTemplates) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("podtemplates").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the podTemplate, and returns the corresponding podTemplate object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *podTemplates) Get(name string) (result *api.PodTemplate, err error) {
 | 
				
			||||||
 | 
						result = &api.PodTemplate{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("podtemplates").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of PodTemplates that match those selectors.
 | 
				
			||||||
 | 
					func (c *podTemplates) List(opts api.ListOptions) (result *api.PodTemplateList, err error) {
 | 
				
			||||||
 | 
						result = &api.PodTemplateList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("podtemplates").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested podTemplates.
 | 
				
			||||||
 | 
					func (c *podTemplates) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("podtemplates").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,151 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ReplicationControllersGetter has a method to return a ReplicationControllerInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ReplicationControllersGetter interface {
 | 
				
			||||||
 | 
						ReplicationControllers(namespace string) ReplicationControllerInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ReplicationControllerInterface has methods to work with ReplicationController resources.
 | 
				
			||||||
 | 
					type ReplicationControllerInterface interface {
 | 
				
			||||||
 | 
						Create(*api.ReplicationController) (*api.ReplicationController, error)
 | 
				
			||||||
 | 
						Update(*api.ReplicationController) (*api.ReplicationController, error)
 | 
				
			||||||
 | 
						UpdateStatus(*api.ReplicationController) (*api.ReplicationController, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.ReplicationController, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.ReplicationControllerList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ReplicationControllerExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// replicationControllers implements ReplicationControllerInterface
 | 
				
			||||||
 | 
					type replicationControllers struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newReplicationControllers returns a ReplicationControllers
 | 
				
			||||||
 | 
					func newReplicationControllers(c *CoreClient, namespace string) *replicationControllers {
 | 
				
			||||||
 | 
						return &replicationControllers{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a replicationController and creates it.  Returns the server's representation of the replicationController, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *replicationControllers) Create(replicationController *api.ReplicationController) (result *api.ReplicationController, err error) {
 | 
				
			||||||
 | 
						result = &api.ReplicationController{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicationcontrollers").
 | 
				
			||||||
 | 
							Body(replicationController).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a replicationController and updates it. Returns the server's representation of the replicationController, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *replicationControllers) Update(replicationController *api.ReplicationController) (result *api.ReplicationController, err error) {
 | 
				
			||||||
 | 
						result = &api.ReplicationController{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicationcontrollers").
 | 
				
			||||||
 | 
							Name(replicationController.Name).
 | 
				
			||||||
 | 
							Body(replicationController).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *replicationControllers) UpdateStatus(replicationController *api.ReplicationController) (result *api.ReplicationController, err error) {
 | 
				
			||||||
 | 
						result = &api.ReplicationController{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicationcontrollers").
 | 
				
			||||||
 | 
							Name(replicationController.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(replicationController).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the replicationController and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *replicationControllers) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicationcontrollers").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *replicationControllers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicationcontrollers").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the replicationController, and returns the corresponding replicationController object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *replicationControllers) Get(name string) (result *api.ReplicationController, err error) {
 | 
				
			||||||
 | 
						result = &api.ReplicationController{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicationcontrollers").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of ReplicationControllers that match those selectors.
 | 
				
			||||||
 | 
					func (c *replicationControllers) List(opts api.ListOptions) (result *api.ReplicationControllerList, err error) {
 | 
				
			||||||
 | 
						result = &api.ReplicationControllerList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicationcontrollers").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested replicationControllers.
 | 
				
			||||||
 | 
					func (c *replicationControllers) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicationcontrollers").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,151 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ResourceQuotasGetter has a method to return a ResourceQuotaInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ResourceQuotasGetter interface {
 | 
				
			||||||
 | 
						ResourceQuotas(namespace string) ResourceQuotaInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ResourceQuotaInterface has methods to work with ResourceQuota resources.
 | 
				
			||||||
 | 
					type ResourceQuotaInterface interface {
 | 
				
			||||||
 | 
						Create(*api.ResourceQuota) (*api.ResourceQuota, error)
 | 
				
			||||||
 | 
						Update(*api.ResourceQuota) (*api.ResourceQuota, error)
 | 
				
			||||||
 | 
						UpdateStatus(*api.ResourceQuota) (*api.ResourceQuota, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.ResourceQuota, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.ResourceQuotaList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ResourceQuotaExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// resourceQuotas implements ResourceQuotaInterface
 | 
				
			||||||
 | 
					type resourceQuotas struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newResourceQuotas returns a ResourceQuotas
 | 
				
			||||||
 | 
					func newResourceQuotas(c *CoreClient, namespace string) *resourceQuotas {
 | 
				
			||||||
 | 
						return &resourceQuotas{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a resourceQuota and creates it.  Returns the server's representation of the resourceQuota, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *resourceQuotas) Create(resourceQuota *api.ResourceQuota) (result *api.ResourceQuota, err error) {
 | 
				
			||||||
 | 
						result = &api.ResourceQuota{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("resourcequotas").
 | 
				
			||||||
 | 
							Body(resourceQuota).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a resourceQuota and updates it. Returns the server's representation of the resourceQuota, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *resourceQuotas) Update(resourceQuota *api.ResourceQuota) (result *api.ResourceQuota, err error) {
 | 
				
			||||||
 | 
						result = &api.ResourceQuota{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("resourcequotas").
 | 
				
			||||||
 | 
							Name(resourceQuota.Name).
 | 
				
			||||||
 | 
							Body(resourceQuota).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *resourceQuotas) UpdateStatus(resourceQuota *api.ResourceQuota) (result *api.ResourceQuota, err error) {
 | 
				
			||||||
 | 
						result = &api.ResourceQuota{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("resourcequotas").
 | 
				
			||||||
 | 
							Name(resourceQuota.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(resourceQuota).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the resourceQuota and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *resourceQuotas) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("resourcequotas").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *resourceQuotas) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("resourcequotas").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the resourceQuota, and returns the corresponding resourceQuota object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *resourceQuotas) Get(name string) (result *api.ResourceQuota, err error) {
 | 
				
			||||||
 | 
						result = &api.ResourceQuota{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("resourcequotas").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of ResourceQuotas that match those selectors.
 | 
				
			||||||
 | 
					func (c *resourceQuotas) List(opts api.ListOptions) (result *api.ResourceQuotaList, err error) {
 | 
				
			||||||
 | 
						result = &api.ResourceQuotaList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("resourcequotas").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested resourceQuotas.
 | 
				
			||||||
 | 
					func (c *resourceQuotas) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("resourcequotas").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,137 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SecretsGetter has a method to return a SecretInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type SecretsGetter interface {
 | 
				
			||||||
 | 
						Secrets(namespace string) SecretInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SecretInterface has methods to work with Secret resources.
 | 
				
			||||||
 | 
					type SecretInterface interface {
 | 
				
			||||||
 | 
						Create(*api.Secret) (*api.Secret, error)
 | 
				
			||||||
 | 
						Update(*api.Secret) (*api.Secret, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.Secret, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.SecretList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						SecretExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// secrets implements SecretInterface
 | 
				
			||||||
 | 
					type secrets struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newSecrets returns a Secrets
 | 
				
			||||||
 | 
					func newSecrets(c *CoreClient, namespace string) *secrets {
 | 
				
			||||||
 | 
						return &secrets{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a secret and creates it.  Returns the server's representation of the secret, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *secrets) Create(secret *api.Secret) (result *api.Secret, err error) {
 | 
				
			||||||
 | 
						result = &api.Secret{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("secrets").
 | 
				
			||||||
 | 
							Body(secret).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a secret and updates it. Returns the server's representation of the secret, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *secrets) Update(secret *api.Secret) (result *api.Secret, err error) {
 | 
				
			||||||
 | 
						result = &api.Secret{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("secrets").
 | 
				
			||||||
 | 
							Name(secret.Name).
 | 
				
			||||||
 | 
							Body(secret).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the secret and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *secrets) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("secrets").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *secrets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("secrets").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the secret, and returns the corresponding secret object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *secrets) Get(name string) (result *api.Secret, err error) {
 | 
				
			||||||
 | 
						result = &api.Secret{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("secrets").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Secrets that match those selectors.
 | 
				
			||||||
 | 
					func (c *secrets) List(opts api.ListOptions) (result *api.SecretList, err error) {
 | 
				
			||||||
 | 
						result = &api.SecretList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("secrets").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested secrets.
 | 
				
			||||||
 | 
					func (c *secrets) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("secrets").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,151 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ServicesGetter has a method to return a ServiceInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ServicesGetter interface {
 | 
				
			||||||
 | 
						Services(namespace string) ServiceInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ServiceInterface has methods to work with Service resources.
 | 
				
			||||||
 | 
					type ServiceInterface interface {
 | 
				
			||||||
 | 
						Create(*api.Service) (*api.Service, error)
 | 
				
			||||||
 | 
						Update(*api.Service) (*api.Service, error)
 | 
				
			||||||
 | 
						UpdateStatus(*api.Service) (*api.Service, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.Service, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.ServiceList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ServiceExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// services implements ServiceInterface
 | 
				
			||||||
 | 
					type services struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newServices returns a Services
 | 
				
			||||||
 | 
					func newServices(c *CoreClient, namespace string) *services {
 | 
				
			||||||
 | 
						return &services{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a service and creates it.  Returns the server's representation of the service, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *services) Create(service *api.Service) (result *api.Service, err error) {
 | 
				
			||||||
 | 
						result = &api.Service{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("services").
 | 
				
			||||||
 | 
							Body(service).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *services) Update(service *api.Service) (result *api.Service, err error) {
 | 
				
			||||||
 | 
						result = &api.Service{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("services").
 | 
				
			||||||
 | 
							Name(service.Name).
 | 
				
			||||||
 | 
							Body(service).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *services) UpdateStatus(service *api.Service) (result *api.Service, err error) {
 | 
				
			||||||
 | 
						result = &api.Service{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("services").
 | 
				
			||||||
 | 
							Name(service.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(service).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the service and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *services) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("services").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *services) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("services").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the service, and returns the corresponding service object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *services) Get(name string) (result *api.Service, err error) {
 | 
				
			||||||
 | 
						result = &api.Service{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("services").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Services that match those selectors.
 | 
				
			||||||
 | 
					func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err error) {
 | 
				
			||||||
 | 
						result = &api.ServiceList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("services").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested services.
 | 
				
			||||||
 | 
					func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("services").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,41 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/util/net"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// The ServiceExpansion interface allows manually adding extra methods to the ServiceInterface.
 | 
				
			||||||
 | 
					type ServiceExpansion interface {
 | 
				
			||||||
 | 
						ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ProxyGet returns a response of the service by calling it through the proxy.
 | 
				
			||||||
 | 
					func (c *services) ProxyGet(scheme, name, port, path string, params map[string]string) restclient.ResponseWrapper {
 | 
				
			||||||
 | 
						request := c.client.Get().
 | 
				
			||||||
 | 
							Prefix("proxy").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("services").
 | 
				
			||||||
 | 
							Name(net.JoinSchemeNamePort(scheme, name, port)).
 | 
				
			||||||
 | 
							Suffix(path)
 | 
				
			||||||
 | 
						for k, v := range params {
 | 
				
			||||||
 | 
							request = request.Param(k, v)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return request
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,137 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ServiceAccountsGetter has a method to return a ServiceAccountInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ServiceAccountsGetter interface {
 | 
				
			||||||
 | 
						ServiceAccounts(namespace string) ServiceAccountInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ServiceAccountInterface has methods to work with ServiceAccount resources.
 | 
				
			||||||
 | 
					type ServiceAccountInterface interface {
 | 
				
			||||||
 | 
						Create(*api.ServiceAccount) (*api.ServiceAccount, error)
 | 
				
			||||||
 | 
						Update(*api.ServiceAccount) (*api.ServiceAccount, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*api.ServiceAccount, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*api.ServiceAccountList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ServiceAccountExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// serviceAccounts implements ServiceAccountInterface
 | 
				
			||||||
 | 
					type serviceAccounts struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newServiceAccounts returns a ServiceAccounts
 | 
				
			||||||
 | 
					func newServiceAccounts(c *CoreClient, namespace string) *serviceAccounts {
 | 
				
			||||||
 | 
						return &serviceAccounts{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a serviceAccount and creates it.  Returns the server's representation of the serviceAccount, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *serviceAccounts) Create(serviceAccount *api.ServiceAccount) (result *api.ServiceAccount, err error) {
 | 
				
			||||||
 | 
						result = &api.ServiceAccount{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("serviceaccounts").
 | 
				
			||||||
 | 
							Body(serviceAccount).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a serviceAccount and updates it. Returns the server's representation of the serviceAccount, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *serviceAccounts) Update(serviceAccount *api.ServiceAccount) (result *api.ServiceAccount, err error) {
 | 
				
			||||||
 | 
						result = &api.ServiceAccount{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("serviceaccounts").
 | 
				
			||||||
 | 
							Name(serviceAccount.Name).
 | 
				
			||||||
 | 
							Body(serviceAccount).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the serviceAccount and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *serviceAccounts) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("serviceaccounts").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *serviceAccounts) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("serviceaccounts").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the serviceAccount, and returns the corresponding serviceAccount object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *serviceAccounts) Get(name string) (result *api.ServiceAccount, err error) {
 | 
				
			||||||
 | 
						result = &api.ServiceAccount{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("serviceaccounts").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of ServiceAccounts that match those selectors.
 | 
				
			||||||
 | 
					func (c *serviceAccounts) List(opts api.ListOptions) (result *api.ServiceAccountList, err error) {
 | 
				
			||||||
 | 
						result = &api.ServiceAccountList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("serviceaccounts").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested serviceAccounts.
 | 
				
			||||||
 | 
					func (c *serviceAccounts) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("serviceaccounts").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,152 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DaemonSetsGetter has a method to return a DaemonSetInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type DaemonSetsGetter interface {
 | 
				
			||||||
 | 
						DaemonSets(namespace string) DaemonSetInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DaemonSetInterface has methods to work with DaemonSet resources.
 | 
				
			||||||
 | 
					type DaemonSetInterface interface {
 | 
				
			||||||
 | 
						Create(*extensions.DaemonSet) (*extensions.DaemonSet, error)
 | 
				
			||||||
 | 
						Update(*extensions.DaemonSet) (*extensions.DaemonSet, error)
 | 
				
			||||||
 | 
						UpdateStatus(*extensions.DaemonSet) (*extensions.DaemonSet, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*extensions.DaemonSet, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*extensions.DaemonSetList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						DaemonSetExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// daemonSets implements DaemonSetInterface
 | 
				
			||||||
 | 
					type daemonSets struct {
 | 
				
			||||||
 | 
						client *ExtensionsClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newDaemonSets returns a DaemonSets
 | 
				
			||||||
 | 
					func newDaemonSets(c *ExtensionsClient, namespace string) *daemonSets {
 | 
				
			||||||
 | 
						return &daemonSets{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a daemonSet and creates it.  Returns the server's representation of the daemonSet, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *daemonSets) Create(daemonSet *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
 | 
				
			||||||
 | 
						result = &extensions.DaemonSet{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("daemonsets").
 | 
				
			||||||
 | 
							Body(daemonSet).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a daemonSet and updates it. Returns the server's representation of the daemonSet, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *daemonSets) Update(daemonSet *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
 | 
				
			||||||
 | 
						result = &extensions.DaemonSet{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("daemonsets").
 | 
				
			||||||
 | 
							Name(daemonSet.Name).
 | 
				
			||||||
 | 
							Body(daemonSet).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *daemonSets) UpdateStatus(daemonSet *extensions.DaemonSet) (result *extensions.DaemonSet, err error) {
 | 
				
			||||||
 | 
						result = &extensions.DaemonSet{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("daemonsets").
 | 
				
			||||||
 | 
							Name(daemonSet.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(daemonSet).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the daemonSet and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *daemonSets) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("daemonsets").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *daemonSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("daemonsets").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the daemonSet, and returns the corresponding daemonSet object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *daemonSets) Get(name string) (result *extensions.DaemonSet, err error) {
 | 
				
			||||||
 | 
						result = &extensions.DaemonSet{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("daemonsets").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of DaemonSets that match those selectors.
 | 
				
			||||||
 | 
					func (c *daemonSets) List(opts api.ListOptions) (result *extensions.DaemonSetList, err error) {
 | 
				
			||||||
 | 
						result = &extensions.DaemonSetList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("daemonsets").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested daemonSets.
 | 
				
			||||||
 | 
					func (c *daemonSets) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("daemonsets").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,152 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeploymentsGetter has a method to return a DeploymentInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type DeploymentsGetter interface {
 | 
				
			||||||
 | 
						Deployments(namespace string) DeploymentInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeploymentInterface has methods to work with Deployment resources.
 | 
				
			||||||
 | 
					type DeploymentInterface interface {
 | 
				
			||||||
 | 
						Create(*extensions.Deployment) (*extensions.Deployment, error)
 | 
				
			||||||
 | 
						Update(*extensions.Deployment) (*extensions.Deployment, error)
 | 
				
			||||||
 | 
						UpdateStatus(*extensions.Deployment) (*extensions.Deployment, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*extensions.Deployment, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*extensions.DeploymentList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						DeploymentExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// deployments implements DeploymentInterface
 | 
				
			||||||
 | 
					type deployments struct {
 | 
				
			||||||
 | 
						client *ExtensionsClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newDeployments returns a Deployments
 | 
				
			||||||
 | 
					func newDeployments(c *ExtensionsClient, namespace string) *deployments {
 | 
				
			||||||
 | 
						return &deployments{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a deployment and creates it.  Returns the server's representation of the deployment, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *deployments) Create(deployment *extensions.Deployment) (result *extensions.Deployment, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Deployment{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("deployments").
 | 
				
			||||||
 | 
							Body(deployment).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a deployment and updates it. Returns the server's representation of the deployment, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *deployments) Update(deployment *extensions.Deployment) (result *extensions.Deployment, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Deployment{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("deployments").
 | 
				
			||||||
 | 
							Name(deployment.Name).
 | 
				
			||||||
 | 
							Body(deployment).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *deployments) UpdateStatus(deployment *extensions.Deployment) (result *extensions.Deployment, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Deployment{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("deployments").
 | 
				
			||||||
 | 
							Name(deployment.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(deployment).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the deployment and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *deployments) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("deployments").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *deployments) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("deployments").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the deployment, and returns the corresponding deployment object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *deployments) Get(name string) (result *extensions.Deployment, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Deployment{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("deployments").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Deployments that match those selectors.
 | 
				
			||||||
 | 
					func (c *deployments) List(opts api.ListOptions) (result *extensions.DeploymentList, err error) {
 | 
				
			||||||
 | 
						result = &extensions.DeploymentList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("deployments").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested deployments.
 | 
				
			||||||
 | 
					func (c *deployments) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("deployments").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// The DeploymentExpansion interface allows manually adding extra methods to the DeploymentInterface.
 | 
				
			||||||
 | 
					type DeploymentExpansion interface {
 | 
				
			||||||
 | 
						Rollback(*extensions.DeploymentRollback) error
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Rollback applied the provided DeploymentRollback to the named deployment in the current namespace.
 | 
				
			||||||
 | 
					func (c *deployments) Rollback(deploymentRollback *extensions.DeploymentRollback) error {
 | 
				
			||||||
 | 
						return c.client.Post().Namespace(c.ns).Resource("deployments").Name(deploymentRollback.Name).SubResource("rollback").Body(deploymentRollback).Do().Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Package unversioned has the automatically generated clients for unversioned resources.
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
@@ -0,0 +1,127 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						registered "k8s.io/kubernetes/pkg/apimachinery/registered"
 | 
				
			||||||
 | 
						restclient "k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ExtensionsInterface interface {
 | 
				
			||||||
 | 
						DaemonSetsGetter
 | 
				
			||||||
 | 
						DeploymentsGetter
 | 
				
			||||||
 | 
						HorizontalPodAutoscalersGetter
 | 
				
			||||||
 | 
						IngressesGetter
 | 
				
			||||||
 | 
						JobsGetter
 | 
				
			||||||
 | 
						ReplicaSetsGetter
 | 
				
			||||||
 | 
						ScalesGetter
 | 
				
			||||||
 | 
						ThirdPartyResourcesGetter
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ExtensionsClient is used to interact with features provided by the Extensions group.
 | 
				
			||||||
 | 
					type ExtensionsClient struct {
 | 
				
			||||||
 | 
						*restclient.RESTClient
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *ExtensionsClient) DaemonSets(namespace string) DaemonSetInterface {
 | 
				
			||||||
 | 
						return newDaemonSets(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *ExtensionsClient) Deployments(namespace string) DeploymentInterface {
 | 
				
			||||||
 | 
						return newDeployments(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *ExtensionsClient) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface {
 | 
				
			||||||
 | 
						return newHorizontalPodAutoscalers(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *ExtensionsClient) Ingresses(namespace string) IngressInterface {
 | 
				
			||||||
 | 
						return newIngresses(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *ExtensionsClient) Jobs(namespace string) JobInterface {
 | 
				
			||||||
 | 
						return newJobs(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface {
 | 
				
			||||||
 | 
						return newReplicaSets(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *ExtensionsClient) Scales(namespace string) ScaleInterface {
 | 
				
			||||||
 | 
						return newScales(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *ExtensionsClient) ThirdPartyResources(namespace string) ThirdPartyResourceInterface {
 | 
				
			||||||
 | 
						return newThirdPartyResources(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewForConfig creates a new ExtensionsClient for the given config.
 | 
				
			||||||
 | 
					func NewForConfig(c *restclient.Config) (*ExtensionsClient, error) {
 | 
				
			||||||
 | 
						config := *c
 | 
				
			||||||
 | 
						if err := setConfigDefaults(&config); err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						client, err := restclient.RESTClientFor(&config)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return &ExtensionsClient{client}, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewForConfigOrDie creates a new ExtensionsClient for the given config and
 | 
				
			||||||
 | 
					// panics if there is an error in the config.
 | 
				
			||||||
 | 
					func NewForConfigOrDie(c *restclient.Config) *ExtensionsClient {
 | 
				
			||||||
 | 
						client, err := NewForConfig(c)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							panic(err)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return client
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// New creates a new ExtensionsClient for the given RESTClient.
 | 
				
			||||||
 | 
					func New(c *restclient.RESTClient) *ExtensionsClient {
 | 
				
			||||||
 | 
						return &ExtensionsClient{c}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func setConfigDefaults(config *restclient.Config) error {
 | 
				
			||||||
 | 
						// if extensions group is not registered, return an error
 | 
				
			||||||
 | 
						g, err := registered.Group("extensions")
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						config.APIPath = "/apis"
 | 
				
			||||||
 | 
						if config.UserAgent == "" {
 | 
				
			||||||
 | 
							config.UserAgent = restclient.DefaultKubernetesUserAgent()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						// TODO: Unconditionally set the config.Version, until we fix the config.
 | 
				
			||||||
 | 
						//if config.Version == "" {
 | 
				
			||||||
 | 
						copyGroupVersion := g.GroupVersion
 | 
				
			||||||
 | 
						config.GroupVersion = ©GroupVersion
 | 
				
			||||||
 | 
						//}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
 | 
				
			||||||
 | 
						if config.QPS == 0 {
 | 
				
			||||||
 | 
							config.QPS = 5
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if config.Burst == 0 {
 | 
				
			||||||
 | 
							config.Burst = 10
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Package fake has the automatically generated clients.
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
@@ -0,0 +1,115 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeDaemonSets implements DaemonSetInterface
 | 
				
			||||||
 | 
					type FakeDaemonSets struct {
 | 
				
			||||||
 | 
						Fake *FakeExtensions
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.DaemonSet), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.DaemonSet), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeDaemonSets) UpdateStatus(daemonSet *extensions.DaemonSet) (*extensions.DaemonSet, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("daemonsets", "status", c.ns, daemonSet), &extensions.DaemonSet{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.DaemonSet), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeDaemonSets) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("daemonsets", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &extensions.DaemonSetList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeDaemonSets) Get(name string) (result *extensions.DaemonSet, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("daemonsets", c.ns, name), &extensions.DaemonSet{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.DaemonSet), 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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &extensions.DaemonSetList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*extensions.DaemonSetList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,115 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeDeployments implements DeploymentInterface
 | 
				
			||||||
 | 
					type FakeDeployments struct {
 | 
				
			||||||
 | 
						Fake *FakeExtensions
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Deployment), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Deployment), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeDeployments) UpdateStatus(deployment *extensions.Deployment) (*extensions.Deployment, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("deployments", "status", c.ns, deployment), &extensions.Deployment{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Deployment), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeDeployments) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("deployments", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &extensions.DeploymentList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeDeployments) Get(name string) (result *extensions.Deployment, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("deployments", c.ns, name), &extensions.Deployment{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Deployment), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &extensions.DeploymentList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*extensions.DeploymentList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,33 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2014 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeDeployments) Rollback(deploymentRollback *extensions.DeploymentRollback) error {
 | 
				
			||||||
 | 
						action := core.CreateActionImpl{}
 | 
				
			||||||
 | 
						action.Verb = "create"
 | 
				
			||||||
 | 
						action.Resource = "deployments"
 | 
				
			||||||
 | 
						action.Subresource = "rollback"
 | 
				
			||||||
 | 
						action.Object = deploymentRollback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, deploymentRollback)
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,60 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						unversioned "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/extensions/unversioned"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type FakeExtensions struct {
 | 
				
			||||||
 | 
						*core.Fake
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeExtensions) DaemonSets(namespace string) unversioned.DaemonSetInterface {
 | 
				
			||||||
 | 
						return &FakeDaemonSets{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeExtensions) Deployments(namespace string) unversioned.DeploymentInterface {
 | 
				
			||||||
 | 
						return &FakeDeployments{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeExtensions) HorizontalPodAutoscalers(namespace string) unversioned.HorizontalPodAutoscalerInterface {
 | 
				
			||||||
 | 
						return &FakeHorizontalPodAutoscalers{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeExtensions) Ingresses(namespace string) unversioned.IngressInterface {
 | 
				
			||||||
 | 
						return &FakeIngresses{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeExtensions) Jobs(namespace string) unversioned.JobInterface {
 | 
				
			||||||
 | 
						return &FakeJobs{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeExtensions) ReplicaSets(namespace string) unversioned.ReplicaSetInterface {
 | 
				
			||||||
 | 
						return &FakeReplicaSets{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeExtensions) Scales(namespace string) unversioned.ScaleInterface {
 | 
				
			||||||
 | 
						return &FakeScales{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeExtensions) ThirdPartyResources(namespace string) unversioned.ThirdPartyResourceInterface {
 | 
				
			||||||
 | 
						return &FakeThirdPartyResources{c, namespace}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,115 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
 | 
				
			||||||
 | 
					type FakeHorizontalPodAutoscalers struct {
 | 
				
			||||||
 | 
						Fake *FakeExtensions
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.HorizontalPodAutoscaler), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.HorizontalPodAutoscaler), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeHorizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("horizontalpodautoscalers", "status", c.ns, horizontalPodAutoscaler), &extensions.HorizontalPodAutoscaler{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.HorizontalPodAutoscaler), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("horizontalpodautoscalers", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &extensions.HorizontalPodAutoscalerList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeHorizontalPodAutoscalers) Get(name string) (result *extensions.HorizontalPodAutoscaler, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("horizontalpodautoscalers", c.ns, name), &extensions.HorizontalPodAutoscaler{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.HorizontalPodAutoscaler), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &extensions.HorizontalPodAutoscalerList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*extensions.HorizontalPodAutoscalerList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,115 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeIngresses implements IngressInterface
 | 
				
			||||||
 | 
					type FakeIngresses struct {
 | 
				
			||||||
 | 
						Fake *FakeExtensions
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Ingress), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Ingress), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeIngresses) UpdateStatus(ingress *extensions.Ingress) (*extensions.Ingress, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("ingresses", "status", c.ns, ingress), &extensions.Ingress{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Ingress), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeIngresses) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("ingresses", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &extensions.IngressList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeIngresses) Get(name string) (result *extensions.Ingress, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("ingresses", c.ns, name), &extensions.Ingress{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Ingress), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &extensions.IngressList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*extensions.IngressList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,115 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeJobs implements JobInterface
 | 
				
			||||||
 | 
					type FakeJobs struct {
 | 
				
			||||||
 | 
						Fake *FakeExtensions
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Job), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Job), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeJobs) UpdateStatus(job *extensions.Job) (*extensions.Job, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("jobs", "status", c.ns, job), &extensions.Job{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Job), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeJobs) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("jobs", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &extensions.JobList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeJobs) Get(name string) (result *extensions.Job, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("jobs", c.ns, name), &extensions.Job{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.Job), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &extensions.JobList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*extensions.JobList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,115 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeReplicaSets implements ReplicaSetInterface
 | 
				
			||||||
 | 
					type FakeReplicaSets struct {
 | 
				
			||||||
 | 
						Fake *FakeExtensions
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.ReplicaSet), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.ReplicaSet), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeReplicaSets) UpdateStatus(replicaSet *extensions.ReplicaSet) (*extensions.ReplicaSet, error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewUpdateSubresourceAction("replicasets", "status", c.ns, replicaSet), &extensions.ReplicaSet{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.ReplicaSet), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeReplicaSets) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("replicasets", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &extensions.ReplicaSetList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeReplicaSets) Get(name string) (result *extensions.ReplicaSet, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("replicasets", c.ns, name), &extensions.ReplicaSet{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.ReplicaSet), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &extensions.ReplicaSetList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*extensions.ReplicaSetList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeScales implements ScaleInterface
 | 
				
			||||||
 | 
					type FakeScales struct {
 | 
				
			||||||
 | 
						Fake *FakeExtensions
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,46 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2015 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeScales) Get(kind string, name string) (result *extensions.Scale, err error) {
 | 
				
			||||||
 | 
						action := core.GetActionImpl{}
 | 
				
			||||||
 | 
						action.Verb = "get"
 | 
				
			||||||
 | 
						action.Namespace = c.ns
 | 
				
			||||||
 | 
						action.Resource = kind
 | 
				
			||||||
 | 
						action.Subresource = "scale"
 | 
				
			||||||
 | 
						action.Name = name
 | 
				
			||||||
 | 
						obj, err := c.Fake.Invokes(action, &extensions.Scale{})
 | 
				
			||||||
 | 
						result = obj.(*extensions.Scale)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeScales) Update(kind string, scale *extensions.Scale) (result *extensions.Scale, err error) {
 | 
				
			||||||
 | 
						action := core.UpdateActionImpl{}
 | 
				
			||||||
 | 
						action.Verb = "update"
 | 
				
			||||||
 | 
						action.Namespace = c.ns
 | 
				
			||||||
 | 
						action.Resource = kind
 | 
				
			||||||
 | 
						action.Subresource = "scale"
 | 
				
			||||||
 | 
						action.Object = scale
 | 
				
			||||||
 | 
						obj, err := c.Fake.Invokes(action, scale)
 | 
				
			||||||
 | 
						result = obj.(*extensions.Scale)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,105 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeThirdPartyResources implements ThirdPartyResourceInterface
 | 
				
			||||||
 | 
					type FakeThirdPartyResources struct {
 | 
				
			||||||
 | 
						Fake *FakeExtensions
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.ThirdPartyResource), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.ThirdPartyResource), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeThirdPartyResources) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("thirdpartyresources", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &extensions.ThirdPartyResourceList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeThirdPartyResources) Get(name string) (result *extensions.ThirdPartyResource, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("thirdpartyresources", c.ns, name), &extensions.ThirdPartyResource{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*extensions.ThirdPartyResource), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &extensions.ThirdPartyResourceList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*extensions.ThirdPartyResourceList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type DaemonSetExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type HorizontalPodAutoscalerExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type IngressExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type JobExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ThirdPartyResourceExpansion interface{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type ReplicaSetExpansion interface{}
 | 
				
			||||||
@@ -0,0 +1,152 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// HorizontalPodAutoscalersGetter has a method to return a HorizontalPodAutoscalerInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type HorizontalPodAutoscalersGetter interface {
 | 
				
			||||||
 | 
						HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// HorizontalPodAutoscalerInterface has methods to work with HorizontalPodAutoscaler resources.
 | 
				
			||||||
 | 
					type HorizontalPodAutoscalerInterface interface {
 | 
				
			||||||
 | 
						Create(*extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)
 | 
				
			||||||
 | 
						Update(*extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)
 | 
				
			||||||
 | 
						UpdateStatus(*extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*extensions.HorizontalPodAutoscaler, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*extensions.HorizontalPodAutoscalerList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						HorizontalPodAutoscalerExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// horizontalPodAutoscalers implements HorizontalPodAutoscalerInterface
 | 
				
			||||||
 | 
					type horizontalPodAutoscalers struct {
 | 
				
			||||||
 | 
						client *ExtensionsClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newHorizontalPodAutoscalers returns a HorizontalPodAutoscalers
 | 
				
			||||||
 | 
					func newHorizontalPodAutoscalers(c *ExtensionsClient, namespace string) *horizontalPodAutoscalers {
 | 
				
			||||||
 | 
						return &horizontalPodAutoscalers{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a horizontalPodAutoscaler and creates it.  Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *horizontalPodAutoscalers) Create(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (result *extensions.HorizontalPodAutoscaler, err error) {
 | 
				
			||||||
 | 
						result = &extensions.HorizontalPodAutoscaler{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("horizontalpodautoscalers").
 | 
				
			||||||
 | 
							Body(horizontalPodAutoscaler).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a horizontalPodAutoscaler and updates it. Returns the server's representation of the horizontalPodAutoscaler, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *horizontalPodAutoscalers) Update(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (result *extensions.HorizontalPodAutoscaler, err error) {
 | 
				
			||||||
 | 
						result = &extensions.HorizontalPodAutoscaler{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("horizontalpodautoscalers").
 | 
				
			||||||
 | 
							Name(horizontalPodAutoscaler.Name).
 | 
				
			||||||
 | 
							Body(horizontalPodAutoscaler).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *horizontalPodAutoscalers) UpdateStatus(horizontalPodAutoscaler *extensions.HorizontalPodAutoscaler) (result *extensions.HorizontalPodAutoscaler, err error) {
 | 
				
			||||||
 | 
						result = &extensions.HorizontalPodAutoscaler{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("horizontalpodautoscalers").
 | 
				
			||||||
 | 
							Name(horizontalPodAutoscaler.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(horizontalPodAutoscaler).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the horizontalPodAutoscaler and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *horizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("horizontalpodautoscalers").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *horizontalPodAutoscalers) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("horizontalpodautoscalers").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the horizontalPodAutoscaler, and returns the corresponding horizontalPodAutoscaler object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *horizontalPodAutoscalers) Get(name string) (result *extensions.HorizontalPodAutoscaler, err error) {
 | 
				
			||||||
 | 
						result = &extensions.HorizontalPodAutoscaler{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("horizontalpodautoscalers").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of HorizontalPodAutoscalers that match those selectors.
 | 
				
			||||||
 | 
					func (c *horizontalPodAutoscalers) List(opts api.ListOptions) (result *extensions.HorizontalPodAutoscalerList, err error) {
 | 
				
			||||||
 | 
						result = &extensions.HorizontalPodAutoscalerList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("horizontalpodautoscalers").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested horizontalPodAutoscalers.
 | 
				
			||||||
 | 
					func (c *horizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("horizontalpodautoscalers").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,152 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// IngressesGetter has a method to return a IngressInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type IngressesGetter interface {
 | 
				
			||||||
 | 
						Ingresses(namespace string) IngressInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// IngressInterface has methods to work with Ingress resources.
 | 
				
			||||||
 | 
					type IngressInterface interface {
 | 
				
			||||||
 | 
						Create(*extensions.Ingress) (*extensions.Ingress, error)
 | 
				
			||||||
 | 
						Update(*extensions.Ingress) (*extensions.Ingress, error)
 | 
				
			||||||
 | 
						UpdateStatus(*extensions.Ingress) (*extensions.Ingress, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*extensions.Ingress, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*extensions.IngressList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						IngressExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ingresses implements IngressInterface
 | 
				
			||||||
 | 
					type ingresses struct {
 | 
				
			||||||
 | 
						client *ExtensionsClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newIngresses returns a Ingresses
 | 
				
			||||||
 | 
					func newIngresses(c *ExtensionsClient, namespace string) *ingresses {
 | 
				
			||||||
 | 
						return &ingresses{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a ingress and creates it.  Returns the server's representation of the ingress, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *ingresses) Create(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Ingress{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("ingresses").
 | 
				
			||||||
 | 
							Body(ingress).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a ingress and updates it. Returns the server's representation of the ingress, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *ingresses) Update(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Ingress{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("ingresses").
 | 
				
			||||||
 | 
							Name(ingress.Name).
 | 
				
			||||||
 | 
							Body(ingress).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *ingresses) UpdateStatus(ingress *extensions.Ingress) (result *extensions.Ingress, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Ingress{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("ingresses").
 | 
				
			||||||
 | 
							Name(ingress.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(ingress).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the ingress and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *ingresses) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("ingresses").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *ingresses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("ingresses").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the ingress, and returns the corresponding ingress object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *ingresses) Get(name string) (result *extensions.Ingress, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Ingress{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("ingresses").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Ingresses that match those selectors.
 | 
				
			||||||
 | 
					func (c *ingresses) List(opts api.ListOptions) (result *extensions.IngressList, err error) {
 | 
				
			||||||
 | 
						result = &extensions.IngressList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("ingresses").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested ingresses.
 | 
				
			||||||
 | 
					func (c *ingresses) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("ingresses").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,152 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// JobsGetter has a method to return a JobInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type JobsGetter interface {
 | 
				
			||||||
 | 
						Jobs(namespace string) JobInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// JobInterface has methods to work with Job resources.
 | 
				
			||||||
 | 
					type JobInterface interface {
 | 
				
			||||||
 | 
						Create(*extensions.Job) (*extensions.Job, error)
 | 
				
			||||||
 | 
						Update(*extensions.Job) (*extensions.Job, error)
 | 
				
			||||||
 | 
						UpdateStatus(*extensions.Job) (*extensions.Job, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*extensions.Job, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*extensions.JobList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						JobExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// jobs implements JobInterface
 | 
				
			||||||
 | 
					type jobs struct {
 | 
				
			||||||
 | 
						client *ExtensionsClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newJobs returns a Jobs
 | 
				
			||||||
 | 
					func newJobs(c *ExtensionsClient, namespace string) *jobs {
 | 
				
			||||||
 | 
						return &jobs{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a job and creates it.  Returns the server's representation of the job, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *jobs) Create(job *extensions.Job) (result *extensions.Job, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Job{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("jobs").
 | 
				
			||||||
 | 
							Body(job).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a job and updates it. Returns the server's representation of the job, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *jobs) Update(job *extensions.Job) (result *extensions.Job, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Job{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("jobs").
 | 
				
			||||||
 | 
							Name(job.Name).
 | 
				
			||||||
 | 
							Body(job).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *jobs) UpdateStatus(job *extensions.Job) (result *extensions.Job, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Job{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("jobs").
 | 
				
			||||||
 | 
							Name(job.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(job).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the job and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *jobs) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("jobs").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *jobs) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("jobs").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the job, and returns the corresponding job object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *jobs) Get(name string) (result *extensions.Job, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Job{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("jobs").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Jobs that match those selectors.
 | 
				
			||||||
 | 
					func (c *jobs) List(opts api.ListOptions) (result *extensions.JobList, err error) {
 | 
				
			||||||
 | 
						result = &extensions.JobList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("jobs").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested jobs.
 | 
				
			||||||
 | 
					func (c *jobs) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("jobs").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,152 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ReplicaSetsGetter has a method to return a ReplicaSetInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ReplicaSetsGetter interface {
 | 
				
			||||||
 | 
						ReplicaSets(namespace string) ReplicaSetInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ReplicaSetInterface has methods to work with ReplicaSet resources.
 | 
				
			||||||
 | 
					type ReplicaSetInterface interface {
 | 
				
			||||||
 | 
						Create(*extensions.ReplicaSet) (*extensions.ReplicaSet, error)
 | 
				
			||||||
 | 
						Update(*extensions.ReplicaSet) (*extensions.ReplicaSet, error)
 | 
				
			||||||
 | 
						UpdateStatus(*extensions.ReplicaSet) (*extensions.ReplicaSet, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*extensions.ReplicaSet, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*extensions.ReplicaSetList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ReplicaSetExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// replicaSets implements ReplicaSetInterface
 | 
				
			||||||
 | 
					type replicaSets struct {
 | 
				
			||||||
 | 
						client *ExtensionsClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newReplicaSets returns a ReplicaSets
 | 
				
			||||||
 | 
					func newReplicaSets(c *ExtensionsClient, namespace string) *replicaSets {
 | 
				
			||||||
 | 
						return &replicaSets{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a replicaSet and creates it.  Returns the server's representation of the replicaSet, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *replicaSets) Create(replicaSet *extensions.ReplicaSet) (result *extensions.ReplicaSet, err error) {
 | 
				
			||||||
 | 
						result = &extensions.ReplicaSet{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicasets").
 | 
				
			||||||
 | 
							Body(replicaSet).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a replicaSet and updates it. Returns the server's representation of the replicaSet, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *replicaSets) Update(replicaSet *extensions.ReplicaSet) (result *extensions.ReplicaSet, err error) {
 | 
				
			||||||
 | 
						result = &extensions.ReplicaSet{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicasets").
 | 
				
			||||||
 | 
							Name(replicaSet.Name).
 | 
				
			||||||
 | 
							Body(replicaSet).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *replicaSets) UpdateStatus(replicaSet *extensions.ReplicaSet) (result *extensions.ReplicaSet, err error) {
 | 
				
			||||||
 | 
						result = &extensions.ReplicaSet{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicasets").
 | 
				
			||||||
 | 
							Name(replicaSet.Name).
 | 
				
			||||||
 | 
							SubResource("status").
 | 
				
			||||||
 | 
							Body(replicaSet).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the replicaSet and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *replicaSets) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicasets").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *replicaSets) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicasets").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the replicaSet, and returns the corresponding replicaSet object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *replicaSets) Get(name string) (result *extensions.ReplicaSet, err error) {
 | 
				
			||||||
 | 
						result = &extensions.ReplicaSet{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicasets").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of ReplicaSets that match those selectors.
 | 
				
			||||||
 | 
					func (c *replicaSets) List(opts api.ListOptions) (result *extensions.ReplicaSetList, err error) {
 | 
				
			||||||
 | 
						result = &extensions.ReplicaSetList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicasets").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested replicaSets.
 | 
				
			||||||
 | 
					func (c *replicaSets) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("replicasets").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,44 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ScalesGetter has a method to return a ScaleInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ScalesGetter interface {
 | 
				
			||||||
 | 
						Scales(namespace string) ScaleInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ScaleInterface has methods to work with Scale resources.
 | 
				
			||||||
 | 
					type ScaleInterface interface {
 | 
				
			||||||
 | 
						ScaleExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// scales implements ScaleInterface
 | 
				
			||||||
 | 
					type scales struct {
 | 
				
			||||||
 | 
						client *ExtensionsClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newScales returns a Scales
 | 
				
			||||||
 | 
					func newScales(c *ExtensionsClient, namespace string) *scales {
 | 
				
			||||||
 | 
						return &scales{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,65 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api/meta"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api/unversioned"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// The ScaleExpansion interface allows manually adding extra methods to the ScaleInterface.
 | 
				
			||||||
 | 
					type ScaleExpansion interface {
 | 
				
			||||||
 | 
						Get(kind string, name string) (*extensions.Scale, error)
 | 
				
			||||||
 | 
						Update(kind string, scale *extensions.Scale) (*extensions.Scale, error)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes the reference to scale subresource and returns the subresource or error, if one occurs.
 | 
				
			||||||
 | 
					func (c *scales) Get(kind string, name string) (result *extensions.Scale, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Scale{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// TODO this method needs to take a proper unambiguous kind
 | 
				
			||||||
 | 
						fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind}
 | 
				
			||||||
 | 
						resource, _ := meta.KindToResource(fullyQualifiedKind)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource(resource.Resource).
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							SubResource("scale").
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *scales) Update(kind string, scale *extensions.Scale) (result *extensions.Scale, err error) {
 | 
				
			||||||
 | 
						result = &extensions.Scale{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// TODO this method needs to take a proper unambiguous kind
 | 
				
			||||||
 | 
						fullyQualifiedKind := unversioned.GroupVersionKind{Kind: kind}
 | 
				
			||||||
 | 
						resource, _ := meta.KindToResource(fullyQualifiedKind)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(scale.Namespace).
 | 
				
			||||||
 | 
							Resource(resource.Resource).
 | 
				
			||||||
 | 
							Name(scale.Name).
 | 
				
			||||||
 | 
							SubResource("scale").
 | 
				
			||||||
 | 
							Body(scale).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,138 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with the default arguments.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package unversioned
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						extensions "k8s.io/kubernetes/pkg/apis/extensions"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ThirdPartyResourcesGetter has a method to return a ThirdPartyResourceInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ThirdPartyResourcesGetter interface {
 | 
				
			||||||
 | 
						ThirdPartyResources(namespace string) ThirdPartyResourceInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ThirdPartyResourceInterface has methods to work with ThirdPartyResource resources.
 | 
				
			||||||
 | 
					type ThirdPartyResourceInterface interface {
 | 
				
			||||||
 | 
						Create(*extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)
 | 
				
			||||||
 | 
						Update(*extensions.ThirdPartyResource) (*extensions.ThirdPartyResource, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*extensions.ThirdPartyResource, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*extensions.ThirdPartyResourceList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ThirdPartyResourceExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// thirdPartyResources implements ThirdPartyResourceInterface
 | 
				
			||||||
 | 
					type thirdPartyResources struct {
 | 
				
			||||||
 | 
						client *ExtensionsClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newThirdPartyResources returns a ThirdPartyResources
 | 
				
			||||||
 | 
					func newThirdPartyResources(c *ExtensionsClient, namespace string) *thirdPartyResources {
 | 
				
			||||||
 | 
						return &thirdPartyResources{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a thirdPartyResource and creates it.  Returns the server's representation of the thirdPartyResource, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *thirdPartyResources) Create(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
 | 
				
			||||||
 | 
						result = &extensions.ThirdPartyResource{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("thirdpartyresources").
 | 
				
			||||||
 | 
							Body(thirdPartyResource).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a thirdPartyResource and updates it. Returns the server's representation of the thirdPartyResource, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *thirdPartyResources) Update(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
 | 
				
			||||||
 | 
						result = &extensions.ThirdPartyResource{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("thirdpartyresources").
 | 
				
			||||||
 | 
							Name(thirdPartyResource.Name).
 | 
				
			||||||
 | 
							Body(thirdPartyResource).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the thirdPartyResource and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *thirdPartyResources) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("thirdpartyresources").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *thirdPartyResources) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("thirdpartyresources").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the thirdPartyResource, and returns the corresponding thirdPartyResource object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *thirdPartyResources) Get(name string) (result *extensions.ThirdPartyResource, err error) {
 | 
				
			||||||
 | 
						result = &extensions.ThirdPartyResource{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("thirdpartyresources").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of ThirdPartyResources that match those selectors.
 | 
				
			||||||
 | 
					func (c *thirdPartyResources) List(opts api.ListOptions) (result *extensions.ThirdPartyResourceList, err error) {
 | 
				
			||||||
 | 
						result = &extensions.ThirdPartyResourceList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("thirdpartyresources").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested thirdPartyResources.
 | 
				
			||||||
 | 
					func (c *thirdPartyResources) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("thirdpartyresources").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
 | 
				
			|||||||
limitations under the License.
 | 
					limitations under the License.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --clientset-only=true --input=[api/v1,extensions/v1beta1]
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package release_1_2
 | 
					package release_1_2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"github.com/golang/glog"
 | 
						"github.com/golang/glog"
 | 
				
			||||||
 | 
						v1core "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2/typed/core/v1"
 | 
				
			||||||
 | 
						v1beta1extensions "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1"
 | 
				
			||||||
	restclient "k8s.io/kubernetes/pkg/client/restclient"
 | 
						restclient "k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
	discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
						discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
				
			||||||
	v1core "k8s.io/kubernetes/pkg/client/typed/generated/core/v1"
 | 
					 | 
				
			||||||
	v1beta1extensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/v1beta1"
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type Interface interface {
 | 
					type Interface interface {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 | 
				
			|||||||
limitations under the License.
 | 
					limitations under the License.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --clientset-only=true --input=[api/v1,extensions/v1beta1]
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package fake
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -22,13 +22,13 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/api"
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/apimachinery/registered"
 | 
						"k8s.io/kubernetes/pkg/apimachinery/registered"
 | 
				
			||||||
	clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2"
 | 
						clientset "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2"
 | 
				
			||||||
 | 
						v1core "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2/typed/core/v1"
 | 
				
			||||||
 | 
						fakev1core "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2/typed/core/v1/fake"
 | 
				
			||||||
 | 
						v1beta1extensions "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1"
 | 
				
			||||||
 | 
						fakev1beta1extensions "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_2/typed/extensions/v1beta1/fake"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/testing/core"
 | 
						"k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
						"k8s.io/kubernetes/pkg/client/typed/discovery"
 | 
				
			||||||
	fakediscovery "k8s.io/kubernetes/pkg/client/typed/discovery/fake"
 | 
						fakediscovery "k8s.io/kubernetes/pkg/client/typed/discovery/fake"
 | 
				
			||||||
	v1core "k8s.io/kubernetes/pkg/client/typed/generated/core/v1"
 | 
					 | 
				
			||||||
	fakev1core "k8s.io/kubernetes/pkg/client/typed/generated/core/v1/fake"
 | 
					 | 
				
			||||||
	v1beta1extensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/v1beta1"
 | 
					 | 
				
			||||||
	fakev1beta1extensions "k8s.io/kubernetes/pkg/client/typed/generated/extensions/v1beta1/fake"
 | 
					 | 
				
			||||||
	"k8s.io/kubernetes/pkg/runtime"
 | 
						"k8s.io/kubernetes/pkg/runtime"
 | 
				
			||||||
	"k8s.io/kubernetes/pkg/watch"
 | 
						"k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,129 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						v1 "k8s.io/kubernetes/pkg/api/v1"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ComponentStatusesGetter has a method to return a ComponentStatusInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ComponentStatusesGetter interface {
 | 
				
			||||||
 | 
						ComponentStatuses() ComponentStatusInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ComponentStatusInterface has methods to work with ComponentStatus resources.
 | 
				
			||||||
 | 
					type ComponentStatusInterface interface {
 | 
				
			||||||
 | 
						Create(*v1.ComponentStatus) (*v1.ComponentStatus, error)
 | 
				
			||||||
 | 
						Update(*v1.ComponentStatus) (*v1.ComponentStatus, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*v1.ComponentStatus, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*v1.ComponentStatusList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ComponentStatusExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// componentStatuses implements ComponentStatusInterface
 | 
				
			||||||
 | 
					type componentStatuses struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newComponentStatuses returns a ComponentStatuses
 | 
				
			||||||
 | 
					func newComponentStatuses(c *CoreClient) *componentStatuses {
 | 
				
			||||||
 | 
						return &componentStatuses{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a componentStatus and creates it.  Returns the server's representation of the componentStatus, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						result = &v1.ComponentStatus{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							Body(componentStatus).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a componentStatus and updates it. Returns the server's representation of the componentStatus, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						result = &v1.ComponentStatus{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							Name(componentStatus.Name).
 | 
				
			||||||
 | 
							Body(componentStatus).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the componentStatus and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *componentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the componentStatus, and returns the corresponding componentStatus object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Get(name string) (result *v1.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						result = &v1.ComponentStatus{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of ComponentStatuses that match those selectors.
 | 
				
			||||||
 | 
					func (c *componentStatuses) List(opts api.ListOptions) (result *v1.ComponentStatusList, err error) {
 | 
				
			||||||
 | 
						result = &v1.ComponentStatusList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested componentStatuses.
 | 
				
			||||||
 | 
					func (c *componentStatuses) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Resource("componentstatuses").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,138 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						v1 "k8s.io/kubernetes/pkg/api/v1"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ConfigMapsGetter has a method to return a ConfigMapInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type ConfigMapsGetter interface {
 | 
				
			||||||
 | 
						ConfigMaps(namespace string) ConfigMapInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ConfigMapInterface has methods to work with ConfigMap resources.
 | 
				
			||||||
 | 
					type ConfigMapInterface interface {
 | 
				
			||||||
 | 
						Create(*v1.ConfigMap) (*v1.ConfigMap, error)
 | 
				
			||||||
 | 
						Update(*v1.ConfigMap) (*v1.ConfigMap, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*v1.ConfigMap, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*v1.ConfigMapList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						ConfigMapExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// configMaps implements ConfigMapInterface
 | 
				
			||||||
 | 
					type configMaps struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newConfigMaps returns a ConfigMaps
 | 
				
			||||||
 | 
					func newConfigMaps(c *CoreClient, namespace string) *configMaps {
 | 
				
			||||||
 | 
						return &configMaps{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a configMap and creates it.  Returns the server's representation of the configMap, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *configMaps) Create(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
 | 
				
			||||||
 | 
						result = &v1.ConfigMap{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							Body(configMap).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a configMap and updates it. Returns the server's representation of the configMap, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *configMaps) Update(configMap *v1.ConfigMap) (result *v1.ConfigMap, err error) {
 | 
				
			||||||
 | 
						result = &v1.ConfigMap{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							Name(configMap.Name).
 | 
				
			||||||
 | 
							Body(configMap).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the configMap and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *configMaps) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *configMaps) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the configMap, and returns the corresponding configMap object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *configMaps) Get(name string) (result *v1.ConfigMap, err error) {
 | 
				
			||||||
 | 
						result = &v1.ConfigMap{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of ConfigMaps that match those selectors.
 | 
				
			||||||
 | 
					func (c *configMaps) List(opts api.ListOptions) (result *v1.ConfigMapList, err error) {
 | 
				
			||||||
 | 
						result = &v1.ConfigMapList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested configMaps.
 | 
				
			||||||
 | 
					func (c *configMaps) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("configmaps").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,162 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						registered "k8s.io/kubernetes/pkg/apimachinery/registered"
 | 
				
			||||||
 | 
						restclient "k8s.io/kubernetes/pkg/client/restclient"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type CoreInterface interface {
 | 
				
			||||||
 | 
						ComponentStatusesGetter
 | 
				
			||||||
 | 
						ConfigMapsGetter
 | 
				
			||||||
 | 
						EndpointsGetter
 | 
				
			||||||
 | 
						EventsGetter
 | 
				
			||||||
 | 
						LimitRangesGetter
 | 
				
			||||||
 | 
						NamespacesGetter
 | 
				
			||||||
 | 
						NodesGetter
 | 
				
			||||||
 | 
						PersistentVolumesGetter
 | 
				
			||||||
 | 
						PodsGetter
 | 
				
			||||||
 | 
						PodTemplatesGetter
 | 
				
			||||||
 | 
						ReplicationControllersGetter
 | 
				
			||||||
 | 
						ResourceQuotasGetter
 | 
				
			||||||
 | 
						SecretsGetter
 | 
				
			||||||
 | 
						ServicesGetter
 | 
				
			||||||
 | 
						ServiceAccountsGetter
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CoreClient is used to interact with features provided by the Core group.
 | 
				
			||||||
 | 
					type CoreClient struct {
 | 
				
			||||||
 | 
						*restclient.RESTClient
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ComponentStatuses() ComponentStatusInterface {
 | 
				
			||||||
 | 
						return newComponentStatuses(c)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ConfigMaps(namespace string) ConfigMapInterface {
 | 
				
			||||||
 | 
						return newConfigMaps(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Endpoints(namespace string) EndpointsInterface {
 | 
				
			||||||
 | 
						return newEndpoints(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Events(namespace string) EventInterface {
 | 
				
			||||||
 | 
						return newEvents(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) LimitRanges(namespace string) LimitRangeInterface {
 | 
				
			||||||
 | 
						return newLimitRanges(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Namespaces() NamespaceInterface {
 | 
				
			||||||
 | 
						return newNamespaces(c)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Nodes() NodeInterface {
 | 
				
			||||||
 | 
						return newNodes(c)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) PersistentVolumes() PersistentVolumeInterface {
 | 
				
			||||||
 | 
						return newPersistentVolumes(c)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Pods(namespace string) PodInterface {
 | 
				
			||||||
 | 
						return newPods(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) PodTemplates(namespace string) PodTemplateInterface {
 | 
				
			||||||
 | 
						return newPodTemplates(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ReplicationControllers(namespace string) ReplicationControllerInterface {
 | 
				
			||||||
 | 
						return newReplicationControllers(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ResourceQuotas(namespace string) ResourceQuotaInterface {
 | 
				
			||||||
 | 
						return newResourceQuotas(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Secrets(namespace string) SecretInterface {
 | 
				
			||||||
 | 
						return newSecrets(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) Services(namespace string) ServiceInterface {
 | 
				
			||||||
 | 
						return newServices(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *CoreClient) ServiceAccounts(namespace string) ServiceAccountInterface {
 | 
				
			||||||
 | 
						return newServiceAccounts(c, namespace)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewForConfig creates a new CoreClient for the given config.
 | 
				
			||||||
 | 
					func NewForConfig(c *restclient.Config) (*CoreClient, error) {
 | 
				
			||||||
 | 
						config := *c
 | 
				
			||||||
 | 
						if err := setConfigDefaults(&config); err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						client, err := restclient.RESTClientFor(&config)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return &CoreClient{client}, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewForConfigOrDie creates a new CoreClient for the given config and
 | 
				
			||||||
 | 
					// panics if there is an error in the config.
 | 
				
			||||||
 | 
					func NewForConfigOrDie(c *restclient.Config) *CoreClient {
 | 
				
			||||||
 | 
						client, err := NewForConfig(c)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							panic(err)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return client
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// New creates a new CoreClient for the given RESTClient.
 | 
				
			||||||
 | 
					func New(c *restclient.RESTClient) *CoreClient {
 | 
				
			||||||
 | 
						return &CoreClient{c}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func setConfigDefaults(config *restclient.Config) error {
 | 
				
			||||||
 | 
						// if core group is not registered, return an error
 | 
				
			||||||
 | 
						g, err := registered.Group("")
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						config.APIPath = "/api"
 | 
				
			||||||
 | 
						if config.UserAgent == "" {
 | 
				
			||||||
 | 
							config.UserAgent = restclient.DefaultKubernetesUserAgent()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						// TODO: Unconditionally set the config.Version, until we fix the config.
 | 
				
			||||||
 | 
						//if config.Version == "" {
 | 
				
			||||||
 | 
						copyGroupVersion := g.GroupVersion
 | 
				
			||||||
 | 
						config.GroupVersion = ©GroupVersion
 | 
				
			||||||
 | 
						//}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						config.Codec = api.Codecs.LegacyCodec(*config.GroupVersion)
 | 
				
			||||||
 | 
						if config.QPS == 0 {
 | 
				
			||||||
 | 
							config.QPS = 5
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if config.Burst == 0 {
 | 
				
			||||||
 | 
							config.Burst = 10
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Package unversioned has the automatically generated clients for unversioned resources.
 | 
				
			||||||
 | 
					package v1
 | 
				
			||||||
@@ -0,0 +1,138 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						v1 "k8s.io/kubernetes/pkg/api/v1"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// EndpointsGetter has a method to return a EndpointsInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type EndpointsGetter interface {
 | 
				
			||||||
 | 
						Endpoints(namespace string) EndpointsInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// EndpointsInterface has methods to work with Endpoints resources.
 | 
				
			||||||
 | 
					type EndpointsInterface interface {
 | 
				
			||||||
 | 
						Create(*v1.Endpoints) (*v1.Endpoints, error)
 | 
				
			||||||
 | 
						Update(*v1.Endpoints) (*v1.Endpoints, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*v1.Endpoints, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*v1.EndpointsList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						EndpointsExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// endpoints implements EndpointsInterface
 | 
				
			||||||
 | 
					type endpoints struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newEndpoints returns a Endpoints
 | 
				
			||||||
 | 
					func newEndpoints(c *CoreClient, namespace string) *endpoints {
 | 
				
			||||||
 | 
						return &endpoints{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a endpoints and creates it.  Returns the server's representation of the endpoints, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *endpoints) Create(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
 | 
				
			||||||
 | 
						result = &v1.Endpoints{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							Body(endpoints).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a endpoints and updates it. Returns the server's representation of the endpoints, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *endpoints) Update(endpoints *v1.Endpoints) (result *v1.Endpoints, err error) {
 | 
				
			||||||
 | 
						result = &v1.Endpoints{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							Name(endpoints.Name).
 | 
				
			||||||
 | 
							Body(endpoints).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the endpoints and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *endpoints) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *endpoints) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the endpoints, and returns the corresponding endpoints object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *endpoints) Get(name string) (result *v1.Endpoints, err error) {
 | 
				
			||||||
 | 
						result = &v1.Endpoints{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Endpoints that match those selectors.
 | 
				
			||||||
 | 
					func (c *endpoints) List(opts api.ListOptions) (result *v1.EndpointsList, err error) {
 | 
				
			||||||
 | 
						result = &v1.EndpointsList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested endpoints.
 | 
				
			||||||
 | 
					func (c *endpoints) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("endpoints").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,138 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						v1 "k8s.io/kubernetes/pkg/api/v1"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// EventsGetter has a method to return a EventInterface.
 | 
				
			||||||
 | 
					// A group's client should implement this interface.
 | 
				
			||||||
 | 
					type EventsGetter interface {
 | 
				
			||||||
 | 
						Events(namespace string) EventInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// EventInterface has methods to work with Event resources.
 | 
				
			||||||
 | 
					type EventInterface interface {
 | 
				
			||||||
 | 
						Create(*v1.Event) (*v1.Event, error)
 | 
				
			||||||
 | 
						Update(*v1.Event) (*v1.Event, error)
 | 
				
			||||||
 | 
						Delete(name string, options *api.DeleteOptions) error
 | 
				
			||||||
 | 
						DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
 | 
				
			||||||
 | 
						Get(name string) (*v1.Event, error)
 | 
				
			||||||
 | 
						List(opts api.ListOptions) (*v1.EventList, error)
 | 
				
			||||||
 | 
						Watch(opts api.ListOptions) (watch.Interface, error)
 | 
				
			||||||
 | 
						EventExpansion
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// events implements EventInterface
 | 
				
			||||||
 | 
					type events struct {
 | 
				
			||||||
 | 
						client *CoreClient
 | 
				
			||||||
 | 
						ns     string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// newEvents returns a Events
 | 
				
			||||||
 | 
					func newEvents(c *CoreClient, namespace string) *events {
 | 
				
			||||||
 | 
						return &events{
 | 
				
			||||||
 | 
							client: c,
 | 
				
			||||||
 | 
							ns:     namespace,
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Create takes the representation of a event and creates it.  Returns the server's representation of the event, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *events) Create(event *v1.Event) (result *v1.Event, err error) {
 | 
				
			||||||
 | 
						result = &v1.Event{}
 | 
				
			||||||
 | 
						err = c.client.Post().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Body(event).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Update takes the representation of a event and updates it. Returns the server's representation of the event, and an error, if there is any.
 | 
				
			||||||
 | 
					func (c *events) Update(event *v1.Event) (result *v1.Event, err error) {
 | 
				
			||||||
 | 
						result = &v1.Event{}
 | 
				
			||||||
 | 
						err = c.client.Put().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(event.Name).
 | 
				
			||||||
 | 
							Body(event).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Delete takes name of the event and deletes it. Returns an error if one occurs.
 | 
				
			||||||
 | 
					func (c *events) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DeleteCollection deletes a collection of objects.
 | 
				
			||||||
 | 
					func (c *events) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						return c.client.Delete().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							VersionedParams(&listOptions, api.ParameterCodec).
 | 
				
			||||||
 | 
							Body(options).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Error()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Get takes name of the event, and returns the corresponding event object, and an error if there is any.
 | 
				
			||||||
 | 
					func (c *events) Get(name string) (result *v1.Event, err error) {
 | 
				
			||||||
 | 
						result = &v1.Event{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(name).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// List takes label and field selectors, and returns the list of Events that match those selectors.
 | 
				
			||||||
 | 
					func (c *events) List(opts api.ListOptions) (result *v1.EventList, err error) {
 | 
				
			||||||
 | 
						result = &v1.EventList{}
 | 
				
			||||||
 | 
						err = c.client.Get().
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Watch returns a watch.Interface that watches the requested events.
 | 
				
			||||||
 | 
					func (c *events) Watch(opts api.ListOptions) (watch.Interface, error) {
 | 
				
			||||||
 | 
						return c.client.Get().
 | 
				
			||||||
 | 
							Prefix("watch").
 | 
				
			||||||
 | 
							Namespace(c.ns).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							VersionedParams(&opts, api.ParameterCodec).
 | 
				
			||||||
 | 
							Watch()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,158 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"fmt"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/api/v1"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/fields"
 | 
				
			||||||
 | 
						"k8s.io/kubernetes/pkg/runtime"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// The EventExpansion interface allows manually adding extra methods to the EventInterface.
 | 
				
			||||||
 | 
					type EventExpansion interface {
 | 
				
			||||||
 | 
						// CreateWithEventNamespace is the same as a Create, except that it sends the request to the event.Namespace.
 | 
				
			||||||
 | 
						CreateWithEventNamespace(event *v1.Event) (*v1.Event, error)
 | 
				
			||||||
 | 
						// UpdateWithEventNamespace is the same as a Update, except that it sends the request to the event.Namespace.
 | 
				
			||||||
 | 
						UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error)
 | 
				
			||||||
 | 
						Patch(event *v1.Event, data []byte) (*v1.Event, error)
 | 
				
			||||||
 | 
						// Search finds events about the specified object
 | 
				
			||||||
 | 
						Search(objOrRef runtime.Object) (*v1.EventList, error)
 | 
				
			||||||
 | 
						// Returns the appropriate field selector based on the API version being used to communicate with the server.
 | 
				
			||||||
 | 
						// The returned field selector can be used with List and Watch to filter desired events.
 | 
				
			||||||
 | 
						GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CreateWithEventNamespace makes a new event. Returns the copy of the event the server returns,
 | 
				
			||||||
 | 
					// or an error. The namespace to create the event within is deduced from the
 | 
				
			||||||
 | 
					// event; it must either match this event client's namespace, or this event
 | 
				
			||||||
 | 
					// client must have been created with the "" namespace.
 | 
				
			||||||
 | 
					func (e *events) CreateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
 | 
				
			||||||
 | 
						if e.ns != "" && event.Namespace != e.ns {
 | 
				
			||||||
 | 
							return nil, fmt.Errorf("can't create an event with namespace '%v' in namespace '%v'", event.Namespace, e.ns)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						result := &v1.Event{}
 | 
				
			||||||
 | 
						err := e.client.Post().
 | 
				
			||||||
 | 
							NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Body(event).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return result, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// UpdateWithEventNamespace modifies an existing event. It returns the copy of the event that the server returns,
 | 
				
			||||||
 | 
					// or an error. The namespace and key to update the event within is deduced from the event. The
 | 
				
			||||||
 | 
					// namespace must either match this event client's namespace, or this event client must have been
 | 
				
			||||||
 | 
					// created with the "" namespace. Update also requires the ResourceVersion to be set in the event
 | 
				
			||||||
 | 
					// object.
 | 
				
			||||||
 | 
					func (e *events) UpdateWithEventNamespace(event *v1.Event) (*v1.Event, error) {
 | 
				
			||||||
 | 
						result := &v1.Event{}
 | 
				
			||||||
 | 
						err := e.client.Put().
 | 
				
			||||||
 | 
							NamespaceIfScoped(event.Namespace, len(event.Namespace) > 0).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(event.Name).
 | 
				
			||||||
 | 
							Body(event).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return result, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Patch modifies an existing event. It returns the copy of the event that the server returns, or an
 | 
				
			||||||
 | 
					// error. The namespace and name of the target event is deduced from the incompleteEvent. The
 | 
				
			||||||
 | 
					// namespace must either match this event client's namespace, or this event client must have been
 | 
				
			||||||
 | 
					// created with the "" namespace.
 | 
				
			||||||
 | 
					func (e *events) Patch(incompleteEvent *v1.Event, data []byte) (*v1.Event, error) {
 | 
				
			||||||
 | 
						result := &v1.Event{}
 | 
				
			||||||
 | 
						err := e.client.Patch(api.StrategicMergePatchType).
 | 
				
			||||||
 | 
							NamespaceIfScoped(incompleteEvent.Namespace, len(incompleteEvent.Namespace) > 0).
 | 
				
			||||||
 | 
							Resource("events").
 | 
				
			||||||
 | 
							Name(incompleteEvent.Name).
 | 
				
			||||||
 | 
							Body(data).
 | 
				
			||||||
 | 
							Do().
 | 
				
			||||||
 | 
							Into(result)
 | 
				
			||||||
 | 
						return result, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Search finds events about the specified object. The namespace of the
 | 
				
			||||||
 | 
					// object must match this event's client namespace unless the event client
 | 
				
			||||||
 | 
					// was made with the "" namespace.
 | 
				
			||||||
 | 
					func (e *events) Search(objOrRef runtime.Object) (*v1.EventList, error) {
 | 
				
			||||||
 | 
						ref, err := api.GetReference(objOrRef)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if e.ns != "" && ref.Namespace != e.ns {
 | 
				
			||||||
 | 
							return nil, fmt.Errorf("won't be able to find any events of namespace '%v' in namespace '%v'", ref.Namespace, e.ns)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						stringRefKind := string(ref.Kind)
 | 
				
			||||||
 | 
						var refKind *string
 | 
				
			||||||
 | 
						if stringRefKind != "" {
 | 
				
			||||||
 | 
							refKind = &stringRefKind
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						stringRefUID := string(ref.UID)
 | 
				
			||||||
 | 
						var refUID *string
 | 
				
			||||||
 | 
						if stringRefUID != "" {
 | 
				
			||||||
 | 
							refUID = &stringRefUID
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						fieldSelector := e.GetFieldSelector(&ref.Name, &ref.Namespace, refKind, refUID)
 | 
				
			||||||
 | 
						return e.List(api.ListOptions{FieldSelector: fieldSelector})
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Returns the appropriate field selector based on the API version being used to communicate with the server.
 | 
				
			||||||
 | 
					// The returned field selector can be used with List and Watch to filter desired events.
 | 
				
			||||||
 | 
					func (e *events) GetFieldSelector(involvedObjectName, involvedObjectNamespace, involvedObjectKind, involvedObjectUID *string) fields.Selector {
 | 
				
			||||||
 | 
						apiVersion := e.client.APIVersion().String()
 | 
				
			||||||
 | 
						field := fields.Set{}
 | 
				
			||||||
 | 
						if involvedObjectName != nil {
 | 
				
			||||||
 | 
							field[GetInvolvedObjectNameFieldLabel(apiVersion)] = *involvedObjectName
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if involvedObjectNamespace != nil {
 | 
				
			||||||
 | 
							field["involvedObject.namespace"] = *involvedObjectNamespace
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if involvedObjectKind != nil {
 | 
				
			||||||
 | 
							field["involvedObject.kind"] = *involvedObjectKind
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if involvedObjectUID != nil {
 | 
				
			||||||
 | 
							field["involvedObject.uid"] = *involvedObjectUID
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return field.AsSelector()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Returns the appropriate field label to use for name of the involved object as per the given API version.
 | 
				
			||||||
 | 
					func GetInvolvedObjectNameFieldLabel(version string) string {
 | 
				
			||||||
 | 
						return "involvedObject.name"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// TODO: This is a temporary arrangement and will be removed once all clients are moved to use the clientset.
 | 
				
			||||||
 | 
					type EventSinkImpl struct {
 | 
				
			||||||
 | 
						Interface EventInterface
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (e *EventSinkImpl) Create(event *v1.Event) (*v1.Event, error) {
 | 
				
			||||||
 | 
						return e.Interface.CreateWithEventNamespace(event)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (e *EventSinkImpl) Update(event *v1.Event) (*v1.Event, error) {
 | 
				
			||||||
 | 
						return e.Interface.UpdateWithEventNamespace(event)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (e *EventSinkImpl) Patch(event *v1.Event, data []byte) (*v1.Event, error) {
 | 
				
			||||||
 | 
						return e.Interface.Patch(event, data)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Package fake has the automatically generated clients.
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
@@ -0,0 +1,98 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						v1 "k8s.io/kubernetes/pkg/api/v1"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeComponentStatuses implements ComponentStatusInterface
 | 
				
			||||||
 | 
					type FakeComponentStatuses struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootCreateAction("componentstatuses", componentStatus), &v1.ComponentStatus{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1.ComponentStatus), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootUpdateAction("componentstatuses", componentStatus), &v1.ComponentStatus{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1.ComponentStatus), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootDeleteAction("componentstatuses", name), &v1.ComponentStatus{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
 | 
				
			||||||
 | 
						action := core.NewRootDeleteCollectionAction("componentstatuses", listOptions)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &v1.ComponentStatusList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) Get(name string) (result *v1.ComponentStatus, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootGetAction("componentstatuses", name), &v1.ComponentStatus{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1.ComponentStatus), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeComponentStatuses) List(opts api.ListOptions) (result *v1.ComponentStatusList, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewRootListAction("componentstatuses", opts), &v1.ComponentStatusList{})
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &v1.ComponentStatusList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*v1.ComponentStatusList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -0,0 +1,105 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					Copyright 2016 The Kubernetes Authors All rights reserved.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					limitations under the License.
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// This file is generated by client-gen with arguments: --clientset-name=release_1_2 --input=[api/v1,extensions/v1beta1]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					package fake
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						api "k8s.io/kubernetes/pkg/api"
 | 
				
			||||||
 | 
						v1 "k8s.io/kubernetes/pkg/api/v1"
 | 
				
			||||||
 | 
						core "k8s.io/kubernetes/pkg/client/testing/core"
 | 
				
			||||||
 | 
						labels "k8s.io/kubernetes/pkg/labels"
 | 
				
			||||||
 | 
						watch "k8s.io/kubernetes/pkg/watch"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FakeConfigMaps implements ConfigMapInterface
 | 
				
			||||||
 | 
					type FakeConfigMaps struct {
 | 
				
			||||||
 | 
						Fake *FakeCore
 | 
				
			||||||
 | 
						ns   string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1.ConfigMap), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1.ConfigMap), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeConfigMaps) Delete(name string, options *api.DeleteOptions) error {
 | 
				
			||||||
 | 
						_, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewDeleteAction("configmaps", 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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_, err := c.Fake.Invokes(action, &v1.ConfigMapList{})
 | 
				
			||||||
 | 
						return err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *FakeConfigMaps) Get(name string) (result *v1.ConfigMap, err error) {
 | 
				
			||||||
 | 
						obj, err := c.Fake.
 | 
				
			||||||
 | 
							Invokes(core.NewGetAction("configmaps", c.ns, name), &v1.ConfigMap{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return obj.(*v1.ConfigMap), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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{})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if obj == nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						label := opts.LabelSelector
 | 
				
			||||||
 | 
						if label == nil {
 | 
				
			||||||
 | 
							label = labels.Everything()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						list := &v1.ConfigMapList{}
 | 
				
			||||||
 | 
						for _, item := range obj.(*v1.ConfigMapList).Items {
 | 
				
			||||||
 | 
							if label.Matches(labels.Set(item.Labels)) {
 | 
				
			||||||
 | 
								list.Items = append(list.Items, item)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return list, err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user