lib/vagrant-vcloud/action/power_off.rb in vagrant-vcloud-0.2.2 vs lib/vagrant-vcloud/action/power_off.rb in vagrant-vcloud-0.3.0

- old
+ new

@@ -18,26 +18,13 @@ @logger.debug( "Number of VMs in the vApp: #{test_vapp[:vms_hash].count}" ) - if test_vapp[:vms_hash].count == 1 - - # Poweroff vApp - env[:ui].info('Powering off vApp...') - vapp_stop_task = cnx.poweroff_vapp(vapp_id) - vapp_stop_wait = cnx.wait_task_completion(vapp_stop_task) - - unless vapp_stop_wait[:errormsg].nil? - fail Errors::StopVAppError, :message => vapp_stop_wait[:errormsg] - end - - else - # Poweroff VM - env[:ui].info('Powering off VM...') - task_id = cnx.poweroff_vm(vm_id) - cnx.wait_task_completion(task_id) - end + # Poweroff VM + env[:ui].info('Powering off VM...') + task_id = cnx.poweroff_vm(vm_id) + cnx.wait_task_completion(task_id) @app.call env end end end