当前位置: 首页>>代码示例>>Golang>>正文


Golang testclient.NewCreateAction函数代码示例

本文整理汇总了Golang中k8s/io/kubernetes/pkg/client/unversioned/testclient.NewCreateAction函数的典型用法代码示例。如果您正苦于以下问题:Golang NewCreateAction函数的具体用法?Golang NewCreateAction怎么用?Golang NewCreateAction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了NewCreateAction函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: Create

func (c *FakeSubjectRulesReviews) Create(inObj *authorizationapi.SubjectRulesReview) (*authorizationapi.SubjectRulesReview, error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("selfsubjectrulesreviews", c.Namespace, inObj), &authorizationapi.SubjectRulesReview{})
	if cast, ok := obj.(*authorizationapi.SubjectRulesReview); ok {
		return cast, err
	}
	return nil, err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:7,代码来源:fake_subjectrulesreview.go

示例2: Create

func (c *FakeLocalResourceAccessReviews) Create(inObj *authorizationapi.LocalResourceAccessReview) (*authorizationapi.ResourceAccessReviewResponse, error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("localresourceaccessreviews", c.Namespace, inObj), &authorizationapi.ResourceAccessReviewResponse{})
	if cast, ok := obj.(*authorizationapi.ResourceAccessReviewResponse); ok {
		return cast, err
	}
	return nil, err
}
开发者ID:RomainVabre,项目名称:origin,代码行数:7,代码来源:fake_localresourceaccessreview.go

示例3: Create

func (c *FakeRoutes) Create(inObj *routeapi.Route) (*routeapi.Route, error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("routes", c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*routeapi.Route), err
}
开发者ID:johnmccawley,项目名称:origin,代码行数:8,代码来源:fake_routes.go

示例4: Create

func (c *FakeImageStreamTags) Create(inObj *imageapi.ImageStreamTag) (*imageapi.ImageStreamTag, error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("imagestreamtags", c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*imageapi.ImageStreamTag), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:8,代码来源:fake_imagestreamtags.go

示例5: Create

func (c *FakeBackingServiceInstances) Create(inObj *backingserviceinstanceapi.BackingServiceInstance) (*backingserviceinstanceapi.BackingServiceInstance, error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("backingserviceinstances", c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*backingserviceinstanceapi.BackingServiceInstance), err
}
开发者ID:asiainfoLDP,项目名称:datafactory,代码行数:8,代码来源:fake_backingserviceinsts.go

示例6: Create

func (c *FakeRoleBindings) Create(inObj *authorizationapi.RoleBinding) (*authorizationapi.RoleBinding, error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("rolebindings", c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*authorizationapi.RoleBinding), err
}
开发者ID:RomainVabre,项目名称:origin,代码行数:8,代码来源:fake_rolebindings.go

示例7: Create

func (c *FakeTemplateConfigs) Create(inObj *templateapi.Template) (*templateapi.Template, error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("templateconfigs", c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*templateapi.Template), err
}
开发者ID:RomainVabre,项目名称:origin,代码行数:8,代码来源:fake_template_configs.go

示例8: Create

func (c *FakeEgressNetworkPolicy) Create(inObj *sdnapi.EgressNetworkPolicy) (*sdnapi.EgressNetworkPolicy, error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("egressnetworkpolicies", c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*sdnapi.EgressNetworkPolicy), err
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:8,代码来源:fake_egressnetworkpolicy.go

示例9: Create

func (c *FakeBuilds) Create(inObj *buildapi.Build) (*buildapi.Build, error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("builds", c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*buildapi.Build), err
}
开发者ID:johnmccawley,项目名称:origin,代码行数:8,代码来源:fake_builds.go

示例10: Rollback

func (c *FakeDeploymentConfigs) Rollback(inObj *deployapi.DeploymentConfigRollback) (result *deployapi.DeploymentConfig, err error) {
	obj, err := c.Fake.Invokes(ktestclient.NewCreateAction("deploymentconfigrollbacks", c.Namespace, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*deployapi.DeploymentConfig), err
}
开发者ID:ncantor,项目名称:origin,代码行数:8,代码来源:fake_deploymentconfigs.go

示例11: Clone

func (c *FakeBuilds) Clone(request *buildapi.BuildRequest) (result *buildapi.Build, err error) {
	action := ktestclient.NewCreateAction("buildconfigs", c.Namespace, request)
	action.Subresource = "clone"
	obj, err := c.Fake.Invokes(action, &buildapi.Build{})
	if obj == nil {
		return nil, err
	}

	return obj.(*buildapi.Build), err
}
开发者ID:johnmccawley,项目名称:origin,代码行数:10,代码来源:fake_builds.go

示例12: InstantiateBinary

func (c *FakeBuildConfigs) InstantiateBinary(request *buildapi.BinaryBuildRequestOptions, r io.Reader) (result *buildapi.Build, err error) {
	action := ktestclient.NewCreateAction("buildconfigs", c.Namespace, request)
	action.Subresource = "instantiatebinary"
	obj, err := c.Fake.Invokes(action, &buildapi.Build{})
	if obj == nil {
		return nil, err
	}

	return obj.(*buildapi.Build), err
}
开发者ID:RomainVabre,项目名称:origin,代码行数:10,代码来源:fake_buildconfigs.go

示例13: expectCreateRCAction

func (f *fixture) expectCreateRCAction(rc *api.ReplicationController) {
	f.actions = append(f.actions, testclient.NewCreateAction("replicationcontrollers", rc.Namespace, rc))
	f.objects.Items = append(f.objects.Items, rc)
}
开发者ID:rrati,项目名称:origin,代码行数:4,代码来源:deployment_controller_test.go

示例14: Create

func (c *fakeRc) Create(controller *api.ReplicationController) (*api.ReplicationController, error) {
	c.Fake.Invokes(testclient.NewCreateAction("replicationcontrollers", controller.Namespace, controller), nil)
	return controller, nil
}
开发者ID:ngbinh,项目名称:kubernetes,代码行数:4,代码来源:rolling_updater_test.go

示例15: CreateBinding

func (c *FakeBackingServiceInstances) CreateBinding(name string, bro *backingserviceinstanceapi.BindingRequestOptions) (err error) {
	_, err = c.Fake.Invokes(ktestclient.NewCreateAction("backingserviceinstances/binding", c.Namespace, bro), bro)
	return
}
开发者ID:asiainfoLDP,项目名称:datafactory,代码行数:4,代码来源:fake_backingserviceinsts.go


注:本文中的k8s/io/kubernetes/pkg/client/unversioned/testclient.NewCreateAction函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。