Sha256: 75672748a2d76d5c4b34252f87ef4a62f8f27b6641b20a37992afd7d38d29c4e
Contents?: true
Size: 1.7 KB
Versions: 2
Compression:
Stored size: 1.7 KB
Contents
module Fog module VcloudDirector class Compute class Real # Retrieves the lease settings section of a vApp. # # @param [String] id Object identifier of the vApp. # @return [Excon::Response] # * body<~Hash>: # # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-LeaseSettingsSection-vApp.html # @since vCloud API version 1.0 def get_lease_settings_section_vapp(id) request( :expects => 200, :idempotent => true, :method => 'GET', :parser => Fog::ToHashDocument.new, :path => "vApp/#{id}/leaseSettingsSection" ) end end class Mock def get_lease_settings_section_vapp(id) type = 'application/vnd.vmware.vcloud.leaseSettingsSection+xml' unless data[:vapps][id] raise Fog::VcloudDirector::Compute::Forbidden.new( 'This operation is denied.' ) end Excon::Response.new( :status => 200, :headers => {'Content-Type' => "#{type};version=#{api_version}"}, :body => get_vapp_lease_settings_section_body(id) ) end def get_vapp_lease_settings_section_body(id) { :type => "application/vnd.vmware.vcloud.leaseSettingsSection+xml", :href => make_href("vApp/#{id}/leaseSettingsSection/"), :ovf_required=>"false", :"ovf:Info"=>"Lease settings section", :DeploymentLeaseInSeconds=>"0", :StorageLeaseInSeconds=>"0", } end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems