Sha256: 680e87aad4baa530a6957c9a9e0099f35d7c61b47b3cf287021822b2f30169d3

Contents?: true

Size: 590 Bytes

Versions: 11

Compression:

Stored size: 590 Bytes

Contents

require 'fog/ecloud/models/compute/ip_address'

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

        identity :href

        model Fog::Compute::Ecloud::IpAddress

        def all
          data = connection.get_ip_addresses(href).body[:IpAddresses][:IpAddress]
          data = data.nil? ? [] : data
          load(data)
        end

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

Version data entries

11 entries across 11 versions & 7 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/ecloud/models/compute/ip_addresses.rb
fog-nirvanix-1.8.1 lib/fog/ecloud/models/compute/ip_addresses.rb
fog-parser-fix-1.6.1 lib/fog/ecloud/models/compute/ip_addresses.rb
fog-test-again-1.6.0 lib/fog/ecloud/models/compute/ip_addresses.rb
fog-parser-fix-1.6.0 lib/fog/ecloud/models/compute/ip_addresses.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/ecloud/models/compute/ip_addresses.rb
fog-sgonyea-1.8.1 lib/fog/ecloud/models/compute/ip_addresses.rb
fog-1.8.0 lib/fog/ecloud/models/compute/ip_addresses.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/ecloud/models/compute/ip_addresses.rb
fog-1.7.0 lib/fog/ecloud/models/compute/ip_addresses.rb
fog-1.6.0 lib/fog/ecloud/models/compute/ip_addresses.rb