Description
You can call this operation to upgrade an OBProxy.
Call description
Prerequisite
You have passed the authentication for the OCP application service.
Request path
POST /api/v2/obproxy/clusters/{id}/obproxies/{obproxyIds}/upgrade
Request parameters
path:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Long | Yes | 1 | The ID of the OBProxy cluster. |
| obproxyIds | Long | Yes | 1 | The ID of the OBProxy server. |
body:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| shortRpmName | String | Yes | obproxy-1.9.1.1-1919579 | The name of the installation package. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information about the asynchronous task. For more information, seeTask information. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The time taken by the server to process the request, in milliseconds. |
| status | Integer | An HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Examples
Sample request
POST /obproxy/clusters/1/obproxies/2/upgrade
Sample response
{
"data": {
"context": {
"listMap": {
"obproxy_server_ids": ["2"],
"host_ids": ["2"]
},
"parallel": false,
"parallelIdx": -1,
"stringMap": {
"service_type": "OB_PROXY",
"obproxy_need_delete_cluster": "false",
"prohibit_rollback": "false",
"service_name": "test"
}
},
"creator": "admin",
"executor": "xxx.xxx.xxx.xxx",
"id": 33149,
"name": "Offline obproxy",
"operation": "EXECUTE",
"startTime": "2021-09-03T16:31:58.151+08:00",
"status": "RUNNING",
"subtasks": [{
"className": "com.alipay.ocp.service.task.business.obproxy.DeleteObproxyMetaInfoTask",
"description": "Delete obproxy info",
"downstreams": [34970],
"id": 34964,
"name": "Delete obproxy info",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 0,
"status": "PENDING",
"timeout": 300,
"upstreams": [34963]
}, {
"className": "com.alipay.ocp.service.task.business.host.UnReserveHostTask",
"description": "Unreserve host",
"downstreams": [34968],
"id": 34966,
"name": "Unreserve host",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 3,
"status": "PENDING",
"timeout": 1800,
"upstreams": [34970]
}, {
"className": "com.alipay.ocp.service.task.business.obproxy.UninstallObproxyTask",
"description": "Stop and uninstall obproxy",
"downstreams": [34964],
"id": 34963,
"name": "Stop and uninstall obproxy",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 1,
"status": "PENDING",
"timeout": 1800,
"upstreams": [34965]
}, {
"className": "com.alipay.ocp.service.task.business.obproxy.FinishTask",
"description": "Finish node",
"downstreams": [],
"id": 34968,
"name": "Finish node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 2,
"status": "PENDING",
"timeout": 0,
"upstreams": [34966]
}, {
"className": "com.alipay.ocp.service.task.business.obproxy.OfflineObproxyExporterTask",
"description": "Offline obproxy exporter",
"downstreams": [34966],
"id": 34970,
"name": "Offline obproxy exporter",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 7,
"status": "PENDING",
"timeout": 30,
"upstreams": [34964]
}, {
"className": "com.alipay.ocp.service.task.business.obproxy.PrepareOfflineObproxyTask",
"description": "Prepare offline obproxy",
"downstreams": [34965],
"id": 34967,
"name": "Prepare offline obproxy",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": 0,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 5,
"status": "PENDING",
"timeout": 1800,
"upstreams": [34969]
}, {
"className": "com.alipay.ocp.service.task.business.WaitNode",
"description": "Wait node",
"downstreams": [34963],
"id": 34965,
"name": "Wait node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 4,
"status": "PENDING",
"timeout": 30,
"upstreams": [34967]
}, {
"className": "com.alipay.ocp.service.task.business.StartNode",
"description": "Start node",
"downstreams": [34967],
"id": 34969,
"name": "Start node",
"nodeType": "JAVA_TASK",
"operation": "EXECUTE",
"parallelIdx": -1,
"prohibitRollback": false,
"runTime": 1,
"seriesId": 6,
"status": "READY",
"timeout": 30,
"upstreams": []
}],
"taskDefinitionId": -1,
"type": "MANUAL"
},
"duration": 17,
"server": "a83ad33525",
"status": 200,
"successful": true,
"timestamp": "2021-09-03T16:31:58.162+08:00",
"traceId": "0fda4c74b7a84932"
}