本文整理匯總了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewPatchSubresourceAction函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewPatchSubresourceAction函數的具體用法?Golang NewPatchSubresourceAction怎麽用?Golang NewPatchSubresourceAction使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了NewPatchSubresourceAction函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Patch
// 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: Patch
// 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: Patch
// 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: Patch
// 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: Patch
// 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: Patch
// 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: Patch
// 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: PatchStatus
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: Patch
// 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: Patch
// 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: Patch
// 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: Patch
// 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: PatchStatus
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: Patch
// 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: Patch
// 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
}