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



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

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)



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

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