Sha256: 36f7b0a6f94016e471911eb05581b977d0ae2de659bcdfc4bb69fe84172007a8

Contents?: true

Size: 367 Bytes

Versions: 2

Compression:

Stored size: 367 Bytes

Contents

class Account < Thor

  desc 'list [NAME]', 'list accounts'
  def list(name = nil)
    cs_cli = CloudstackCli::Helper.new(options[:config])
    accounts = cs_cli.list_accounts(name)
    if accounts.size < 1
      puts "No accounts found"
    else
      accounts.each do |account|
        puts "#{account['name']} - #{account['domain']}"
      end
    end
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cloudstack-cli-0.0.3 lib/cloudstack-cli/commands/account.rb
cloudstack-cli-0.0.2 lib/cloudstack-cli/commands/account.rb