UpdateHostIpmi
API Request
URLs
PUT zstack/v1/hosts/ipmi/{uuid}/actionsHeaders
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"updateHostIpmi": {
"ipmiAddress": "127.0.0.10",
"ipmiUsername": "admin",
"ipmiPassword": "password",
"ipmiPort": 623
},
"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 '{"updateHostIpmi":{"ipmiAddress":"127.0.0.10","ipmiUsername":"admin","ipmiPassword":"password","ipmiPort":623}}' \
http://localhost:8080/zstack/v1/hosts/ipmi/6cbd75f1a7cb3805b47a8dca8871c1c6/actionsRequest Parameters
| Name | Type | Location | Description | Valid Value | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The resource UUID. | 4.7.0 | |
| ipmiAddress | String | body (contained in the updateHostIpmi structure) | Optional. The IPMI address. | 4.7.0 | |
| ipmiUsername | String | body (contained in the updateHostIpmi structure) | Optional. The IPMI user name. | 4.7.0 | |
| ipmiPassword | String | body (contained in the updateHostIpmi structure) | Optional. The IPMI password. | 4.7.0 | |
| ipmiPort | int | body (contained in the updateHostIpmi structure) | Optional. The IPMI port. | 4.7.0 | |
| systemTags | List | body | Optional. The system tags. | 4.7.0 | |
| userTags | List | body | Optional. The user tags. | 4.7.0 |
API Response
Sample
Response
{
"hostIpmiInventory": {
"ipmiAddress": "192.168.0.1",
"ipmiUsername": "admin",
"ipmiPort": 623,
"ipmiPassword": "password"
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 4.7.0 | |
| hostIpmiInventory | HostIpmiInventory | See | 4.7.0 |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see | 4.7.0 |
#hostIpmiInventory
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The resource UUID. | 4.7.0 |
| ipmiAddress | String | The IPMI address. | 4.7.0 |
| ipmiUsername | String | The IPMI user name. | 4.7.0 |
| ipmiPort | int | The IPMI port. | 4.7.0 |
| ipmiPowerStatus | String | The IPMI power status. | 4.7.0 |
#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. | 4.7.0 |
| description | String | The brief description of the error. | 4.7.0 |
| details | String | The details about the error. | 4.7.0 |
| elaboration | String | The reserved field. Default value: null. | 4.7.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 4.7.0 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.7.0 |
SDK Sample
Java
SDK
UpdateHostIpmiAction action = new UpdateHostIpmiAction();
action.uuid = "6cbd75f1a7cb3805b47a8dca8871c1c6";
action.ipmiAddress = "127.0.0.10";
action.ipmiUsername = "admin";
action.ipmiPassword = "password";
action.ipmiPort = 623;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateHostIpmiAction.Result res = action.call();Python
SDK
UpdateHostIpmiAction action = UpdateHostIpmiAction()
action.uuid = "6cbd75f1a7cb3805b47a8dca8871c1c6"
action.ipmiAddress = "127.0.0.10"
action.ipmiUsername = "admin"
action.ipmiPassword = "password"
action.ipmiPort = 623
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateHostIpmiAction.Result res = action.call()