Sha256: be662001fb4d87ed964881af85aad20f4b214906360732c775b215334a1a58f2
Contents?: true
Size: 705 Bytes
Versions: 34
Compression:
Stored size: 705 Bytes
Contents
require 'fog/core/collection' require 'fog/vsphere/models/compute/snapshot' module Fog module Compute class Vsphere class Snapshots < Fog::Collection attribute :server_id, :alias => :instance_uuid attribute :parent_snapshot model Fog::Compute::Vsphere::Snapshot def all(filters = {}) if parent_snapshot load service.list_child_snapshots(parent_snapshot, filters) else requires :server_id load service.list_vm_snapshots(server_id, filters) end end def get(snapshot_ref) all.find { |snapshot| snapshot.get_child(snapshot_ref) } end end end end end
Version data entries
34 entries across 34 versions & 1 rubygems