Class: Fog::Compute::OpenStack::Addresses

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/openstack/models/compute/addresses.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
# File 'lib/fog/openstack/models/compute/addresses.rb', line 10

def all
  load(service.list_all_addresses.body['floating_ips'])
end

#get(address_id) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/fog/openstack/models/compute/addresses.rb', line 14

def get(address_id)
  if address = service.get_address(address_id).body['floating_ip']
    new(address)
  end
rescue Fog::Compute::OpenStack::NotFound
  nil
end

#get_address_poolsObject



22
23
24
# File 'lib/fog/openstack/models/compute/addresses.rb', line 22

def get_address_pools
  service.list_address_pools.body['floating_ip_pools']
end