IBM BluemixDevelop in the cloud at the click of a button!

Explore the OpenStack REST APIs for PowerVC

Interface with IBM PowerVC Express Edition's OpenStack REST APIs and simplify virtual resource management

IBM® Power® Virtualization Center Express Edition (PowerVC) is an Infrastructure as a Service (IaaS) cloud solution designed to make it easier to build and manage virtual resources in a Power Systems Software Defined Environment or a cloud infrastructure. It is primarily based on OpenStack® and includes OpenStack industry-standard application programming interfaces. Learn about the APIs for each OpenStack component and the tasks the APIs can help you complete.

Share:

Cholleti Ramyasree, Software Engineer, IBM

Cholleti Ramyasree is a software engineer at IBM India Pvt. Ltd. , currently working on PowerVC, who has four years of experience with the technology and holds a bachelor's degree in computer science from JNTU University, Hyderabad, India.



16 April 2015 (First published 13 June 2014)

Also available in Russian Japanese

IBM Power Virtualization Center Express Edition (PowerVC) is an OpenStack-based Infrastructure as a Service cloud solution for the IBM Power platform designed to simplify the management of virtual resources in a Power Systems environment. PowerVC consists of both GUI and RESTful HTTP services (in the form of APIs) that perform virtual management tasks for your Power System. This article highlights the REST APIs for PowerVC Express edition and provides a short description of each one, which should give you an understanding of how to manage Power virtual resources through web services.

PowerVC overview

PowerVC is an IaaS cloud solution that is built on OpenStack project technology and designed to simplify the management of virtual resources in a Power Systems environment. It uses the industry standard, open source community interfaces of OpenStack.

PowerVC resides between console-style interface tools and IBM SmartCloud infrastructure as a service (IaaS) offering; tools such as: 

  • IBM Hardware Management Console (HMC), a Linux® kernel using BusyBox that provides a  standard interface for configuring and operating partitioned (also known as an LPAR or virtualized system) and SMP systems (such as Power).
  • IBM Integrated Virtualization Manager (IVM), a browser-based tool that literally allows clients to point, click, and consolidate multiple virtual workloads onto one Power System without needing an appliance such as the HMC to manage LPARs on a single system.
  • Kernel-based Virtual Machine (KVM), an open source hypervisor that provides enterprise-class performance, scalability, and security to run Windows® and Linux workloads. KVM turns the Linux kernel into a bare-metal hypervisor that can access the hardware virtualization support built into processor hardware.

PowerVC brings the features of OpenStack APIs to Power cloud resource management. It is designed to help users dynamically build an infrastructure that supports a Software Defined Environment (SDE) or a cloud infrastructure. PowerVC's interface supports management of RHEL, SLES, and AIX® operating systems on Power hardware by allowing you to register physical hosts, storage providers, and network resources with which you can deploy and capture virtual machines. Some of the tasks PowerVC helps with include:

  • Deploying images to create new virtual machines
  • Resizing and attaching volumes to these new images
  • Capturing the existing virtual machines
  • Importing existing virtual machines and volumes so that they can be managed by IBM PowerVC
  • Initiating start/stop/reboot/delete operations on created virtual machines or managed virtual machines
  • Monitoring the utilization of the resources that are in your environment
  • Supporting migration of virtual machines when they are running (or "hot migration")

PowerVC automatically captures the following management information:

  • Existing host/hypervisor configuration, including VIOS partition information
  • CPU, memory, and I/O settings for the existing virtual machine definitions in a Power host
  • Existing volume definitions in the supported storage controllers
  • Existing zoning information in the supported SAN switches

PowerVC lets you capture and manage a library of VM images, making it easier to quickly deploy a VM environment by launching a stored image of that environment instead of having to manually recreate a particular environment. By saving and centralizing virtual images, you can migrate the images around and quickly deploy applications on them.

You can also create groups of resources needed to support workloads.

