Sha256: 986da19166b84ee233664607c121d8100c8be9f84ec55c491bab81759bcfd332
Contents?: true
Size: 515 Bytes
Versions: 7
Compression:
Stored size: 515 Bytes
Contents
class Account < CloudstackCli::Base TYPES = { 0 => 'user', 1 => 'domain-admin', 2 => 'admin' } desc 'list [NAME]', 'list accounts (by name)' def list(name = nil) accounts = client.list_accounts({name: name}) if accounts.size < 1 puts "No accounts found." else table = [["Name", "Type", "Domain"]] accounts.each do |account| table << [account['name'], TYPES[account['accounttype']], account['domain']] end print_table table end end end
Version data entries
7 entries across 7 versions & 1 rubygems