Class: VagrantPlugins::VSphere::Action::GetState
- Inherits:
-
Object
- Object
- VagrantPlugins::VSphere::Action::GetState
- Includes:
- Util::VimHelpers
- Defined in:
- lib/vSphere/action/get_state.rb
Constant Summary collapse
- POWERED_ON =
the three possible values of a vSphere VM’s power state
'poweredOn'
- POWERED_OFF =
'poweredOff'
- SUSPENDED =
'suspended'
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ GetState
constructor
A new instance of GetState.
Methods included from Util::VimHelpers
#get_customization_spec_info_by_name, #get_datacenter, #get_datastore, #get_resource_pool, #get_vm_by_uuid
Constructor Details
#initialize(app, env) ⇒ GetState
Returns a new instance of GetState.
15 16 17 |
# File 'lib/vSphere/action/get_state.rb', line 15 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
19 20 21 22 23 |
# File 'lib/vSphere/action/get_state.rb', line 19 def call(env) env[:machine_state_id] = get_state(env[:vSphere_connection], env[:machine]) @app.call env end |