Class: Fog::Compute::Terremark::Addresses
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::Terremark::Addresses
- Defined in:
- lib/fog/compute/terremark/models/addresses.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
7 8 9 |
# File 'lib/fog/compute/terremark/models/addresses.rb', line 7 def all load(service.get_public_ips(vdc_id).body["PublicIpAddresses"]) end |
#get(ip_id) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/fog/compute/terremark/models/addresses.rb', line 11 def get(ip_id) if ip_id && ip = service.get_public_ip(ip_id).body new(ip) elsif !ip_id nil end rescue Excon::Errors::Forbidden nil end |
#vdc_id ⇒ Object
21 22 23 |
# File 'lib/fog/compute/terremark/models/addresses.rb', line 21 def vdc_id @vdc_id ||= service.default_vdc_id end |