Class: Fog::Ecloud::MockDataClasses::MockNetworkIps

Inherits:
Base
  • Object
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!

Constructor Details

This class inherits a constructor from Fog::Ecloud::MockDataClasses::Base

Instance Method Details

- (Object) items



397
398
399
400
401
# File 'lib/fog/ecloud/mock_data_classes.rb', line 397

def items
  @items ||= _parent.usable_subnet_ips.inject({}) do |out, subnet_ip|
    out.update(subnet_ip => MockNetworkIp.new({ :ip => subnet_ip }, self))
  end
end

- (Object) name



407
408
409
# File 'lib/fog/ecloud/mock_data_classes.rb', line 407

def name
  "IP Addresses"
end

- (Object) ordered_ips



403
404
405
# File 'lib/fog/ecloud/mock_data_classes.rb', line 403

def ordered_ips
  items.values.sort_by {|i| i.ip.split(".").map(&:to_i) }
end