LocalStorageMigrateVolume

API Request

URLs
PUT zstack/v1/primary-storage/local-storage/volumes/{volumeUuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
"localStorageMigrateVolume": {
"destHostUuid": "511e02b9b8c9427c9fbbac55b8c7ec62"
  },
"systemTags": [],
"userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"localStorageMigrateVolume":{"destHostUuid":"58118467f70733cdb19f39bd07868384"}}' \
http://localhost:8080/zstack/v1/primary-storage/local-storage/volumes/f15736d2850536f3a6ea1d68f7c89b7f/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
volumeUuid String url The volume UUID. 0.6
destHostUuid String body (contained in the localStorageMigrateVolume structure) The UUID of the destination host. 0.6
systemTags List body Optional. The system tags. 0.6
userTags List body Optional. The user tags. 0.6

API Response

Sample Response
{
"inventory": {
"resourceUuid": "bad5e950cf014275bf9ba6e4cfe78a97",
"primaryStorageUuid": "81d893539a6b4ce7b9957c7a5d6c5df8",
"hostUuid": "9d250b88ae90449db567cfa18a75fecc",
"size": 2.4035328E7
  }
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 0.6
inventory LocalStorageResourceRefInventory See inventory. 0.6
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 0.6
description String The short description of the error. 0.6
details String The details about the error. 0.6
elaboration String The reserved field. Default value: null. 0.6
opaque LinkedHashMap The reserved field. Default value: null. 0.6
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 0.6
#inventory
Name Type Description Starting Version
resourceUuid String 0.6
primaryStorageUuid String The local storage UUID. 0.6
hostUuid String The host UUID. 0.6
size Long 0.6
resourceType String 0.6
createDate Timestamp The creation date. 0.6
lastOpDate Timestamp The last operation date. 0.6

SDK Sample

Java SDK
LocalStorageMigrateVolumeAction action = new LocalStorageMigrateVolumeAction();
action.volumeUuid = "1d4825d4845c4bba81033de367f0a03c";
action.destHostUuid = "e82e6f37aa3b472ab36b32962b2ba44c";
action.sessionId = "74b8b0a565c542e8bc146d7d9c06c764";
LocalStorageMigrateVolumeAction.Result res = action.call();
Python SDK
LocalStorageMigrateVolumeAction action = LocalStorageMigrateVolumeAction()
action.volumeUuid = "85f9e2cb4d2640b3a5fe4ec74ebccd22"
action.destHostUuid = "f841732d6c604d12bf2cbbb458f09bee"
action.sessionId = "535bc181a3aa41a0989ac795f58ba664"
LocalStorageMigrateVolumeAction.Result res = action.call()