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



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

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



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

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