CreateBareMetal2IpmiChassisHardwareInfo

API Request

URLs
POST zstack/v1/baremetal2/chassis/ipmi/hardwareinfos
Body
{
  "params": {
    "ipmiAddress": "192.168.0.10",
    "ipmiPort": 623.0,
    "hardwareInfo": "{\u0027architecture\u0027:\u0027x86_64\u0027, \u0027cpuModelName\u0027:\u0027Intel i7-6700K\u0027, \u0027cpuNum\u0027:\u00278\u0027, \u0027memorySize\u0027:\u002733421254656\u0027,\u0027nics\u0027:[{\u0027nicMac\u0027:\u002740:8d:5c:f7:8d:61\u0027, \u0027nicSpeed\u0027:\u00271000Mbps\u0027, \u0027isProvisionNic\u0027:\u0027true\u0027}]}"
  },
  "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 POST -d '{"params":{"ipmiAddress":"192.168.0.10","ipmiPort":623.0,"hardwareInfo":"{'architecture':'x86_64', 'cpuModelName':'Intel i7-6700K', 'cpuNum':'8', 'memorySize':'33421254656','nics':[{'nicMac':'40:8d:5c:f7:8d:61', 'nicSpeed':'1000Mbps', 'isProvisionNic':'true'}]}"}}' http://localhost:8080/zstack/v1/baremetal2/chassis/ipmi/hardwareinfos
Request Parameters
Name Type Location Description Valid Value Starting Version
ipmiAddress String body(contained in the params structure) The IPMI address. 4.0.0
ipmiPort Integer body(contained in the params structure) The IPMI port. 4.0.0
hardwareInfo String body(contained in the params structure) The hardware information. 4.0.0
convertInfo (Optional) String body(contained in the params structure) The converted information. 4.3.12
systemTags List body Optional. The system tags. 4.0.0
userTags List body Optional. The user tags. 4.0.0

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,
{
	"error": {
		"code": "SYS.1001",
		"description": "A message or a operation timeout",
		"details": "Create VM on KVM timeout after 300s"
	}
}

SDK Sample

Java SDK
CreateBareMetal2IpmiChassisHardwareInfoAction action = new CreateBareMetal2IpmiChassisHardwareInfoAction();
action.ipmiAddress = "192.168.0.10";
action.ipmiPort = 623.0;
action.hardwareInfo = "{'architecture':'x86_64', 'cpuModelName':'Intel i7-6700K', 'cpuNum':'8', 'memorySize':'33421254656','nics':[{'nicMac':'40:8d:5c:f7:8d:61', 'nicSpeed':'1000Mbps', 'isProvisionNic':'true'}]}";
CreateBareMetal2IpmiChassisHardwareInfoAction.Result res = action.call();
Python SDK
CreateBareMetal2IpmiChassisHardwareInfoAction action = CreateBareMetal2IpmiChassisHardwareInfoAction()
action.ipmiAddress = "192.168.0.10"
action.ipmiPort = 623.0
action.hardwareInfo = "{'architecture':'x86_64', 'cpuModelName':'Intel i7-6700K', 'cpuNum':'8', 'memorySize':'33421254656','nics':[{'nicMac':'40:8d:5c:f7:8d:61', 'nicSpeed':'1000Mbps', 'isProvisionNic':'true'}]}"
CreateBareMetal2IpmiChassisHardwareInfoAction.Result res = action.call()