AddBareMetal2IpmiChassis
API Request
URLs
POST zstack/v1/baremetal2/chassis/ipmi
Headers
Authorization: OAuth the-session-uuid
Body
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"ipmiAddress": "192.168.0.10",
"ipmiPort": 623.0,
"ipmiUsername": "root",
"ipmiPassword": "password",
"name": "BM_CHASSIS",
"description": "This is a bare metal chassis.",
"clusterUuid": "68e54b937895308ca398f21826eb1343"
"provisionType": "Remote"
},
"systemTags": [],
"userTags": []
}

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,"ipmiUsername":"root","ipmiPassword":"password","name":"BM_CHASSIS","description":"This is a bare metal chassis.","clusterUuid":"68e54b937895308ca398f21826eb1343"}}' http://localhost:8080/zstack/v1/baremetal2/chassis/ipmi
Request Parameters
Note:
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) | Optional. The IPMI port. | 4.0.0 | |
ipmiUsername | String | body(contained in the params structure) | The IPMI username. | 4.0.0 | |
ipmiPassword | String | body(contained in the params structure) | The IPMI password. | 4.0.0 | |
name | String | body(contained in the params structure) | The name of the bare metal chassis. | 4.0.0 | |
description | String | body(contained in the params structure) | Optional. The detailed description of the bare metal chassis. | 4.0.0 | |
clusterUuid | String | body(contained in the params structure) | The cluster UUID. | 4.0.0 | |
resourceUuid | String | body(contained in the params structure) | Optional. The chassis UUID . | 4.0.0 | |
provisionType | String | body(contained in the params structure) | Optional. The startup method. |
|
4.3.12 |
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 |

- When you add a baremetal node of the local disk (non
take-over) type on ZStack Cloud, you can record
the local system information by adding chassisPlatform to the
SystemTags to chassisPlatform option.
- Format:
chassisPlatform::system type
- Example:
chassisPlatform::Windows
- Format:
API Response
Sample
Response
{
"inventory": {
"uuid": "37e556edd6d2439e80f5b620750cf2cf",
"name": "BM_CHASSIS",
"description": "This is a bare metal chassis.",
"zoneUuid": "ccbd627d113a4b9581a90fbeee45cedc",
"clusterUuid": "5fc0111a027a4c9b9f19ca9ba83b5cbd",
"chassisOfferingUuid": "ec563730b5a94ad8a838406a7a7d3888",
"type": "IPMI",
"state": "Enabled",
"status": "Available",
"powerStatus": "POWER_ON",
"provisionType": "Remote",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
}
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 | BareMetal2ChassisInventory | 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 bare metal chassis. | 4.0.0 |
name | String | The name of the bare metal chassis. | 4.0.0 |
description | String | The detailed description of the bare metal chassis. | 4.0.0 |
zoneUuid | String | The zone UUID. | 4.0.0 |
clusterUuid | String | The cluster UUID. | 4.0.0 |
chassisOfferingUuid | String | The chassis offering UUID. | 4.0.0 |
type | String | The type of the protocol used to control bare metal chassis and instances. | 4.0.0 |
state | String | The state of the chassis. | 4.0.0 |
status | String | The distribution status of the chassis. | 4.0.0 |
powerStatus | String | The power status of the chassis. | 4.0.0 |
createDate | Timestamp | The time when the chassis was added to the cluster. | 4.0.0 |
lastOpDate | Timestamp | The time when the chassis was last modified. | 4.0.0 |
chassisNics | List | See chassisNics. | 4.0.0 |
chassisDisks | List | See chassisDisks. | 4.0.0 |
chassisOffering | BareMetal2ChassisOfferingInventory | See chassisOffering. | 4.0.0 |
#chassisNics
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The UUID of the bare metal chassis NIC. | 4.0.0 |
chassisUuid | String | The UUID of the bare metal chassis. | 4.0.0 |
mac | String | The MAC address of the chassis NIC. | 4.0.0 |
speed | String | The data rate of the chassis NIC. | 4.0.0 |
isProvisionNic | Boolean | Indicates whether the NIC is a provisioned NIC. | 4.0.0 |
createDate | Timestamp | The time when the NIC was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the NIC was last modified. | 4.0.0 |
#chassisDisks
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The UUID of the chassis disk. | 4.0.0 |
chassisUuid | String | The chassis UUID. | 4.0.0 |
diskSize | Long | The size of the disk storage space, in bytes. | 4.0.0 |
type | String | The type of the disk. | 4.0.0 |
createDate | Timestamp | The time when the disk was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the disk was last modified. | 4.0.0 |
#chassisOffering
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The chassis offering UUID. | 4.0.0 |
name | String | The name of the chassis offering. | 4.0.0 |
description | String | The detailed description of the chassis offering. | 4.0.0 |
architecture | String | The CPU architecture. | 4.0.0 |
cpuModelName | String | The CPU model name. | 4.0.0 |
cpuNum | Integer | The number of CPU cores. | 4.0.0 |
memorySize | Long | The memory size. | 4.0.0 |
bootMode | String | The boot mode. | 4.0.0 |
state | String | The state of the chassis offering. | 4.0.0 |
createDate | Timestamp | The time when the chassis offering was created. | 4.0.0 |
lastOpDate | Timestamp | The time when the chassis offering was last modified. | 4.0.0 |
SDK Sample
Java
SDK
AddBareMetal2IpmiChassisAction action = new AddBareMetal2IpmiChassisAction();
action.ipmiAddress = "192.168.0.10";
action.ipmiPort = 623.0;
action.ipmiUsername = "root";
action.ipmiPassword = "password";
action.name = "BM_CHASSIS";
action.description = "This is a bare metal chassis.";
action.clusterUuid = "68e54b937895308ca398f21826eb1343";
action.provisionType = "Remote";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
AddBareMetal2IpmiChassisAction.Result res = action.call();
Python
SDK
AddBareMetal2IpmiChassisAction action = AddBareMetal2IpmiChassisAction()
action.ipmiAddress = "192.168.0.10"
action.ipmiPort = 623.0
action.ipmiUsername = "root"
action.ipmiPassword = "password"
action.name = "BM_CHASSIS"
action.description = "This is a bare metal chassis."
action.clusterUuid = "68e54b937895308ca398f21826eb1343"
action.provisionType = "Remote"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
AddBareMetal2IpmiChassisAction.Result res = action.call()