Class: Fog::OpenStack::Compute::Networks
- Inherits:
-
Fog::OpenStack::Collection
- Object
- Collection
- Fog::OpenStack::Collection
- Fog::OpenStack::Compute::Networks
- Defined in:
- lib/fog/openstack/compute/models/networks.rb
Instance Attribute Summary
Attributes inherited from Fog::OpenStack::Collection
Instance Method Summary collapse
Methods inherited from Fog::OpenStack::Collection
#destroy, #find_by_id, #get, #load_response, #summary
Instance Method Details
#all ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/fog/openstack/compute/models/networks.rb', line 12 def all requires :server networks = [] server.addresses.each_with_index do |address, index| networks << { :id => index + 1, :name => address[0], :addresses => address[1].map { |a| a['addr'] } } end # TODO: convert to load_response? load(networks) end |