Retype validation APIs
The retype validation API ensures that the target templates listed for retype of a volume are the most eligible templates for the selected volume.
When you retype or migrate a volume, the retype validation API ensures that the target templates listed are the most eligible templates for the selected volume.
generic must be used only when all other options -
'never' and 'on-demand' do not work.Retype validation options
| Method | URI | Description |
|---|---|---|
|
GET |
/v3/<tenant_id>/volumes/<volume_id>/retype-validation |
The retype validation API is called for a volume ID. Fetches a list of viable storage templates. |
|
GET |
|
Lists all storage templates that are created in PowerVC for the tenant without any validation. |
Retype validation API without any option
This API is called for a volume ID and PowerVC fetches a list of viable storage templates as response.
- Response codes
-
Table 2. Response codes for retype validation API Error code Error Reason 400 Invalid input received: Valid parameter values are ['true','false'] Using retype validation with generic_migration
option and providing an incorrect value.400 Invalid volume type. The volume type does not belong to the storage provider for this volume. Use a volume-type that is associated with the volume's storage provider. Using retype validation for a volume that has volume type assigned with no storage provider assigned. 403 Cannot perform retype for volume <volume_name>because it is in<state>state. Valid states areavailable
andin-use
.Using retype validation for a volume which is not in available
orin-use
state.403 Volume <volume>is part of a consistency group<group>. Remove the volume from the consistency group and retry.Using retype validation for a volume, which is part of a group. 403 Volume <volume_name>does not have any storage template assigned. Set the template usingpowervc-config storage set-template
Using retype validation for a volume that has no storage template assigned. 403 Retype is not allowed for the volume <volume_name>since it is attached to a virtual machine and is a shared volume.Using retype validation for a volume in use and multiattach
set toTrue
.403 Retype is not allowed for shared storage pool. Using retype validation for a volume part of shared storage pool. 403 Retype is not allowed for Hitachi without generic migration filter set as True
.Using retype validation for a volume part of Hitachi storage and not using generic_migration
filter.403 Retype is not allowed for GPFS storage. Using retype validation for a volume part of GPFS storage. 404 Volume <volume_id>could not be found.Using retype validation for a non-existent volume. 404 Volume type <volume_type_id>could not be found.Using retype validation for a volume having non-existent volume type. - Response body
-
Example: Retype validation API response
Table 3. Parameters in the response for retrieving the list of storage templates Name Style Type Description target_templatesbody
list of string
List of viable storage templates.
Example: Retype validation API - with{ "target_templates": ["SVC Base Template", "DRP pool template", "thin provisioning template", "Compression template"] }generic_migrationoption{ "target_templates": ["SVC Base Template", "DRP pool template", "thin provisioning template", "Compression template", "Different storage template"] }
Retype volume completion API
This operation completes the pending retype. Specify the
os-retype_volume_completion in the request body.
| Method | URI | Description |
|---|---|---|
|
POST |
/v3/{tenant_id}/volumes/{volume_id}/action |
This API completes the volume retype. |
- Response codes
-
- Normal response code: Accepted (202)
- Error response codes: Not Found (404), Server Error (500)
Example of request body
{ "os-retype_volume_completion": { } }