Class: Fog::Compute::Terremark::Vdcs
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Terremark::Vdcs
- Defined in:
- lib/fog/compute/terremark/models/vdcs.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
7 8 9 10 11 12 |
# File 'lib/fog/compute/terremark/models/vdcs.rb', line 7 def all data = service.get_organization(organization_id).body["Links"].select do |entity| entity["type"] == "application/vnd.vmware.vcloud.vdc+xml" end load(data) end |
#get(vdc_id) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/fog/compute/terremark/models/vdcs.rb', line 14 def get(vdc_id) if vdc_id && vdc = service.get_vdc(vdc_id).body new(vdc) elsif !vdc_id nil end rescue Excon::Errors::Forbidden nil end |
#organization_id ⇒ Object
24 25 26 |
# File 'lib/fog/compute/terremark/models/vdcs.rb', line 24 def organization_id @organization_id ||= service.default_organization_id end |