Sha256: 32121e055d3ab22c5fec0023c058c166d624c11af7791bafa77589f1c4f75024

Contents?: true

Size: 1.19 KB

Versions: 29

Compression:

Stored size: 1.19 KB

Contents

module Fog
  module Compute
    class HP
      class Real
        # Get details about an existing floating IP address
        #
        # ==== Parameters
        # * 'address_id'<~Integer> - Id of floating IP address get details for
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'floating_ip'<~Hash> -
        #       * 'id'<~Integer> - Id of the address
        #       * 'ip'<~String> - Floating IP of the address
        #       * 'instance_id'<~String> - Id of the associated server instance
        #       * 'fixed_ip'<~String> - Fixed IP of the address
        def get_address(address_id)
          request(
            :expects  => [200],
            :method   => 'GET',
            :path     => "os-floating-ips/#{address_id}"
          )
        end
      end

      class Mock
        def get_address(address_id)
          response = Excon::Response.new
          if address = self.data[:addresses][address_id]
            response.status = 200
            response.body = { 'floating_ip' => address }
            response
          else
            raise Fog::Compute::HP::NotFound
          end
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
fog-1.37.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.36.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.35.0 lib/fog/hp/requests/compute/get_address.rb
fog-2.0.0.pre.0 lib/fog/hp/requests/compute/get_address.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/hp/requests/compute/get_address.rb
fog-1.34.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.33.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.32.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.31.0 lib/fog/hp/requests/compute/get_address.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/hp/requests/compute/get_address.rb
fog-1.30.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.29.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.28.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.27.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.26.0 lib/fog/hp/requests/compute/get_address.rb
fog-1.25.0 lib/fog/hp/requests/compute/get_address.rb
nsidc-fog-1.24.1 lib/fog/hp/requests/compute/get_address.rb
fog-1.24.0 lib/fog/hp/requests/compute/get_address.rb
ns-fog-1.22.11 lib/fog/hp/requests/compute/get_address.rb
ns-fog-1.22.10 lib/fog/hp/requests/compute/get_address.rb