AddMonToCephPrimaryStorage
API Request
URLs
POST zstack/v1/primary-storage/ceph/{uuid}/mons
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": {
"monUrls": [
"10.0.1.3"
]
},
"systemTags": [],
"userTags": []
}

Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"monUrls":["10.0.1.3"]}}' \
http://localhost:8080/zstack/v1/primary-storage/ceph/6496e4b29793368dbacf388d83446acc/mons
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
uuid | String | url | The UUID of the Ceph primary storage. | 0.6 | |
monUrls | List | body (contained in the params structure) | The URL list of the Ceph mon (monitor daemon). | 0.6 | |
systemTags | List | body | Optional. The system tags. | 0.6 | |
userTags | List | body | Optional. The user tags. | 0.6 |
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
AddMonToCephPrimaryStorageAction action = new AddMonToCephPrimaryStorageAction();
action.uuid = "d0e3946e312a40c6af85da9163ac2519";
action.monUrls = asList("10.0.1.3");
action.sessionId = "6033eea9a2514c078c7af2a709ead405";
AddMonToCephPrimaryStorageAction.Result res = action.call();
Python
SDK
AddMonToCephPrimaryStorageAction action = AddMonToCephPrimaryStorageAction()
action.uuid = "6b631b40a3fa434785a8b0bd49a3f199"
action.monUrls = [10.0.1.3]
action.sessionId = "c455c88362f84aa7acd07bd5f6d3a4d3"
AddMonToCephPrimaryStorageAction.Result res = action.call()