Class: Fog::Ecloud::MockDataClasses::MockNetworkIps
- Inherits:
-
Base
- Object
- Hash
- Base
- Fog::Ecloud::MockDataClasses::MockNetworkIps
show all
- Defined in:
- lib/fog/ecloud/mock_data_classes.rb
Instance Method Summary
collapse
Methods inherited from Base
#_parent, base_url, #base_url, base_url=, #first, #href, #initialize, #inspect, #last
Methods inherited from Hash
#symbolize_keys!
Instance Method Details
#items ⇒ Object
395
396
397
398
399
|
# File 'lib/fog/ecloud/mock_data_classes.rb', line 395
def items
@items ||= _parent.usable_subnet_ips.reduce({}) do |out, subnet_ip|
out.update(subnet_ip => MockNetworkIp.new({ :ip => subnet_ip }, self))
end
end
|
#name ⇒ Object
405
406
407
|
# File 'lib/fog/ecloud/mock_data_classes.rb', line 405
def name
"IP Addresses"
end
|
#ordered_ips ⇒ Object
401
402
403
|
# File 'lib/fog/ecloud/mock_data_classes.rb', line 401
def ordered_ips
items.values.sort_by {|i| i.ip.split(".").map(&:to_i) }
end
|