Sha256: 5816933f010adac0407a274fada3b5938650795919e235b66febdec08ec1cc34
Contents?: true
Size: 792 Bytes
Versions: 7
Compression:
Stored size: 792 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.each do |snapshot| snapshot = snapshot.get_child(snapshot_ref) return snapshot if snapshot end nil end end end end end
Version data entries
7 entries across 5 versions & 2 rubygems