IBM PowerVC is available in two editions:

  • IBM PowerVC Express Edition: For entry environments where virtual machine hosts are Power 7, Power 7+, and Power 8 systems managed by the IVM
  • IBM PowerVC Standard Edition: For enterprise-class virtualization environments where virtual machine hosts are Power 6, Power 7, Power 7+, and Power 8 servers managed by the HMC and Power KVM

The following section introduces the Express Edition's OpenStack APIs and one PowerVC-specific validator API and their purposes. Although there are a few additional REST APIs that are specific to the Power Systems managed by HMC and KVM tools, I won't be covering those in this article.


OpenStack REST and PowerVC validator APIs

The following are the OpenStack component APIs and PowerVC validator API you can use for virtual resource management via PowerVC in a Power System (in this example, in the PowerVC Express Edition). Each API is categorized by the OpenStack component and comes with a definition of the component and sub-component the API addresses, the purpose of the API, the operational command you use to enable the API, and the request and response body of each API.

Component: Keystone

Keystone is an OpenStack project that provides Identity, Token, Catalog, and Policy services for use specifically by projects in the OpenStack family. It implements OpenStack's Identity API.

Get the Keystone sample request and response body files.

Keystone v3: Tokens

A token is an arbitrary bit of text that is used to access resources. Each token has a scope that describes which resources are accessible with it. A token may be revoked at any time and is valid for a finite duration.

  • https://<powervc-ip>/powervc/openstack/identity/v3/auth/tokens
    Purpose: Returns an authentication token and service catalogue when credentials are supplied and authentication token returned via the X-Subject-Token return header.
    Operation: POST
    Normal Response codes: 201, 200(OK)
    Error response codes: identityFault (400, 500, …), 401, 404, 409, badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)
  • https://<powervc-ip>/powervc/openstack/identity/v3/auth/tokens
    Purpose: Validates authentication token specified by the X-Subject-Token header and also returns service catalogue. Current authentication token must be specified via the X-Auth-Token request header.
    Operation: GET
    Normal Response codes: 200(OK), 203
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)
  • https://<powervc-ip>/powervc/openstack/identity/v3/auth/tokens
    Purpose: Fast validation of authentication token. No service catalogue. 204 returns token is valid.
    Operation: HEAD
    Normal Response codes: 204
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)
    Sample Response body: This operation does not return a response body.
  • https://<powervc-ip>/powervc/openstack/identity/v3/auth/tokens
    Purpose: Immediately invalidates access token.
    Operation: DELETE
    Normal Response codes: 204
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)
    Sample Response body: This operation does not return a response body.

Keystone v3: Users

You can get the list of keystone users and its associated group using these APIs:

  • https://<powervc-ip>/powervc/openstack/identity/v3/users
    Purpose: Retrieves list of users.
    Operation: GET
    Normal Response codes: 200
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)
  • https://<powervc-ip>/powervc/openstack/identity/v3/users/user_id
    Purpose: Retrieves a specific user.
    Operation: GET
    Normal Response codes: 200
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)
  • https://<powervc-ip>/powervc/openstack/identity/v3/users/user_id/groups
    Purpose: Lists groups of which the user is a member.
    Operation: GET
    Normal Response codes: 200
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)

Keystone v3: Groups

You can get the list of keystone groups and its associated users using these APIs:

  • https://<powervc-ip>/powervc/openstack/identity/v3/groups
    Purpose: Retrieves list of keystone groups.
    Operation: GET
    Normal Response codes: 200
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)
  • https://<powervc-ip>/powervc/openstack/identity/v3/groups/group_id
    Purpose: Retrieves a specific group.
    Operation: GET
    Normal Response codes: 200
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)
  • https://<powervc-ip>/powervc/openstack/identity/v3/groups/group_id/users
    Purpose: Lists users that are the members of specified group.
    Operation: GET
    Normal Response codes: 200
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)

Keystone v3: IBM roles

