Retype validation

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.

Note: The migration_policy - generic must be used only when all other options - 'never' and 'on-demand' do not work.

Retype validation options

Table 1. Options for retype validation API
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

v3/<project/tenant_id>/volumes/<volume_id>/retype-validation?generic_migration=true

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 are available and in-use. Using retype validation for a volume which is not in available or in-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 using powervc-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 to True.
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

Table 3. Parameters in the response for retrieving the list of storage templates
Name Style Type Description

target_templates

body

list of string

List of viable storage templates.

Example: Retype validation API response
{
  "target_templates": ["SVC Base Template", "DRP pool template", "thin provisioning template", "Compression template"]
}
Example: Retype validation API - with generic_migration option
{
  "target_templates": ["SVC Base Template", "DRP pool template", "thin provisioning template", "Compression template", "Different storage template"]
}