Class: Fog::OpenStack::Volume::Snapshot
- Defined in:
- lib/fog/openstack/volume/models/snapshot.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
-
#delete_metadata(key_name) ⇒ Object
Delete one specific key-value pair by specifying the key name.
- #destroy ⇒ Object
- #update(data) ⇒ Object
-
#update_metadata(metadata) ⇒ Object
Existing keys have values updated and new key-value pairs are created, but none are deleted.
Methods inherited from Model
Constructor Details
This class inherits a constructor from Fog::OpenStack::Model
Instance Method Details
#delete_metadata(key_name) ⇒ Object
Delete one specific key-value pair by specifying the key name
30 31 32 33 34 |
# File 'lib/fog/openstack/volume/models/snapshot.rb', line 30 def (key_name) requires :id service.(id, key_name) true end |
#destroy ⇒ Object
16 17 18 19 20 |
# File 'lib/fog/openstack/volume/models/snapshot.rb', line 16 def destroy requires :id service.delete_snapshot(id) true end |
#update(data) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/fog/openstack/volume/models/snapshot.rb', line 7 def update(data) requires :id response = service.update_snapshot(id, data) merge_attributes(response.body['snapshot']) self end |
#update_metadata(metadata) ⇒ Object
Existing keys have values updated and new key-value pairs are created, but none are deleted
23 24 25 26 27 |
# File 'lib/fog/openstack/volume/models/snapshot.rb', line 23 def () requires :id service.(id, ) true end |