Sha256: f95b2877d74f8fa4b12169166c7b1dfa28d1c74d7e9edc231a7d942861245b5a

Contents?: true

Size: 1.61 KB

Versions: 85

Compression:

Stored size: 1.61 KB

Contents

module Fog
  module Compute
    class OpenStack
      class Real

        def list_all_addresses
          request(
            :expects  => [200, 203],
            :method   => 'GET',
            :path     => "os-floating-ips.json"
          )

        end

      end

      class Mock
        def list_all_addresses
          response = Excon::Response.new
          response.status = 200
          response.headers = {
            "X-Compute-Request-Id" => "req-d4a21158-a86c-44a6-983a-e25645907f26",
            "Content-Type" => "application/json",
            "Content-Length" => "378",
            "Date"=> Date.new
          }
          response.body = {
            "floating_ips" => [
              {
                "instance_id" => nil,
                "ip" => "192.168.27.129",
                "fixed_ip" => nil,
                "id" => 1,
                "pool" => "nova"
              },
              {
                "instance_id" => nil,
                "ip" => "192.168.27.130",
                "fixed_ip" => nil,
                "id" => 2,
                "pool" => "nova"
              },
              {
                "instance_id" => nil,
                "ip" => "192.168.27.131",
                "fixed_ip" => nil,
                "id" => 3,
                "pool" => "nova"
              },
              {
                "instance_id" => nil,
                "ip" => "192.168.27.132",
                "fixed_ip" => nil,
                "id" => 4,
                "pool" => "nova"
              }
            ]
          }
          response
        end
      end # mock
    end # openstack
  end # Compute
end # fog

Version data entries

85 entries across 85 versions & 13 rubygems

Version Path
fog-1.22.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-1.21.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/openstack/requests/compute/list_all_addresses.rb
cifrado-0.2.1 vendor/fog/lib/fog/openstack/requests/compute/list_all_addresses.rb
cifrado-0.2.0 vendor/fog/lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-1.20.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-1.19.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/openstack/requests/compute/list_all_addresses.rb