Sha256: 2afd6f0bb0b2c48d74a0df7c054ca3cd30459a19b0d36fdc87b948c24e7f4780

Contents?: true

Size: 1009 Bytes

Versions: 32

Compression:

Stored size: 1009 Bytes

Contents

module Fog
  module Compute
    class Ecloud

      class Real
        basic_request :get_public_ips
      end

      class Mock
        #
        # Based off of:
        # http://support.theenterprisecloud.com/kb/default.asp?id=577&Lang=1&SID=
        #

        def get_public_ips(public_ips_uri)
          public_ips_uri = ensure_unparsed(public_ips_uri)

          if public_ip_collection = mock_data.public_ip_collection_from_href(public_ips_uri)
            xml = Builder::XmlMarkup.new
            mock_it 200,
              xml.PublicIPAddresses {
                public_ip_collection.items.each do |ip|
                  xml.PublicIPAddress {
                    xml.Id ip.object_id
                    xml.Href ip.href
                    xml.Name ip.name
                  }
                end
              }, { 'Content-Type' => 'application/vnd.tmrk.ecloud.publicIpsList+xml'}
          else
            mock_error 200, "401 Unauthorized"
          end
        end

      end
    end
  end
end

Version data entries

32 entries across 32 versions & 8 rubygems

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