Update Host IPMI Information

PUT/zstack/v1/hosts/ipmi/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateHostIpmi": {
    "ipmiAddress": "127.0.0.10",
    "ipmiUsername": "admin",
    "ipmiPassword": "password",
    "ipmiPort": 623
  },
  "systemTags": [],
  "userTags": []
}

In the above example, systemTags and userTags fields can be omitted. They are listed to indicate that these two 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 '{"updateHostIpmi":{"ipmiAddress":"127.0.0.10","ipmiUsername":"admin","ipmiPassword":"password","ipmiPort":623}}' \
http://localhost:8080/zstack/v1/hosts/ipmi/6cbd75f1a7cb3805b47a8dca8871c1c6/actions

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringurlResource UUID, uniquely identifies the resource 4.7.0
ipmiAddress (optional)Stringbody (contained in updateHostIpmi structure)IPMI address 4.7.0
ipmiUsername (optional)Stringbody (contained in updateHostIpmi structure)IPMI username 4.7.0
ipmiPassword (optional)Stringbody (contained in updateHostIpmi structure)IPMI password 4.7.0
ipmiPort (optional)intbody (contained in updateHostIpmi structure)IPMI port 4.7.0
systemTags (optional)ListbodySystem tag 4.7.0
userTags (optional)ListbodyUser tag 4.7.0

API Response

Response Example

{
  "hostIpmiInventory": {
    "ipmiAddress": "192.168.0.1",
    "ipmiUsername": "admin",
    "ipmiPort": 623,
    "ipmiPassword": "password"
  }
}
NameTypeDescriptionStarting Version
successboolean 4.7.0
hostIpmiInventoryHostIpmiInventorySee details hostIpmiInventory4.7.0
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See details error4.7.0

hostIpmiInventory

NameTypeDescriptionStarting Version
uuidStringResource UUID, uniquely identifies the resource4.7.0
ipmiAddressStringIPMI address4.7.0
ipmiUsernameStringIPMI username4.7.0
ipmiPortintIPMI port4.7.0
ipmiPowerStatusStringIPMI power status4.7.0

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier of the error, e.g. SYS.1000, HOST.10014.7.0
descriptionStringBrief description of the error4.7.0
detailsStringDetailed error information4.7.0
elaborationStringReserved field, default is null4.7.0
opaqueLinkedHashMapReserved field, default is null4.7.0
causeErrorCodeRoot cause, the error that caused the current error. If there is no original error, this field is null4.7.0

SDK Examples

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()