lib/cloudstack-client/commands/server.rb in cloudstack-cli-0.3.10 vs lib/cloudstack-client/commands/server.rb in cloudstack-cli-0.3.11

- old
+ new

@@ -91,9 +91,19 @@ params = { 'command' => 'listVirtualMachines', 'listAll' => true } params['projectid'] = options[:project_id] if options[:project_id] + + if options[:zone] + zone = get_zone(options[:zone]) + unless zone + puts "Error: Zone #{options[:zone]} not found" + exit 1 + end + params['zoneid'] = zone['id'] + end + if options[:account] if account = list_accounts({name: options[:account]}).first params['domainid'] = account["domainid"] params['account'] = options[:account] end \ No newline at end of file