Access to Cloudpe API
Cloudpe uses OpenStack-based API with password credentials.
Here is a list of access parameters:
Name | Python CLI Variable | Value |
---|---|---|
User Domain | OS_USER_DOMAIN_NAME | Your domain name. |
Project Domain | OS_PROJECT_DOMAIN_NAME | Your project domain name. |
Project Name | OS_PROJECT_NAME | Your project name. You can view it in the upper-right corner of the self-service panel. |
Username | OS_USERNAME | Your user name. |
Password | OS_PASSWORD | Your password. |
URL | OS_AUTH_URL | Your cloud URL should be one of the following:https://eu1-cloud.cloudpe.com:/5000/v3https://eu3-cloud.cloudpe.com:/5000/v3https://us1-cloud.cloudpe.com:/5000/v3 |
Access Example with Python CLI
The example below is for the Ubuntu system you can use to connect to Cloudpe Cloud API. It can be a virtual machine on the Cloudpe or your laptop with a similar system:
- Install the Python 3 OpenStack client:# apt install python3-OpenStack client python3-heat client python3-magnum client python3-octaviaclient
- Prepare a credentials file: In the request below, replace the values with your ones. echo -e “export OS_PROJECT_DOMAIN_NAME=cloudpe-pc \nexport OS_USER_DOMAIN_NAME=cloudpe-pc \nexport OS_PROJECT_NAME=pc-345 \nexport [email protected] \nexport OS_PASSWORD=”strong password” \nexport OS_AUTH_URL=https://eu1-cloud.cloudpe.com:5000/v3″ > cloud-cred.rc
- Load the credentials into an Env Var: /cloud-cred.rc
Now, you can use the OpenStack CLI to manage your cloud objects. For more details, go to OpenStack CLI Reference. For example:
# openstack server list
The abovementioned command will output a list of virtual machines.
API Automation Solutions
You can use the same credential information set for Heat Orchestration and Terraform on Heat.