# File lib/fog/vcloud_director/models/compute/vapp.rb, line 31 def custom_fields requires :id service.custom_fields( :vapp => self) end
# File lib/fog/vcloud_director/models/compute/vapp.rb, line 131 def destroy requires :id begin response = service.delete_vapp(id) rescue Fog::Compute::VcloudDirector::BadRequest => ex Fog::Logger.debug(ex.message) return false end service.process_task(response.body) end
Power off all VMs in the vApp.
# File lib/fog/vcloud_director/models/compute/vapp.rb, line 60 def power_off requires :id begin response = service.post_power_off_vapp(id) rescue Fog::Compute::VcloudDirector::BadRequest => ex Fog::Logger.debug(ex.message) return false end service.process_task(response.body) end
Power on all VMs in the vApp.
# File lib/fog/vcloud_director/models/compute/vapp.rb, line 72 def power_on requires :id begin response = service.post_power_on_vapp(id) rescue Fog::Compute::VcloudDirector::BadRequest => ex Fog::Logger.debug(ex.message) return false end service.process_task(response.body) end
Reboot all VMs in the vApp.
# File lib/fog/vcloud_director/models/compute/vapp.rb, line 84 def reboot requires :id begin response = service.post_reboot_vapp(id) rescue Fog::Compute::VcloudDirector::BadRequest => ex Fog::Logger.debug(ex.message) return false end service.process_task(response.body) end
Reset all VMs in the vApp.
# File lib/fog/vcloud_director/models/compute/vapp.rb, line 96 def reset requires :id begin response = service.post_reset_vapp(id) rescue Fog::Compute::VcloudDirector::BadRequest => ex Fog::Logger.debug(ex.message) return false end service.process_task(response.body) end
Shut down all VMs in the vApp.
# File lib/fog/vcloud_director/models/compute/vapp.rb, line 108 def shutdown requires :id begin response = service.post_shutdown_vapp(id) rescue Fog::Compute::VcloudDirector::BadRequest => ex Fog::Logger.debug(ex.message) return false end service.process_task(response.body) end
Suspend all VMs in the vApp.
# File lib/fog/vcloud_director/models/compute/vapp.rb, line 120 def suspend requires :id begin response = service.post_suspend_vapp(id) rescue Fog::Compute::VcloudDirector::BadRequest => ex Fog::Logger.debug(ex.message) return false end service.process_task(response.body) end
@param [String] action The specified action is applied to all virtual
machines in the vApp. All values other than **default** ignore actions, order, and delay specified in the StartupSection. One of:
powerOff (Power off the virtual machines. This is the default action if this attribute is missing or empty)
suspend (Suspend the virtual machines)
shutdown (Shut down the virtual machines)
force (Attempt to power off the virtual machines. Failures in undeploying the virtual machine or associated networks are ignored. All references to the vApp and its virtual machines are removed from the database)
default (Use the actions, order, and delay specified in the StartupSection)
# File lib/fog/vcloud_director/models/compute/vapp.rb, line 49 def undeploy(action='powerOff') begin response = service.post_undeploy_vapp(id, :UndeployPowerAction => action) rescue Fog::Compute::VcloudDirector::BadRequest => ex Fog::Logger.debug(ex.message) return false end service.process_task(response.body) end
# File lib/fog/vcloud_director/models/compute/vapp.rb, line 21 def vms requires :id service.vms(:vapp => self) end