A role is a personality that a user assumes when performing a specific set of operations. A role includes a set of rights and privileges. A user assuming that role inherits those rights and privileges.

  • https://<powervc-ip>/powervc/openstack/identity/v3/ibm-roles/users
    Purpose: Retrieves list of users with PowerVC role grants.
    Operation: GET
    Normal Response codes: 200
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)
  • https://<powervc-ip>/powervc/openstack/identity/v3/ibm-roles/groups
    Purpose: Retrieves list of groups with PowerVC role grants.
    Operation: GET
    Normal Response codes: 200
    Error response codes: identityFault (400, 500, …), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), serviceUnavailable (503), itemNotFound (404)

Component: Nova

Nova is the project name for OpenStack Compute, a cloud computing fabric controller, the main part of an IaaS system. It manages lifecycle and operations of compute resources.

Get the Nova sample request and response body files.

Nova servers

You can manage virtual servers using these APIs:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers
    Purpose: Creates a new virtual server or virtual machine.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers
    Purpose: Gets a list of virtual servers.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers/detail
    Purpose: Gets details on all virtual servers.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers/server_id
    Purpose: Gets details on a specified virtual server.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers/server_id
    Purpose: Deletes a specified virtual server.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
    No request or response body
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers/server_id/action
    Purpose: Resizes the specified server. Specify the resize action in the requested body.
    Purpose: Confirms a pending resize action. Specify the confirmResize action in the requested body.
    Purpose: Live-migrate a server to a new host without rebooting. Specify the os-migrateLive action in the request body.
    Purpose: Stops a running server and changes its status to STOPPED. Specify the os-stop action in the request body.
    Purpose: Starts a stopped server and changes its status to ACTIVE. Specify the os-start action in the request body.
    Purpose: Reboots the specified server. Specify the reboot action in the requested body.
    Purpose: Creating new image by capturing virtual machine.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)

Nova volume attachments

You can attach and detach the storage volumes to and from a virtual server using these APIs:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers/server_id/os-volume_attachments
    Purpose: Attaches a volume to the specified server.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers/server_id/os-volume_attachments
    Purpose: Lists the volume attachments for the specified server.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers/server_id/os-volume_attachments/attachment_id
    Purpose: Lists the volume details for the specified volume attachment ID.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/servers/server_id/os-volume_attachments/attachment_id
    Purpose: Detaches the specified volume attachment from the specified server.
    Operation: DELETE
    Normal Response Code: No Content (204), 202(Accepted)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
    No request or response body

Nova extensions

You can get the list and details of all extensions available on servers:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/extensions
    Purpose: Lists all available extensions.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/extensions/{alias}
    Purpose: Gets details about a specific extension. Extensions enable the introduction of new features in the API without requiring a version change and they allow the introduction of vendor-specific functionality.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)

Nova flavors

You can manage the virtual server flavors (virtual hardware templates defining sizes for RAM, disk, number of cores, and so on) using these APIs:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors
    Purpose: Creates a new flavor.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors
    Purpose: Gets list of flavors.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/detail
    Purpose: Gets list of flavors with details.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/detail/flavor_id
    Purpose: Gets details of specified flavor.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/detail/flavor_id
    Purpose: Deletes the specified flavor ID.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
    No request or response body

Nova extra flavor specifications

Lets you manage extra specifications of existing virtual server flavors (such as to set minimum and maximum of virtual processor or memory and setting dedicated or shared processor).

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/flavor_id/os-extra_specs
    Purpose: Lists extra specs or the keys for the specified flavor.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/flavor_id/os-extra_specs
    Purpose: Creates extra specs or the keys for the specified flavor.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/flavor_id/os-extra_specs/key_id
    Purpose: Gets the value of the specified key.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/flavors/flavor_id/os-extra_specs/key_id
    Purpose: Deletes a specified extra-spec by key.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
    No request or response body

Nova hosts

