Supported OpenStack Compute (Nova) APIs

These OpenStack APIs are supported in PowerVC.

For usage instructions, see the OpenStack compute API documentation.

General APIs

Table 1. OpenStack compute general APIs that are used with PowerVC.
Method URI Description
GET /v2.1/ Returns detailed information about this specific version of the API.
GET /v2.1/{tenant_id}/extensions Lists all available extensions.
GET /v2.1/{tenant_id}/extensions/{alias} 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 functions.

Flavors APIs

Use flavors APIs to work with PowerVC compute templates. PowerVC uses the term compute template instead of flavor.

Table 2. OpenStack compute flavors APIs that are used with PowerVC.
Method URI Description
POST /v2.1/{tenant_id}/flavors Creates a flavor.
GET /v2.1/{tenant_id}/flavors Lists IDs, names, and links for available flavors.
GET /v2.1/{tenant_id}/flavors/detail Lists all details for available flavors.
GET /v2.1/{tenant_id}/flavors/{flavor_id} Lists details for the specified flavor.
DELETE /v2.1/{tenant_id}/flavors/{flavor_id} Deletes a flavor.
GET /v2.1/{tenant_id}/flavors/{flavor_id}/os-extra_specs Lists the extra-specs or keys for the specified flavor.
POST /v2.1/{tenant_id}/flavors/{flavor_id}/os-extra_specs Creates extra-specs or keys for the specified flavor.
GET /v2.1/{tenant_id}/flavors/{flavor_id}/os-extra_specs/{key_id} Gets the value of the specified key.
DELETE /v2.1/{tenant_id}/flavors/{flavor_id}/os-extra_specs/{key_id} Delete a specified extra-spec by key.

Host aggregates (host groups) APIs

Note: The PowerVC user interface uses the term host groups instead of host aggregates.
Table 3. OpenStack compute host aggregates (host groups) APIs that are used with PowerVC.
Method URI Description
GET /v2.1/​{tenant_id}​/os-aggregates Lists all aggregates.
POST /v2.1/​{tenant_id}​/os-aggregates Creates an aggregate.
DELETE /v2.1/{tenant_id}/os-aggregates/​{aggregate_id} Deletes an aggregate.
GET /v2.1/{tenant_id}/os-aggregates/​{aggregate_id} Gets details about a specified aggregate.
PUT /v2.1/{tenant_id}/os-aggregates/​{aggregate_id} Updates the name, and optionally the availability zone, for a specified aggregate.
PUT /v2.1/{tenant_id}/os-aggregates/​{aggregate_id} Sets and updates the DRO schedules for the specified aggregate.
POST /v2.1/{tenant_id}/os-aggregates/​{aggregate_id}​/action Sets metadata for an aggregate.
POST /v2.1/{tenant_id}/os-aggregates/​{aggregate_id}​/action Adds a host to an aggregate.
POST /v2.1/{tenant_id}/os-aggregates/​{aggregate_id}​/action Removes a host from an aggregate.

Hypervisors APIs

Table 4. OpenStack compute hypervisors APIs that are used with PowerVC.
Method URI Description
GET /v2.1/{tenant_id}/os-hypervisors Lists hypervisor information per server that is obtained through the API that is specific to the hypervisor, such as libvirt or XenAPI.
GET /v2.1/{tenant_id}/os-hypervisors/detail Lists details of the hypervisors that are managed by the OpenStack installation.
GET /v2.1/{tenant_id}/os-hypervisors/{hypervisor_hostname} Gets detailed information for the specified hypervisor. Supported parameters:

include_cpu_utilization: Specifies whether to include the CPU utilization in the response. Possible values are True (default) and False.

include_remote_restart_enabled: Specifies whether to include the value for Remote restart enabled in the response. Possible values are True (default) and False.

include_memory_utilization: Specifies whether to include the current memory utilization of the host. Possible values are True (default) and False.

Note: HMC currently does not support the memory utilization metric and reports "0."
GET /v2.1/{tenant_id}/os-hypervisors/{hypervisor_hostname}/servers Retrieves a list of servers and virtual machines that are hosted by the specified hypervisor.

Image APIs

