Sha256: 297cb3157d21067eb68530796fdd61fa2d09109d3f5c00a7f45fddbf0c8e6df2
Contents?: true
Size: 634 Bytes
Versions: 34
Compression:
Stored size: 634 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
34 entries across 34 versions & 3 rubygems