Sha256: 39649b02266b1322f237dc854994d918c65a9ba41c6ce9acaa0fcc8fdf494510

Contents?: true

Size: 941 Bytes

Versions: 14

Compression:

Stored size: 941 Bytes

Contents

module Fog
  module Baremetal
    class OpenStack
      class Real
        def list_nodes(options = {})
          request(
            :expects => [200, 204],
            :method  => 'GET',
            :path    => 'nodes',
            :query   => options
          )
        end
      end # class Real

      class Mock
        def list_nodes(_options = {})
          response = Excon::Response.new
          response.status = [200, 204][rand(2)]
          response.body = {
            "nodes" => [{
              "instance_uuid"   => Fog::UUID.uuid,
              "maintenance"     => false,
              "power_state"     => "power on",
              "provision_state" => "active",
              "uuid"            => Fog::UUID.uuid,
              "links"           => []
            }]
          }
          response
        end # def list_nodes
      end # class Mock
    end # class OpenStack
  end # module Baremetal
end # module Fog

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-openstack-0.1.25 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.24 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.23 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.22 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.21 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.20 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.19 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.18 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.17 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.15 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.14 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.13 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.12 lib/fog/baremetal/openstack/requests/list_nodes.rb
fog-openstack-0.1.11 lib/fog/baremetal/openstack/requests/list_nodes.rb