Sha256: 23f7850a66f11976f529c2eec677655da732ea5432f2582fe562126f3b44e1c1
Contents?: true
Size: 631 Bytes
Versions: 29
Compression:
Stored size: 631 Bytes
Contents
class Snapshot < CloudstackCli::Base desc 'list', 'list snapshots' option :account option :project option :domain option :listall def list snapshots = client.list_snapshots(options) if snapshots.size < 1 say "No snapshots found." else table = [["Account", "Name", "Volume", "Created", "Type"]] snapshots.each do |snapshot| table << [ snapshot['account'], snapshot['name'], snapshot['volumename'], snapshot['created'], snapshot['snapshottype'] ] end print_table table say "Total number of snapshots: #{snapshots.size}" end end end
Version data entries
29 entries across 29 versions & 1 rubygems