Class: Fog::Identity::OpenStack::V3::Real

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/fog/openstack/identity_v3.rb,
lib/fog/openstack/requests/identity_v3/get_role.rb,
lib/fog/openstack/requests/identity_v3/get_user.rb,
lib/fog/openstack/requests/identity_v3/get_group.rb,
lib/fog/openstack/requests/identity_v3/get_domain.rb,
lib/fog/openstack/requests/identity_v3/get_policy.rb,
lib/fog/openstack/requests/identity_v3/list_roles.rb,
lib/fog/openstack/requests/identity_v3/list_users.rb,
lib/fog/openstack/requests/identity_v3/create_role.rb,
lib/fog/openstack/requests/identity_v3/create_user.rb,
lib/fog/openstack/requests/identity_v3/delete_role.rb,
lib/fog/openstack/requests/identity_v3/delete_user.rb,
lib/fog/openstack/requests/identity_v3/get_project.rb,
lib/fog/openstack/requests/identity_v3/get_service.rb,
lib/fog/openstack/requests/identity_v3/list_groups.rb,
lib/fog/openstack/requests/identity_v3/token_check.rb,
lib/fog/openstack/requests/identity_v3/update_role.rb,
lib/fog/openstack/requests/identity_v3/update_user.rb,
lib/fog/openstack/requests/identity_v3/auth_domains.rb,
lib/fog/openstack/requests/identity_v3/create_group.rb,
lib/fog/openstack/requests/identity_v3/delete_group.rb,
lib/fog/openstack/requests/identity_v3/get_endpoint.rb,
lib/fog/openstack/requests/identity_v3/list_domains.rb,
lib/fog/openstack/requests/identity_v3/token_revoke.rb,
lib/fog/openstack/requests/identity_v3/update_group.rb,
lib/fog/openstack/requests/identity_v3/auth_projects.rb,
lib/fog/openstack/requests/identity_v3/create_domain.rb,
lib/fog/openstack/requests/identity_v3/create_policy.rb,
lib/fog/openstack/requests/identity_v3/delete_domain.rb,
lib/fog/openstack/requests/identity_v3/delete_policy.rb,
lib/fog/openstack/requests/identity_v3/list_policies.rb,
lib/fog/openstack/requests/identity_v3/list_projects.rb,
lib/fog/openstack/requests/identity_v3/list_services.rb,
lib/fog/openstack/requests/identity_v3/update_domain.rb,
lib/fog/openstack/requests/identity_v3/update_policy.rb,
lib/fog/openstack/requests/identity_v3/create_project.rb,
lib/fog/openstack/requests/identity_v3/create_service.rb,
lib/fog/openstack/requests/identity_v3/delete_project.rb,
lib/fog/openstack/requests/identity_v3/delete_service.rb,
lib/fog/openstack/requests/identity_v3/list_endpoints.rb,
lib/fog/openstack/requests/identity_v3/token_validate.rb,
lib/fog/openstack/requests/identity_v3/update_project.rb,
lib/fog/openstack/requests/identity_v3/update_service.rb,
lib/fog/openstack/requests/identity_v3/create_endpoint.rb,
lib/fog/openstack/requests/identity_v3/delete_endpoint.rb,
lib/fog/openstack/requests/identity_v3/update_endpoint.rb,
lib/fog/openstack/requests/identity_v3/group_user_check.rb,
lib/fog/openstack/requests/identity_v3/list_group_users.rb,
lib/fog/openstack/requests/identity_v3/list_user_groups.rb,
lib/fog/openstack/requests/identity_v3/add_user_to_group.rb,
lib/fog/openstack/requests/identity_v3/get_os_credential.rb,
lib/fog/openstack/requests/identity_v3/list_user_projects.rb,
lib/fog/openstack/requests/identity_v3/token_authenticate.rb,
lib/fog/openstack/requests/identity_v3/list_os_credentials.rb,
lib/fog/openstack/requests/identity_v3/create_os_credential.rb,
lib/fog/openstack/requests/identity_v3/delete_os_credential.rb,
lib/fog/openstack/requests/identity_v3/update_os_credential.rb,
lib/fog/openstack/requests/identity_v3/list_role_assignments.rb,
lib/fog/openstack/requests/identity_v3/check_domain_user_role.rb,
lib/fog/openstack/requests/identity_v3/grant_domain_user_role.rb,
lib/fog/openstack/requests/identity_v3/list_domain_user_roles.rb,
lib/fog/openstack/requests/identity_v3/remove_user_from_group.rb,
lib/fog/openstack/requests/identity_v3/check_domain_group_role.rb,
lib/fog/openstack/requests/identity_v3/check_project_user_role.rb,
lib/fog/openstack/requests/identity_v3/grant_domain_group_role.rb,
lib/fog/openstack/requests/identity_v3/grant_project_user_role.rb,
lib/fog/openstack/requests/identity_v3/list_domain_group_roles.rb,
lib/fog/openstack/requests/identity_v3/list_project_user_roles.rb,
lib/fog/openstack/requests/identity_v3/revoke_domain_user_role.rb,
lib/fog/openstack/requests/identity_v3/check_project_group_role.rb,
lib/fog/openstack/requests/identity_v3/grant_project_group_role.rb,
lib/fog/openstack/requests/identity_v3/list_project_group_roles.rb,
lib/fog/openstack/requests/identity_v3/revoke_domain_group_role.rb,
lib/fog/openstack/requests/identity_v3/revoke_project_user_role.rb,
lib/fog/openstack/requests/identity_v3/revoke_project_group_role.rb