Table 5. OpenStack compute image APIs that are used with PowerVC.
Method URI Description
GET /v2.1/{tenant_id}/images Lists all images.
GET /v2.1/{tenant_id}/images/detail Lists all details for available images.
GET /v2.1/{tenant_id}/images/{image_id} Lists details of the specified image.
DELETE /v2.1/{tenant_id}/images/{image_id} Deletes the specified image.

Interface APIs

Table 6. OpenStack compute interface APIs that are used with PowerVC.
Method URI Description
POST /v2/{tenant_id}/servers/{server_id}/os-interface Creates a port interface and uses it to attach the port to a server instance. If you pre-create a port, try to attach a virtual machine to it, and the attach fails, you must manually delete or reuse the port.
DELETE /v2/{tenant_id}/servers/{server_id}/os-interface/{attachment_id} Detaches the specified port interface from the virtual machine and then deletes the port.

Key Pair APIs

Table 7. OpenStack compute key pairs APIs that are used with PowerVC.
Method URI Description
GET /v2.1/​{tenant_id}​/os-keypairs Lists keypairs that are associated with the account.
POST /v2.1/​{tenant_id}​/os-keypairs Generates or imports a keypair.
DELETE /v2.1/​{tenant_id}​/os-keypairs/​{keypair_name}​ Deletes a keypair.
GET /v2.1/​{tenant_id}​/os-keypairs/​{keypair_name}​ Shows a keypair that is associated with the account.

Limits, quotas, and usage APIs

Table 8. OpenStack compute limits, quotas, and usage APIs that are used with PowerVC.
Method URI Description
GET /v2.1/{tenant_id}/limits Returns current limits for the account.
GET /v2.1/{tenant_id}/os-quota-sets/{tenant_id} Shows quotas for a tenant.
PUT /v2.1/{tenant_id}/os-quota-sets/{tenant_id} Update quotas for a tenant.
DELETE /v2.1/{tenant_id}/os-quota-sets/{tenant_id} Deletes quotas for a tenant.
GET /v2.1/{tenant_id}/os-quota-sets/{tenant_id}/defaults Retrieves default quotas.
GET /v2.1/{tenant_id}/os-quota-sets/{tenant_id}/detail Retrieves the details about the quotas.
GET /v2.1/{tenant_id}/os-simple-tenant-usage Gets usage for all tenants.
GET /v2.1/{tenant_id}/os-simple-tenant-usage/{tenant_id} Retrieves usage for a tenant.
GET /v2.1/{tenant_id}/os-simple-tenant-usage/{tenant_id}/detail Retrieves details about quotas.

Server groups APIs

Table 9. OpenStack compute server groups APIs that are used with PowerVC. PowerVC uses the term collocation rule instead of server group.
Method URI Description
GET /v2.1/{tenant_id}/os-server-groups Lists server groups.
POST /v2.1/{tenant_id}/os-server-groups Creates a server group.
GET /v2.1/{tenant_id}/os-server-groups/{ServerGroup_id} Shows details for a specified server group.
DELETE /v2.1/{tenant_id}/os-server-groups/{ServerGroup_id} Deletes a specified server group.

Servers APIs

Table 10. OpenStack compute servers APIs that are used with PowerVC.
Method URI Description
POST /v2.1/{tenant_id}/servers Creates a new virtual machine.
POST /v2.1/{tenant_id}/servers Creates a new virtual machine. Specify availability_zone for targeting virtual machine deployment to host group identified by value of availability_zone in the request body.

Example format: "availability_zone":":<host-name>" or "availability_zone":"<host-group-name>"

For more details, see Availability Zones.

GET /v2.1/{tenant_id}/servers Lists IDs, names, and links for all servers.
GET /v2.1/{tenant_id}/servers/detail Lists details for all servers.
GET /v2.1/{tenant_id}/servers/{server_id} Lists details for the specified server.
DELETE /v2.1/{tenant_id}/servers/{server_id} Deletes the specified server.
POST /v2.1/{tenant_id}/servers/{server_id}/action Creates an image that is based on the specified server. Specify the createImage action in the request body. Prepare the server by using the AE script and shutdown it down before you initiate the action.

