Class: OrchestratorClient::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/orchestrator_client/command.rb

Instance Method Summary collapse

Constructor Details

#initialize(https) ⇒ Command

Returns a new instance of Command.



3
4
5
# File 'lib/orchestrator_client/command.rb', line 3

def initialize(https)
  @https = https
end

Instance Method Details

#deploy(options = {}) ⇒ Object

Raises:

  • (ArgumentError)


12
13
14
15
# File 'lib/orchestrator_client/command.rb', line 12

def deploy(options = {})
  raise ArgumentError, 'Must pass options as a hash' unless options.is_a? Hash
  @https.post("command/deploy", options)
end

#stop(job_number) ⇒ Object



17
18
19
20
# File 'lib/orchestrator_client/command.rb', line 17

def stop(job_number)
  data = {"job" => "#{job_number}"}
  @https.post("command/stop",data)
end

#task(options = {}) ⇒ Object

Raises:

  • (ArgumentError)


7
8
9
10
# File 'lib/orchestrator_client/command.rb', line 7

def task(options = {})
  raise ArgumentError, 'Must pass options as a hash' unless options.is_a? Hash
  @https.post("command/task", options)
end