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.9.7 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.9.6 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.9.5 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.9.3 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.9.2 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.9.1 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.9.0 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.8.0 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.7.1 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.7.0 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.6.4 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.6.3 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.6.2 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.6.0 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.6.1 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.5.0 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.4.4 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.4.3 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.4.2 lib/cloudstack_client/commands/user.rb
cloudstack_client-0.4.1 lib/cloudstack_client/commands/user.rb