Module: CloudstackClient::Account
- Defined in:
- lib/cloudstack_client/commands/account.rb
Instance Method Summary collapse
-
#list_accounts(args = { :name => nil }) ⇒ Object
Lists accounts.
-
#list_project_accounts(project_id, args = {}) ⇒ Object
Lists project accounts.
Instance Method Details
#list_accounts(args = { :name => nil }) ⇒ Object
Lists accounts.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cloudstack_client/commands/account.rb', line 8 def list_accounts(args = { :name => nil }) params = { 'command' => 'listAccounts', 'listall' => 'true', 'isrecursive' => 'true' } params['name'] = args[:name] if args[:name] json = send_request(params) json['account'] || [] end |
#list_project_accounts(project_id, args = {}) ⇒ Object
Lists project accounts.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/cloudstack_client/commands/account.rb', line 23 def list_project_accounts(project_id, args = {}) params = { 'command' => 'listProjectAccounts', 'projectid' => project_id, 'listall' => 'true', 'isrecursive' => 'true' } params['name'] = args[:name] if args[:name] json = send_request(params) json['account'] || [] end |