Class: Fog::SharedFileSystem::OpenStack::ShareAccessRule
Instance Attribute Summary collapse
#project
Instance Method Summary
collapse
#create, #initialize, #update
Instance Attribute Details
#share ⇒ Object
Returns the value of attribute share.
7
8
9
|
# File 'lib/fog/shared_file_system/openstack/models/share_access_rule.rb', line 7
def share
@share
end
|
Instance Method Details
#destroy ⇒ Object
23
24
25
26
27
|
# File 'lib/fog/shared_file_system/openstack/models/share_access_rule.rb', line 23
def destroy
requires :id, :share
service.revoke_share_access(@share.id, id)
true
end
|
#ready? ⇒ Boolean
29
30
31
|
# File 'lib/fog/shared_file_system/openstack/models/share_access_rule.rb', line 29
def ready?
state == 'active'
end
|
#save ⇒ Object
16
17
18
19
20
21
|
# File 'lib/fog/shared_file_system/openstack/models/share_access_rule.rb', line 16
def save
requires :share, :access_level, :access_type, :access_to
raise Fog::Errors::Error, 'Resaving an existing object may create a duplicate' if persisted?
merge_attributes(service.grant_share_access(@share.id, access_to, access_type, access_level).body['access'])
true
end
|