Class: Fog::Ecloud::MockDataClasses::MockNetworkIps
- Inherits:
-
Base
- Object
- Hash
- Base
- Fog::Ecloud::MockDataClasses::MockNetworkIps
show all
- Defined in:
- lib/fog/ecloud/compute.rb
Instance Method Summary
collapse
Methods inherited from Base
#_parent, base_url, #base_url, base_url=, #first, #href, #initialize, #inspect, #last
Instance Method Details
#items ⇒ Object
424
425
426
427
428
|
# File 'lib/fog/ecloud/compute.rb', line 424
def items
@items ||= _parent.usable_subnet_ips.inject({}) do |out, subnet_ip|
out.update(subnet_ip => MockNetworkIp.new({ :ip => subnet_ip }, self))
end
end
|
#name ⇒ Object
434
435
436
|
# File 'lib/fog/ecloud/compute.rb', line 434
def name
"IP Addresses"
end
|
#ordered_ips ⇒ Object
430
431
432
|
# File 'lib/fog/ecloud/compute.rb', line 430
def ordered_ips
items.values.sort_by {|i| i.ip.split(".").map(&:to_i) }
end
|