UpdateCephPrimaryStorageMon

API Request

URLs
PUT zstack/v1/primary-storage/ceph/mons/{monUuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
"updateCephPrimaryStorageMon": {
"hostname": "10.0.1.4"
  },
"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 PUT -d '{"updateCephPrimaryStorageMon":{"hostname":"10.0.1.4"}}' \
http://localhost:8080/zstack/v1/primary-storage/ceph/mons/cda8b731b2e23b8eb1081dec0f7a0a60/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
monUuid String url The Ceph mon (monitor daemon) UUID. 0.6
hostname String body (contained in the updateCephPrimaryStorageMon structure) Optional. The new hostname of the Ceph mon. 0.6
sshUsername String body (contained in the updateCephPrimaryStorageMon structure) Optional. The SSH username of the Ceph mon. 0.6
sshPassword String body (contained in the updateCephPrimaryStorageMon structure) Optional. The SSH password of the Ceph mon. 0.6
sshPort Integer body (contained in the updateCephPrimaryStorageMon structure) Optional. The SSH port of the Ceph mon. 0.6
monPort Integer (contained in the updateCephPrimaryStorageMon structure) Optional. The new port of the Ceph mon. 0.6
systemTags List body Optional. The system tags. 0.6
userTags List body Optional. The user tags. 0.6

API Response

Sample Response
{
"inventory": {
"mons": [
      {
"monAddr": "10.0.1.4",
"monUuid": "d557e48870b04ef699509d2998084bdb"
      }
    ],
"name": "My Ceph Primary Storage",
"description": "Public Ceph Primary Storage",
"totalCapacity": 1.073741824E9,
"availableCapacity": 9.68884224E8,
"type": "Ceph",
"state": "Enabled",
"status": "Connected",
"createDate": "Jun 7, 2017 9:21:22 PM",
"lastOpDate": "Jun 7, 2017 9:21:22 PM",
"attachedClusterUuids": [
"3fa1f7c2bbb544e1a04ba9f9da935abe"
    ]
  }
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 0.6
inventory CephPrimaryStorageInventory See inventory. 0.6
#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 short 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
#inventory
Name Type Description Starting Version
fsid String 0.6
rootVolumePoolName String 0.6
dataVolumePoolName String 0.6
imageCachePoolName String 0.6
uuid String The resource UUID. 0.6
zoneUuid String The zone UUID. 0.6
name String The resource name. 0.6
url String 0.6
description String The detailed description of the resource. 0.6
totalCapacity Long 0.6
availableCapacity Long 0.6
totalPhysicalCapacity Long 0.6
availablePhysicalCapacity Long 0.6
systemUsedCapacity Long 0.6
type String 0.6
state String 0.6
status String 0.6
mountPath String 0.6
createDate Timestamp The creation date. 0.6
lastOpDate Timestamp The last operation date. 0.6
attachedClusterUuids List 0.6
mons List See mons. 0.6
#mons
Name Type Description Starting Version
hostname String 0.6
monPort Integer 0.6
createDate Timestamp The creation date. 0.6
lastOpDate Timestamp The last operation date. 0.6
primaryStorageUuid String The UUID of the Ceph primary storage. 0.6
monAddr String 0.6
sshUsername String 0.6
sshPassword String 0.6
sshPort Integer 0.6
status String 0.6
monUuid String 0.6

SDK Sample

Java SDK
UpdateCephPrimaryStorageMonAction action = new UpdateCephPrimaryStorageMonAction();
action.monUuid = "3341eaef160045d6b6fd085a22a3c69f";
action.hostname = "10.0.1.4";
action.sessionId = "359aceecda5e478e81d4eaea9e86bca8";
UpdateCephPrimaryStorageMonAction.Result res = action.call();
Python SDK
UpdateCephPrimaryStorageMonAction action = UpdateCephPrimaryStorageMonAction()
action.monUuid = "70bc5237403848f6b5b6a60079c3ab91"
action.hostname = "10.0.1.4"
action.sessionId = "b1737cdb77c4420ba72aab66c4438521"
UpdateCephPrimaryStorageMonAction.Result res = action.call()