Registers and unregisters Power hosts into PowerVC.

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts
    Purpose: Lists all the hosts.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts/host_name
    Purpose: Describes a specified host.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts
    Purpose: Registers a new compute host.
    Operation: POST
    Normal response code: OK (200)
    Error response code: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts/host_name
    Purpose: Unregisters a compute host.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
    No request or response body
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts/host_name/update-registration
    Purpose: Reregisters a compute host.
    Operation: PUT
    Normal response code: OK (200)
    Error response code: Bad Request (400), Not Found (404), Server Error (500)

Nova hypervisors

You can get the hypervisor information of servers being managed by PowerVC using these APIs:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hypervisors
    Purpose: Lists hypervisors information per server.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hypervisors/detail
    Purpose: Lists the details of the hypervisors being managed by the OpenStack installation.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hypervisors/hypervisor_id
    Purpose: Gives detailed information of specific hypervisor.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hypervisors/hypervisor_id/servers
    Purpose: Lists hypervisor servers or virtual machines.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)

Nova images

You can manage virtual server images using these APIs:

  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/images
    Purpose: Lists all the images.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/images/detail
    Purpose: Lists all the images with details.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/images/image_id
    Purpose: Lists the details of the specified image.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/images/image_id
    Purpose: Deletes the specified image.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
    No request or response body

Nova limits

You can get the details of limits configured for user accounts using this API:

  • https://<powervc-ip>/powervc/openstack/image/v2/tenant_id/limits
    Purpose: Returns current limits for the account.
    Operation: GET
    Normal Response Code: OK (200), 203
    Error Response Codes: Not Found (404), Server Error (500)

Nova placement policies

You can get the list and modify the attributes of placement policies using these APIs:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/ego/policy/placement
    Purpose: Lists all the policies.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/ego/policy/placement/policy_id
    Purpose: Lists a specific policy.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/ego/policy/placement/policy_id
    Purpose: Modifies editable attributes of the specific policy.
    Operation: PUT
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)

Nova key pairs

You can manage key pairs associated with user accounts of the virtual server using these APIs:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-keypairs
    Purpose: Lists key pairs associated with the account.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-keypairs
    Purpose: Generates or imports a key pair.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-keypairs/keypair_name
    Purpose: Deletes a specified key pair.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
    No request or response body
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-keypairs/keypair_name
    Purpose: Shows key pair associated with the account.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)

Nova virtual server onboarding

For broader management reach, you can import virtual servers into PowerVC that are created outside of PowerVC.

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts/hostname/all-servers
    Purpose: Retrieves a list of all virtual machines that are on a given host (managed and not).
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts/hostname/onboard
    Purpose: Imports one or more virtual machines for a given host so they are managed by PowerVC.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-hosts/hostname/unmanage
    Purpose: Removes one or more virtual machines for a host so they are no longer managed by PowerVC.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Server Error (500)

Nova host-shared Ethernet adapters

You can list the shared Ethernet adapters assigned to single host, all hosts, or those having the same UUID and VLAN ID using these APIs:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-seas
    Purpose: Lists all host SEAs.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-seas/host_id
    Purpose: Lists specific host SEAs on given host.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-seas/host_id?vlanid=<VLANID>
    Purpose: Lists specific host SEAs passing in a VLAN ID.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-seas?vlanid=<VLANID>
    Purpose: Lists all host SEAs passing in a VLAN ID which matches PVID of one SEA.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-seas?network_id=<network_id>
    Purpose: Lists all host SEAs passing in a network UUID.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-seas?network_id=<network_id>&vlanid=<VLAN ID>
    Purpose: Lists all host SEAs passing in a network UUID and VLAN ID.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)

Nova host network mapping

