Class: Fog::Identity::OpenStack::V3::Real
- Inherits:
-
Real
- Object
- Real
- Fog::Identity::OpenStack::V3::Real
show all
- Defined in:
- lib/fog/identity/openstack/v3.rb,
lib/fog/identity/openstack/v3/requests/get_role.rb,
lib/fog/identity/openstack/v3/requests/get_user.rb,
lib/fog/identity/openstack/v3/requests/get_group.rb,
lib/fog/identity/openstack/v3/requests/get_domain.rb,
lib/fog/identity/openstack/v3/requests/get_policy.rb,
lib/fog/identity/openstack/v3/requests/list_roles.rb,
lib/fog/identity/openstack/v3/requests/list_users.rb,
lib/fog/identity/openstack/v3/requests/create_role.rb,
lib/fog/identity/openstack/v3/requests/create_user.rb,
lib/fog/identity/openstack/v3/requests/delete_role.rb,
lib/fog/identity/openstack/v3/requests/delete_user.rb,
lib/fog/identity/openstack/v3/requests/get_project.rb,
lib/fog/identity/openstack/v3/requests/get_service.rb,
lib/fog/identity/openstack/v3/requests/list_groups.rb,
lib/fog/identity/openstack/v3/requests/token_check.rb,
lib/fog/identity/openstack/v3/requests/update_role.rb,
lib/fog/identity/openstack/v3/requests/update_user.rb,
lib/fog/identity/openstack/v3/requests/auth_domains.rb,
lib/fog/identity/openstack/v3/requests/create_group.rb,
lib/fog/identity/openstack/v3/requests/delete_group.rb,
lib/fog/identity/openstack/v3/requests/get_endpoint.rb,
lib/fog/identity/openstack/v3/requests/list_domains.rb,
lib/fog/identity/openstack/v3/requests/token_revoke.rb,
lib/fog/identity/openstack/v3/requests/update_group.rb,
lib/fog/identity/openstack/v3/requests/auth_projects.rb,
lib/fog/identity/openstack/v3/requests/create_domain.rb,
lib/fog/identity/openstack/v3/requests/create_policy.rb,
lib/fog/identity/openstack/v3/requests/delete_domain.rb,
lib/fog/identity/openstack/v3/requests/delete_policy.rb,
lib/fog/identity/openstack/v3/requests/list_policies.rb,
lib/fog/identity/openstack/v3/requests/list_projects.rb,
lib/fog/identity/openstack/v3/requests/list_services.rb,
lib/fog/identity/openstack/v3/requests/update_domain.rb,
lib/fog/identity/openstack/v3/requests/update_policy.rb,
lib/fog/identity/openstack/v3/requests/create_project.rb,
lib/fog/identity/openstack/v3/requests/create_service.rb,
lib/fog/identity/openstack/v3/requests/delete_project.rb,
lib/fog/identity/openstack/v3/requests/delete_service.rb,
lib/fog/identity/openstack/v3/requests/list_endpoints.rb,
lib/fog/identity/openstack/v3/requests/token_validate.rb,
lib/fog/identity/openstack/v3/requests/update_project.rb,
lib/fog/identity/openstack/v3/requests/update_service.rb,
lib/fog/identity/openstack/v3/requests/create_endpoint.rb,
lib/fog/identity/openstack/v3/requests/delete_endpoint.rb,
lib/fog/identity/openstack/v3/requests/update_endpoint.rb,
lib/fog/identity/openstack/v3/requests/group_user_check.rb,
lib/fog/identity/openstack/v3/requests/list_group_users.rb,
lib/fog/identity/openstack/v3/requests/list_user_groups.rb,
lib/fog/identity/openstack/v3/requests/add_user_to_group.rb,
lib/fog/identity/openstack/v3/requests/get_os_credential.rb,
lib/fog/identity/openstack/v3/requests/list_user_projects.rb,
lib/fog/identity/openstack/v3/requests/token_authenticate.rb,
lib/fog/identity/openstack/v3/requests/list_os_credentials.rb,
lib/fog/identity/openstack/v3/requests/create_os_credential.rb,
lib/fog/identity/openstack/v3/requests/delete_os_credential.rb,
lib/fog/identity/openstack/v3/requests/update_os_credential.rb,
lib/fog/identity/openstack/v3/requests/list_role_assignments.rb,
lib/fog/identity/openstack/v3/requests/check_domain_user_role.rb,
lib/fog/identity/openstack/v3/requests/grant_domain_user_role.rb,
lib/fog/identity/openstack/v3/requests/list_domain_user_roles.rb,
lib/fog/identity/openstack/v3/requests/remove_user_from_group.rb,
lib/fog/identity/openstack/v3/requests/check_domain_group_role.rb,
lib/fog/identity/openstack/v3/requests/check_project_user_role.rb,
lib/fog/identity/openstack/v3/requests/grant_domain_group_role.rb,
lib/fog/identity/openstack/v3/requests/grant_project_user_role.rb,
lib/fog/identity/openstack/v3/requests/list_domain_group_roles.rb,
lib/fog/identity/openstack/v3/requests/list_project_user_roles.rb,
lib/fog/identity/openstack/v3/requests/revoke_domain_user_role.rb,
lib/fog/identity/openstack/v3/requests/check_project_group_role.rb,
lib/fog/identity/openstack/v3/requests/grant_project_group_role.rb,
lib/fog/identity/openstack/v3/requests/list_project_group_roles.rb,
lib/fog/identity/openstack/v3/requests/revoke_domain_group_role.rb,
lib/fog/identity/openstack/v3/requests/revoke_project_user_role.rb,
lib/fog/identity/openstack/v3/requests/revoke_project_group_role.rb
Constant Summary
Constants inherited
from Real
Real::DEFAULT_SERVICE_TYPE, Real::DEFAULT_SERVICE_TYPE_V3
Instance Attribute Summary
#auth_token, #auth_token_expiration, #current_tenant, #current_user, #current_user_id, #openstack_cache_ttl, #openstack_domain_id, #openstack_domain_name, #openstack_identity_prefix, #openstack_project_domain, #openstack_project_domain_id, #openstack_project_id, #openstack_user_domain, #openstack_user_domain_id, #unscoped_token
Instance Method Summary
collapse
-
#add_user_to_group(group_id, user_id) ⇒ Object
-
#auth_domains(options = {}) ⇒ Object
-
#auth_projects(options = {}) ⇒ Object
-
#check_domain_group_role(id, group_id, role_id) ⇒ Object
-
#check_domain_user_role(id, user_id, role_id) ⇒ Object
-
#check_project_group_role(id, group_id, role_id) ⇒ Object
-
#check_project_user_role(id, user_id, role_id) ⇒ Object
-
#create_domain(domain) ⇒ Object
-
#create_endpoint(endpoint) ⇒ Object
-
#create_group(group) ⇒ Object
-
#create_os_credential(credential) ⇒ Object
-
#create_policy(policy) ⇒ Object
-
#create_project(project) ⇒ Object
-
#create_role(role) ⇒ Object
-
#create_service(service) ⇒ Object
-
#create_user(user) ⇒ Object
-
#delete_domain(id) ⇒ Object
-
#delete_endpoint(id) ⇒ Object
-
#delete_group(id) ⇒ Object
-
#delete_os_credential(id) ⇒ Object
-
#delete_policy(id) ⇒ Object
-
#delete_project(id) ⇒ Object
-
#delete_role(id) ⇒ Object
-
#delete_service(id) ⇒ Object
-
#delete_user(id) ⇒ Object
-
#get_domain(id) ⇒ Object
-
#get_endpoint(id) ⇒ Object
-
#get_group(id) ⇒ Object
-
#get_os_credential(id) ⇒ Object
-
#get_policy(id) ⇒ Object
-
#get_project(id, options = []) ⇒ Object
-
#get_role(id) ⇒ Object
-
#get_service(id) ⇒ Object
-
#get_user(id) ⇒ Object
-
#grant_domain_group_role(id, group_id, role_id) ⇒ Object
-
#grant_domain_user_role(id, user_id, role_id) ⇒ Object
-
#grant_project_group_role(id, group_id, role_id) ⇒ Object
-
#grant_project_user_role(id, user_id, role_id) ⇒ Object
-
#group_user_check(group_id, user_id) ⇒ Object
-
#list_domain_group_roles(id, group_id) ⇒ Object
-
#list_domain_user_roles(id, user_id) ⇒ Object
-
#list_domains(options = {}) ⇒ Object
-
#list_endpoints(options = {}) ⇒ Object
-
#list_group_users(id, options = {}) ⇒ Object
-
#list_groups(options = {}) ⇒ Object
-
#list_os_credentials(options = {}) ⇒ Object
-
#list_policies(options = {}) ⇒ Object
-
#list_project_group_roles(id, group_id) ⇒ Object
-
#list_project_user_roles(id, user_id) ⇒ Object
-
#list_projects(options = {}) ⇒ Object
-
#list_role_assignments(options = {}) ⇒ Object
-
#list_roles(options = {}) ⇒ Object
-
#list_services(options = {}) ⇒ Object
-
#list_user_groups(user_id) ⇒ Object
-
#list_user_projects(user_id, options = {}) ⇒ Object
-
#list_users(options = {}) ⇒ Object
-
#remove_user_from_group(group_id, user_id) ⇒ Object
-
#revoke_domain_group_role(id, group_id, role_id) ⇒ Object
-
#revoke_domain_user_role(id, user_id, role_id) ⇒ Object
-
#revoke_project_group_role(id, group_id, role_id) ⇒ Object
-
#revoke_project_user_role(id, user_id, role_id) ⇒ Object
-
#token_authenticate(auth) ⇒ Object
-
#token_check(subject_token) ⇒ Object
-
#token_revoke(subject_token) ⇒ Object
-
#token_validate(subject_token) ⇒ Object
-
#update_domain(id, domain) ⇒ Object
-
#update_endpoint(id, endpoint) ⇒ Object
-
#update_group(id, group) ⇒ Object
-
#update_os_credential(id, credential) ⇒ Object
-
#update_policy(id, policy) ⇒ Object
-
#update_project(id, project) ⇒ Object
-
#update_role(id, role) ⇒ Object
-
#update_service(id, service) ⇒ Object
-
#update_user(id, user) ⇒ Object
Methods inherited from Real
#config, #config_service?, #initialize, not_found_class
#credentials, #initialize_identity, not_found_class, #reload
Instance Method Details
#add_user_to_group(group_id, user_id) ⇒ Object
6
7
8
9
10
11
12
|
# File 'lib/fog/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/list_groups.rb', line 6
def list_groups(options = {})
user_id = options.delete('user_id') || options.delete(:user_id)
path = if user_id
"users/#{user_id}/groups"
else
"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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/list_projects.rb', line 6
def list_projects(options = {})
user_id = options.delete('user_id') || options.delete(:user_id)
path = if user_id
"users/#{user_id}/projects"
else
"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/identity/openstack/v3/requests/list_role_assignments.rb', line 6
def list_role_assignments(options = {})
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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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, options = {}) ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/fog/identity/openstack/v3/requests/list_user_projects.rb', line 6
def list_user_projects(user_id, options = {})
request(
:expects => [200],
:method => 'GET',
:path => "users/#{user_id}/projects",
:query => options
)
end
|
#list_users(options = {}) ⇒ Object
6
7
8
9
10
11
12
13
|
# File 'lib/fog/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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
|
# File 'lib/fog/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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/identity/openstack/v3/requests/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
|