lib/fog/vcloud_director/models/compute/vm.rb in fog-1.37.0 vs lib/fog/vcloud_director/models/compute/vm.rb in fog-1.38.0
- old
+ new
@@ -12,15 +12,17 @@
attribute :name
attribute :type
attribute :description
attribute :href
attribute :status
+ attribute :deployed
attribute :operating_system
attribute :ip_address
attribute :cpu, :type => :integer
attribute :memory, :type => :integer
attribute :hard_disks, :aliases => :disks
+ attribute :network_adapters
def reload
# when collection.vapp is nil, it means it's fatherless,
# vms from different vapps are loaded in the same collection.
# This situation comes from a "query" result
@@ -81,9 +83,20 @@
# Reset the VM.
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
+
+ def undeploy
+ requires :id
+ begin
+ response = service.post_undeploy_vapp(id)
rescue Fog::Compute::VcloudDirector::BadRequest => ex
Fog::Logger.debug(ex.message)
return false
end
service.process_task(response.body)