Elastic Bare Metal Management(Plus)

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


GetAccessPath

API Request

URLs
GET zstack/v1/block-volumes/access/path/
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8"  -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c"  -X GET http://localhost:8080/zstack/v1/block-volumes/access/path?primaryStorageUuid=56963d0046b330839488e795b5109e44
Request Parameters
Name Type Location Description Optional Value Starting Version
systemTags List query Optional. The system tags. 4.7.11
userTags List query Optional. The user tags. 4.7.11
primaryStorageUuid String query The primary storage UUID. 4.7.11

API Response

Response Sample
{   "pathInfos": [     {       "accessPathId": 1,       "accessPathIqn": "iqn",       "targetCount": 1     }   ] }
Name Type Description Starting Version
success boolean 4.7.11
inventory VolumeInventory See pathInfos. 4.7.11
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 4.7.11
#pathInfos
Name Type Description Starting Version
name String The resource name. 4.7.11
accessPathId String The access path id. 4.7.11
accessPathIqn String The access path iqn. 4.7.11
targetCount Integer The target count. 4.7.11
gatewayIps List The gateway IPs. 4.7.11
#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. 0.6
description String The brief description of the error. 0.6
details String The details about the error. 0.6
elaboration String The reserved field. Default value: null. 0.6
opaque LinkedHashMap The reserved field. Default value: null. 0.6
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 0.6

SDK Sample

Java SDK
CreateBlockVolumeAction action = new CreateBlockVolumeAction(); action.name = "example"; action.description = "block volume test"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; CreateBlockVolumeAction.Result res = action.call();
Python SDK
CreateBlockVolumeAction action = CreateBlockVolumeAction() action.name = "example" action.description = "block volume test" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" CreateBlockVolumeAction.Result res = action.call()

CreateBlockVolume

API Request

URLs
POST zstack/v1/block-volumes
Headers
Authorization: OAuth the-session-uuid
Body
{   "params": {     "name": "example",     "description": "block volume test"   },   "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":"example","description":"block volume test"}}'  http://localhost:8080/zstack/v1/block-volumes
Request Parameters
Name Type Location Description Optional Value Starting Version
name String body (contained in the params structure) The resource name. 4.7.11
description String body (contained in the params structure) Optional. The detailed description of the resource. 4.7.11
size Long body (contained in the params structure) The size. 4.7.11
primaryStorageUuid String body (contained in the params structure) The primary storage UUID. 4.7.11
accessPathId Integer body (contained in the params structure) Optional. The access path id. 5.1.0
accessPathIqn String body (contained in the params structure) Optional. The access path iqn. 4.7.11
burstTotalBw Long body (contained in the params structure) Optional. The burst total bandwidth. 4.7.11
burstTotalIops Long body (contained in the params structure) Optional. The burst total IOPS. 4.7.11
maxTotalBw Long body (contained in the params structure) Optional. The maxmium total bandwidth. 4.7.11
maxTotalIops Long body (contained in the params structure) Optional. The maximum total IOPS. 4.7.11
resourceUuid String body (contained in the params structure) Optional. The resource UUID. 4.7.11
tagUuids List body (contained in the params structure) Optional. The tag UUID list. 4.7.11
systemTags List body Optional. The system tags. 4.7.11
userTags List body Optional. The user tags. 4.7.11
protocol String Optional.The protocol. 5.1.0

API Response

Response Sample
{   "inventory": {} }
Name Type Description Starting Version
success boolean 4.7.11
inventory VolumeInventory See inventory. 4.7.11
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 4.7.11
#inventory
Name Type Description Starting Version
iscsiPath String 4.7.11
vendor String 4.7.11
uuid String The resource UUID. 4.7.11
name String The resource name. 4.7.11
description String The detailed description of the resource. 4.7.11
primaryStorageUuid String The primary storage UUID. 4.7.11
vmInstanceUuid String The VM Instance UUID. 4.7.11
diskOfferingUuid String The disk offering UUID. 4.7.11
rootImageUuid String 4.7.11
installPath String 4.7.11
type String 4.7.11
format String 4.7.11
size Long 4.7.11
actualSize Long 4.7.11
deviceId Integer 4.7.11
state String 4.7.11
status String 4.7.11
createDate Timestamp The creation date. 4.7.11
lastOpDate Timestamp The last operation date. 4.7.11
isShareable Boolean 4.7.11
volumeQos String 4.7.11
lastDetachDate Timestamp 4.7.11
lastVmInstanceUuid String 4.7.11
#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.7.0
description String The brief description of the error. 4.7.0
details String The details about the error. 4.7.0
elaboration String The reserved field. Default value: null. 4.7.0
opaque LinkedHashMap The reserved field. Default value: null. 4.7.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.7.0

SDK Sample

Java SDK
CreateBlockVolumeAction action = new CreateBlockVolumeAction(); action.name = "example"; action.description = "block volume test"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; CreateBlockVolumeAction.Result res = action.call();
Python SDK
CreateBlockVolumeAction action = CreateBlockVolumeAction() action.name = "example" action.description = "block volume test" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" CreateBlockVolumeAction.Result res = action.call()

AddStorageProtocol

API Request

URLs
POST zstack/v1/primary-storage/protocol
Headers
Authorization: OAuth the-session-uuid
Body
{   "params": {     "uuid": "68c75f0058b93c61b30188e37b8fc5e9",     "outputProtocol": "iSCSI"   },   "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":{"uuid":"68c75f0058b93c61b30188e37b8fc5e9","outputProtocol":"iSCSI"}}' \ http://localhost:8080/zstack/v1/primary-storage/protocol
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String body (contained in the params structure) The resource UUID. 5.1.0
outputProtocol String body (contained in the params structure) The output protocol. 5.1.0
systemTags List body Optional.The system tags. 5.1.0
userTags List body Optional. The user tags. 5.1.0

API Response

Response Sample
{ 	"error": { 		"code": "SYS.1001", 		"description": "A message or a operation timeout", 		"details": "Create VM on KVM timeout after 300s" 	} }

SDK Sample

Java SDK
AddStorageProtocolAction action = new AddStorageProtocolAction(); action.uuid = "68c75f0058b93c61b30188e37b8fc5e9"; action.outputProtocol = "iSCSI"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; AddStorageProtocolAction.Result res = action.call();
Python SDK
AddStorageProtocolAction action = AddStorageProtocolAction() action.uuid = "68c75f0058b93c61b30188e37b8fc5e9" action.outputProtocol = "iSCSI" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" AddStorageProtocolAction.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.