コード例 #1
0
ファイル: fake_cronjob.go プロジェクト: kubernetes/kubernetes
// Patch applies the patch and returns the patched cronJob.
func (c *FakeCronJobs) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *batch.CronJob, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(cronjobsResource, c.ns, name, data, subresources...), &batch.CronJob{})

	if obj == nil {
		return nil, err
	}
	return obj.(*batch.CronJob), err
}
コード例 #2
0
// Patch applies the patch and returns the patched serviceAccount.
func (c *FakeServiceAccounts) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ServiceAccount, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(serviceaccountsResource, c.ns, name, data, subresources...), &api.ServiceAccount{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.ServiceAccount), err
}
コード例 #3
0
// Patch applies the patch and returns the patched podDisruptionBudget.
func (c *FakePodDisruptionBudgets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.PodDisruptionBudget, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(poddisruptionbudgetsResource, c.ns, name, data, subresources...), &v1alpha1.PodDisruptionBudget{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.PodDisruptionBudget), err
}
コード例 #4
0
ファイル: fake_job.go プロジェクト: nak3/kubernetes
// Patch applies the patch and returns the patched job.
func (c *FakeJobs) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.Job, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(jobsResource, c.ns, name, data, subresources...), &v1beta1.Job{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.Job), err
}
コード例 #5
0
ファイル: fake_ingress.go プロジェクト: nak3/kubernetes
// Patch applies the patch and returns the patched ingress.
func (c *FakeIngresses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.Ingress, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(ingressesResource, c.ns, name, data, subresources...), &extensions.Ingress{})

	if obj == nil {
		return nil, err
	}
	return obj.(*extensions.Ingress), err
}
コード例 #6
0
// Patch applies the patch and returns the patched resourceQuota.
func (c *FakeResourceQuotas) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.ResourceQuota, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(resourcequotasResource, c.ns, name, data, subresources...), &api.ResourceQuota{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.ResourceQuota), err
}
コード例 #7
0
// Patch applies the patch and returns the patched clusterNetwork.
func (c *FakeClusterNetworks) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ClusterNetwork, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(clusternetworksResource, c.ns, name, data, subresources...), &v1.ClusterNetwork{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.ClusterNetwork), err
}
コード例 #8
0
func (c *FakeNodes) PatchStatus(nodeName string, data []byte) (*api.Node, error) {
	obj, err := c.Fake.Invokes(
		core.NewPatchSubresourceAction(nodesResource, "status"), &api.Node{})
	if obj == nil {
		return nil, err
	}

	return obj.(*api.Node), err
}
コード例 #9
0
ファイル: fake_statefulset.go プロジェクト: nak3/kubernetes
// Patch applies the patch and returns the patched statefulSet.
func (c *FakeStatefulSets) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *apps.StatefulSet, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(statefulsetsResource, c.ns, name, data, subresources...), &apps.StatefulSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*apps.StatefulSet), err
}
コード例 #10
0
ファイル: fake_testtype.go プロジェクト: ncdc/kubernetes
// Patch applies the patch and returns the patched testType.
func (c *FakeTestTypes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *testgroup_k8s_io.TestType, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(testtypesResource, c.ns, name, data, subresources...), &testgroup_k8s_io.TestType{})

	if obj == nil {
		return nil, err
	}
	return obj.(*testgroup_k8s_io.TestType), err
}
コード例 #11
0
ファイル: fake_service.go プロジェクト: kubernetes/kubernetes
// Patch applies the patch and returns the patched service.
func (c *FakeServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Service, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(servicesResource, c.ns, name, data, subresources...), &v1.Service{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Service), err
}
コード例 #12
0
// Patch applies the patch and returns the patched deploymentConfig.
func (c *FakeDeploymentConfigs) Patch(name string, pt pkg_api.PatchType, data []byte, subresources ...string) (result *api.DeploymentConfig, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(deploymentconfigsResource, c.ns, name, data, subresources...), &api.DeploymentConfig{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.DeploymentConfig), err
}
コード例 #13
0
func (c *FakeSecurityContextConstraints) PatchStatus(name string, data []byte) (*api.SecurityContextConstraints, error) {
	obj, err := c.Fake.Invokes(
		core.NewPatchSubresourceAction(securitycontextconstraintsResource, "status"), &api.SecurityContextConstraints{})
	if obj == nil {
		return nil, err
	}

	return obj.(*api.SecurityContextConstraints), err
}
コード例 #14
0
ファイル: fake_role.go プロジェクト: humblec/kubernetes
// Patch applies the patch and returns the patched role.
func (c *FakeRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.Role, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(rolesResource, c.ns, name, data, subresources...), &rbac.Role{})

	if obj == nil {
		return nil, err
	}
	return obj.(*rbac.Role), err
}
コード例 #15
0
ファイル: fake_rolebinding.go プロジェクト: ncdc/kubernetes
// Patch applies the patch and returns the patched roleBinding.
func (c *FakeRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.RoleBinding, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(rolebindingsResource, c.ns, name, data, subresources...), &v1alpha1.RoleBinding{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.RoleBinding), err
}
コード例 #16
0
// Patch applies the patch and returns the patched persistentVolumeClaim.
func (c *FakePersistentVolumeClaims) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.PersistentVolumeClaim, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(persistentvolumeclaimsResource, c.ns, name, data, subresources...), &api.PersistentVolumeClaim{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.PersistentVolumeClaim), err
}
コード例 #17
0
ファイル: fake_pod.go プロジェクト: kubernetes/kubernetes
// Patch applies the patch and returns the patched pod.
func (c *FakePods) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Pod, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(podsResource, c.ns, name, data, subresources...), &api.Pod{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.Pod), err
}
コード例 #18
0
ファイル: fake_user.go プロジェクト: juanluisvaladas/origin
// Patch applies the patch and returns the patched user.
func (c *FakeUsers) Patch(name string, pt pkg_api.PatchType, data []byte, subresources ...string) (result *api.User, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(usersResource, c.ns, name, data, subresources...), &api.User{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.User), err
}
コード例 #19
0
// Patch applies the patch and returns the patched replicaSet.
func (c *FakeReplicaSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ReplicaSet, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(replicasetsResource, c.ns, name, data, subresources...), &v1beta1.ReplicaSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.ReplicaSet), err
}
コード例 #20
0
// Patch applies the patch and returns the patched horizontalPodAutoscaler.
func (c *FakeHorizontalPodAutoscalers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *autoscaling.HorizontalPodAutoscaler, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(horizontalpodautoscalersResource, c.ns, name, data, subresources...), &autoscaling.HorizontalPodAutoscaler{})

	if obj == nil {
		return nil, err
	}
	return obj.(*autoscaling.HorizontalPodAutoscaler), err
}
コード例 #21
0
// Patch applies the patch and returns the patched oAuthClient.
func (c *FakeOAuthClients) Patch(name string, pt pkg_api.PatchType, data []byte, subresources ...string) (result *api.OAuthClient, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(oauthclientsResource, c.ns, name, data, subresources...), &api.OAuthClient{})

	if obj == nil {
		return nil, err
	}
	return obj.(*api.OAuthClient), err
}
コード例 #22
0
ファイル: fake_limitrange.go プロジェクト: Q-Lee/kubernetes
// Patch applies the patch and returns the patched limitRange.
func (c *FakeLimitRanges) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.LimitRange, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(limitrangesResource, c.ns, name, data, subresources...), &v1.LimitRange{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.LimitRange), err
}
コード例 #23
0
ファイル: fake_endpoints.go プロジェクト: nak3/kubernetes
// Patch applies the patch and returns the patched endpoints.
func (c *FakeEndpoints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Endpoints, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(endpointsResource, c.ns, name, data, subresources...), &v1.Endpoints{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Endpoints), err
}
コード例 #24
0
// Patch applies the patch and returns the patched replicationController.
func (c *FakeReplicationControllers) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ReplicationController, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(replicationcontrollersResource, c.ns, name, data, subresources...), &v1.ReplicationController{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.ReplicationController), err
}
コード例 #25
0
// Patch applies the patch and returns the patched daemonSet.
func (c *FakeDaemonSets) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.DaemonSet, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(daemonsetsResource, c.ns, name, data, subresources...), &extensions.DaemonSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*extensions.DaemonSet), err
}
コード例 #26
0
// Patch applies the patch and returns the patched configMap.
func (c *FakeConfigMaps) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ConfigMap, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(configmapsResource, c.ns, name, data, subresources...), &v1.ConfigMap{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1.ConfigMap), err
}
コード例 #27
0
// Patch applies the patch and returns the patched networkPolicy.
func (c *FakeNetworkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *extensions.NetworkPolicy, err error) {
	obj, err := c.Fake.
		Invokes(core.NewPatchSubresourceAction(networkpoliciesResource, c.ns, name, data, subresources...), &extensions.NetworkPolicy{})

	if obj == nil {
		return nil, err
	}
	return obj.(*extensions.NetworkPolicy), err
}