Class: OpsManager::InstallationRunner
- Inherits:
-
Object
- Object
- OpsManager::InstallationRunner
- Extended by:
- Forwardable
- Defined in:
- lib/ops_manager/installation_runner.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/ops_manager/installation_runner.rb', line 6 def id @id end |
Class Method Details
.trigger! ⇒ Object
14 15 16 |
# File 'lib/ops_manager/installation_runner.rb', line 14 def self.trigger! new.trigger! end |
Instance Method Details
#trigger! ⇒ Object
8 9 10 11 12 |
# File 'lib/ops_manager/installation_runner.rb', line 8 def trigger! res = trigger_installation( body: body ) @id = JSON.parse(res.body).fetch('install').fetch('id').to_i self end |
#wait_for_result ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/ops_manager/installation_runner.rb', line 18 def wait_for_result while JSON.parse(get_installation(id).body).fetch('status') == 'running' print ' .'.green sleep 10 end puts '' end |