Sha256: dd8ade4a5c600d9d510e7f61183b9cde94919e4913b3f217598e3182c77cd8c3

Contents?: true

Size: 671 Bytes

Versions: 105

Compression:

Stored size: 671 Bytes

Contents

module Fog
  module Identity
    class OpenStack
      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 OpenStack
  end # module Identity
end # module Fog

Version data entries

105 entries across 105 versions & 16 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/openstack/requests/identity/get_role.rb
fog-1.30.0 lib/fog/openstack/requests/identity/get_role.rb
fog-1.29.0 lib/fog/openstack/requests/identity/get_role.rb
fog-1.28.0 lib/fog/openstack/requests/identity/get_role.rb
fog-1.27.0 lib/fog/openstack/requests/identity/get_role.rb
fog-1.26.0 lib/fog/openstack/requests/identity/get_role.rb
fog-1.25.0 lib/fog/openstack/requests/identity/get_role.rb
nsidc-fog-1.24.1 lib/fog/openstack/requests/identity/get_role.rb
fog-1.24.0 lib/fog/openstack/requests/identity/get_role.rb
ns-fog-1.22.11 lib/fog/openstack/requests/identity/get_role.rb
ns-fog-1.22.10 lib/fog/openstack/requests/identity/get_role.rb
ns-fog-1.22.9 lib/fog/openstack/requests/identity/get_role.rb
ns-fog-1.22.8 lib/fog/openstack/requests/identity/get_role.rb
ns-fog-1.22.7 lib/fog/openstack/requests/identity/get_role.rb
ns-fog-1.22.6 lib/fog/openstack/requests/identity/get_role.rb
fog-1.23.0 lib/fog/openstack/requests/identity/get_role.rb
ns-fog-1.22.4 lib/fog/openstack/requests/identity/get_role.rb
ns-fog-1.22.3 lib/fog/openstack/requests/identity/get_role.rb
ns-fog-1.22.2 lib/fog/openstack/requests/identity/get_role.rb
fog-1.22.1 lib/fog/openstack/requests/identity/get_role.rb