Class: Fog::Identity::OpenStack::Role
- Inherits:
-
Model
- Object
- Model
- Fog::Identity::OpenStack::Role
- Defined in:
- lib/fog/openstack/models/identity/role.rb
Instance Method Summary collapse
- #add_to_user(user, tenant) ⇒ Object
- #destroy ⇒ Object
- #remove_to_user(user, tenant) ⇒ Object
- #save ⇒ Object
Instance Method Details
#add_to_user(user, tenant) ⇒ Object
23 24 25 |
# File 'lib/fog/openstack/models/identity/role.rb', line 23 def add_to_user(user, tenant) add_remove_to_user(user, tenant, :add) end |
#destroy ⇒ Object
17 18 19 20 21 |
# File 'lib/fog/openstack/models/identity/role.rb', line 17 def destroy requires :id service.delete_role(id) true end |
#remove_to_user(user, tenant) ⇒ Object
27 28 29 |
# File 'lib/fog/openstack/models/identity/role.rb', line 27 def remove_to_user(user, tenant) add_remove_to_user(user, tenant, :remove) end |
#save ⇒ Object
10 11 12 13 14 15 |
# File 'lib/fog/openstack/models/identity/role.rb', line 10 def save requires :name data = service.create_role(name) merge_attributes(data.body['role']) true end |