Class: Fog::Vcloud::Compute::Organizations

Inherits:
Fog::Vcloud::Collection show all
Defined in:
lib/fog/vcloud/models/compute/organizations.rb

Instance Method Summary collapse

Methods inherited from Fog::Vcloud::Collection

#check_href!, #load

Instance Method Details

#allObject



13
14
15
16
17
18
19
20
21
# File 'lib/fog/vcloud/models/compute/organizations.rb', line 13

def all
  raw_orgs = if service.version == '1.0'
    service.
  else
    service.request(service.basic_request_params("#{service.base_path_url}/org/"))
  end
  data = raw_orgs.body[:Org]
  load(data)
end

#get(uri) ⇒ Object



23
24
25
26
27
# File 'lib/fog/vcloud/models/compute/organizations.rb', line 23

def get(uri)
  service.get_organization(uri)
rescue Fog::Errors::NotFound
  nil
end