Method: CloudstackCli::OptionResolver#resolve_account
- Defined in:
- lib/cloudstack-cli/option_resolver.rb
#resolve_account ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/cloudstack-cli/option_resolver.rb', line 64 def resolve_account if [:account] if account = client.list_accounts(name: [:account], listall: true).first [:account_id] = account['id'] [:domain_id] = account['domainid'] else say "Error: Account #{options[:account]} not found.", :red exit 1 end end end |