Managing CloudPe Using API

 Access to CloudPe API

CloudPe uses OpenStack-based API with password credentials.


Access Example with Python CLI

E.g. If you want to connect to CloudPe Cloud API using an Ubuntu system (it could be a virtual machine on the CloudPe Cloud or your laptop), follow these steps:

1. Install the necessary tools:

You need to install the OpenStack client for Python 3. This lets you interact with the CloudPe Cloud API.

Run this command to install it:

# apt install python3-openstackclient python3-heatclient python3-magnumclient python3-octaviaclient


2. Set up your credentials:

You need to create a file where you’ll store your CloudPe credentials (your login details for the CloudPe Cloud).

In the following command, replace the example values with your own credentials:

echo -e "export OS_PROJECT_DOMAIN_NAME=vhc-pc \nexport OS_USER_DOMAIN_NAME=vhc-pc \nexport OS_PROJECT_NAME=pc-345 \nexport [email protected] \nexport OS_PASSWORD="strongpassword" \nexport OS_AUTH_URL=https://eu1-cloud.cloudpe.com:5000/v3" > cloud-cred.rc

Here’s what each part means:

  • OS_PROJECT_DOMAIN_NAME: The project domain name.
  • OS_USER_DOMAIN_NAME: The user domain name.
  • OS_PROJECT_NAME: The name of the project.
  • OS_USERNAME: Your username (usually an email).
  • OS_PASSWORD: Your password.
  • OS_AUTH_URL: The URL where the CloudPe Cloud API is located.

3. Load the credentials into an Env Var:


Now, you need to load the credentials you just set up into your system’s environment so the OpenStack tools can use them.

Run the command:

. /cloud-cred.rc

4. Use the OpenStack CLI:

Once your credentials are set up, you can use the OpenStack command-line tools to manage your cloud resources.

For example, to see a list of your virtual machines (VMs), run:

# openstack server list

This will display all the VMs in your CloudPe Cloud account.

That’s it! You’re now ready to interact with the CloudPe Cloud API from your system. For more information, check the OpenStack CLI Reference.

API Automation Solutions

You can use the same credential information set for Heat Orchestration and Terraform on Heat.



Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support