Class: Fog::Network::OpenStack::NetworkIpAvailabilities

Inherits:
OpenStack::Collection show all
Defined in:
lib/fog/network/openstack/models/network_ip_availabilities.rb

Instance Attribute Summary

Attributes inherited from OpenStack::Collection

#response

Instance Method Summary collapse

Methods inherited from OpenStack::Collection

#destroy, #find_by_id, #load_response, #summary

Instance Method Details

#allObject



10
11
12
# File 'lib/fog/network/openstack/models/network_ip_availabilities.rb', line 10

def all
  load_response(service.list_network_ip_availabilities, 'network_ip_availabilities')
end

#get(network_id) ⇒ Object



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

def get(network_id)
  if network_ip_availability = service.get_network_ip_availability(network_id).body['network_ip_availability']
    new(network_ip_availability)
  end
rescue Fog::Network::OpenStack::NotFound
  nil
end