HP Cloud Computer Driver Documentation

HP Cloud is a public cloud computing service offered by HP.

../../_images/hpcloud.png

HP Cloud driver is based on the OpenStack one. For more information information and OpenStack specific documentation, please refer to OpenStack Compute Driver Documentation page.

Examples

1. Instantiating the driver

Unlike other OpenStack based providers, HP cloud also requires you to specify tenant name when connecting to their cloud. You can do that by passing tenant_name argument to the driver constructor as shown in the code example below.

This attribute represents a project name and can be obtained in the HP Cloud console as shown in the picture below.

../../_images/hp_cloud_console_projects.jpg
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver

USERNAME = "your account username"
PASSWORD = "your account password"
TENANT_NAME = "project name"
REGION = "region-b.geo-1"

cls = get_driver(Provider.HPCLOUD)
driver = cls(USERNAME, PASSWORD, tenant_name=TENANT_NAME, region=REGION)
print(driver.list_nodes())

API Docs