module Fog module Compute class Vcloudng class Real def put_vm_memory(vm_id, memory) data = < byte * 2^20 Memory Size #{memory} MB of memory 5 0 4 #{memory} 0 EOF request( :body => data, :expects => 202, :headers => { 'Content-Type' => 'application/vnd.vmware.vcloud.rasdItem+xml', 'Accept' => 'application/*+xml;version=1.5' }, :method => 'PUT', :parser => Fog::ToHashDocument.new, :path => "vApp/#{vm_id}/virtualHardwareSection/memory" ) end end end end end