Class: Fog::OpenStack::SharedFileSystem::ShareAccessRule
- Inherits:
-
Model
- Object
- Model
- Model
- Fog::OpenStack::SharedFileSystem::ShareAccessRule
show all
- Defined in:
- lib/fog/openstack/shared_file_system/models/share_access_rule.rb
Instance Attribute Summary collapse
Attributes inherited from Model
#project
Instance Method Summary
collapse
Methods inherited from Model
#create, #initialize, #update
Instance Attribute Details
#share ⇒ Object
Returns the value of attribute share.
7
8
9
|
# File 'lib/fog/openstack/shared_file_system/models/share_access_rule.rb', line 7
def share
@share
end
|
Instance Method Details
#destroy ⇒ Object
23
24
25
26
27
|
# File 'lib/fog/openstack/shared_file_system/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/openstack/shared_file_system/models/share_access_rule.rb', line 29
def ready?
state == 'active'
end
|
#save ⇒ Object
16
17
18
19
20
21
|
# File 'lib/fog/openstack/shared_file_system/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
|