Sha256: 77459c4c0fb9280d092cd925f5c4a61b43628a8c5473f8e13680825f435e29d7
Contents?: true
Size: 1.55 KB
Versions: 2
Compression:
Stored size: 1.55 KB
Contents
module Fog module VcloudDirector class Compute class Real # Update VM's capabilities. # # @param [String] id Object identifier of the VM. # @param [Hash] options # @option options [Boolean] :MemoryHotAddEnabled True if the virtual # machine supports addition of memory while powered on. # @option options [Boolean] :CpuHotAddEnabled True if the virtual # machine supports addition of virtual CPUs while powered on. # @return [Excon::Response] # * body<~Hash>: # # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/PUT-VmCapabilities.html def put_vm_capabilities(id, options={}) body = Nokogiri::XML::Builder.new do attrs = { :xmlns => 'http://www.vmware.com/vcloud/v1.5' } VmCapabilities(attrs) { if options.key?(:MemoryHotAddEnabled) MemoryHotAddEnabled options[:MemoryHotAddEnabled] end if options.key?(:CpuHotAddEnabled) MemoryHotAddEnabled options[:CpuHotAddEnabled] end } end.to_xml request( :body => body, :expects => 202, :headers => {'Content-Type' => 'application/vnd.vmware.vcloud.vmCapabilitiesSection+xml'}, :method => 'PUT', :parser => Fog::ToHashDocument.new, :path => "vApp/#{id}/vmCapabilities" ) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-vcloud-director-0.3.1 | lib/fog/vcloud_director/requests/compute/put_vm_capabilities.rb |
fog-vcloud-director-0.3.0 | lib/fog/vcloud_director/requests/compute/put_vm_capabilities.rb |