// DeleteDeployment delete a current deployment from marathon
// 	id:		the deployment id you wish to delete
// 	force:	whether or not to force the deletion
963444
func (r *marathonClient) DeleteDeployment(id string, force bool) (*DeploymentID, error) {
	path := fmt.Sprintf("%s/%s", marathonAPIDeployments, id)

	// if force=true, no body is returned
	if force {
		path += "?force=true"
		return nil, r.apiDelete(path, nil, nil)
	}

	deployment := new(DeploymentID)
	err := r.apiDelete(path, nil, deployment)

	if err != nil {
		return nil, err
	}

	return deployment, nil
}
1144875
func (dc *DeploymentController) updateDeploymentAndClearRollbackTo(d *apps.Deployment) error {
	klog.V(4).Infof("Cleans up rollbackTo of deployment %q", d.Name)
	setRollbackTo(d, nil)
	_, err := dc.client.AppsV1().Deployments(d.Namespace).Update(d)
	return err
}
398218
func RunRemove(dockerCli command.Cli, flags *pflag.FlagSet, commonOrchestrator command.Orchestrator, opts options.Remove) error {
	return runOrchestratedCommand(dockerCli, flags, commonOrchestrator,
		func() error { return swarm.RunRemove(dockerCli, opts) },
		func(kli *kubernetes.KubeCli) error { return kubernetes.RunRemove(kli, opts) })
}
967182
func (m MarathonDeployer) BuildDeploymentGroup(services []*api.Service, client gomarathonClientAbstractor) *deploymentGroup {
	var deployments = make([]deployment, len(services))
	g := m.generateUniqueUID(client)

	dependents := m.findDependencies(services)
	for i := range services {
		if dependents[services[i].Name] != 0 {
			services[i].Deployment.Count = 1
		}

		m.prepareServiceForDeployment(g, services[i])
		deployments[i] = createDeployment(services[i], client)
	}

	myGroup := new(deploymentGroup)
	myGroup.deployments = deployments

	return myGroup
}
1043737
func (_m *Marathon) UpdateApplication(application *marathon.Application, force bool) (*marathon.DeploymentID, error) {
	ret := _m.Called(application, force)

	var r0 *marathon.DeploymentID
	if rf, ok := ret.Get(0).(func(*marathon.Application, bool) *marathon.DeploymentID); ok {
		r0 = rf(application, force)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*marathon.DeploymentID)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*marathon.Application, bool) error); ok {
		r1 = rf(application, force)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
67539
func deleteDeployment(client kubernetes.Interface, namespace string) error {
	policy := metav1.DeletePropagationBackground
	err := client.AppsV1().Deployments(namespace).Delete(deploymentName, &metav1.DeleteOptions{
		PropagationPolicy: &policy,
	})
	return ingoreNotFound(err)
}
276314
func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, checkpointID string) error {
	resp, err := cli.delete(ctx, "/containers/"+containerID+"/checkpoints/"+checkpointID, nil, nil)
	ensureReaderClosed(resp)
	return err
}
319302
func (s *SkipWaitTimeForInstanceTerminationInput) SetDeploymentId(v string) *SkipWaitTimeForInstanceTerminationInput {
	s.DeploymentId = &v
	return s
}
1062519
func (s *Deployment) SetDeploymentId(v string) *Deployment {
	s.DeploymentId = &v
	return s
}
738961
func (dc *DeploymentController) deleteReplicaSet(obj interface{}) {
	rs, ok := obj.(*apps.ReplicaSet)

	// When a delete is dropped, the relist will notice a pod in the store not
	// in the list, leading to the insertion of a tombstone object which contains
	// the deleted key/value. Note that this value might be stale. If the ReplicaSet
	// changed labels the new deployment will not be woken up till the periodic resync.
	if !ok {
		tombstone, ok := obj.(cache.DeletedFinalStateUnknown)
		if !ok {
			utilruntime.HandleError(fmt.Errorf("Couldn't get object from tombstone %#v", obj))
			return
		}
		rs, ok = tombstone.Obj.(*apps.ReplicaSet)
		if !ok {
			utilruntime.HandleError(fmt.Errorf("Tombstone contained object that is not a ReplicaSet %#v", obj))
			return
		}
	}

	controllerRef := metav1.GetControllerOf(rs)
	if controllerRef == nil {
		// No controller should care about orphans being deleted.
		return
	}
	d := dc.resolveControllerRef(rs.Namespace, controllerRef)
	if d == nil {
		return
	}
	klog.V(4).Infof("ReplicaSet %s deleted.", rs.Name)
	dc.enqueueDeployment(d)
}
673919
func (s *GetDeploymentOutput) SetDeploymentId(v string) *GetDeploymentOutput {
	s.DeploymentId = &v
	return s
}
705168
func (s *UpdateStageInput) SetDeploymentId(v string) *UpdateStageInput {
	s.DeploymentId = &v
	return s
}
149082
func (s *CreateStageOutput) SetDeploymentId(v string) *CreateStageOutput {
	s.DeploymentId = &v
	return s
}
1298161
func (s *CreateStageInput) SetDeploymentId(v string) *CreateStageInput {
	s.DeploymentId = &v
	return s
}
1292151
func (s *ListDeploymentTargetsInput) SetDeploymentId(v string) *ListDeploymentTargetsInput {
	s.DeploymentId = &v
	return s
}
1112744
func (s *ECSTarget) SetDeploymentId(v string) *ECSTarget {
	s.DeploymentId = &v
	return s
}
1210937
func (s *GetStageOutput) SetDeploymentId(v string) *GetStageOutput {
	s.DeploymentId = &v
	return s
}