Class: VagrantPlugins::VSphere::Action::PowerOn
- Inherits:
-
Object
- Object
- VagrantPlugins::VSphere::Action::PowerOn
- Includes:
- Util::VimHelpers, Util::VmHelpers
- Defined in:
- lib/vSphere/action/power_on.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, _env) ⇒ PowerOn
constructor
A new instance of PowerOn.
Methods included from Util::VmHelpers
#create_snapshot, #delete_snapshot, #enumerate_snapshots, #get_vm_state, #power_off_vm, #power_on_vm, #powered_off?, #powered_on?, #restore_snapshot, #suspended?
Methods included from Util::VimHelpers
#find_clustercompute_or_compute_resource, #get_compute_resource, #get_customization_spec_info_by_name, #get_datacenter, #get_datastore, #get_network_by_name, #get_resource_pool, #get_vm_by_uuid
Constructor Details
#initialize(app, _env) ⇒ PowerOn
Returns a new instance of PowerOn.
13 14 15 |
# File 'lib/vSphere/action/power_on.rb', line 13 def initialize(app, _env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/vSphere/action/power_on.rb', line 17 def call(env) vm = get_vm_by_uuid env[:vSphere_connection], env[:machine] env[:ui].info I18n.t('vsphere.power_on_vm') power_on_vm(vm) @app.call env end |