Instance Attribute Summary

Attributes included from Common

#unscoped_token

Attributes included from OpenStack::Core

#auth_token, #auth_token_expiration, #current_tenant, #current_user, #current_user_id, #openstack_domain_id, #openstack_domain_name, #openstack_project_domain, #openstack_project_domain_id, #openstack_user_domain, #openstack_user_domain_id

Instance Method Summary collapse

Methods included from Common

#request

Methods included from OpenStack::Core

#credentials, #initialize_identity, #reload

Constructor Details

#initialize(options = {}) ⇒ Real

Returns a new instance of Real.



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/fog/openstack/identity_v3.rb', line 153

def initialize(options={})
  initialize_identity options

  @openstack_service_type   = options[:openstack_service_type] || ['identity_v3','identityv3','identity']
  @openstack_service_name   = options[:openstack_service_name]

  @connection_options       = options[:connection_options] || {}

  @openstack_endpoint_type  = options[:openstack_endpoint_type] || 'adminURL'

  authenticate

  @persistent = options[:persistent] || false
  @connection = Fog::Core::Connection.new("#{@scheme}://#{@host}:#{@port}", @persistent, @connection_options)
end

Instance Method Details

#add_user_to_group(group_id, user_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/add_user_to_group.rb', line 6

def add_user_to_group(group_id, user_id)
  request(
      :expects => [204],
      :method => 'PUT',
      :path => "groups/#{group_id}/users/#{user_id}"
  )
end

#auth_domains(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/auth_domains.rb', line 6

def auth_domains(options={})
  request(
      :expects => [200],
      :method => 'GET',
      :path => "auth/domains",
      :query => options
  )
end

#auth_projects(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/auth_projects.rb', line 6

def auth_projects(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "auth/projects",
    :query   => options
  )
end

#check_domain_group_role(id, group_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/check_domain_group_role.rb', line 6

def check_domain_group_role(id, group_id, role_id)
  request(
      :expects => [204],
      :method => 'HEAD',
      :path => "domains/#{id}/groups/#{group_id}/roles/#{role_id}"
  )
end

#check_domain_user_role(id, user_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/check_domain_user_role.rb', line 6

def check_domain_user_role(id, user_id, role_id)
  request(
      :expects => [204],
      :method => 'HEAD',
      :path => "domains/#{id}/users/#{user_id}/roles/#{role_id}"
  )
end

#check_project_group_role(id, group_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/check_project_group_role.rb', line 6

def check_project_group_role(id, group_id, role_id)
  request(
      :expects => [204],
      :method => 'HEAD',
      :path => "projects/#{id}/groups/#{group_id}/roles/#{role_id}"
  )
end

#check_project_user_role(id, user_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/check_project_user_role.rb', line 6

def check_project_user_role(id, user_id, role_id)
  request(
      :expects => [204],
      :method => 'HEAD',
      :path => "projects/#{id}/users/#{user_id}/roles/#{role_id}"
  )