PowerVC captures the volumes in the boot set, and maintains the boot_index order. To capture more volumes, specify them in the metadata dictionary in the format "powervc_capture_disk_n":"<cinder_volumeID>"

You must use one property for each volume, rather than one property that contains a list of volumes.

POST /v2.1/{tenant_id}/servers/{server_id}/action Migrates a specified server to a new host without restarting the specified server. Specify the os-migrateLive action in the request body.
POST /v2.1/{tenant_id}/servers/{server_id}/action Stops a specified server if it is running and changes status to STOPPED. Specify the os-stop action in the request body.
POST /v2.1/{tenant_id}/servers/{server_id}/action Returns a specified server to ACTIVE status if it was in the STOPPED status. Specify the os-start action in the request body.
POST /v2.1/{tenant_id}/servers/{server_id}/action Restarts the specified server. Specify the reboot action in the request body.
POST /v2.1/{tenant_id}/servers/{server_id}/action Resizes the specified server. Specify the resize action in the request body.
POST /v2.1/{tenant_id}/servers/{server_id}/action Confirms a pending resize action. Specify the confirmResize action in the request body.
POST /v2.1/{tenant_id}/servers/{server_id}/action Starts a virtual network computing (VNC) session and retrieves the console URL. Specify the os-getVNCConsole action in the request body. Specify "novnc" as the payload type.

Only supported for NovaLink managed servers.

POST /v2.1/{tenant_id}/servers/{server_id}/action Locks the specified server. Specify the lock action in the request body.

Only supported for NovaLink managed servers.

POST /v2.1/{tenant_id}/servers/{server_id}/action Unlocks the specified server. Specify the unlock action in the request body.

Only supported for NovaLink managed servers.

POST /v2.1/{tenant_id}/servers/{server_id}/action Rebuilds the specified server. Specify the rebuild action in the request body.

Only supported for NovaLink managed servers.

POST /v2.1/{tenant_id}/servers/{server_id}/action Evacuates a server from a failed host to a different one. Specify the evacuate action in the request body with the onSharedStorage parameter set to True. PowerVC calls this function remote restart.

For a targeted evacuation, use the host parameter to specify the host name. This value should be the name shown on the host's Name attribute.

For information about remote restart of all virtual machines on a host, see Remote restart all virtual machines from a failed host.

POST /v2.1/{tenant_id}/servers/{server_id}/action Creates or attaches bulk volumes to a virtual machine. Specify the bulkVolumeAttach action in the request body.
POST /v2.1/{tenant_id}/servers/{server_id}/action When a user sets immediate parameter to True, the virtual machine is shut down immediately without waiting for OS or other process to shut down.
POST /v2.1/{tenant_id}/servers/{server_id}/action When a user specifies the type as DUMPRESTART in the request body, the VM can be restarted with core dump. For example, {"reboot":{"type":"DUMPRESTART“}}.

Server interface APIs

Table 11. Add virtual network interface API command
Method URI Description
POST /v2.1/{tenant_id}/servers/{server_id}/os-interface Creates a port interface and uses it to attach the port to a server instance.
DELETE /v2.1/{tenant_id}/servers/{server_id}/os-interface/{attachment_id} Detaches the specified port interface from the virtual machine and then deletes the port.

Server volume attachment APIs

Table 12. OpenStack compute server (volume attachments) APIs that are used with PowerVC.
Method URI Description
POST /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments Attaches a volume to the specified server.
GET /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments Lists the volume attachments for the specified server.
GET /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments/{attachment_id} Lists volume details for the specified volume attachment ID.
DELETE /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments/{attachment_id} Deletes the specified volume attachment from the specified server.
PUT /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments/{attachment_id} A PowerVC extension to this API allows you to set whether the specified volume is deleted when the associated virtual machine is deleted. For details, see Update volume attachment.

Availability zone APIs

Table 13. OpenStack compute availability zone APIs that are used with PowerVC.
Method URI Description
GET /v2.1/{tenant_id}/os-availability-zone Lists all availability zones. For more information, see Availability zones (os-availability-zone).
GET /v2.1/{tenant_id}/os-availability-zone/detail Provides detailed availability zone information.