Sha256: a2b75bc89b446ff3e4a0a10e4625eb47ae20ea53948632ccbe79d180d8cd6e6c

Contents?: true

Size: 749 Bytes

Versions: 20

Compression:

Stored size: 749 Bytes

Contents

module Fog
  module Identity
    class OpenStack
      class V2
        class Real
          def get_role(id)
            request(
                :expects => [200, 204],
                :method => 'GET',
                :path => "/OS-KSADM/roles/#{id}"
            )
          end
        end

        class Mock
          def get_role(id)
            response = Excon::Response.new
            if data = self.data[:roles][id]
              response.status = 200
              response.body = {'role' => data}
              response
            else
              raise Fog::Identity::OpenStack::NotFound
            end
          end
        end # class Mock
      end # class V2
    end # class OpenStack
  end # module Identity
end # module Fog

Version data entries

20 entries across 20 versions & 3 rubygems

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