Sha256: d8b73de4c227ffb11de4a8c9f9d15ba39eb80b6b906e272566138ae3c482ab58
Contents?: true
Size: 523 Bytes
Versions: 5
Compression:
Stored size: 523 Bytes
Contents
class Account < CloudstackCli::Base TYPES = { 0 => 'user', 1 => 'domain-admin', 2 => 'admin' } desc 'account 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
5 entries across 5 versions & 1 rubygems