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

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

Instance Attribute Summary

Attributes inherited from Collection

#response

Instance Method Summary collapse

Methods inherited from Collection

#destroy, #find_by_id, #load_response, #summary

Instance Method Details

#allObject



10
11
12
# File 'lib/fog/openstack/network/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/openstack/network/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::OpenStack::Network::NotFound
  nil
end