예제 #1
0
func (c *FakePods) Bind(binding *api.Binding) error {
	action := core.CreateActionImpl{}
	action.Verb = "create"
	action.Resource = "pods"
	action.Subresource = "bindings"
	action.Object = binding

	_, err := c.Fake.Invokes(action, binding)
	return err
}
func (c *FakeDeployments) Rollback(deploymentRollback *extensions.DeploymentRollback) error {
	action := core.CreateActionImpl{}
	action.Verb = "create"
	action.Resource = "deployments"
	action.Subresource = "rollback"
	action.Object = deploymentRollback

	_, err := c.Fake.Invokes(action, deploymentRollback)
	return err
}
func (c *FakeNamespaces) Finalize(namespace *api.Namespace) (*api.Namespace, error) {
	action := core.CreateActionImpl{}
	action.Verb = "create"
	action.Resource = "namespaces"
	action.Subresource = "finalize"
	action.Object = namespace

	obj, err := c.Fake.Invokes(action, namespace)
	if obj == nil {
		return nil, err
	}

	return obj.(*api.Namespace), err
}