Class: Fog::OpenStack::Identity::V3::Role
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::Identity::V3::Role
show all
- Defined in:
- lib/fog/openstack/identity/v3/models/role.rb
Instance Attribute Summary
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#initialize, #save
Instance Method Details
#create ⇒ Object
31
32
33
34
35
36
|
# File 'lib/fog/openstack/identity/v3/models/role.rb', line 31
def create
merge_attributes(
service.create_role(attributes).body['role']
)
self
end
|
#destroy ⇒ Object
17
18
19
20
21
|
# File 'lib/fog/openstack/identity/v3/models/role.rb', line 17
def destroy
requires :id
service.delete_role(id)
true
end
|
#to_s ⇒ Object
13
14
15
|
# File 'lib/fog/openstack/identity/v3/models/role.rb', line 13
def to_s
name
end
|
#update(attr = nil) ⇒ Object
23
24
25
26
27
28
29
|
# File 'lib/fog/openstack/identity/v3/models/role.rb', line 23
def update(attr = nil)
requires :id
merge_attributes(
service.update_role(id, attr || attributes).body['role']
)
self
end
|