You can get the list of existing network mappings and also create and update the network mapping on the host using these APIs:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-network-mapping
    Purpose: Lists network mappings.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-network-mapping?network_id=<network_id>
    Purpose: Lists network mappings by network ID.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-network-mapping/host_id
    Purpose: Lists network mappings for a given host.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-network-mapping/host_id?network_id=<network_id>
    Purpose: Lists network mappings for a given host and network ID.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-network-mapping
    Purpose: Creates a network mapping.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
    Sample Response: 200(OK)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-network-mapping
    Purpose: Modifies network mapping.
    Operation: PUT
    Normal Response Code: No Content (204), 200(OK)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
    Sample Response: 200(OK)

Nova host network placement

You can get the list of possible network placements for specified hosts and also get the list of hosts, which can support the placement of specified VLAN.

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-network-placement
    Purpose: Lists possible network placements for all hosts.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-network-placement?network_id=<network_id>
    Purpose: Lists hosts that can support the specified network.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/host-network-placement/host_name
    Purpose: Lists possible network placements for the specified host.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)

Nova usage

You can get usage statistics (such as CPU, memory, and network usage) per host and per user account using these APIs:

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-simple-tenant-usage
    Purpose: View usage for all tenants.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-simple-tenant-usage/tenant_id
    Purpose: Retrieve usage for a tenant.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)

Nova quotas

You can get information on allocated quotas and update it for user accounts.

  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-quota-sets/tenant_id
    Purpose: Shows quotas for tenant.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-quota-sets/tenant_id
    Purpose: Updates quotas for tenant.
    Operation: PUT
    Normal Response Code: No Content (204), OK(200)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/compute/v2/tenant_id/os-quota-sets/tenant_id/defaults
    Purpose: Retrieves default quotas.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)

Component: Cinder

Cinder is the OpenStack project for managing block storage.

Get the Cinder sample request and response body files.

Cinder volumes

You can manage storage volumes using these APIs:

  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes
    Purpose: For creating a volume.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes
    Purpose: For viewing a list of volumes.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes/detail
    Purpose: For viewing a list of volumes with its details.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes?data_volumes
    Purpose: For viewing a list of data volumes.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes/detail?data_volumes
    Purpose: For viewing a list of data volumes with its details.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes/volume_id
    Purpose: For viewing all information of a single volume.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes/volume_id
    Purpose: For updating a specific volume.
    Operation: PUT
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes/volume_id
    Purpose: For deleting a single volume.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500) No request or response body
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes/volume_id/restricted_metadata
    Purpose: For viewing volume restricted metadata.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes/volume_id/restricted_metadata
    Purpose: For modifying volume restricted metadata.
    Operation: PUT
    Normal Response Code: 200(OK)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes/volume-id/restricted_metadata/{key}
    Purpose: For deleting a volume from volume-restricted metadata.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500) No request or response body

Cinder hosts

You can configure storage providers in PowerVC using these APIs:

  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/os-hosts/host_name/connect
    Purpose: Returns a list of storage pools.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/os-hosts
    Purpose: Registers a new cinder host.
    Operation: POST
    Normal response code: OK (200)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/os-hosts
    Purpose: Lists all cinder hosts.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/os-hosts/host_name
    Purpose: Describes a specific host.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/os-hosts/host_name
    Purpose: Unregisters a cinder host.
    Operation: DELETE
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
    No request or response body
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/os-hosts/host_name/update-registration
    Purpose: Reregisters a cinder host.
    Operation: PUT
    Normal Response Code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)

Cinder volume onboarding

You can import storage volumes that are not managed by PowerVC using these APIs:

  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/os-hosts/host_name/all-volumes
    Purpose: Gives a list of all volumes that are on a given storage provider.
    Operation: GET
    Normal response code: OK (200)
    Error Response Codes: Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/os-hosts/host_name/onboard
    Purpose: Manages existing volumes from a storage provider.
    Operation: POST
    Normal response code: OK (200)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/os-hosts/host_name/unmanage
    Purpose: Unmanages volumes that are currently managed by PowerVC.
    Operation: POST
    Normal response code: No Content (204)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)

Cinder storage providers

