Class: Fog::Identity::OpenStack::V2::Role
Instance Attribute Summary
#project
Instance Method Summary
collapse
#create, #initialize, #update
Instance Method Details
#add_to_user(user, tenant) ⇒ Object
24
25
26
|
# File 'lib/fog/identity/openstack/v2/models/role.rb', line 24
def add_to_user(user, tenant)
add_remove_to_user(user, tenant, :add)
end
|
#destroy ⇒ Object
18
19
20
21
22
|
# File 'lib/fog/identity/openstack/v2/models/role.rb', line 18
def destroy
requires :id
service.delete_role(id)
true
end
|
#remove_to_user(user, tenant) ⇒ Object
28
29
30
|
# File 'lib/fog/identity/openstack/v2/models/role.rb', line 28
def remove_to_user(user, tenant)
add_remove_to_user(user, tenant, :remove)
end
|
#save ⇒ Object
11
12
13
14
15
16
|
# File 'lib/fog/identity/openstack/v2/models/role.rb', line 11
def save
requires :name
data = service.create_role(name)
merge_attributes(data.body['role'])
true
end
|