Sha256: d865df015a8bc714d9f1ee98c061d22c50ba059826786aa4ad6d544aef656a80
Contents?: true
Size: 1.53 KB
Versions: 2
Compression:
Stored size: 1.53 KB
Contents
module Fog module VcloudDirector class Compute class Real # Retrieve the owner 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-VAppOwner.html # @since vCloud API version 1.5 def get_vapp_owner(id) request( :expects => 200, :idempotent => true, :method => 'GET', :parser => Fog::ToHashDocument.new, :path => "vApp/#{id}/owner" ) end end class Mock def get_vapp_owner(id) type = 'application/vnd.vmware.vcloud.owner+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_owner_section_body(id) ) end def get_owner_section_body(id) { :type => 'application/vnd.vmware.vcloud.owner+xml', :User => { :type => "application/vnd.vmware.admin.user+xml", :name => "mockuser", :href => make_href("user/12345678-1234-1234-1234-12345678df2b"), } } 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/get_vapp_owner.rb |
fog-vcloud-director-0.3.0 | lib/fog/vcloud_director/requests/compute/get_vapp_owner.rb |