You can get the metrics and status of existing storage provides in PowerVC.

  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/storage-providers
    Purpose: Gives a list of the storage provider's status/metrics.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/storage-providers/detail
    Purpose: Gives status/metrics details for all storage providers.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/storage-providers/provider_id
    Purpose: Gives status/metrics details for a specific storage provider.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)

Cinder volume expansion

You can resize the storage volumes using this API:

  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/volumes/volume_id
    Purpose: Extends/resizes a volume when the volume is attached whose status is In-Use.
    Operation: POST
    Normal response code: OK (200)
    Error response code: Bad Request (400), Server Error (500)

Cinder extensions

You can get the list and details of all extensions available on a storage volume:

  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/extensions
    Purpose: Lists available extensions.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/{alias}
    Purpose: Gets details about the specified extension.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)

Cinder types

You can manage the storage volume types using these APIs:

  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/types
    Purpose: Creates a volume type.
    Operation: POST
    Normal response code: OK (200)
    Error response code: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/types
    Purpose: Lists volume type.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/types/volume_type_id
    Purpose: Shows the information of a specified volume type.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/types/volume_type_id
    Purpose: Updates a volume type.
    Operation: PUT
    Normal Response Code: 200, 202, 204
    Error Response Codes: 403
  • https://<powervc-ip>/powervc/openstack/volume/v1/tenant_id/types/volume_type_id
    Purpose: Deletes a volume type.
    Operation: DELETE
    Normal Response Code: 202, 204
    Error Response Codes: 403
    This operation does not return a response body.

Component: Glance

Glance is an image service that provides discovery, registration, and delivery services for virtual disk images.

Get the Glance sample request and response body files.

Glance images

You can manage images (create/delete/update/list/get details/download) using these RESTful services:

  • https://<powervc-ip>/powervc/openstack/image/v2/images
    Purpose: Creates an image.
    Operation: POST
    Normal response code: OK (200)
    Error response code: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/image/v2/images
    Purpose: Gets a list of images to which tenant has access.
    Operation: GET
    Normal Response Code: OK (200), Accepted (202)
    Error Response Codes: Not Found (404), Server Error (500), Forbidden (403)
  • https://<powervc-ip>/powervc/openstack/image/v2/images/image_id
    Purpose: Gets details of the specified image.
    Operation: GET
    Normal Response Code: OK (200), Accepted (202)
    Error Response Codes: Not Found (404), Server Error (500), Forbidden (403)
  • https://<powervc-ip>/powervc/openstack/image/v2/images/image_id
    Purpose: Updates a specified image.
    Operation: PATCH
    Normal Response codes: 200
  • https://<powervc-ip>/powervc/openstack/image/v2/images/image_id
    Purpose: Deletes a specified image.
    Operation: DELETE
    Normal Response Code: 204
    Error Response Codes: 403
    This operation does not return a response body.
  • https://<powervc-ip>/powervc/openstack/image/v2/images/image_id/file
    Purpose: Downloads binary image data.
    Operation: GET
    Normal Response Codes: 200, 204
    This operation does not return a response body.
  • https://<powervc-ip>/powervc/openstack/image/v2/images/image_id/file
    Purpose: Uploads binary image data.
    Operation: PUT
    Normal Response Codes: 204
    This operation does not return a response body.

Component: Neutron

Neutron is the network management service for OpenStack.

Get the Neutron sample request and response body files.

Neutron networks

You can manage the network (create/delete/modify/list) using these RESTful services:

  • https://<powervc-ip>/powervc/openstack/network/v2/networks
    Purpose: Creates a new Neutron network.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/networks/network_id
    Purpose: Updates the specified network.
    Operation: PUT
    Normal Response Code: 200(OK)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/networks/network_id
    Purpose: Deletes the specified network.
    Operation: DELETE
    Normal Response Code: 204
    Error Response Codes: 403
    This operation does not return a response body.
  • https://<powervc-ip>/powervc/openstack/network/v2/networks
    Purpose: Gives a summary of all networks defined in Neutron.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/networks/network_id
    Purpose: Lists detailed information for the specified network.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)

