From 7ba14105214540f09dde3fe6fa14567b8d773943 Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Mon, 19 Sep 2016 15:54:08 -0400 Subject: [PATCH] Generate clientset 1.5 --- .../release_1_5/clientset.go | 17 +++ .../clientset_generated/release_1_5/doc.go | 2 +- .../release_1_5/fake/clientset_generated.go | 7 + .../release_1_5/fake/doc.go | 2 +- .../typed/authorization/v1beta1/doc.go | 2 +- .../typed/authorization/v1beta1/fake/doc.go | 2 +- .../release_1_5/typed/autoscaling/v1/doc.go | 2 +- .../typed/autoscaling/v1/fake/doc.go | 2 +- .../release_1_5/typed/batch/v1/doc.go | 2 +- .../release_1_5/typed/batch/v1/fake/doc.go | 2 +- .../release_1_5/typed/core/v1/doc.go | 2 +- .../release_1_5/typed/core/v1/fake/doc.go | 2 +- .../typed/extensions/v1beta1/doc.go | 2 +- .../typed/extensions/v1beta1/fake/doc.go | 2 +- .../release_1_5/typed/policy/v1alpha1/doc.go | 2 +- .../typed/policy/v1alpha1/fake/doc.go | 2 +- .../release_1_5/typed/storage/v1beta1/doc.go | 20 +++ .../typed/storage/v1beta1/fake/doc.go | 20 +++ .../v1beta1/fake/fake_storage_client.go | 37 +++++ .../storage/v1beta1/fake/fake_storageclass.go | 109 ++++++++++++++ .../storage/v1beta1/generated_expansion.go | 19 +++ .../typed/storage/v1beta1/storage_client.go | 96 ++++++++++++ .../typed/storage/v1beta1/storageclass.go | 141 ++++++++++++++++++ 23 files changed, 480 insertions(+), 14 deletions(-) create mode 100644 pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/doc.go create mode 100644 pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/doc.go create mode 100644 pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/fake_storage_client.go create mode 100644 pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/fake_storageclass.go create mode 100644 pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/generated_expansion.go create mode 100644 pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/storage_client.go create mode 100644 pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/storageclass.go diff --git a/pkg/client/clientset_generated/release_1_5/clientset.go b/pkg/client/clientset_generated/release_1_5/clientset.go index 13b21f886a..eacbdca2c2 100644 --- a/pkg/client/clientset_generated/release_1_5/clientset.go +++ b/pkg/client/clientset_generated/release_1_5/clientset.go @@ -24,6 +24,7 @@ import ( v1core "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/core/v1" v1beta1extensions "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1" v1alpha1policy "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1" + v1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1" restclient "k8s.io/kubernetes/pkg/client/restclient" discovery "k8s.io/kubernetes/pkg/client/typed/discovery" "k8s.io/kubernetes/pkg/util/flowcontrol" @@ -37,6 +38,7 @@ type Interface interface { Batch() v1batch.BatchInterface Extensions() v1beta1extensions.ExtensionsInterface Policy() v1alpha1policy.PolicyInterface + Storage() v1beta1storage.StorageInterface } // Clientset contains the clients for groups. Each group has exactly one @@ -49,6 +51,7 @@ type Clientset struct { *v1batch.BatchClient *v1beta1extensions.ExtensionsClient *v1alpha1policy.PolicyClient + *v1beta1storage.StorageClient } // Core retrieves the CoreClient @@ -99,6 +102,14 @@ func (c *Clientset) Policy() v1alpha1policy.PolicyInterface { return c.PolicyClient } +// Storage retrieves the StorageClient +func (c *Clientset) Storage() v1beta1storage.StorageInterface { + if c == nil { + return nil + } + return c.StorageClient +} + // Discovery retrieves the DiscoveryClient func (c *Clientset) Discovery() discovery.DiscoveryInterface { return c.DiscoveryClient @@ -136,6 +147,10 @@ func NewForConfig(c *restclient.Config) (*Clientset, error) { if err != nil { return nil, err } + clientset.StorageClient, err = v1beta1storage.NewForConfig(&configShallowCopy) + if err != nil { + return nil, err + } clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy) if err != nil { @@ -155,6 +170,7 @@ func NewForConfigOrDie(c *restclient.Config) *Clientset { clientset.BatchClient = v1batch.NewForConfigOrDie(c) clientset.ExtensionsClient = v1beta1extensions.NewForConfigOrDie(c) clientset.PolicyClient = v1alpha1policy.NewForConfigOrDie(c) + clientset.StorageClient = v1beta1storage.NewForConfigOrDie(c) clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c) return &clientset @@ -169,6 +185,7 @@ func New(c *restclient.RESTClient) *Clientset { clientset.BatchClient = v1batch.New(c) clientset.ExtensionsClient = v1beta1extensions.New(c) clientset.PolicyClient = v1alpha1policy.New(c) + clientset.StorageClient = v1beta1storage.New(c) clientset.DiscoveryClient = discovery.NewDiscoveryClient(c) return &clientset diff --git a/pkg/client/clientset_generated/release_1_5/doc.go b/pkg/client/clientset_generated/release_1_5/doc.go index d4b1b2d53c..172a05bf02 100644 --- a/pkg/client/clientset_generated/release_1_5/doc.go +++ b/pkg/client/clientset_generated/release_1_5/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // This package has the automatically generated clientset. package release_1_5 diff --git a/pkg/client/clientset_generated/release_1_5/fake/clientset_generated.go b/pkg/client/clientset_generated/release_1_5/fake/clientset_generated.go index c7adc5db02..ddd3661130 100644 --- a/pkg/client/clientset_generated/release_1_5/fake/clientset_generated.go +++ b/pkg/client/clientset_generated/release_1_5/fake/clientset_generated.go @@ -32,6 +32,8 @@ import ( fakev1beta1extensions "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1/fake" v1alpha1policy "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1" fakev1alpha1policy "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1/fake" + v1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1" + fakev1beta1storage "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake" "k8s.io/kubernetes/pkg/client/testing/core" "k8s.io/kubernetes/pkg/client/typed/discovery" fakediscovery "k8s.io/kubernetes/pkg/client/typed/discovery/fake" @@ -101,3 +103,8 @@ func (c *Clientset) Extensions() v1beta1extensions.ExtensionsInterface { func (c *Clientset) Policy() v1alpha1policy.PolicyInterface { return &fakev1alpha1policy.FakePolicy{Fake: &c.Fake} } + +// Storage retrieves the StorageClient +func (c *Clientset) Storage() v1beta1storage.StorageInterface { + return &fakev1beta1storage.FakeStorage{Fake: &c.Fake} +} diff --git a/pkg/client/clientset_generated/release_1_5/fake/doc.go b/pkg/client/clientset_generated/release_1_5/fake/doc.go index f68af52719..97797a2ee4 100644 --- a/pkg/client/clientset_generated/release_1_5/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_5/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // This package has the automatically generated fake clientset. package fake diff --git a/pkg/client/clientset_generated/release_1_5/typed/authorization/v1beta1/doc.go b/pkg/client/clientset_generated/release_1_5/typed/authorization/v1beta1/doc.go index 831e702d92..0568c7e738 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/authorization/v1beta1/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/authorization/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/pkg/client/clientset_generated/release_1_5/typed/authorization/v1beta1/fake/doc.go b/pkg/client/clientset_generated/release_1_5/typed/authorization/v1beta1/fake/doc.go index 793bddf23c..81599fe8c7 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/authorization/v1beta1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/authorization/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/pkg/client/clientset_generated/release_1_5/typed/autoscaling/v1/doc.go b/pkg/client/clientset_generated/release_1_5/typed/autoscaling/v1/doc.go index 20aab35ab2..6d2609fd77 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/autoscaling/v1/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/autoscaling/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1 diff --git a/pkg/client/clientset_generated/release_1_5/typed/autoscaling/v1/fake/doc.go b/pkg/client/clientset_generated/release_1_5/typed/autoscaling/v1/fake/doc.go index 793bddf23c..81599fe8c7 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/autoscaling/v1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/autoscaling/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/pkg/client/clientset_generated/release_1_5/typed/batch/v1/doc.go b/pkg/client/clientset_generated/release_1_5/typed/batch/v1/doc.go index 20aab35ab2..6d2609fd77 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/batch/v1/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/batch/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1 diff --git a/pkg/client/clientset_generated/release_1_5/typed/batch/v1/fake/doc.go b/pkg/client/clientset_generated/release_1_5/typed/batch/v1/fake/doc.go index 793bddf23c..81599fe8c7 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/batch/v1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/batch/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/pkg/client/clientset_generated/release_1_5/typed/core/v1/doc.go b/pkg/client/clientset_generated/release_1_5/typed/core/v1/doc.go index 20aab35ab2..6d2609fd77 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/core/v1/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/core/v1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1 diff --git a/pkg/client/clientset_generated/release_1_5/typed/core/v1/fake/doc.go b/pkg/client/clientset_generated/release_1_5/typed/core/v1/fake/doc.go index 793bddf23c..81599fe8c7 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/core/v1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/core/v1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1/doc.go b/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1/doc.go index 831e702d92..0568c7e738 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1beta1 diff --git a/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1/fake/doc.go b/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1/fake/doc.go index 793bddf23c..81599fe8c7 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/extensions/v1beta1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1/doc.go b/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1/doc.go index 6035018e23..16bec9fe9f 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // This package has the automatically generated typed clients. package v1alpha1 diff --git a/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1/fake/doc.go b/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1/fake/doc.go index 793bddf23c..81599fe8c7 100644 --- a/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1/fake/doc.go +++ b/pkg/client/clientset_generated/release_1_5/typed/policy/v1alpha1/fake/doc.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1] +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] // Package fake has the automatically generated clients. package fake diff --git a/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/doc.go b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/doc.go new file mode 100644 index 0000000000..0568c7e738 --- /dev/null +++ b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] + +// This package has the automatically generated typed clients. +package v1beta1 diff --git a/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/doc.go b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/doc.go new file mode 100644 index 0000000000..81599fe8c7 --- /dev/null +++ b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/doc.go @@ -0,0 +1,20 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// This package is generated by client-gen with arguments: --clientset-name=release_1_5 --input=[api/v1,authorization/v1beta1,autoscaling/v1,batch/v1,extensions/v1beta1,policy/v1alpha1,storage/v1beta1] + +// Package fake has the automatically generated clients. +package fake diff --git a/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/fake_storage_client.go b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/fake_storage_client.go new file mode 100644 index 0000000000..703f7436c6 --- /dev/null +++ b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/fake_storage_client.go @@ -0,0 +1,37 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + v1beta1 "k8s.io/kubernetes/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1" + restclient "k8s.io/kubernetes/pkg/client/restclient" + core "k8s.io/kubernetes/pkg/client/testing/core" +) + +type FakeStorage struct { + *core.Fake +} + +func (c *FakeStorage) StorageClasses() v1beta1.StorageClassInterface { + return &FakeStorageClasses{c} +} + +// GetRESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeStorage) GetRESTClient() *restclient.RESTClient { + return nil +} diff --git a/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/fake_storageclass.go b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/fake_storageclass.go new file mode 100644 index 0000000000..6d5577dac5 --- /dev/null +++ b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/fake/fake_storageclass.go @@ -0,0 +1,109 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package fake + +import ( + api "k8s.io/kubernetes/pkg/api" + unversioned "k8s.io/kubernetes/pkg/api/unversioned" + v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" + core "k8s.io/kubernetes/pkg/client/testing/core" + labels "k8s.io/kubernetes/pkg/labels" + watch "k8s.io/kubernetes/pkg/watch" +) + +// FakeStorageClasses implements StorageClassInterface +type FakeStorageClasses struct { + Fake *FakeStorage +} + +var storageclassesResource = unversioned.GroupVersionResource{Group: "storage.k8s.io", Version: "v1beta1", Resource: "storageclasses"} + +func (c *FakeStorageClasses) Create(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(core.NewRootCreateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageClass), err +} + +func (c *FakeStorageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(core.NewRootUpdateAction(storageclassesResource, storageClass), &v1beta1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageClass), err +} + +func (c *FakeStorageClasses) Delete(name string, options *api.DeleteOptions) error { + _, err := c.Fake. + Invokes(core.NewRootDeleteAction(storageclassesResource, name), &v1beta1.StorageClass{}) + return err +} + +func (c *FakeStorageClasses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { + action := core.NewRootDeleteCollectionAction(storageclassesResource, listOptions) + + _, err := c.Fake.Invokes(action, &v1beta1.StorageClassList{}) + return err +} + +func (c *FakeStorageClasses) Get(name string) (result *v1beta1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(core.NewRootGetAction(storageclassesResource, name), &v1beta1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageClass), err +} + +func (c *FakeStorageClasses) List(opts api.ListOptions) (result *v1beta1.StorageClassList, err error) { + obj, err := c.Fake. + Invokes(core.NewRootListAction(storageclassesResource, opts), &v1beta1.StorageClassList{}) + if obj == nil { + return nil, err + } + + label := opts.LabelSelector + if label == nil { + label = labels.Everything() + } + list := &v1beta1.StorageClassList{} + for _, item := range obj.(*v1beta1.StorageClassList).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 storageClasses. +func (c *FakeStorageClasses) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.Fake. + InvokesWatch(core.NewRootWatchAction(storageclassesResource, opts)) +} + +// Patch applies the patch and returns the patched storageClass. +func (c *FakeStorageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { + obj, err := c.Fake. + Invokes(core.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &v1beta1.StorageClass{}) + if obj == nil { + return nil, err + } + return obj.(*v1beta1.StorageClass), err +} diff --git a/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/generated_expansion.go b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/generated_expansion.go new file mode 100644 index 0000000000..b18dda009f --- /dev/null +++ b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/generated_expansion.go @@ -0,0 +1,19 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +type StorageClassExpansion interface{} diff --git a/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/storage_client.go b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/storage_client.go new file mode 100644 index 0000000000..285ea0e900 --- /dev/null +++ b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/storage_client.go @@ -0,0 +1,96 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + api "k8s.io/kubernetes/pkg/api" + registered "k8s.io/kubernetes/pkg/apimachinery/registered" + restclient "k8s.io/kubernetes/pkg/client/restclient" + serializer "k8s.io/kubernetes/pkg/runtime/serializer" +) + +type StorageInterface interface { + GetRESTClient() *restclient.RESTClient + StorageClassesGetter +} + +// StorageClient is used to interact with features provided by the Storage group. +type StorageClient struct { + *restclient.RESTClient +} + +func (c *StorageClient) StorageClasses() StorageClassInterface { + return newStorageClasses(c) +} + +// NewForConfig creates a new StorageClient for the given config. +func NewForConfig(c *restclient.Config) (*StorageClient, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := restclient.RESTClientFor(&config) + if err != nil { + return nil, err + } + return &StorageClient{client}, nil +} + +// NewForConfigOrDie creates a new StorageClient for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *restclient.Config) *StorageClient { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new StorageClient for the given RESTClient. +func New(c *restclient.RESTClient) *StorageClient { + return &StorageClient{c} +} + +func setConfigDefaults(config *restclient.Config) error { + // if storage group is not registered, return an error + g, err := registered.Group("storage.k8s.io") + 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.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs} + + return nil +} + +// GetRESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *StorageClient) GetRESTClient() *restclient.RESTClient { + if c == nil { + return nil + } + return c.RESTClient +} diff --git a/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/storageclass.go b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/storageclass.go new file mode 100644 index 0000000000..286c362f75 --- /dev/null +++ b/pkg/client/clientset_generated/release_1_5/typed/storage/v1beta1/storageclass.go @@ -0,0 +1,141 @@ +/* +Copyright 2016 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + api "k8s.io/kubernetes/pkg/api" + v1beta1 "k8s.io/kubernetes/pkg/apis/storage/v1beta1" + watch "k8s.io/kubernetes/pkg/watch" +) + +// StorageClassesGetter has a method to return a StorageClassInterface. +// A group's client should implement this interface. +type StorageClassesGetter interface { + StorageClasses() StorageClassInterface +} + +// StorageClassInterface has methods to work with StorageClass resources. +type StorageClassInterface interface { + Create(*v1beta1.StorageClass) (*v1beta1.StorageClass, error) + Update(*v1beta1.StorageClass) (*v1beta1.StorageClass, error) + Delete(name string, options *api.DeleteOptions) error + DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error + Get(name string) (*v1beta1.StorageClass, error) + List(opts api.ListOptions) (*v1beta1.StorageClassList, error) + Watch(opts api.ListOptions) (watch.Interface, error) + Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) + StorageClassExpansion +} + +// storageClasses implements StorageClassInterface +type storageClasses struct { + client *StorageClient +} + +// newStorageClasses returns a StorageClasses +func newStorageClasses(c *StorageClient) *storageClasses { + return &storageClasses{ + client: c, + } +} + +// Create takes the representation of a storageClass and creates it. Returns the server's representation of the storageClass, and an error, if there is any. +func (c *storageClasses) Create(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { + result = &v1beta1.StorageClass{} + err = c.client.Post(). + Resource("storageclasses"). + Body(storageClass). + Do(). + Into(result) + return +} + +// Update takes the representation of a storageClass and updates it. Returns the server's representation of the storageClass, and an error, if there is any. +func (c *storageClasses) Update(storageClass *v1beta1.StorageClass) (result *v1beta1.StorageClass, err error) { + result = &v1beta1.StorageClass{} + err = c.client.Put(). + Resource("storageclasses"). + Name(storageClass.Name). + Body(storageClass). + Do(). + Into(result) + return +} + +// Delete takes name of the storageClass and deletes it. Returns an error if one occurs. +func (c *storageClasses) Delete(name string, options *api.DeleteOptions) error { + return c.client.Delete(). + Resource("storageclasses"). + Name(name). + Body(options). + Do(). + Error() +} + +// DeleteCollection deletes a collection of objects. +func (c *storageClasses) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error { + return c.client.Delete(). + Resource("storageclasses"). + VersionedParams(&listOptions, api.ParameterCodec). + Body(options). + Do(). + Error() +} + +// Get takes name of the storageClass, and returns the corresponding storageClass object, and an error if there is any. +func (c *storageClasses) Get(name string) (result *v1beta1.StorageClass, err error) { + result = &v1beta1.StorageClass{} + err = c.client.Get(). + Resource("storageclasses"). + Name(name). + Do(). + Into(result) + return +} + +// List takes label and field selectors, and returns the list of StorageClasses that match those selectors. +func (c *storageClasses) List(opts api.ListOptions) (result *v1beta1.StorageClassList, err error) { + result = &v1beta1.StorageClassList{} + err = c.client.Get(). + Resource("storageclasses"). + VersionedParams(&opts, api.ParameterCodec). + Do(). + Into(result) + return +} + +// Watch returns a watch.Interface that watches the requested storageClasses. +func (c *storageClasses) Watch(opts api.ListOptions) (watch.Interface, error) { + return c.client.Get(). + Prefix("watch"). + Resource("storageclasses"). + VersionedParams(&opts, api.ParameterCodec). + Watch() +} + +// Patch applies the patch and returns the patched storageClass. +func (c *storageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.StorageClass, err error) { + result = &v1beta1.StorageClass{} + err = c.client.Patch(pt). + Resource("storageclasses"). + SubResource(subresources...). + Name(name). + Body(data). + Do(). + Into(result) + return +}