1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/vcloud_director/requests/compute/helper.rb
2013-10-08 18:59:23 +01:00

15 lines
358 B
Ruby

class VcloudDirector
module Compute
module Helper
def self.current_org(service)
session = service.get_current_session.body
link = session[:Link].detect do |l|
l[:type] == 'application/vnd.vmware.vcloud.org+xml'
end
service.get_organization(link[:href].split('/').last).body
end
end
end
end