lib/cloudstack-cli/commands/domain.rb in cloudstack-cli-0.15.1 vs lib/cloudstack-cli/commands/domain.rb in cloudstack-cli-1.0.0.rc1

- old
+ new

@@ -1,18 +1,18 @@ class Domain < CloudstackCli::Base - desc 'list [NAME]', 'list domains' - def list(name = nil) - domains = client.list_domains(name) + desc 'list', 'list domains' + def list + domains = client.list_domains if domains.size < 1 puts "No domains found." else - table = [["Name", "Path"]] + table = [%w(Name Path)] domains.each do |domain| table << [domain['name'], domain['path']] end print_table table say "Total number of domains: #{domains.size}" end end - -end \ No newline at end of file + +end