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

- (Object) all



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

- (Object) get(uri)



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