end

#create_domain(domain) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/create_domain.rb', line 6

def create_domain(domain)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "domains",
      :body => Fog::JSON.encode(:domain => domain)
  )
end

#create_endpoint(endpoint) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/create_endpoint.rb', line 6

def create_endpoint(endpoint)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "endpoints",
      :body => Fog::JSON.encode(:endpoint => endpoint)
  )
end

#create_group(group) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/create_group.rb', line 6

def create_group(group)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "groups",
      :body => Fog::JSON.encode(:group => group)
  )
end

#create_os_credential(credential) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/create_os_credential.rb', line 6

def create_os_credential(credential)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "credentials",
      :body => Fog::JSON.encode(:credential => credential)
  )
end

#create_policy(policy) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/create_policy.rb', line 6

def create_policy(policy)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "policies",
      :body => Fog::JSON.encode(:policy => policy)
  )
end

#create_project(project) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/create_project.rb', line 6

def create_project(project)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "projects",
      :body => Fog::JSON.encode(:project => project)
  )
end

#create_role(role) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/create_role.rb', line 6

def create_role(role)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "roles",
      :body => Fog::JSON.encode(:role => role)
  )
end

#create_service(service) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/create_service.rb', line 6

def create_service(service)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "services",
      :body => Fog::JSON.encode(:service => service)
  )
end

#create_user(user) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/create_user.rb', line 6

def create_user(user)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "users",
      :body => Fog::JSON.encode(:user => user)
  )
end

#delete_domain(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/delete_domain.rb', line 6

def delete_domain(id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "domains/#{id}"
  )
end

#delete_endpoint(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/delete_endpoint.rb', line 6

def delete_endpoint(id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "endpoints/#{id}"
  )
end

#delete_group(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/delete_group.rb', line 6

def delete_group(id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "groups/#{id}"
  )
end

#delete_os_credential(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/delete_os_credential.rb', line 6

def delete_os_credential(id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "credentials/#{id}"
  )
end

#delete_policy(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/delete_policy.rb', line 6

def delete_policy(id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "policies/#{id}"
  )
end

#delete_project(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/delete_project.rb', line 6

def delete_project(id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "projects/#{id}"
  )
end

#delete_role(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/delete_role.rb', line 6

def delete_role(id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "roles/#{id}"
  )
end

#delete_service(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/delete_service.rb', line 6

def delete_service(id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "services/#{id}"
  )
end

#delete_user(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/delete_user.rb', line 6

def delete_user(id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "users/#{id}"
  )
end

#get_domain(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/get_domain.rb', line 6

def get_domain(id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "domains/#{id}"
  )
end

#get_endpoint(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/get_endpoint.rb', line 6

def get_endpoint(id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "endpoints/#{id}"
  )
end

#get_group(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/get_group.rb', line 6

def get_group(id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "groups/#{id}"
  )
end

#get_os_credential(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/get_os_credential.rb', line 6

def get_os_credential(id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "credentials/#{id}"
  )
end

#get_policy(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/get_policy.rb', line 6

def get_policy(id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "policies/#{id}"
  )
end

#get_project(id, options = []) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/get_project.rb', line 6

def get_project(id, options=[])
  request(
      :expects => [200],
      :method => 'GET',
      :path => "projects/#{id}?#{options.join '&'}"
  )
end

#get_role(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/get_role.rb', line 6

def get_role(id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "roles/#{id}"
  )
end

#get_service(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/get_service.rb', line 6

def get_service(id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "projects/#{id}"
  )
end

#get_user(id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/get_user.rb', line 6

def get_user(id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "users/#{id}"
  )
end

#grant_domain_group_role(id, group_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/grant_domain_group_role.rb', line 6

def grant_domain_group_role(id, group_id, role_id)
  request(
      :expects => [204],
      :method => 'PUT',
      :path => "domains/#{id}/groups/#{group_id}/roles/#{role_id}"
  )
end

#grant_domain_user_role(id, user_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/grant_domain_user_role.rb', line 6

def grant_domain_user_role(id, user_id, role_id)
  request(
      :expects => [204],
      :method => 'PUT',
      :path => "domains/#{id}/users/#{user_id}/roles/#{role_id}"
  )
end

