Manage Existing Volumes

The manage existing volumes APIs provide the capability to specify the existing storage volumes that must be managed by the PowerVC Management System. The capabilities include listing volumes that exist in the environment, managing individual volumes, and unmanaging volumes that are currently being managed.

Manage existing volumes options

Table 1. Options for managing existing volumes API
Method URI Description

GET

/v3/{tenant_id}/os-hosts/{host_name}/all-volumes

Lists existing volumes on storage provider.

POST

/v3/{tenant_id}/os-hosts/{host_name}/onboard

Manages existing volumes from a storage provider.

POST

/v3/{tenant_id}/os-hosts/{host_name}/unmanage

Unmanages volumes that are currently managed by PowerVC .

List existing volumes

The operation lists all the volumes that exist on the storage provider independent of whether PowerVC is managing them. This API takes the name of the storage provider in the URI as input does not take any request body. The API returns the list of volumes on the storage provider in the response body. The list includes the names, status, whether the volumes are currently managed by PowerVC, and whether the volumes are supported to be managed by PowerVC.

Response codes
  • Normal response code: OK (200)
  • Error Response Codes: Not Found (404), Server Error (500)

Response body

Table 2. Parameters in the response for viewing existing volumes
Name Style Type Description

id

body

string

Internally generated identifier that is used to look up the task results of the manage action.

name

body

string

Name of the storage provider.

size

body

integer

Size of the volume in gigabytes.

managed

body

boolean

Whether the volume is managed by PowerVC.

storage_pool

body

string

Name of the storage pool that contains the volume.

mapped_wwpns

body

list of strings

List of WWPNs that are mapped to the volume on the storage provider.

support

body

object

Whether the volume is supported to be managed by PowerVC.

Example:
{"volumes": [ 
 {"id": "2c6da352-...", 
  "name": "My Volume 1",
  "status": "available", 
  "size": 14, 
  "managed": False,
  "storage_pool": "pool1",
  "mapped_wwpns": ["C050...", "C051..."], 
  "support": { "status": "supported" }
 }, 
 {"id": "1b87d2dc-...", 
  "support": { "status": "not_supported", "reasons": [ "A reason", 
    "Another reason" ] }... 

Manage existing volumes

The operation asks PowerVC to start managing specific volumes that exist on the storage provider. This API takes the name of the storage provider in the URI and the list of UUIDs of the volumes in the body as input. The API then returns the URI of the task that can be used to look up results for the asynchronous operation in the response body.
Note: The special keyword *all can be used instead of the UUID to specify that all volumes should be managed.
Response codes
  • Normal response code: OK (200)
  • Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)

Request parameters

{"volumes": [ "2c6da352-...", "1b87d2dc-..."] }

Response body

Table 3. Parameters in the response for managing existing volumes
Name Style Type Description

id

body

string

Internally generated identifier that is used to look up the task results of the manage action.

links

body

list of strings

URI that can be used to look up the task results.

Information about task URI can be used to retrieve progress and results of the on-boarding.

Example:

{"task": { 
  "id": "44fde213...", 
  "links": [ { "href": "https://..../os-hosts/storage1/onboard/5555-222..." } ] 

Unmanage volumes

The operation asks PowerVC to stop managing specific volumes that exist on the storage provider. This API takes the name of the storage provider in the URI and the list of UUIDs of the volumes in the body as input and removes the volumes from the PowerVC database. The API does not return response body, if successful.
Note: The special keyword *all can be used instead of the UUID to specify that all volumes should be unmanaged.
Response codes
  • Normal response code: No Content (204)
  • Error Response Codes: Bad Request (400), Not Found (404), Server Error (500)

Request parameters

{"volumes": [ "1234-789...", "3333-444..."] }