Update Bare Metal Chassis
Headers
Authorization: OAuth the-session-uuidBody
{
"updateBaremetalChassis": {
"name": "test",
"ipmiAddress": "1.1.1.1",
"ipmiPort": 623,
"ipmiUsername": "root",
"ipmiPassword": "password"
},
"systemTags": [],
"userTags": []
}In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that these fields can be included in the body.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateBaremetalChassis":{"name":"test","ipmiAddress":"1.1.1.1","ipmiPort":623,"ipmiUsername":"root","ipmiPassword":"password"}}' \
http://localhost:8080/zstack/v1/baremetal/chassis/cd68e7a048d831768c622a18accd5885/actionsParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | UUID of the resource, uniquely identifying the resource | 2.6.0 | |
| name (Optional) | String | body(included in the updateBaremetalChassis structure) | Resource name | 2.6.0 | |
| description (Optional) | String | body(included in the updateBaremetalChassis structure) | Detailed description of the resource | 2.6.0 | |
| ipmiAddress (Optional) | String | body(included in the updateBaremetalChassis structure) | IPMI address | 2.6.0 | |
| ipmiPort (Optional) | Integer | body(included in the updateBaremetalChassis structure) | IPMI port | 2.6.0 | |
| ipmiUsername (Optional) | String | body(included in the updateBaremetalChassis structure) | IPMI username | 2.6.0 | |
| ipmiPassword (Optional) | String | body(included in the updateBaremetalChassis structure) | IPMI password | 2.6.0 | |
| systemTags (Optional) | List | body | System Tag | 2.6.0 | |
| userTags (Optional) | List | body | User Tag | 2.6.0 |
API Response
Response Example
{
"inventory": {
"uuid": "2a0f218999633ee9a79fe655206b8671",
"ipmiAddress": "1.1.1.1",
"ipmiPort": 623,
"ipmiUsername": "root",
"ipmiPassword": "password",
"state": "Enabled",
"status": "Available"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 0.6 | |
| error | ErrorCode | Error code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error | 2.6.0 |
| inventory | BaremetalChassisInventory | For details, see inventory | 2.6.0 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 | 0.6 |
| description | String | Brief description of the error | 0.6 |
| details | String | Detailed error information | 0.6 |
| elaboration | String | Reserved field, default is null | 0.6 |
| opaque | LinkedHashMap | Reserved field, default is null | 0.6 |
| cause | ErrorCode | Root cause: the source error that triggered the current error. If there is no original error, this field is null | 0.6 |
inventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | UUID of the resource, uniquely identifying the resource | 2.6.0 |
| name | String | Resource name | 2.6.0 |
| description | String | Detailed description of the resource | 2.6.0 |
| zoneUuid | String | Data Center UUID | 2.6.0 |
| clusterUuid | String | Cluster UUID | 2.6.0 |
| pxeServerUuid | String | 3.1.1 | |
| ipmiAddress | String | IPMI address | 2.6.0 |
| ipmiPort | Integer | IPMI port | 2.6.0 |
| ipmiUsername | String | IPMI username | 2.6.0 |
| state | String | 2.6.0 | |
| status | String | 2.6.0 | |
| createDate | Timestamp | Create time | 2.6.0 |
| lastOpDate | Timestamp | Last modification time | 2.6.0 |
SDK Examples
Java SDK
UpdateBaremetalChassisAction action = new UpdateBaremetalChassisAction();
action.uuid = "cd68e7a048d831768c622a18accd5885";
action.name = "test";
action.ipmiAddress = "1.1.1.1";
action.ipmiPort = 623;
action.ipmiUsername = "root";
action.ipmiPassword = "password";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateBaremetalChassisAction.Result res = action.call();Python SDK
action = UpdateBaremetalChassisAction()
action.uuid = "cd68e7a048d831768c622a18accd5885"
action.name = "test"
action.ipmiAddress = "1.1.1.1"
action.ipmiPort = 623
action.ipmiUsername = "root"
action.ipmiPassword = "password"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()