Sha256: a9759b24a3472a6add5f1c0bfea2fbb973cb7359c3a8aa4781a96f07702d7a0e

Contents?: true

Size: 652 Bytes

Versions: 4

Compression:

Stored size: 652 Bytes

Contents

module Fog
  module Compute
    class OpenStack
      class Real
        def list_hosts(options = {})
          request(
            :expects => [200, 203],
            :method  => 'GET',
            :path    => 'os-hosts',
            :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

4 entries across 4 versions & 1 rubygems

Version Path
fog-openstack-0.1.25 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.24 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.23 lib/fog/compute/openstack/requests/list_hosts.rb
fog-openstack-0.1.22 lib/fog/compute/openstack/requests/list_hosts.rb