本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewRootCreateAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewRootCreateAction函数的具体用法?Golang NewRootCreateAction怎么用?Golang NewRootCreateAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewRootCreateAction函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: Create
func (c *FakePersistentVolumes) Create(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction("persistentVolumes", persistentVolume), &api.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*api.PersistentVolume), err
}
开发者ID:mitake,项目名称:kubernetes,代码行数:8,代码来源:fake_persistentvolume.go
示例2: Create
func (c *FakeOAuthAccessTokens) Create(inObj *oauthapi.OAuthAccessToken) (*oauthapi.OAuthAccessToken, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(oAuthAccessTokensResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*oauthapi.OAuthAccessToken), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_oauthaccesstoken.go
示例3: Create
func (c *FakeUserIdentityMappings) Create(inObj *userapi.UserIdentityMapping) (*userapi.UserIdentityMapping, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(userIdentityMappingsResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*userapi.UserIdentityMapping), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_useridentitymappings.go
示例4: Create
func (c *FakeIdentities) Create(inObj *userapi.Identity) (*userapi.Identity, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(identitiesResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*userapi.Identity), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_identities.go
示例5: Create
func (c *FakeClusterResourceQuotas) Create(inObj *quotaapi.ClusterResourceQuota) (*quotaapi.ClusterResourceQuota, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(clusteResourceQuotasResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*quotaapi.ClusterResourceQuota), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_clusterresourcequota.go
示例6: Create
func (c *FakeComponentStatus) Create(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction("componentStatus", componentStatus), &api.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*api.ComponentStatus), err
}
开发者ID:mitake,项目名称:kubernetes,代码行数:8,代码来源:fake_componentstatus.go
示例7: Create
func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{})
if obj == nil {
return nil, err
}
return obj.(*v1beta1.PodSecurityPolicy), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_podsecuritypolicy.go
示例8: Create
func (c *FakeNamespaces) Create(namespace *v1.Namespace) (result *v1.Namespace, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(namespacesResource, namespace), &v1.Namespace{})
if obj == nil {
return nil, err
}
return obj.(*v1.Namespace), err
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:8,代码来源:fake_namespace.go
示例9: Create
func (c *FakeComponentStatuses) Create(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
if obj == nil {
return nil, err
}
return obj.(*v1.ComponentStatus), err
}
开发者ID:CodeJuan,项目名称:kubernetes,代码行数:8,代码来源:fake_componentstatus.go
示例10: Create
func (c *FakeClusterPolicyBindings) Create(inObj *authorizationapi.ClusterPolicyBinding) (*authorizationapi.ClusterPolicyBinding, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(clusterPolicyBindingsResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*authorizationapi.ClusterPolicyBinding), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_clusterpolicybindings.go
示例11: Create
func (c *FakeImages) Create(inObj *imageapi.Image) (*imageapi.Image, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(imagesResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*imageapi.Image), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_images.go
示例12: Create
func (c *FakeNetworks) Create(network *v1.Network) (result *v1.Network, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(networksResource, network), &v1.Network{})
if obj == nil {
return nil, err
}
return obj.(*v1.Network), err
}
开发者ID:hyperhq,项目名称:hypernetes,代码行数:8,代码来源:fake_network.go
示例13: Create
func (c *FakeThirdPartyResources) Create(thirdPartyResource *extensions.ThirdPartyResource) (result *extensions.ThirdPartyResource, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(thirdpartyresourcesResource, thirdPartyResource), &extensions.ThirdPartyResource{})
if obj == nil {
return nil, err
}
return obj.(*extensions.ThirdPartyResource), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:8,代码来源:fake_thirdpartyresource.go
示例14: Create
func (c *FakeClusterRoles) Create(clusterRole *rbac.ClusterRole) (result *rbac.ClusterRole, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(clusterrolesResource, clusterRole), &rbac.ClusterRole{})
if obj == nil {
return nil, err
}
return obj.(*rbac.ClusterRole), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_clusterrole.go
示例15: Create
func (c *FakeCertificateSigningRequests) Create(certificateSigningRequest *certificates.CertificateSigningRequest) (result *certificates.CertificateSigningRequest, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(certificatesigningrequestsResource, certificateSigningRequest), &certificates.CertificateSigningRequest{})
if obj == nil {
return nil, err
}
return obj.(*certificates.CertificateSigningRequest), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:8,代码来源:fake_certificatesigningrequest.go
示例16: Create
func (c *FakeClusterRoleBindings) Create(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{})
if obj == nil {
return nil, err
}
return obj.(*v1alpha1.ClusterRoleBinding), err
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:8,代码来源:fake_clusterrolebinding.go
示例17: Create
func (c *FakeOAuthClient) Create(inObj *oauthapi.OAuthClient) (*oauthapi.OAuthClient, error) {
obj, err := c.Fake.Invokes(core.NewRootCreateAction(oAuthClientsResource, inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*oauthapi.OAuthClient), err
}
开发者ID:xgwang-zte,项目名称:origin,代码行数:8,代码来源:fake_oauthclient.go
示例18: Create
func (c *FakePersistentVolumes) Create(persistentVolume *v1.PersistentVolume) (result *v1.PersistentVolume, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(persistentvolumesResource, persistentVolume), &v1.PersistentVolume{})
if obj == nil {
return nil, err
}
return obj.(*v1.PersistentVolume), err
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:8,代码来源:fake_persistentvolume.go
示例19: Create
func (c *FakeAPIServices) Create(aPIService *apiregistration.APIService) (result *apiregistration.APIService, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(apiservicesResource, aPIService), &apiregistration.APIService{})
if obj == nil {
return nil, err
}
return obj.(*apiregistration.APIService), err
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:8,代码来源:fake_apiservice.go
示例20: Create
func (c *FakeStorageClasses) Create(storageClass *storage.StorageClass) (result *storage.StorageClass, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(storageclassesResource, storageClass), &storage.StorageClass{})
if obj == nil {
return nil, err
}
return obj.(*storage.StorageClass), err
}
开发者ID:humblec,项目名称:kubernetes,代码行数:8,代码来源:fake_storageclass.go
注:本文中的k8s/io/kubernetes/pkg/client/testing/core.NewRootCreateAction函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论