Sha256: 8f4827baae98b5687685bc26c705333239c35f7ff8f9a5470ed6490a159d56ee
Contents?: true
Size: 632 Bytes
Versions: 22
Compression:
Stored size: 632 Bytes
Contents
module CloudstackClient module User ## # Lists users. # def list_users(args = {}) params = { 'command' => 'listUsers', 'isrecursive' => true } params['listall'] = true if args[:listall] if args[:account] account = list_accounts(name: args[:account]).first unless account puts "Error: Account #{args[:account]} not found." exit 1 end params['domainid'] = account["domainid"] params['account'] = args[:account] end json = send_request(params) json['user'] || [] end end end
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
cloudstack_client-0.4.0 | lib/cloudstack_client/commands/user.rb |
cloudstack_client-0.3.6 | lib/cloudstack_client/commands/user.rb |