Class: Fog::Vcloud::Compute::Vdcs

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

Instance Method Summary collapse

Methods inherited from Fog::Vcloud::Collection

#check_href!, #load

Instance Method Details

#allObject



13
14
15
16
17
# File 'lib/fog/vcloud/models/compute/vdcs.rb', line 13

def all
  data = service.get_organization(org_uri).links.select { |link| link[:type] == "application/vnd.vmware.vcloud.vdc+xml" }
  data.each { |link| link.delete_if { |key, value| [:rel].include?(key) } }
  load(data)
end

#get(uri) ⇒ Object



19
20
21
22
23
# File 'lib/fog/vcloud/models/compute/vdcs.rb', line 19

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