Discover Primary Storage on Cluster Hosts Not Managed by the Current Platform

GET/zstack/v1/primary-storage/stranger

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/primary-storage/stranger?clusterUuid=3f7c761b89a5384ebeb6c186012d0997

Parameters

NameTypeLocationDescriptionOptional ValuesSince
clusterUuidStringqueryCluster UUID 5.0.0
systemTags (Optional)ListquerySystem tags 5.0.0
userTags (Optional)ListqueryUser tags 5.0.0

API Response

Response Example

{
  "inventories": [
    {
      "name": "SharedBlockGroup-1",
      "url": "/dev/vg_uuid",
      "type": "SharedBlock",
      "attachedClusterUuids": [
        "7a8202c37ea63e1093acb2c8d1d03e97"
      ]
    }
  ]
}
NameTypeDescriptionSince
inventoriesListList of discovered primary storage inventories5.0.0
successbooleanWhether the operation succeeded5.0.0
errorErrorCodeFor details, see error5.0.0

error

NameTypeDescriptionSince
codeStringError code, which is the globally unique identifier of the error, such as SYS.1000 or HOST.10010.6
descriptionStringSummary description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. The default value is null.0.6
opaqueLinkedHashMapReserved field. The default value is null.0.6
causeErrorCodeRoot error that caused the current error. If there is no original error, this field is null.0.6

SDK Example

Java SDK

DiscoverStrangePrimaryStorageAction action = new DiscoverStrangePrimaryStorageAction();
action.clusterUuid = "3f7c761b89a5384ebeb6c186012d0997";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DiscoverStrangePrimaryStorageAction.Result res = action.call();

Python SDK

action = DiscoverStrangePrimaryStorageAction()
action.clusterUuid = "3f7c761b89a5384ebeb6c186012d0997"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()