本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewRootPatchSubresourceAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewRootPatchSubresourceAction函数的具体用法?Golang NewRootPatchSubresourceAction怎么用?Golang NewRootPatchSubresourceAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewRootPatchSubresourceAction函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: Patch
// Patch applies the patch and returns the patched clusterRole.
func (c *FakeClusterRoles) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *rbac.ClusterRole, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(clusterrolesResource, name, data, subresources...), &rbac.ClusterRole{})
if obj == nil {
return nil, err
}
return obj.(*rbac.ClusterRole), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:9,代码来源:fake_clusterrole.go
示例2: Patch
// Patch applies the patch and returns the patched cluster.
func (c *FakeClusters) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *federation.Cluster, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(clustersResource, name, data, subresources...), &federation.Cluster{})
if obj == nil {
return nil, err
}
return obj.(*federation.Cluster), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:9,代码来源:fake_cluster.go
示例3: Patch
// Patch applies the patch and returns the patched thirdPartyResource.
func (c *FakeThirdPartyResources) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *extensions.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(thirdpartyresourcesResource, name, data, subresources...), &extensions.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*extensions.ThirdPartyResource), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:9,代码来源:fake_thirdpartyresource.go
示例4: Patch
// Patch applies the patch and returns the patched certificateSigningRequest.
func (c *FakeCertificateSigningRequests) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *certificates.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(certificatesigningrequestsResource, name, data, subresources...), &certificates.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*certificates.CertificateSigningRequest), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:9,代码来源:fake_certificatesigningrequest.go
示例5: Patch
// Patch applies the patch and returns the patched clusterRoleBinding.
func (c *FakeClusterRoleBindings) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1alpha1.ClusterRoleBinding, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(clusterrolebindingsResource, name, data, subresources...), &v1alpha1.ClusterRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterRoleBinding), err
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:9,代码来源:fake_clusterrolebinding.go
示例6: Patch
// Patch applies the patch and returns the patched storageClass.
func (c *FakeStorageClasses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *storage.StorageClass, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(storageclassesResource, name, data, subresources...), &storage.StorageClass{})
if obj == nil {
return nil, err
}
return obj.(*storage.StorageClass), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:9,代码来源:fake_storageclass.go
示例7: Patch
// Patch applies the patch and returns the patched persistentVolume.
func (c *FakePersistentVolumes) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(persistentvolumesResource, name, data, subresources...), &v1.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*v1.PersistentVolume), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:9,代码来源:fake_persistentvolume.go
示例8: Patch
// Patch applies the patch and returns the patched aPIService.
func (c *FakeAPIServices) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *apiregistration.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(apiservicesResource, name, data, subresources...), &apiregistration.APIService{})
if obj == nil {
return nil, err
}
return obj.(*apiregistration.APIService), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:9,代码来源:fake_apiservice.go
示例9: Patch
// Patch applies the patch and returns the patched podSecurityPolicy.
func (c *FakePodSecurityPolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1beta1.PodSecurityPolicy, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(podsecuritypoliciesResource, name, data, subresources...), &v1beta1.PodSecurityPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.PodSecurityPolicy), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:9,代码来源:fake_podsecuritypolicy.go
示例10: Patch
// Patch applies the patch and returns the patched namespace.
func (c *FakeNamespaces) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Namespace, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(namespacesResource, name, data, subresources...), &api.Namespace{})
if obj == nil {
return nil, err
}
return obj.(*api.Namespace), err
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:9,代码来源:fake_namespace.go
示例11: Patch
// Patch applies the patch and returns the patched componentStatus.
func (c *FakeComponentStatuses) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(componentstatusesResource, name, data, subresources...), &v1.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*v1.ComponentStatus), err
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:9,代码来源:fake_componentstatus.go
示例12: Patch
// Patch applies the patch and returns the patched securityContextConstraints.
func (c *FakeSecurityContextConstraints) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.SecurityContextConstraints, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(securitycontextconstraintsResource, name, data, subresources...), &v1.SecurityContextConstraints{})
if obj == nil {
return nil, err
}
return obj.(*v1.SecurityContextConstraints), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:9,代码来源:fake_securitycontextconstraints.go
示例13: Patch
// Patch applies the patch and returns the patched project.
func (c *FakeProjects) Patch(name string, pt pkg_api.PatchType, data []byte, subresources ...string) (result *api.Project, err error) {
obj, err := c.Fake.
Invokes(core.NewRootPatchSubresourceAction(projectsResource, name, data, subresources...), &api.Project{})
if obj == nil {
return nil, err
}
return obj.(*api.Project), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:9,代码来源:fake_project.go
示例14: PatchStatus
func (c *FakeNodes) PatchStatus(nodeName string, data []byte) (*api.Node, error) {
obj, err := c.Fake.Invokes(
core.NewRootPatchSubresourceAction(nodesResource, nodeName, data, "status"), &api.Node{})
if obj == nil {
return nil, err
}
return obj.(*api.Node), err
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:9,代码来源:fake_node_expansion.go
注:本文中的k8s/io/kubernetes/pkg/client/testing/core.NewRootPatchSubresourceAction函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论