Class: Fog::Vsphere::Compute::Snapshot
- Inherits:
-
Model
- Object
- Model
- Fog::Vsphere::Compute::Snapshot
- Defined in:
- lib/fog/vsphere/models/compute/snapshot.rb
Instance Method Summary collapse
- #child_snapshots(filters = {}) ⇒ Object
- #destroy(remove_children = false) ⇒ Object
- #get_child(snapshot_ref) ⇒ Object
- #revert ⇒ Object
Instance Method Details
#child_snapshots(filters = {}) ⇒ Object
21 22 23 24 25 |
# File 'lib/fog/vsphere/models/compute/snapshot.rb', line 21 def child_snapshots(filters = {}) service.snapshots( { server_id: server_id, parent_snapshot: self }.update(filters) ) end |
#destroy(remove_children = false) ⇒ Object
36 37 38 39 |
# File 'lib/fog/vsphere/models/compute/snapshot.rb', line 36 def destroy(remove_children = false) requires :server_id, :ref service.vm_remove_snapshot(server_id, ref, remove_children) end |
#get_child(snapshot_ref) ⇒ Object
27 28 29 30 |
# File 'lib/fog/vsphere/models/compute/snapshot.rb', line 27 def get_child(snapshot_ref) return self if ref == snapshot_ref child_snapshots.get(snapshot_ref) end |
#revert ⇒ Object
32 33 34 |
# File 'lib/fog/vsphere/models/compute/snapshot.rb', line 32 def revert service.vm_revert_snapshot server_id, ref end |