mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
multiregion CLI: nomad deployment unblock
This commit is contained in:
19
vendor/github.com/hashicorp/nomad/api/deployments.go
generated
vendored
19
vendor/github.com/hashicorp/nomad/api/deployments.go
generated
vendored
@@ -107,6 +107,19 @@ func (d *Deployments) PromoteGroups(deploymentID string, groups []string, q *Wri
|
||||
return &resp, wm, nil
|
||||
}
|
||||
|
||||
// Unblock is used to unblock the given deployment.
|
||||
func (d *Deployments) Unblock(deploymentID string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) {
|
||||
var resp DeploymentUpdateResponse
|
||||
req := &DeploymentUnblockRequest{
|
||||
DeploymentID: deploymentID,
|
||||
}
|
||||
wm, err := d.client.write("/v1/deployment/unblock/"+deploymentID, req, &resp, q)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
return &resp, wm, nil
|
||||
}
|
||||
|
||||
// SetAllocHealth is used to set allocation health for allocs that are part of
|
||||
// the given deployment
|
||||
func (d *Deployments) SetAllocHealth(deploymentID string, healthy, unhealthy []string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) {
|
||||
@@ -260,6 +273,12 @@ type DeploymentFailRequest struct {
|
||||
WriteRequest
|
||||
}
|
||||
|
||||
// DeploymentUnblockRequest is used to unblock a particular deployment
|
||||
type DeploymentUnblockRequest struct {
|
||||
DeploymentID string
|
||||
WriteRequest
|
||||
}
|
||||
|
||||
// SingleDeploymentResponse is used to respond with a single deployment
|
||||
type SingleDeploymentResponse struct {
|
||||
Deployment *Deployment
|
||||
|
||||
Reference in New Issue
Block a user