Class: Fog::Identity::OpenStack::V3::Policy
Instance Attribute Summary
#project
Instance Method Summary
collapse
#initialize, #save
Instance Method Details
#create ⇒ Object
32
33
34
35
36
37
38
|
# File 'lib/fog/identity/openstack/v3/models/policy.rb', line 32
def create
requires :blob, :type
merge_attributes(
service.create_policy(attributes).body['policy']
)
self
end
|
#destroy ⇒ Object
18
19
20
21
22
|
# File 'lib/fog/identity/openstack/v3/models/policy.rb', line 18
def destroy
requires :id
service.delete_policy(id)
true
end
|
#to_s ⇒ Object
14
15
16
|
# File 'lib/fog/identity/openstack/v3/models/policy.rb', line 14
def to_s
name
end
|
#update(attr = nil) ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/fog/identity/openstack/v3/models/policy.rb', line 24
def update(attr = nil)
requires :id, :blob, :type
merge_attributes(
service.update_policy(id, attr || attributes).body['policy']
)
self
end
|