apache / cloudstack-cloudmonkey

Apache Cloudstack Cloudmonkey
Apache License 2.0
91 stars 60 forks source link

Enable passing of profile information in cmk commandline #104

Closed PaulAngus closed 1 year ago

PaulAngus commented 2 years ago

Feature Request

Enable the passing of profile information in cmk command line

Use Case

Subsequent Usage

Being able to override these parameters would allow config to be:

prompt     = ߐ
asyncblock = true
timeout    = 1800
output     = json
verifycert = true
profile    = localcloud

[localcloud]
url       = http://localhost:8080/client/api
username  = 
password  = 
domain    = /
apikey    = 
secretkey =

one could then use:

cmk cmk_url=http://acs_host:8080/client/api cmk_apikey=$APIKEY cmk_secretkey=$SECRETKEY cmk_output=csv list hosts

When scripting, APIKEY and SECRETKEY can be stored in a vault

rohityadavcloud commented 2 years ago

With latest v6.2.0 you can now pass the -p and -c options to specify custom config/server profile https://github.com/apache/cloudstack-cloudmonkey/wiki/Getting-Started#getting-help

PaulAngus commented 2 years ago

Hi Rohit.

I want avoid a text file with the endpoint and credentials in it. Using the existing nomenclature there would be

-s secret key -k api key -u api endpoint url -o output

possibly also -a asyncblock -v verifycert ....

soreana commented 1 year ago

@PaulAngus Do you work on this issue?