Class: Fog::Volume::OpenStack::Snapshot
- Inherits:
-
OpenStack::Model
- Object
- Model
- OpenStack::Model
- Fog::Volume::OpenStack::Snapshot
- Defined in:
- lib/fog/volume/openstack/models/snapshot.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from OpenStack::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 OpenStack::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/volume/openstack/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/volume/openstack/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/volume/openstack/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/volume/openstack/models/snapshot.rb', line 23 def () requires :id service.(id, ) true end |