Sha256: b6933c1ce3bc1d49426a9e8b13bd1e4f41539ae06f7b4e7fb4ad4e1baf3b1195

Contents?: true

Size: 657 Bytes

Versions: 10

Compression:

Stored size: 657 Bytes

Contents

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

      class Mock
        def list_hosts(_options = {})
          response = Excon::Response.new
          response.status = 200
          response.body = {"hosts" => [
            {"host_name" => "host.test.net", "service" => "compute", "zone" => "az1"}
          ]}
          response
        end
      end # mock
    end # openstack
  end # compute
end # fog

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fog-openstack-0.1.21 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.20 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.19 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.18 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.17 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.15 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.14 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.13 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.12 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.11 lib/fog/compute/openstack/requests/list_hosts.rb