Update godeps
This commit is contained in:
parent
423433bc5f
commit
701c5a0e30
482 changed files with 86915 additions and 19741 deletions
73
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_clusterrolebindings.go
generated
vendored
Normal file
73
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_clusterrolebindings.go
generated
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
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 testclient
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apis/rbac"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
// FakeClusterRoleBindings implements ClusterRoleBindingInterface
|
||||
type FakeClusterRoleBindings struct {
|
||||
Fake *FakeRbac
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoleBindings) Get(name string) (*rbac.ClusterRoleBinding, error) {
|
||||
obj, err := c.Fake.Invokes(NewRootGetAction("clusterrolebindings", name), &rbac.ClusterRoleBinding{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.ClusterRoleBinding), err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoleBindings) List(opts api.ListOptions) (*rbac.ClusterRoleBindingList, error) {
|
||||
obj, err := c.Fake.Invokes(NewRootListAction("clusterrolebindings", opts), &rbac.ClusterRoleBindingList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.ClusterRoleBindingList), err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoleBindings) Create(csr *rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error) {
|
||||
obj, err := c.Fake.Invokes(NewRootCreateAction("clusterrolebindings", csr), csr)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.ClusterRoleBinding), err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoleBindings) Update(csr *rbac.ClusterRoleBinding) (*rbac.ClusterRoleBinding, error) {
|
||||
obj, err := c.Fake.Invokes(NewRootUpdateAction("clusterrolebindings", csr), csr)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.ClusterRoleBinding), err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoleBindings) Delete(name string, opts *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewRootDeleteAction("clusterrolebindings", name), &rbac.ClusterRoleBinding{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.InvokesWatch(NewRootWatchAction("clusterrolebindings", opts))
|
||||
}
|
||||
73
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_clusterroles.go
generated
vendored
Normal file
73
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_clusterroles.go
generated
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
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 testclient
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apis/rbac"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
// FakeClusterRoles implements ClusterRoleInterface
|
||||
type FakeClusterRoles struct {
|
||||
Fake *FakeRbac
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoles) Get(name string) (*rbac.ClusterRole, error) {
|
||||
obj, err := c.Fake.Invokes(NewRootGetAction("clusterroles", name), &rbac.ClusterRole{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.ClusterRole), err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoles) List(opts api.ListOptions) (*rbac.ClusterRoleList, error) {
|
||||
obj, err := c.Fake.Invokes(NewRootListAction("clusterroles", opts), &rbac.ClusterRoleList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.ClusterRoleList), err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoles) Create(csr *rbac.ClusterRole) (*rbac.ClusterRole, error) {
|
||||
obj, err := c.Fake.Invokes(NewRootCreateAction("clusterroles", csr), csr)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.ClusterRole), err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoles) Update(csr *rbac.ClusterRole) (*rbac.ClusterRole, error) {
|
||||
obj, err := c.Fake.Invokes(NewRootUpdateAction("clusterroles", csr), csr)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.ClusterRole), err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoles) Delete(name string, opts *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewRootDeleteAction("clusterroles", name), &rbac.ClusterRole{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeClusterRoles) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.InvokesWatch(NewRootWatchAction("clusterroles", opts))
|
||||
}
|
||||
6
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_deployments.go
generated
vendored
6
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_deployments.go
generated
vendored
|
|
@ -19,17 +19,21 @@ package testclient
|
|||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
kclientlib "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
// FakeDeployments implements DeploymentsInterface. Meant to be embedded into a struct to get a default
|
||||
// FakeDeployments implements DeploymentInterface. Meant to be embedded into a struct to get a default
|
||||
// implementation. This makes faking out just the methods you want to test easier.
|
||||
type FakeDeployments struct {
|
||||
Fake *FakeExperimental
|
||||
Namespace string
|
||||
}
|
||||
|
||||
// Ensure statically that FakeDeployments implements DeploymentInterface.
|
||||
var _ kclientlib.DeploymentInterface = &FakeDeployments{}
|
||||
|
||||
func (c *FakeDeployments) Get(name string) (*extensions.Deployment, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("deployments", c.Namespace, name), &extensions.Deployment{})
|
||||
if obj == nil {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ package testclient
|
|||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
"k8s.io/kubernetes/pkg/apis/autoscaling"
|
||||
"k8s.io/kubernetes/pkg/labels"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
|
@ -26,21 +26,21 @@ import (
|
|||
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface. Meant to be embedded into a struct to get a default
|
||||
// implementation. This makes faking out just the methods you want to test easier.
|
||||
type FakeHorizontalPodAutoscalers struct {
|
||||
Fake *FakeExperimental
|
||||
Fake *FakeAutoscaling
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(name string) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("horizontalpodautoscalers", c.Namespace, name), &extensions.HorizontalPodAutoscaler{})
|
||||
func (c *FakeHorizontalPodAutoscalers) Get(name string) (*autoscaling.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("horizontalpodautoscalers", c.Namespace, name), &autoscaling.HorizontalPodAutoscaler{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
return obj.(*autoscaling.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (*extensions.HorizontalPodAutoscalerList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("horizontalpodautoscalers", c.Namespace, opts), &extensions.HorizontalPodAutoscalerList{})
|
||||
func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (*autoscaling.HorizontalPodAutoscalerList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("horizontalpodautoscalers", c.Namespace, opts), &autoscaling.HorizontalPodAutoscalerList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -48,8 +48,8 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (*extensions.H
|
|||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &extensions.HorizontalPodAutoscalerList{}
|
||||
for _, a := range obj.(*extensions.HorizontalPodAutoscalerList).Items {
|
||||
list := &autoscaling.HorizontalPodAutoscalerList{}
|
||||
for _, a := range obj.(*autoscaling.HorizontalPodAutoscalerList).Items {
|
||||
if label.Matches(labels.Set(a.Labels)) {
|
||||
list.Items = append(list.Items, a)
|
||||
}
|
||||
|
|
@ -57,108 +57,37 @@ func (c *FakeHorizontalPodAutoscalers) List(opts api.ListOptions) (*extensions.H
|
|||
return list, err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
func (c *FakeHorizontalPodAutoscalers) Create(a *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("horizontalpodautoscalers", c.Namespace, a), a)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
return obj.(*autoscaling.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
func (c *FakeHorizontalPodAutoscalers) Update(a *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("horizontalpodautoscalers", c.Namespace, a), a)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
return obj.(*autoscaling.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("horizontalpodautoscalers", "status", c.Namespace, a), &extensions.HorizontalPodAutoscaler{})
|
||||
func (c *FakeHorizontalPodAutoscalers) UpdateStatus(a *autoscaling.HorizontalPodAutoscaler) (*autoscaling.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("horizontalpodautoscalers", "status", c.Namespace, a), &autoscaling.HorizontalPodAutoscaler{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
return obj.(*autoscaling.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("horizontalpodautoscalers", c.Namespace, name), &extensions.HorizontalPodAutoscaler{})
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("horizontalpodautoscalers", c.Namespace, name), &autoscaling.HorizontalPodAutoscaler{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalers) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.InvokesWatch(NewWatchAction("horizontalpodautoscalers", c.Namespace, opts))
|
||||
}
|
||||
|
||||
// FakeHorizontalPodAutoscalers implements HorizontalPodAutoscalerInterface. Meant to be embedded into a struct to get a default
|
||||
// implementation. This makes faking out just the methods you want to test easier.
|
||||
// This is a test implementation of HorizontalPodAutoscalersV1
|
||||
// TODO(piosz): get back to one client implementation once HPA will be graduated to GA completely
|
||||
type FakeHorizontalPodAutoscalersV1 struct {
|
||||
Fake *FakeAutoscaling
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalersV1) Get(name string) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("horizontalpodautoscalers", c.Namespace, name), &extensions.HorizontalPodAutoscaler{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalersV1) List(opts api.ListOptions) (*extensions.HorizontalPodAutoscalerList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("horizontalpodautoscalers", c.Namespace, opts), &extensions.HorizontalPodAutoscalerList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
label := opts.LabelSelector
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &extensions.HorizontalPodAutoscalerList{}
|
||||
for _, a := range obj.(*extensions.HorizontalPodAutoscalerList).Items {
|
||||
if label.Matches(labels.Set(a.Labels)) {
|
||||
list.Items = append(list.Items, a)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalersV1) Create(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("horizontalpodautoscalers", c.Namespace, a), a)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalersV1) Update(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("horizontalpodautoscalers", c.Namespace, a), a)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalersV1) UpdateStatus(a *extensions.HorizontalPodAutoscaler) (*extensions.HorizontalPodAutoscaler, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("horizontalpodautoscalers", "status", c.Namespace, a), &extensions.HorizontalPodAutoscaler{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.HorizontalPodAutoscaler), err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalersV1) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("horizontalpodautoscalers", c.Namespace, name), &extensions.HorizontalPodAutoscaler{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeHorizontalPodAutoscalersV1) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.InvokesWatch(NewWatchAction("horizontalpodautoscalers", c.Namespace, opts))
|
||||
}
|
||||
|
|
|
|||
75
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_network_policies.go
generated
vendored
Normal file
75
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_network_policies.go
generated
vendored
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
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 testclient
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apis/extensions"
|
||||
kclientlib "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
// FakeNetworkPolicies implements NetworkPolicyInterface. Meant to be embedded into a struct to get a default
|
||||
// implementation. This makes faking out just the method you want to test easier.
|
||||
type FakeNetworkPolicies struct {
|
||||
Fake *FakeExperimental
|
||||
Namespace string
|
||||
}
|
||||
|
||||
// Ensure statically that FakeNetworkPolicies implements NetworkPolicyInterface.
|
||||
var _ kclientlib.NetworkPolicyInterface = &FakeNetworkPolicies{}
|
||||
|
||||
func (c *FakeNetworkPolicies) Get(name string) (*extensions.NetworkPolicy, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("networkpolicies", c.Namespace, name), &extensions.NetworkPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.NetworkPolicy), err
|
||||
}
|
||||
|
||||
func (c *FakeNetworkPolicies) List(opts api.ListOptions) (*extensions.NetworkPolicyList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("networkpolicies", c.Namespace, opts), &extensions.NetworkPolicyList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.NetworkPolicyList), err
|
||||
}
|
||||
|
||||
func (c *FakeNetworkPolicies) Create(np *extensions.NetworkPolicy) (*extensions.NetworkPolicy, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("networkpolicies", c.Namespace, np), &extensions.NetworkPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.NetworkPolicy), err
|
||||
}
|
||||
|
||||
func (c *FakeNetworkPolicies) Update(np *extensions.NetworkPolicy) (*extensions.NetworkPolicy, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("networkpolicies", c.Namespace, np), &extensions.NetworkPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.NetworkPolicy), err
|
||||
}
|
||||
|
||||
func (c *FakeNetworkPolicies) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("networkpolicies", c.Namespace, name), &extensions.NetworkPolicy{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeNetworkPolicies) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.InvokesWatch(NewWatchAction("networkpolicies", c.Namespace, opts))
|
||||
}
|
||||
8
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_podsecuritypolicy.go
generated
vendored
8
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_podsecuritypolicy.go
generated
vendored
|
|
@ -47,16 +47,16 @@ func (c *FakePodSecurityPolicy) Get(name string) (*extensions.PodSecurityPolicy,
|
|||
return obj.(*extensions.PodSecurityPolicy), err
|
||||
}
|
||||
|
||||
func (c *FakePodSecurityPolicy) Create(scc *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("podsecuritypolicies", c.Namespace, scc), &extensions.PodSecurityPolicy{})
|
||||
func (c *FakePodSecurityPolicy) Create(psp *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("podsecuritypolicies", c.Namespace, psp), &extensions.PodSecurityPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*extensions.PodSecurityPolicy), err
|
||||
}
|
||||
|
||||
func (c *FakePodSecurityPolicy) Update(scc *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("podsecuritypolicies", c.Namespace, scc), &extensions.PodSecurityPolicy{})
|
||||
func (c *FakePodSecurityPolicy) Update(psp *extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("podsecuritypolicies", c.Namespace, psp), &extensions.PodSecurityPolicy{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
74
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_rolebindings.go
generated
vendored
Normal file
74
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_rolebindings.go
generated
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
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 testclient
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apis/rbac"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
// FakeRoleBindings implements RoleBindingInterface
|
||||
type FakeRoleBindings struct {
|
||||
Fake *FakeRbac
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeRoleBindings) Get(name string) (*rbac.RoleBinding, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("rolebindings", c.Namespace, name), &rbac.RoleBinding{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.RoleBinding), err
|
||||
}
|
||||
|
||||
func (c *FakeRoleBindings) List(opts api.ListOptions) (*rbac.RoleBindingList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("rolebindings", c.Namespace, opts), &rbac.RoleBindingList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.RoleBindingList), err
|
||||
}
|
||||
|
||||
func (c *FakeRoleBindings) Create(csr *rbac.RoleBinding) (*rbac.RoleBinding, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("rolebindings", c.Namespace, csr), csr)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.RoleBinding), err
|
||||
}
|
||||
|
||||
func (c *FakeRoleBindings) Update(csr *rbac.RoleBinding) (*rbac.RoleBinding, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("rolebindings", c.Namespace, csr), csr)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.RoleBinding), err
|
||||
}
|
||||
|
||||
func (c *FakeRoleBindings) Delete(name string, opts *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("rolebindings", c.Namespace, name), &rbac.RoleBinding{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeRoleBindings) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.InvokesWatch(NewWatchAction("rolebindings", c.Namespace, opts))
|
||||
}
|
||||
74
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_roles.go
generated
vendored
Normal file
74
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_roles.go
generated
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
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 testclient
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apis/rbac"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
// FakeRoles implements RoleInterface
|
||||
type FakeRoles struct {
|
||||
Fake *FakeRbac
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeRoles) Get(name string) (*rbac.Role, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("roles", c.Namespace, name), &rbac.Role{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.Role), err
|
||||
}
|
||||
|
||||
func (c *FakeRoles) List(opts api.ListOptions) (*rbac.RoleList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("roles", c.Namespace, opts), &rbac.RoleList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.RoleList), err
|
||||
}
|
||||
|
||||
func (c *FakeRoles) Create(csr *rbac.Role) (*rbac.Role, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("roles", c.Namespace, csr), csr)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.Role), err
|
||||
}
|
||||
|
||||
func (c *FakeRoles) Update(csr *rbac.Role) (*rbac.Role, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("roles", c.Namespace, csr), csr)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*rbac.Role), err
|
||||
}
|
||||
|
||||
func (c *FakeRoles) Delete(name string, opts *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("roles", c.Namespace, name), &rbac.Role{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeRoles) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.InvokesWatch(NewWatchAction("roles", c.Namespace, opts))
|
||||
}
|
||||
84
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_scheduledjobs.go
generated
vendored
Normal file
84
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fake_scheduledjobs.go
generated
vendored
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
/*
|
||||
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 testclient
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/apis/batch"
|
||||
"k8s.io/kubernetes/pkg/watch"
|
||||
)
|
||||
|
||||
// FakeScheduledJobs implements ScheduledJobInterface. Meant to be embedded into a struct to get a default
|
||||
// implementation. This makes faking out just the methods you want to test easier.
|
||||
type FakeScheduledJobs struct {
|
||||
Fake *FakeBatch
|
||||
Namespace string
|
||||
}
|
||||
|
||||
func (c *FakeScheduledJobs) Get(name string) (*batch.ScheduledJob, error) {
|
||||
obj, err := c.Fake.Invokes(NewGetAction("scheduledjobs", c.Namespace, name), &batch.ScheduledJob{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*batch.ScheduledJob), err
|
||||
}
|
||||
|
||||
func (c *FakeScheduledJobs) List(opts api.ListOptions) (*batch.ScheduledJobList, error) {
|
||||
obj, err := c.Fake.Invokes(NewListAction("scheduledjobs", c.Namespace, opts), &batch.ScheduledJobList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*batch.ScheduledJobList), err
|
||||
}
|
||||
|
||||
func (c *FakeScheduledJobs) Create(scheduledJob *batch.ScheduledJob) (*batch.ScheduledJob, error) {
|
||||
obj, err := c.Fake.Invokes(NewCreateAction("scheduledjobs", c.Namespace, scheduledJob), scheduledJob)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*batch.ScheduledJob), err
|
||||
}
|
||||
|
||||
func (c *FakeScheduledJobs) Update(scheduledJob *batch.ScheduledJob) (*batch.ScheduledJob, error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateAction("scheduledjobs", c.Namespace, scheduledJob), scheduledJob)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*batch.ScheduledJob), err
|
||||
}
|
||||
|
||||
func (c *FakeScheduledJobs) Delete(name string, options *api.DeleteOptions) error {
|
||||
_, err := c.Fake.Invokes(NewDeleteAction("scheduledjobs", c.Namespace, name), &batch.ScheduledJob{})
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *FakeScheduledJobs) Watch(opts api.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.InvokesWatch(NewWatchAction("scheduledjobs", c.Namespace, opts))
|
||||
}
|
||||
|
||||
func (c *FakeScheduledJobs) UpdateStatus(scheduledJob *batch.ScheduledJob) (result *batch.ScheduledJob, err error) {
|
||||
obj, err := c.Fake.Invokes(NewUpdateSubresourceAction("scheduledjobs", "status", c.Namespace, scheduledJob), scheduledJob)
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return obj.(*batch.ScheduledJob), err
|
||||
}
|
||||
4
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fixture.go
generated
vendored
4
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/fixture.go
generated
vendored
|
|
@ -204,11 +204,11 @@ func (o objects) Kind(kind unversioned.GroupVersionKind, name string) (runtime.O
|
|||
}
|
||||
|
||||
func (o objects) Add(obj runtime.Object) error {
|
||||
gvk, err := o.scheme.ObjectKind(obj)
|
||||
gvks, _, err := o.scheme.ObjectKinds(obj)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
kind := gvk.Kind
|
||||
kind := gvks[0].Kind
|
||||
|
||||
switch {
|
||||
case meta.IsListType(obj):
|
||||
|
|
|
|||
50
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/testclient.go
generated
vendored
50
vendor/k8s.io/kubernetes/pkg/client/unversioned/testclient/testclient.go
generated
vendored
|
|
@ -301,6 +301,10 @@ func (c *Fake) ConfigMaps(namespace string) client.ConfigMapsInterface {
|
|||
return &FakeConfigMaps{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
func (c *Fake) Rbac() client.RbacInterface {
|
||||
return &FakeRbac{Fake: c}
|
||||
}
|
||||
|
||||
// SwaggerSchema returns an empty swagger.ApiDeclaration for testing
|
||||
func (c *Fake) SwaggerSchema(version unversioned.GroupVersion) (*swagger.ApiDeclaration, error) {
|
||||
action := ActionImpl{}
|
||||
|
|
@ -325,7 +329,7 @@ type FakeAutoscaling struct {
|
|||
}
|
||||
|
||||
func (c *FakeAutoscaling) HorizontalPodAutoscalers(namespace string) client.HorizontalPodAutoscalerInterface {
|
||||
return &FakeHorizontalPodAutoscalersV1{Fake: c, Namespace: namespace}
|
||||
return &FakeHorizontalPodAutoscalers{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
// NewSimpleFakeBatch returns a client that will respond with the provided objects
|
||||
|
|
@ -341,6 +345,10 @@ func (c *FakeBatch) Jobs(namespace string) client.JobInterface {
|
|||
return &FakeJobsV1{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
func (c *FakeBatch) ScheduledJobs(namespace string) client.ScheduledJobInterface {
|
||||
return &FakeScheduledJobs{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
// NewSimpleFakeExp returns a client that will respond with the provided objects
|
||||
func NewSimpleFakeExp(objects ...runtime.Object) *FakeExperimental {
|
||||
return &FakeExperimental{Fake: NewSimpleFake(objects...)}
|
||||
|
|
@ -354,10 +362,6 @@ func (c *FakeExperimental) DaemonSets(namespace string) client.DaemonSetInterfac
|
|||
return &FakeDaemonSets{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
func (c *FakeExperimental) HorizontalPodAutoscalers(namespace string) client.HorizontalPodAutoscalerInterface {
|
||||
return &FakeHorizontalPodAutoscalers{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
func (c *FakeExperimental) Deployments(namespace string) client.DeploymentInterface {
|
||||
return &FakeDeployments{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
|
@ -382,10 +386,46 @@ func (c *FakeExperimental) ReplicaSets(namespace string) client.ReplicaSetInterf
|
|||
return &FakeReplicaSets{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
func (c *FakeExperimental) NetworkPolicies(namespace string) client.NetworkPolicyInterface {
|
||||
return &FakeNetworkPolicies{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
func NewSimpleFakeRbac(objects ...runtime.Object) *FakeRbac {
|
||||
return &FakeRbac{Fake: NewSimpleFake(objects...)}
|
||||
}
|
||||
|
||||
type FakeRbac struct {
|
||||
*Fake
|
||||
}
|
||||
|
||||
func (c *FakeRbac) Roles(namespace string) client.RoleInterface {
|
||||
return &FakeRoles{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
func (c *FakeRbac) RoleBindings(namespace string) client.RoleBindingInterface {
|
||||
return &FakeRoleBindings{Fake: c, Namespace: namespace}
|
||||
}
|
||||
|
||||
func (c *FakeRbac) ClusterRoles() client.ClusterRoleInterface {
|
||||
return &FakeClusterRoles{Fake: c}
|
||||
}
|
||||
|
||||
func (c *FakeRbac) ClusterRoleBindings() client.ClusterRoleBindingInterface {
|
||||
return &FakeClusterRoleBindings{Fake: c}
|
||||
}
|
||||
|
||||
type FakeDiscovery struct {
|
||||
*Fake
|
||||
}
|
||||
|
||||
func (c *FakeDiscovery) ServerPreferredResources() ([]unversioned.GroupVersionResource, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *FakeDiscovery) ServerPreferredNamespacedResources() ([]unversioned.GroupVersionResource, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *FakeDiscovery) ServerResourcesForGroupVersion(groupVersion string) (*unversioned.APIResourceList, error) {
|
||||
action := ActionImpl{
|
||||
Verb: "get",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue