Sha256: aeb7156090e58c34620a4df5e638b2a4af0c1894316a562b8f361f94692ca874

Contents?: true

Size: 648 Bytes

Versions: 7

Compression:

Stored size: 648 Bytes

Contents

require 'fog/compute/models/ecloud/ip'

module Fog
  module Ecloud
    class Compute
      class Ips < Fog::Ecloud::Collection

        model Fog::Ecloud::Compute::Ip

        undef_method :create

        attribute :href

        def all
          check_href!( :messages => "Ips href of a Network you want to enumerate" )
          if data = connection.get_network_ips(href).body[:IpAddress]
            load(data)
          end
        end

        def get(uri)
          if data = connection.get_network_ip(uri).body
            new(data)
          end
        rescue Fog::Errors::NotFound
          nil
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-0.8.2 lib/fog/compute/models/ecloud/ips.rb
fog-0.8.1 lib/fog/compute/models/ecloud/ips.rb
fog-0.8.0 lib/fog/compute/models/ecloud/ips.rb
fog-0.7.2 lib/fog/compute/models/ecloud/ips.rb
fog-0.7.1 lib/fog/compute/models/ecloud/ips.rb
fog-0.7.0 lib/fog/compute/models/ecloud/ips.rb
fog-0.6.0 lib/fog/compute/models/ecloud/ips.rb