Class: Fog::Terremark::Shared::Addresses
- Inherits:
-
Collection
- Object
- Collection
- Fog::Terremark::Shared::Addresses
- Defined in:
- lib/fog/terremark/models/shared/addresses.rb
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
19 20 21 |
# File 'lib/fog/terremark/models/shared/addresses.rb', line 19 def all load(service.get_public_ips(vdc_id).body['PublicIpAddresses']) end |
#get(ip_id) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/fog/terremark/models/shared/addresses.rb', line 23 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
33 34 35 |
# File 'lib/fog/terremark/models/shared/addresses.rb', line 33 def vdc_id @vdc_id ||= service.default_vdc_id end |