Class: Fog::OpenStack::SharedFileSystem::Shares
- Inherits:
-
Collection
- Object
- Collection
- Collection
- Fog::OpenStack::SharedFileSystem::Shares
- Defined in:
- lib/fog/openstack/shared_file_system/models/shares.rb
Instance Attribute Summary
Attributes inherited from Collection
Instance Method Summary collapse
Methods inherited from Collection
Instance Method Details
#all(options = {}) ⇒ Object
10 11 12 |
# File 'lib/fog/openstack/shared_file_system/models/shares.rb', line 10 def all( = {}) load_response(service.list_shares_detail(), 'shares') end |
#destroy(id) ⇒ Object
21 22 23 24 |
# File 'lib/fog/openstack/shared_file_system/models/shares.rb', line 21 def destroy(id) share = find_by_id(id) share.destroy end |
#find_by_id(id) ⇒ Object Also known as: get
14 15 16 17 |
# File 'lib/fog/openstack/shared_file_system/models/shares.rb', line 14 def find_by_id(id) share_hash = service.get_share(id).body['share'] new(share_hash.merge(:service => service)) end |