Batch Create Bare Metal Chassis (BatchCreateBaremetalChassis)

API Request

URLs
POST zstack/v1/baremetal/chassis/from-file
Headers
Authorization: OAuth the-session-uuid
Body
{   "params": {     "baremetalChassisInfo": "FILE CONTENT ENCODE BY BASE64"   },   "systemTags": [],   "userTags": [] }
Note: In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that these fields can be included in the body.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X POST -d '{"params":{"baremetalChassisInfo":"FILE CONTENT ENCODE BY BASE64"}}' \ http://localhost:8080/zstack/v1/baremetal/chassis/from-file
Parameter List
Name Type Location Description Allowed Values Starting Version
baremetalChassisInfo String body(included in the params structure) Bare metal chassis information encoded in base64 3.1.1
longJobName (Optional) String body(included in the params structure) Long job name 3.1.1
longJobDescription (Optional) String body(included in the params structure) Long job description 3.1.1
resourceUuid (Optional) String body(included in the params structure) Resource UUID 3.1.1
systemTags (Optional) List body System Tag 3.1.1
userTags (Optional) List body User Tag 3.1.1
tagUuids (Optional) List body(included in the params structure) Tag UUID list 3.4.0

API Response

Response Example
{   "inventory": {     "uuid": "cec9662c5cc534779833c89d8104aa7d",     "name": "APIBatchCreateBaremetalChassisMsg",     "apiId": "85ef8b327b0a3c71a53827b30892f327",     "jobName": "APIBatchCreateBaremetalChassisMsg",     "jobData": "{\"createMessages\":[]",     "jobResult": "",     "state": "Succeeded",     "managementNodeUuid": "31c1228477b6310b9eb28a75e892b046"   } }
Name Type Description Starting Version
success boolean 0.6
error ErrorCode Error code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error 3.1.1
inventory LongJobInventory For details, see inventory 3.1.1
#error
Name Type Description Starting Version
code String Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 0.6
description String Brief description of the error 0.6
details String Detailed error information 0.6
elaboration String Reserved field, default is null 0.6
opaque LinkedHashMap Reserved field, default is null 0.6
cause ErrorCode Root cause: the source error that triggered the current error. If there is no original error, this field is null 0.6
#inventory
Name Type Description Starting Version
uuid String UUID of the resource, uniquely identifying the resource 2.2.4
name String Resource name 2.2.4
description String Detailed description of the resource 2.2.4
apiId String API ID used to correlate with TaskProgress 2.2.4
jobName String Task name 2.2.4
jobData String Task data 2.2.4
jobResult String Task result 2.2.4
targetResourceUuid String Target resource UUID 2.2.4
managementNodeUuid String Management Node UUID 2.2.4
createDate Timestamp Create time 2.2.4
lastOpDate Timestamp Last modification time 2.2.4
state LongJobState For details, see state 2.2.4
#state
Name Type Description Starting Version
name String Resource name 2.2.4
ordinal int 2.2.4

SDK Examples

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

Check Bare Metal Chassis Config File (CheckBaremetalChassisConfigFile)

API Request

URLs
POST zstack/v1/baremetal/chassis/from-file/check
Headers
Authorization: OAuth the-session-uuid
Body
{   "params": {     "baremetalChassisInfo": "FILE CONTENT ENCODE BY BASE64"   },   "systemTags": [],   "userTags": [] }
Note: In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that these fields can be included in the body.
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X POST -d '{"params":{"baremetalChassisInfo":"FILE CONTENT ENCODE BY BASE64"}}' \ http://localhost:8080/zstack/v1/baremetal/chassis/from-file/check
Parameter List
Name Type Location Description Allowed Values Starting Version
baremetalChassisInfo String body(included in the params structure) Bare metal chassis information encoded in base64 3.1.1
systemTags (Optional) List body System Tag 3.1.1
userTags (Optional) List body User Tag 3.1.1

API Response

This API returns an empty JSON structure {} on success. On error, the returned JSON structure contains 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 Examples

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

Create Bare Metal Chassis (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,     "ipmiUsername": "root",     "ipmiPassword": "password"   },   "systemTags": [],   "userTags": [] }
Note: In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that these fields can be included in the body.
Curl Example
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,"ipmiUsername":"root","ipmiPassword":"password"}}' \ http://localhost:8080/zstack/v1/baremetal/chassis
Parameter List
Name Type Location Description Allowed Values Starting Version
name String body(included in the params structure) Resource name 2.6.0
description (Optional) String body(included in the params structure) Detailed description of the resource 2.6.0
clusterUuid String body(included in the params structure) Cluster UUID 2.6.0
ipmiAddress String body(included in the params structure) IPMI address 2.6.0
ipmiPort (Optional) Integer body(included in the params structure) IPMI port 2.6.0
ipmiUsername String body(included in the params structure) IPMI username 2.6.0
ipmiPassword String body(included in the params structure) IPMI password 2.6.0
resourceUuid (Optional) String body(included in the params structure) Resource UUID 2.6.0
systemTags (Optional) List body System Tag 2.6.0
userTags (Optional) List body User Tag 2.6.0
tagUuids (Optional) List body(included in the params structure) Tag UUID list 3.4.0

API Response

Response Example
{   "inventory": {     "uuid": "40fae70b4c573bdfad57d031eaba0eb0",     "ipmiAddress": "1.1.1.1",     "ipmiPort": 623,     "ipmiUsername": "root",     "ipmiPassword": "password",     "state": "Enabled",     "status": "HWInfoUnknown"   } }
Name Type Description Starting Version
success boolean 0.6
error ErrorCode Error code. If not null, the operation failed. When the operation is successful, this field is null. For details, see error 2.6.0
inventory BaremetalChassisInventory For details, see inventory 2.6.0
#error
Name Type Description Starting Version
code String Error code number, globally unique identifier of the error, for example SYS.1000, HOST.1001 0.6
description String Brief description of the error 0.6
details String Detailed error information 0.6
elaboration String Reserved field, default is null 0.6
opaque LinkedHashMap Reserved field, default is null 0.6
cause ErrorCode Root cause: the source error that triggered the current error. If there is no original error, this field is null 0.6
#inventory
Name Type Description Starting Version
uuid String UUID of the resource, uniquely identifying the resource 2.6.0
name String Resource name 2.6.0
description String Detailed description of the resource 2.6.0
zoneUuid String Data Center UUID 2.6.0
clusterUuid String Cluster UUID 2.6.0
pxeServerUuid String 3.1.1
ipmiAddress String IPMI address 2.6.0
ipmiPort Integer IPMI port 2.6.0
ipmiUsername String IPMI username 2.6.0
state String 2.6.0
status String 2.6.0
createDate Timestamp Create time 2.6.0
lastOpDate Timestamp Last modification time 2.6.0

SDK Examples

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









Archives

Download Document Archives

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Cannot be empty.
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.