Class: OrchestratorClient::Command
- Inherits:
-
Object
- Object
- OrchestratorClient::Command
- Defined in:
- lib/orchestrator_client/command.rb
Instance Method Summary collapse
- #deploy(options = {}) ⇒ Object
-
#initialize(https) ⇒ Command
constructor
A new instance of Command.
- #plan_finish(options = {}) ⇒ Object
- #plan_start(options = {}) ⇒ Object
- #plan_task(options = {}) ⇒ Object
- #stop(job_number) ⇒ Object
- #task(options = {}) ⇒ Object
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
7 8 9 10 |
# File 'lib/orchestrator_client/command.rb', line 7 def deploy( = {}) raise ArgumentError, 'Must pass options as a hash' unless .is_a? Hash @https.post("command/deploy", ) end |
#plan_finish(options = {}) ⇒ Object
17 18 19 20 |
# File 'lib/orchestrator_client/command.rb', line 17 def plan_finish( = {}) raise ArgumentError, 'Must pass options as a hash' unless .is_a? Hash @https.post("command/plan_finish", ) end |
#plan_start(options = {}) ⇒ Object
12 13 14 15 |
# File 'lib/orchestrator_client/command.rb', line 12 def plan_start( = {}) raise ArgumentError, 'Must pass options as a hash' unless .is_a? Hash @https.post("command/plan_start", ) end |
#plan_task(options = {}) ⇒ Object
22 23 24 25 |
# File 'lib/orchestrator_client/command.rb', line 22 def plan_task( = {}) raise ArgumentError, 'Must pass options as a hash' unless .is_a? Hash @https.post("command/plan_task", ) 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
32 33 34 35 |
# File 'lib/orchestrator_client/command.rb', line 32 def task( = {}) raise ArgumentError, 'Must pass options as a hash' unless .is_a? Hash @https.post("command/task", ) end |