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

Version Path
cloudstack-cli-0.15.1 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.15.0 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.14.1 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.14.0 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.13.1 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.13.0 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.12.3 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.12.2 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.12.1 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.12.0 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.11.2 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.11.1 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.11.0 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.10.2 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.10.1 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.10.0 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.9.1 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.9.0 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.8.3 lib/cloudstack-cli/commands/snapshot.rb
cloudstack-cli-0.8.2 lib/cloudstack-cli/commands/snapshot.rb