Neutron subnets

You can manage network subnets using these RESTful services:

  • https://<powervc-ip>/powervc/openstack/network/v2/subnets
    Purpose: Creates a subnet on the specified network.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/subnets/subnet_id
    Purpose: Updates the specified subnet.
    Operation: PUT
    Normal Response Code: 200(OK)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/subnets/subnet_id
    Purpose: Removes the specified subnet.
    Operation: DELETE Normal Response Code: 204
    Error Response Codes: 403
    This operation does not return a response body.
  • https://<powervc-ip>/powervc/openstack/network/v2/subnets
    Purpose: Lists all subnets that are accessible to the tenant who submits the request.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/subnets/subnet_id
    Purpose: Gives detailed information for specified subnet.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)

Neutron ports

You can manage network ports using these RESTful services:

  • https://<powervc-ip>/powervc/openstack/network/v2/tenant_id/ports
    Purpose: Creates a port on specified network.
    Operation: POST
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/tenant_id/ports
    Purpose: Lists ports to which tenant has access.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/tenant_id/ports/port_id
    Purpose: Shows information for a specified port.
    Operation: GET
    Normal Response Code: OK (200)
    Error Response Codes: Bad Request (400), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/tenant_id/ports/port_id
    Purpose: Updates a specified port.
    Operation: PUT
    Normal Response Code: 200(OK)
    Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)
  • https://<powervc-ip>/powervc/openstack/network/v2/tenant_id/ports/port_id
    Purpose: Deletes a specified port.
    Operation: DELETE
    Normal Response Code: 204
    Error Response Codes: 403
    This operation does not return a response body.

The PowerVC service component: Validator

This service validates the existing PowerVC environment and displays results that can be useful to correct the configured PowerVC environment.

Get the Validator sample request and response body files.

  • https://<powervc-ip>/powervc/openstack/validation/v1/validation
    Purpose: Initiates validation run.
    Operation: GET
    Normal Response Code: OK (200), Accepted (202) (when validation is started in the backend)
    Error Response Codes: Not Found (404), Server Error (500), Forbidden (403) (when a validation is already running in the background)
  • https://<powervc-ip>/powervc/openstack/validation/v1/validation/result
    Purpose: Displays the results from the previous completed validation run.
    Operation: GET
    Normal Response Code: OK (200), Accepted (202) (when validation is started in the backend)
    Error Response Codes: Not Found (404), Server Error (500), Forbidden (403) (when a validation is already running in the background)

Conclusion

I hope this quick reference guide to using OpenStack virtual resource management APIs via the PowerVC Express Edition helps to make your cloud management tasks easier and faster.


Downloads

DescriptionNameSize
Cinder API sample request and response filesCinder.zip341KB
Glance API sample request and response filesGlance.zip51KB
Keystone API sample request and response filesKeystone.zip137KB
Neutron API sample request and response filesNeutron.zip158KB
Nova API sample request and response filesNova.zip792KB
Validator API sample request and response filesValidator.zip28KB

Resources

Learn

Get products and technologies

Discuss

  • Join the PowerVC community and be a part of the discussions on advanced methods for managing resources in the cloud.
  • Get involved in the developerWorks community. Connect with other developerWorks users while exploring the developer-driven blogs, forums, groups, and wikis.

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Cloud computing on developerWorks


  • Bluemix Developers Community

    Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.

  • Cloud newsletter

    Crazy about Cloud? Sign up for our monthly newsletter and the latest cloud news.

  • DevOps Services

    Software development in the cloud. Register today to create a project.

  • Try SoftLayer Cloud

    Deploy public cloud instances in as few as 5 minutes. Try the SoftLayer public cloud instance for one month.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Cloud computing, Open source, DevOps, Linux, AIX and UNIX
ArticleID=973574
ArticleTitle=Explore the OpenStack REST APIs for PowerVC
publish-date=04162015