Sha256: c7db5c425166d7597ad2b19f26d464b5564b14d9150eba91a04d3ae290dee29d

Contents?: true

Size: 1.67 KB

Versions: 19

Compression:

Stored size: 1.67 KB

Contents

module Fog
  module Compute
    class OpenStack
      class Real
        def list_all_addresses(options = {})
          request(
            :expects  => [200, 203],
            :method   => 'GET',
            :path     => "os-floating-ips.json",
            :query    => options
          )
        end
      end

      class Mock
        def list_all_addresses(options = {})
          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

19 entries across 19 versions & 3 rubygems

Version Path
fog-openstack-0.1.10 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.9 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.8 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.7 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.6 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.5 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.4 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.3 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.2 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.1 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-openstack-0.1.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-1.37.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-1.36.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-1.35.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-2.0.0.pre.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-1.34.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-1.33.0 lib/fog/openstack/requests/compute/list_all_addresses.rb
fog-1.32.0 lib/fog/openstack/requests/compute/list_all_addresses.rb