Sha256: 6e73982dda43981ca5f7f58b91c1f782b666d66b4f305b88056a8d729cb8d71e

Contents?: true

Size: 1.06 KB

Versions: 19

Compression:

Stored size: 1.06 KB

Contents

module Fog
  module Identity
    class OpenStack
      class V3
        class Real
          def list_role_assignments(options = {})
            # Backwards compatibility name mapping, also serves as single pane of glass, since keystone broke
            # consistency in naming of options, just for this one API call
            name_mapping = {
              :group_id   => 'group.id',
              :role_id    => 'role.id',
              :domain_id  => 'scope.domain.id',
              :project_id => 'scope.project.id',
              :user_id    => 'user.id',
            }
            name_mapping.keys.each do |key|
              if (opt = options.delete(key))
                options[name_mapping[key]] = opt
              end
            end

            request(
              :expects => [200],
              :method  => 'GET',
              :path    => "role_assignments",
              :query   => options
            )
          end
        end

        class Mock
          def list_role_assignments(options = {})

          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

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