Update Distributed Storage Monitoring Node

PUT/zstack/v1/primary-storage/ceph/mons/{monUuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateCephPrimaryStorageMon": {
    "hostname": "10.0.1.4"
  },
  "systemTags": [],
  "userTags": []
}

In the example above, systemTags and userTags fields can be omitted. They are listed to indicate that the body can contain these two fields.

Curl Examples

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

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
monUuidStringurlMonitoring node UUID 0.6
hostname (optional)Stringbody (nested in updateCephPrimaryStorageMon structure)New host IP address of the monitoring node 0.6
sshUsername (optional)Stringbody (nested in updateCephPrimaryStorageMon structure)SSH username of the monitoring node host 0.6
sshPassword (optional)Stringbody (nested in updateCephPrimaryStorageMon structure)SSH password of the monitoring node host 0.6
sshPort (optional)Integerbody (nested in updateCephPrimaryStorageMon structure)SSH port of the monitoring node host 0.6
monPort (optional)Integerbody (nested in updateCephPrimaryStorageMon structure)New port of the mon 0.6
systemTags (optional)ListbodySystem tags 0.6
userTags (optional)ListbodyUser tags 0.6

API Response

Response Example

{
  "inventory": {
    "mons": [
      {
        "monAddr": "10.0.1.4",
        "monUuid": "d557e48870b04ef699509d2998084bdb"
      }
    ],
    "name": "My Ceph Primary Storage",
    "description": "Public Ceph Primary Storage",
    "totalCapacity": 1073741824.0,
    "availableCapacity": 968884224.0,
    "type": "Ceph",
    "state": "Enabled",
    "status": "Connected",
    "createDate": "Jun 7, 2017 9:21:22 PM",
    "lastOpDate": "Jun 7, 2017 9:21:22 PM",
    "attachedClusterUuids": [
      "3fa1f7c2bbb544e1a04ba9f9da935abe"
    ]
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, indicates the operation failed. This field is null when the operation succeeds. For details, see error0.6
inventoryCephPrimaryStorageInventoryFor details, see inventory0.6

error

NameTypeDescriptionStarting Version
codeStringError code number, globally unique identifier for the error, such as SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot cause. The source error that triggered the current error. If there is no original error, this field is null0.6

inventory

NameTypeDescriptionStarting Version
fsidString 0.6
rootVolumePoolNameString 0.6
dataVolumePoolNameString 0.6
imageCachePoolNameString 0.6
uuidStringResource UUID, uniquely identifies the resource0.6
zoneUuidStringData Center UUID0.6
nameStringResource name0.6
urlString 0.6
descriptionStringDetailed description of the resource0.6
totalCapacityLong 0.6
availableCapacityLong 0.6
totalPhysicalCapacityLong 0.6
availablePhysicalCapacityLong 0.6
systemUsedCapacityLong 0.6
typeString 0.6
stateString 0.6
statusString 0.6
mountPathString 0.6
createDateTimestampCreation time0.6
lastOpDateTimestampLast modification time0.6
attachedClusterUuidsList 0.6
monsListFor details, see mons0.6

mons

NameTypeDescriptionStarting Version
hostnameString 0.6
monPortInteger 0.6
createDateTimestampCreation time0.6
lastOpDateTimestampLast modification time0.6
primaryStorageUuidStringData Storage UUID0.6
monAddrString 0.6
sshUsernameString 0.6
sshPasswordString 0.6
sshPortInteger 0.6
statusString 0.6
monUuidString 0.6

SDK Examples

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()