#grant_project_group_role(id, group_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/grant_project_group_role.rb', line 6

def grant_project_group_role(id, group_id, role_id)
  request(
      :expects => [204],
      :method => 'PUT',
      :path => "projects/#{id}/groups/#{group_id}/roles/#{role_id}"
  )
end

#grant_project_user_role(id, user_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/grant_project_user_role.rb', line 6

def grant_project_user_role(id, user_id, role_id)
  request(
      :expects => [204],
      :method => 'PUT',
      :path => "projects/#{id}/users/#{user_id}/roles/#{role_id}"
  )
end

#group_user_check(group_id, user_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/group_user_check.rb', line 6

def group_user_check(group_id, user_id)
  request(
      :expects => [204],
      :method => 'HEAD',
      :path => "groups/#{group_id}/users/#{user_id}"
  )
end

#list_domain_group_roles(id, group_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/list_domain_group_roles.rb', line 6

def list_domain_group_roles(id, group_id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "domains/#{id}/groups/#{group_id}/roles"
  )
end

#list_domain_user_roles(id, user_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/list_domain_user_roles.rb', line 6

def list_domain_user_roles(id, user_id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "domains/#{id}/users/#{user_id}/roles"
  )
end

#list_domains(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/list_domains.rb', line 6

def list_domains(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "domains",
    :query   => options
  )
end

#list_endpoints(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/list_endpoints.rb', line 6

def list_endpoints(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "endpoints",
    :query   => options
  )
end

#list_group_users(id, options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/list_group_users.rb', line 6

def list_group_users(id, options={})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "groups/#{id}/users",
    :query   => options
  )
end

#list_groups(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/fog/openstack/requests/identity_v3/list_groups.rb', line 6

def list_groups(options = {})
  user_id = options.delete('user_id') || options.delete(:user_id)

  if user_id
    path = "users/#{user_id}groups"
  else
    path = "groups"
  end

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

#list_os_credentials(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/list_os_credentials.rb', line 6

def list_os_credentials(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "credentials",
    :query   => options
  )
end

#list_policies(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/list_policies.rb', line 6

def list_policies(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "policies",
    :query   => options
  )
end

#list_project_group_roles(id, group_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/list_project_group_roles.rb', line 6

def list_project_group_roles(id, group_id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "projects/#{id}/groups/#{group_id}/roles"
  )
end

#list_project_user_roles(id, user_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/list_project_user_roles.rb', line 6

def list_project_user_roles(id, user_id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "projects/#{id}/users/#{user_id}/roles"
  )
end

#list_projects(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/fog/openstack/requests/identity_v3/list_projects.rb', line 6

def list_projects(options = {})
  user_id = options.delete('user_id') || options.delete(:user_id)
  if user_id
    path = "users/#{user_id}/projects"
  else
    path = "projects"
  end

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

#list_role_assignments(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/fog/openstack/requests/identity_v3/list_role_assignments.rb', line 6

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

#list_roles(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/list_roles.rb', line 6

def list_roles(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "roles",
    :query   => options
  )
end

#list_services(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/list_services.rb', line 6

def list_services(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "services",
    :query   => options
  )
end

#list_user_groups(user_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/list_user_groups.rb', line 6

def list_user_groups(user_id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "users/#{user_id}/groups"
  )
end

#list_user_projects(user_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/list_user_projects.rb', line 6

def list_user_projects(user_id)
  request(
      :expects => [200],
      :method => 'GET',
      :path => "users/#{user_id}/projects"
  )
end

#list_users(options = {}) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/list_users.rb', line 6

def list_users(options = {})
  request(
    :expects => [200],
    :method  => 'GET',
    :path    => "users",
    :query   => options
  )
end

#remove_user_from_group(group_id, user_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/remove_user_from_group.rb', line 6

def remove_user_from_group(group_id, user_id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "groups/#{group_id}/users/#{user_id}"
  )
end

#revoke_domain_group_role(id, group_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/revoke_domain_group_role.rb', line 6

def revoke_domain_group_role(id, group_id, role_id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "domains/#{id}/groups/#{group_id}/roles/#{role_id}"
  )
end

#revoke_domain_user_role(id, user_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/revoke_domain_user_role.rb', line 6

