class Marathon::Deployments
This class represents a set of Deployments
Public Class Methods
new(marathon_instance)
click to toggle source
# File lib/marathon/deployment.rb, line 56 def initialize(marathon_instance) @marathon_instance = marathon_instance @connection = @marathon_instance.connection end
Public Instance Methods
delete(id, force = false)
click to toggle source
Cancel the deployment with id. id
: Deployment's id force
: If set to false (the default) then the deployment is canceled and a new deployment
is created to restore the previous configuration. If set to true, then the deployment is still canceled but no rollback deployment is created.
# File lib/marathon/deployment.rb, line 72 def delete(id, force = false) query = {} query[:force] = true if force json = @connection.delete("/v2/deployments/#{id}") Marathon::DeploymentInfo.new(json, @marathon_instance) end
list()
click to toggle source
List running deployments.
# File lib/marathon/deployment.rb, line 62 def list json = @connection.get('/v2/deployments') json.map { |j| Marathon::Deployment.new(j, @marathon_instance) } end