Sha256: 8598404a44ad17fade21739b78c756cc93c1a736f6e15f73a5f3ffcd8b8cbd62

Contents?: true

Size: 908 Bytes

Versions: 14

Compression:

Stored size: 908 Bytes

Contents

module Fog
  module Openstack
    class Planning
      class Real
        def list_roles(options = {})
          request(
            :expects => [200, 204],
            :method  => 'GET',
            :path    => 'roles',
            :query   => options
          )
        end
      end # class Real

      class Mock
        def list_roles(_options = {})
          response = Excon::Response.new
          response.status = [200, 204][rand(2)]
          response.body = [
            {
              "description" => "OpenStack hypervisor node. Can be wrapped in a ResourceGroup for scaling.\n",
              "name"        => "compute",
              "uuid"        => "f72c0656-5696-4c66-81a5-d6d88a48e385",
              "version"     => 1
            }
          ]
          response
        end # def list_nodes
      end # class Mock
    end # class Planning
  end # module Openstack
end # module Fog

Version data entries

14 entries across 14 versions & 1 rubygems

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