-
Notifications
You must be signed in to change notification settings - Fork 70
Getting Started
Rohit Yadav edited this page Mar 14, 2019
·
12 revisions
The default server profile has the name localcloud
with defaults (such as url and credentials) set to a locally running CloudStack server. Start cmk
, create a new server profile, configure your CloudStack server's API endpoint and run sync
, for example:
$ cmk
Apache CloudStack 🐵 CloudMonkey 6.0.0
Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues
(localcloud) 🐱 > set profile mycloud
Loaded server profile: mycloud
Url: http://localhost:8080/client/api
Username: admin
Domain: /
API Key:
Total APIs: 595
(mycloud) 🐱 > set url http://myprovider.cloud/client/api
(mycloud) 🐱 > set username myusername
(mycloud) 🐱 > set password mypassword
(mycloud) 🐱 > sync
Discovered 610 APIs
You can also use the set
command to set the various server profile specific options. The cloudmonkey configuration is stored at ~/.cmk/config
file. The ~/.cmk
directory also contains the API cache at ~/.cmk/profiles
.
Try autocompletion using tabbing:
> <tab><tab>
> list <tab><tab>
> list users <tab><tab> # for options
> list users <press enter>
> list users
{
"count": 1,
"user": [
{
"account": "admin",
"accountid": "79665239-3cd4-11e9-bf33-f4d1082409e6",
"accounttype": 1,
"apikey": "...redacted...",
"created": "2019-03-02T15:48:07+0000",
"domain": "ROOT",
"domainid": "7965d079-3cd4-11e9-bf33-f4d1082409e6",
"email": "[email protected]",
"firstname": "Admin",
"id": "7966afa9-3cd4-11e9-bf33-f4d1082409e6",
"iscallerchilddomain": false,
"isdefault": true,
"lastname": "User",
"roleid": "852a28b1-3cd4-11e9-bf33-f4d1082409e6",
"rolename": "Root Admin",
"roletype": "Admin",
"state": "enabled",
"username": "admin",
"usersource": "native"
}
]
}
Consult the API docs at http://cloudstack.apache.org/api.html