Upload and Execute a Software Upgrade Package
Headers
Authorization: OAuth the-session-uuidBody
{
"params": {
"upgradeType": "Normal"
},
"systemTags": [],
"userTags": []
}In the preceding example, the systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"upgradeType":"Normal"}}' \
http://localhost:8080/zstack/v1/software-packages/backup-storage/ff04e1736ec6391f9a1f023b524d0a00/upgradeParameters
Name | Type | Location | Description | Valid Values | Since |
|---|---|---|---|---|---|
uuid | String | url | UUID of the software package resource |
| 5.0.0 |
backupStorageUuid (optional) | String | body(contained in the | Backup storage UUID |
| 5.0.0 |
url (optional) | String | body(contained in the |
|
| 5.0.0 |
installPath (optional) | String | body(contained in the |
|
| 5.0.0 |
upgradeType (optional) | String | body(contained in the |
|
| 5.0.0 |
systemTags (optional) | List | body | System tags |
| 5.0.0 |
userTags (optional) | List | body | User tags |
| 5.0.0 |
API Response
When this API succeeds, it returns an empty JSON structure {}. When an error occurs, the returned JSON structure contains an error field. Example:
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}SDK Example
Java SDK
UploadAndExecuteSoftwareUpgradePackageAction action = new UploadAndExecuteSoftwareUpgradePackageAction();
action.uuid = "ff04e1736ec6391f9a1f023b524d0a00";
action.upgradeType = "Normal";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UploadAndExecuteSoftwareUpgradePackageAction.Result res = action.call();Python SDK
action = UploadAndExecuteSoftwareUpgradePackageAction()
action.uuid = "ff04e1736ec6391f9a1f023b524d0a00"
action.upgradeType = "Normal"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()