Adding compatibility for marathon 1.5
This commit is contained in:
parent
461ebf6d88
commit
04d8b5d483
35 changed files with 2257 additions and 63 deletions
12
vendor/github.com/gambol99/go-marathon/deployment.go
generated
vendored
12
vendor/github.com/gambol99/go-marathon/deployment.go
generated
vendored
|
@ -29,6 +29,7 @@ type Deployment struct {
|
|||
CurrentStep int `json:"currentStep"`
|
||||
TotalSteps int `json:"totalSteps"`
|
||||
AffectedApps []string `json:"affectedApps"`
|
||||
AffectedPods []string `json:"affectedPods"`
|
||||
Steps [][]*DeploymentStep `json:"-"`
|
||||
XXStepsRaw json.RawMessage `json:"steps"` // Holds raw steps JSON to unmarshal later
|
||||
CurrentActions []*DeploymentStep `json:"currentActions"`
|
||||
|
@ -107,8 +108,17 @@ func (r *marathonClient) Deployments() ([]*Deployment, error) {
|
|||
// id: the deployment id you wish to delete
|
||||
// force: whether or not to force the deletion
|
||||
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(fmt.Sprintf("%s/%s", marathonAPIDeployments, id), nil, deployment)
|
||||
err := r.apiDelete(path, nil, deployment)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue