當前位置: 首頁>>代碼示例>>Golang>>正文


Golang core.NewRootUpdateAction函數代碼示例

本文整理匯總了Golang中k8s/io/kubernetes/pkg/client/testing/core.NewRootUpdateAction函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewRootUpdateAction函數的具體用法?Golang NewRootUpdateAction怎麽用?Golang NewRootUpdateAction使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NewRootUpdateAction函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: Update

func (c *FakeNetworks) Update(network *api.Network) (result *api.Network, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction("networks", network), &api.Network{})
	if obj == nil {
		return nil, err
	}
	return obj.(*api.Network), err
}
開發者ID:thed00de,項目名稱:hypernetes,代碼行數:8,代碼來源:fake_network.go

示例2: Update

func (c *FakeClusterRoles) Update(inObj *authorizationapi.ClusterRole) (*authorizationapi.ClusterRole, error) {
	obj, err := c.Fake.Invokes(core.NewRootUpdateAction(clusterRolesResource, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*authorizationapi.ClusterRole), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_clusterroles.go

示例3: Update

func (c *FakeComponentStatus) Update(componentStatus *api.ComponentStatus) (result *api.ComponentStatus, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction("componentStatus", componentStatus), &api.ComponentStatus{})
	if obj == nil {
		return nil, err
	}
	return obj.(*api.ComponentStatus), err
}
開發者ID:mitake,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_componentstatus.go

示例4: Update

func (c *FakeUserIdentityMappings) Update(inObj *userapi.UserIdentityMapping) (*userapi.UserIdentityMapping, error) {
	obj, err := c.Fake.Invokes(core.NewRootUpdateAction(userIdentityMappingsResource, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*userapi.UserIdentityMapping), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_useridentitymappings.go

示例5: Update

func (c *FakePersistentVolumes) Update(persistentVolume *api.PersistentVolume) (result *api.PersistentVolume, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction("persistentVolumes", persistentVolume), &api.PersistentVolume{})
	if obj == nil {
		return nil, err
	}
	return obj.(*api.PersistentVolume), err
}
開發者ID:mitake,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_persistentvolume.go

示例6: Update

func (c *FakeIdentities) Update(inObj *userapi.Identity) (*userapi.Identity, error) {
	obj, err := c.Fake.Invokes(core.NewRootUpdateAction(identitiesResource, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*userapi.Identity), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_identities.go

示例7: Update

func (c *FakeClusterResourceQuotas) Update(inObj *quotaapi.ClusterResourceQuota) (*quotaapi.ClusterResourceQuota, error) {
	obj, err := c.Fake.Invokes(core.NewRootUpdateAction(clusteResourceQuotasResource, inObj), inObj)
	if obj == nil {
		return nil, err
	}

	return obj.(*quotaapi.ClusterResourceQuota), err
}
開發者ID:xgwang-zte,項目名稱:origin,代碼行數:8,代碼來源:fake_clusterresourcequota.go

示例8: Update

func (c *FakeProjects) Update(project *api.Project) (result *api.Project, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction(projectsResource, project), &api.Project{})
	if obj == nil {
		return nil, err
	}
	return obj.(*api.Project), err
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:8,代碼來源:fake_project.go

示例9: Update

func (c *FakeComponentStatuses) Update(componentStatus *v1.ComponentStatus) (result *v1.ComponentStatus, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction(componentstatusesResource, componentStatus), &v1.ComponentStatus{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1.ComponentStatus), err
}
開發者ID:CodeJuan,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_componentstatus.go

示例10: Update

func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *v1beta1.PodSecurityPolicy) (result *v1beta1.PodSecurityPolicy, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &v1beta1.PodSecurityPolicy{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta1.PodSecurityPolicy), err
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_podsecuritypolicy.go

示例11: Update

func (c *FakeNamespaces) Update(namespace *v1.Namespace) (result *v1.Namespace, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction(namespacesResource, namespace), &v1.Namespace{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Namespace), err
}
開發者ID:CodeJuan,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_namespace.go

示例12: Update

func (c *FakeNetworks) Update(network *v1.Network) (result *v1.Network, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction(networksResource, network), &v1.Network{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1.Network), err
}
開發者ID:hyperhq,項目名稱:hypernetes,代碼行數:8,代碼來源:fake_network.go

示例13: Update

func (c *FakeClusterRoles) Update(clusterRole *rbac.ClusterRole) (result *rbac.ClusterRole, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction(clusterrolesResource, clusterRole), &rbac.ClusterRole{})
	if obj == nil {
		return nil, err
	}
	return obj.(*rbac.ClusterRole), err
}
開發者ID:alex-mohr,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_clusterrole.go

示例14: Update

func (c *FakeClusters) Update(cluster *federation.Cluster) (result *federation.Cluster, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction(clustersResource, cluster), &federation.Cluster{})
	if obj == nil {
		return nil, err
	}
	return obj.(*federation.Cluster), err
}
開發者ID:Clarifai,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_cluster.go

示例15: Update

func (c *FakeClusterRoleBindings) Update(clusterRoleBinding *v1alpha1.ClusterRoleBinding) (result *v1alpha1.ClusterRoleBinding, err error) {
	obj, err := c.Fake.
		Invokes(core.NewRootUpdateAction(clusterrolebindingsResource, clusterRoleBinding), &v1alpha1.ClusterRoleBinding{})
	if obj == nil {
		return nil, err
	}
	return obj.(*v1alpha1.ClusterRoleBinding), err
}
開發者ID:ncdc,項目名稱:kubernetes,代碼行數:8,代碼來源:fake_clusterrolebinding.go


注:本文中的k8s/io/kubernetes/pkg/client/testing/core.NewRootUpdateAction函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。