BatchAddBareMetal2IpmiChassis

API Request

URLs
POST zstack/v1/baremetal2/chassis/ipmi/from-file
Headers
Authorization: OAuth the-session-uuid
Body
{
  "params": {
    "chassisInfo": "FILE CONTENT ENCODE BY BASE64"
  },
  "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":{"chassisInfo":"FILE CONTENT ENCODE BY BASE64"}}' http://localhost:8080/zstack/v1/baremetal2/chassis/ipmi/from-file
Request Parameters
Name Type Location Description Valid Value Starting Version
chassisInfo String body(contained in the params structure) The Base64-encoded configuration file of bare metal chassis. 4.0.0
longJobName String body(contained in the params structure) Optional. The name of the long job. 4.0.0
longJobDescription String body(contained in the params structure) Optional. The description of the long job. 4.0.0
resourceUuid String body(contained in the params structure) Optional. The UUID of the long job. 4.0.0
tagUuids List body(contained in the params structure) Optional. The tag UUIDs. 4.0.0
systemTags List body Optional. The system tags. 4.0.0
userTags List body Optional. The user tags. 4.0.0

API Response

Sample Response
{
  "inventory": {
    "uuid": "1a3e5b9ece0738f5b1ca785271dd7b34",
    "name": "APIBatchAddBareMetal2ChassisEvent",
    "apiId": "d22289087f32358ca7d06ed3c1969462",
    "jobName": "APIBatchAddBareMetal2ChassisEvent",
    "jobData": "{\"createMessages\":[]",
    "jobResult": "",
    "state": "Succeeded",
    "managementNodeUuid": "a0b0f5b18c6e3cbb84b7d75e3eea991d"
  }
}
Name Type Description Starting Version
success boolean 4.3.6
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 4.0.0
inventory LongJobInventory See inventory. 4.0.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.0.0
description String The brief description of the error. 4.0.0
details String The details about the error. 4.0.0
elaboration String The reserved field. Default value: null. 4.0.0
opaque LinkedHashMap The reserved field. Default value: null. 4.0.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.0.0
#inventory
Name Type Description Starting Version
uuid String The UUID of the API request. 4.0.0
name String The name of the API. 4.0.0
description String The detailed description of the long job. 4.0.0
apiId String The ID of the long job. 4.0.0
jobName String The name of the long job. 4.0.0
jobData String The data about the long job. 4.0.0
jobResult String The result of the long job. 4.0.0
targetResourceUuid String The UUID of the long job. 4.0.0
managementNodeUuid String The UUID of the management node. 4.0.0
createDate Timestamp The time when the long job was created. 4.0.0
lastOpDate Timestamp The time when the long job was last operated. 4.0.0
state LongJobState See state. 4.0.0
#state
Name Type Description Starting Version
name String The name of the long job. 4.0.0
ordinal int 4.0.0

SDK Sample

Java SDK
BatchAddBareMetal2IpmiChassisAction action = new BatchAddBareMetal2IpmiChassisAction();
action.chassisInfo = "FILE CONTENT ENCODE BY BASE64";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
BatchAddBareMetal2IpmiChassisAction.Result res = action.call();
Python SDK
BatchAddBareMetal2IpmiChassisAction action = BatchAddBareMetal2IpmiChassisAction()
action.chassisInfo = "FILE CONTENT ENCODE BY BASE64"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
BatchAddBareMetal2IpmiChassisAction.Result res = action.call()