def revoke_domain_user_role(id, user_id, role_id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "domains/#{id}/users/#{user_id}/roles/#{role_id}"
  )
end

#revoke_project_group_role(id, group_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/revoke_project_group_role.rb', line 6

def revoke_project_group_role(id, group_id, role_id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "projects/#{id}/groups/#{group_id}/roles/#{role_id}"
  )
end

#revoke_project_user_role(id, user_id, role_id) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fog/openstack/requests/identity_v3/revoke_project_user_role.rb', line 6

def revoke_project_user_role(id, user_id, role_id)
  request(
      :expects => [204],
      :method => 'DELETE',
      :path => "projects/#{id}/users/#{user_id}/roles/#{role_id}"
  )
end

#token_authenticate(auth) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/token_authenticate.rb', line 6

def token_authenticate(auth)
  request(
      :expects => [201],
      :method => 'POST',
      :path => "auth/tokens",
      :body => Fog::JSON.encode(auth)
  )
end

#token_check(subject_token) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/token_check.rb', line 6

def token_check(subject_token)
  request(
      :expects => [200, 204],
      :method => 'HEAD',
      :path => "auth/tokens",
      :headers => {"X-Subject-Token" => subject_token, "X-Auth-Token" => auth_token, }
  )
end

#token_revoke(subject_token) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/token_revoke.rb', line 6

def token_revoke(subject_token)
  request(
      :expects => [200, 204],
      :method => 'DELETE',
      :path => "auth/tokens",
      :headers => {"X-Subject-Token" => subject_token, "X-Auth-Token" => auth_token, }
  )
end

#token_validate(subject_token) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/fog/openstack/requests/identity_v3/token_validate.rb', line 6

def token_validate(subject_token)

  request(
      :expects => [200],
      :method => 'GET',
      :path => "auth/tokens",
      :headers => {"X-Subject-Token" => subject_token, "X-Auth-Token" => auth_token}
  )
end

#update_domain(id, domain) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/update_domain.rb', line 6

def update_domain(id, domain)
  request(
      :expects => [200],
      :method => 'PATCH',
      :path => "domains/#{id}",
      :body => Fog::JSON.encode(:domain => domain)
  )
end

#update_endpoint(id, endpoint) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/update_endpoint.rb', line 6

def update_endpoint(id, endpoint)
  request(
      :expects => [200],
      :method => 'PATCH',
      :path => "endpoints/#{id}",
      :body => Fog::JSON.encode(:endpoint => endpoint)
  )
end

#update_group(id, group) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/update_group.rb', line 6

def update_group(id, group)
  request(
      :expects => [200],
      :method => 'PATCH',
      :path => "groups/#{id}",
      :body => Fog::JSON.encode(:group => group)
  )
end

#update_os_credential(id, credential) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/update_os_credential.rb', line 6

def update_os_credential(id, credential)
  request(
      :expects => [200],
      :method => 'PATCH',
      :path => "credentials/#{id}",
      :body => Fog::JSON.encode(:credential => credential)
  )
end

#update_policy(id, policy) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/update_policy.rb', line 6

def update_policy(id, policy)
  request(
      :expects => [200],
      :method => 'PATCH',
      :path => "policies/#{id}",
      :body => Fog::JSON.encode(:policy => policy)
  )
end

#update_project(id, project) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/update_project.rb', line 6

def update_project(id, project)
  request(
      :expects => [200],
      :method => 'PATCH',
      :path => "projects/#{id}",
      :body => Fog::JSON.encode(:project => project)
  )
end

#update_role(id, role) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/update_role.rb', line 6

def update_role(id, role)
  request(
      :expects => [200],
      :method => 'PATCH',
      :path => "roles/#{id}",
      :body => Fog::JSON.encode(:role => role)
  )
end

#update_service(id, service) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/update_service.rb', line 6

def update_service(id, service)
  request(
      :expects => [200],
      :method => 'PATCH',
      :path => "services/#{id}",
      :body => Fog::JSON.encode(:service => service)
  )
end

#update_user(id, user) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/fog/openstack/requests/identity_v3/update_user.rb', line 6

def update_user(id, user)
  request(
      :expects => [200],
      :method => 'PATCH',
      :path => "users/#{id}",
      :body => Fog::JSON.encode(:user => user)
  )
end