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

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/compute/ecloud.rb

Instance Method Summary collapse

Methods inherited from Base

#_parent, base_url, #base_url, base_url=, #first, #href, #initialize, #inspect, #last

Constructor Details

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

Instance Method Details

#itemsObject



428
429
430
431
432
# File 'lib/fog/compute/ecloud.rb', line 428

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

#nameObject



438
439
440
# File 'lib/fog/compute/ecloud.rb', line 438

def name
  "IP Addresses"
end

#ordered_ipsObject



434
435
436
# File 'lib/fog/compute/ecloud.rb', line 434

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