Sha256: 841df4f870444355912561fad655aaed7b57390a38a80e66f72a0297be006448

Contents?: true

Size: 896 Bytes

Versions: 25

Compression:

Stored size: 896 Bytes

Contents

require 'fog/ecloud/models/compute/public_ip'

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

        undef_method :create

        attribute :href, :aliases => :Href

        model Fog::Compute::Ecloud::PublicIp

        #get_request :get_public_ip
        #vcloud_type "application/vnd.tmrk.ecloud.publicIp+xml"
        #all_request lambda { |public_ips| public_ips.connection.get_public_ips(public_ips.href) }

        def all
          check_href!(:message => "the Public Ips href of the Vdc you want to enumerate")
          if data = connection.get_public_ips(href).body[:PublicIPAddress]
            load(data)
          end
        end

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

      end
    end
  end
end

Version data entries

25 entries across 25 versions & 7 rubygems

Version Path
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/models/compute/public_ips.rb
michiels-fog-1.3.1 lib/fog/ecloud/models/compute/public_ips.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/ecloud/models/compute/public_ips.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/models/compute/public_ips.rb
fog-1.3.1 lib/fog/ecloud/models/compute/public_ips.rb
fog-1.3.0 lib/fog/ecloud/models/compute/public_ips.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/models/compute/public_ips.rb
fog-1.2.0 lib/fog/ecloud/models/compute/public_ips.rb
ktheory-fog-1.1.2 lib/fog/ecloud/models/compute/public_ips.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/models/compute/public_ips.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/models/compute/public_ips.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/models/compute/public_ips.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/models/compute/public_ips.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/models/compute/public_ips.rb
fog-1.1.2 lib/fog/ecloud/models/compute/public_ips.rb
fog_tractical-1.1.4 lib/fog/ecloud/models/compute/public_ips.rb
fog_tractical-1.1.3 lib/fog/ecloud/models/compute/public_ips.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/models/compute/public_ips.rb
fog-1.1.1 lib/fog/ecloud/models/compute/public_ips.rb
fog-1.1.0 lib/fog/ecloud/models/compute/public_ips.rb