Sha256: 99f04c47d8ba979f040913623bf30c39394f6752fc29863f49ad0cb0cf19c448

Contents?: true

Size: 941 Bytes

Versions: 32

Compression:

Stored size: 941 Bytes

Contents

module Fog
  module Compute
    class Ecloud

      class Real
        basic_request :get_public_ip
      end

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

        def get_public_ip(public_ip_uri)
          public_ip_uri = ensure_unparsed(public_ip_uri)

          if public_ip = mock_data.public_ip_from_href(public_ip_uri)
            xml = Builder::XmlMarkup.new
            mock_it 200,
              xml.PublicIp(:xmlns => "urn:tmrk:eCloudExtensions-2.0", :"xmlns:i" => "http://www.w3.org/2001/XMLSchema-instance") {
                xml.Id public_ip.object_id
                xml.Href public_ip.href
                xml.Name public_ip.name
              }, { 'Content-Type' => 'application/vnd.tmrk.ecloud.publicIp+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_ip.rb
michiels-fog-1.3.1 lib/fog/ecloud/requests/compute/get_public_ip.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/ecloud/requests/compute/get_public_ip.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/get_public_ip.rb
fog-1.3.1 lib/fog/ecloud/requests/compute/get_public_ip.rb
fog-1.3.0 lib/fog/ecloud/requests/compute/get_public_ip.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/get_public_ip.rb
fog-1.2.0 lib/fog/ecloud/requests/compute/get_public_ip.rb
ktheory-fog-1.1.2 lib/fog/ecloud/requests/compute/get_public_ip.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/get_public_ip.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/get_public_ip.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/get_public_ip.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/get_public_ip.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/get_public_ip.rb
fog-1.1.2 lib/fog/ecloud/requests/compute/get_public_ip.rb
fog_tractical-1.1.4 lib/fog/ecloud/requests/compute/get_public_ip.rb
fog_tractical-1.1.3 lib/fog/ecloud/requests/compute/get_public_ip.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/ecloud/requests/compute/get_public_ip.rb
fog-1.1.1 lib/fog/ecloud/requests/compute/get_public_ip.rb
fog-1.1.0 lib/fog/ecloud/requests/compute/get_public_ip.rb