Bare Metal Management (Plus)

The Bare Metal Management feature is provided in a separate module. Before you can use this feature, you need to purchase the Plus License of Bare Metal Management, in addition to the Base License.


CreateBaremetalChassis

API Request

URLs
POST zstack/v1/baremetal/chassis
Headers
Authorization: OAuth the-session-uuid
Body
{   "params": {     "name": "test",     "clusterUuid": "bf598e729e61382ab2486ac40f25c425",     "ipmiAddress": "1.1.1.1",     "ipmiPort": "623.0",     "ipmiUsername": "root",     "ipmiPassword": "password"   },   "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":{"name":"test","clusterUuid":"bf598e729e61382ab2486ac40f25c425","ipmiAddress":"1.1.1.1","ipmiPort":"623.0","ipmiUsername":"root","ipmiPassword":"password"}}' http://localhost:8080/zstack/v1/baremetal/chassis
Request Parameters
Name Type Location Description Optional Value Starting Version
name String body (contained in the params structure) The name of the bare metal chassis. 2.6.0
description String body (contained in the params structure) Optional. The detailed description of the bare metal chassis. 2.6.0
clusterUuid String body (contained in the params structure) The UUID of the cluster where the bare metal chassis resides. 2.6.0
ipmiAddress String body (contained in the params structure) The IPMI address of the bare metal chassis. 2.6.0
ipmiPort Integer body (contained in the params structure) Optional. The IPMI port of the bare metal chassis. 2.6.0
ipmiUsername String body (contained in the params structure) The IPMI username. 2.6.0
ipmiPassword String body (contained in the params structure) The IPMI password. 2.6.0
resourceUuid String body (contained in the params structure) The UUID of the bare metal chassis. 2.6.0
systemTags List body Optional. The system tags. 2.6.0
userTags List body Optional. The user tags. 2.6.0

API Response

Sample Response
{   "inventory": {     "uuid": "40fae70b4c573bdfad57d031eaba0eb0",     "ipmiAddress": "1.1.1.1",     "ipmiPort": 623.0,     "ipmiUsername": "root",     "ipmiPassword": "password",     "state": "Enabled",     "status": "HWInfoUnknown"   } }
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error 2.6.0
inventory BaremetalChassisInventory See inventory 2.6.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. 2.6.0
description String The brief description of the error. 2.6.0
details String The details about the error. 2.6.0
elaboration String The reserved field. Default value: null. 2.6.0
opaque LinkedHashMap The reserved field. Default value: null. 2.6.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. 2.6.0
#inventory
Name Type Description Starting Version
uuid String The UUID of the bare metal chassis. 2.6.0
name String The name of the bare metal chassis. 2.6.0
description String The detailed description of the bare metal chassis. 2.6.0
zoneUuid String The zone UUID. 2.6.0
clusterUuid String The cluster UUID. 2.6.0
pxeServerUuid String 3.1.1
ipmiAddress String The IPMI address of the bare metal chassis. 2.6.0
ipmiPort Integer The IPMI port of the bare metal chassis. 2.6.0
ipmiUsername String The IPMI username. 2.6.0
state String 2.6.0
status String 2.6.0
createDate Timestamp The time when the bare metal chassis was created. 2.6.0
lastOpDate Timestamp The time when the bare metal chassis was last modified. 2.6.0

SDK Sample

Java SDK
CreateBaremetalChassisAction action = new CreateBaremetalChassisAction(); action.name = "test"; action.clusterUuid = "bf598e729e61382ab2486ac40f25c425"; action.ipmiAddress = "1.1.1.1"; action.ipmiPort = "623.0"; action.ipmiUsername = "root"; action.ipmiPassword = "password"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; CreateBaremetalChassisAction.Result res = action.call();
Python SDK
CreateBaremetalChassisAction action = CreateBaremetalChassisAction() action.name = "test" action.clusterUuid = "bf598e729e61382ab2486ac40f25c425" action.ipmiAddress = "1.1.1.1" action.ipmiPort = "623.0" action.ipmiUsername = "root" action.ipmiPassword = "password" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" CreateBaremetalChassisAction.Result res = action.call()

DeleteBaremetalChassis

API Request

URLs
DELETE zstack/v1/baremetal/chassis/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X DELETE http://localhost:8080/zstack/v1/baremetal/chassis/b4962c6429d23e93b9473f5aee202496
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The UUID of the bare metal chassis. 2.6.0
deleteMode String body Optional. The mode under which the bare metal chassis is deleted. 2.6.0
systemTags List body Optional. The system tags. 2.6.0
userTags List body Optional. The user tags. 2.6.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
DeleteBaremetalChassisAction action = new DeleteBaremetalChassisAction(); action.uuid = "b4962c6429d23e93b9473f5aee202496"; action.deleteMode = "Permissive"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; DeleteBaremetalChassisAction.Result res = action.call();
Python SDK
DeleteBaremetalChassisAction action = DeleteBaremetalChassisAction() action.uuid = "b4962c6429d23e93b9473f5aee202496" action.deleteMode = "Permissive" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" DeleteBaremetalChassisAction.Result res = action.call()




































Archives

Download Document Archives

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.