Sha256: f341ffc300990d424d7fea02a567e551d8c0e445d85fca2c9378b7745b9745c0
Contents?: true
Size: 1.09 KB
Versions: 11
Compression:
Stored size: 1.09 KB
Contents
require 'fog/compute/models/server' module Fog module Compute class Vsphere class Snapshot < Fog::Model identity :ref attribute :server_id attribute :name attribute :quiescedi, :default => false attribute :description, :default => '' attribute :create_time attribute :power_state, :default => 'none' attribute :ref attribute :mo_ref attribute :tree_node attribute :snapshot_name_chain attribute :ref_chain def child_snapshots(filters = {}) service.snapshots( { :server_id => server_id, :parent_snapshot => self }.update(filters) ) end def get_child(snapshot_ref) return self if ref == snapshot_ref child_snapshots().get(snapshot_ref) end def revert service.vm_revert_snapshot server_id, ref end def destroy(remove_children = false) requires :server_id, :ref service.vm_remove_snapshot(server_id, ref, remove_children) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems