GetPrimaryStorageCandidatesForVolumeMigration

Get the candidate list of target Data Storage for volume migration.

API Request

URLs
GET zstack/v1/primary-storage/volumes/{volumeUuid}/migration-candidates
Headers
Authorization: OAuth the-session-uuid
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 39b0ace2ecc0459c929c8e352ea906f2" \
-X GET http://localhost:8080/zstack/v1/primary-storage/volumes/073f14f2d6dc437b8114faa4223f0ce8/migration-candidates
Parameter List
Name Type Location Description Allowed Values Starting Version
volumeUuid String url Volume UUID 2.2
systemTags (Optional) List query System Tags 2.2
userTags (Optional) List query User Tags 2.2

API Response

Response Example
{
  "inventories": [
    {
      "uuid": "64776c6c7dfd46b091ec387d21b5adb0",
      "name": "PS-1"
    }
  ]
}
Name Type Description Starting Version
error ErrorCode Error code. If not null, the operation failed. When the operation succeeds, this field is null. See error 2.2
inventories List See inventories 2.2
#error
Name Type Description Starting Version
code String Error code number, a globally unique identifier for the error, for example SYS.1000, HOST.1001 2.2
description String Brief description of the error 2.2
details String Detailed error information 2.2
elaboration String Reserved field, defaults to null 2.2
opaque LinkedHashMap Reserved field, defaults to null 2.2
cause ErrorCode Root cause, the source error that caused the current error. If there is no original error, this field is null 2.2
#inventories
Name Type Description Starting Version
uuid String Resource UUID, uniquely identifies the resource 2.2
zoneUuid String Data Center UUID 2.2
name String Resource Name 2.2
url String The URL. 2.2
description String Resource Description 2.2
totalCapacity Long The total capacity. 2.2
availableCapacity Long The available capacity. 2.2
totalPhysicalCapacity Long The total physical capacity. 2.2
availablePhysicalCapacity Long The available physical capacity. 2.2
systemUsedCapacity Long The system used capacity. 2.2
type String The resource type. 2.2
state String The resource state. 2.2
status String The resource status. 2.2
mountPath String The mount path. 2.2
createDate Timestamp Create Time 2.2
lastOpDate Timestamp Last Modification Time 2.2
attachedClusterUuids List The attached cluster UUIDs. 2.2

SDK Examples

Java SDK
GetPrimaryStorageCandidatesForVolumeMigrationAction action = new GetPrimaryStorageCandidatesForVolumeMigrationAction();
action.volumeUuid = "06b0f7d7098349b5ba336013aea319f5";
action.sessionId = "5869e8a6986b40c8be1ac3a520a6a9a1";
GetPrimaryStorageCandidatesForVolumeMigrationAction.Result res = action.call();
Python SDK
GetPrimaryStorageCandidatesForVolumeMigrationAction action = GetPrimaryStorageCandidatesForVolumeMigrationAction()
action.volumeUuid = "8800d0ffad8f42d7911347ca0af8e224"
action.sessionId = "a1b986a4bb5b409ba84951d3a3c1ed54"
GetPrimaryStorageCandidatesForVolumeMigrationAction.Result res = action.call()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center