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)


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

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

#plan_finish(options = {}) ⇒ Object

Raises:

  • (ArgumentError)


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

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

#plan_start(options = {}) ⇒ Object

Raises:

  • (ArgumentError)


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

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

#plan_task(options = {}) ⇒ Object

Raises:

  • (ArgumentError)


22
23
24
25
# File 'lib/orchestrator_client/command.rb', line 22

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

#stop(job_number) ⇒ Object



27
28
29
30
# File 'lib/orchestrator_client/command.rb', line 27

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

#task(options = {}) ⇒ Object

Raises:

  • (ArgumentError)


32
33
34
35
# File 'lib/orchestrator_client/command.rb', line 32

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