Get Candidate List

GET/zstack/v1/primary-storage/volumes/{volumeUuid}/migration-candidates

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

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

NameTypeLocationDescriptionAllowed ValuesStarting Version
volumeUuidStringurlVolume UUID 2.2
systemTags (Optional)ListquerySystem Tags 2.2
userTags (Optional)ListqueryUser Tags 2.2

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "64776c6c7dfd46b091ec387d21b5adb0",
      "name": "PS-1"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. When the operation succeeds, this field is null. See error2.2
inventoriesListSee inventories2.2

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier for the error, for example SYS.1000, HOST.10012.2
descriptionStringBrief description of the error2.2
detailsStringDetailed error information2.2
elaborationStringReserved field, defaults to null2.2
opaqueLinkedHashMapReserved field, defaults to null2.2
causeErrorCodeRoot cause, the source error that caused the current error. If there is no original error, this field is null2.2

inventories

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource2.2
zoneUuidStringData Center UUID2.2
nameStringResource Name2.2
urlString 2.2
descriptionStringResource Description2.2
totalCapacityLong 2.2
availableCapacityLong 2.2
totalPhysicalCapacityLong 2.2
availablePhysicalCapacityLong 2.2
systemUsedCapacityLong 2.2
typeString 2.2
stateString 2.2
statusString 2.2
mountPathString 2.2
createDateTimestampCreate Time2.2
lastOpDateTimestampLast Modification Time2.2
attachedClusterUuidsList 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()