Federico Simoncelli has uploaded a new change for review. Change subject: hsm: expose the sendExtendMsg command ......................................................................
hsm: expose the sendExtendMsg command To facilitate the mailbox testing (and debugging) the hsm command sendExtendMsg is now exposed. Change-Id: I2099c2dee0bfdb172036edee389cca259f13ce0e Signed-off-by: Federico Simoncelli <[email protected]> --- M vdsm/API.py M vdsm/BindingXMLRPC.py M vdsm_cli/vdsClient.py 3 files changed, 26 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/86/8286/1 diff --git a/vdsm/API.py b/vdsm/API.py index 566d6e5..1260e8e 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -967,6 +967,8 @@ def removeVM(self, vmUUID, sdUUID): return self._irs.removeVM(self._UUID, vmUUID, sdUUID) + def sendExtendMsg(self, volDict, newSize): + return self._irs.sendExtendMsg(self._UUID, volDict, newSize, None) class Global(APIBase): diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py index 11c7276..8544115 100644 --- a/vdsm/BindingXMLRPC.py +++ b/vdsm/BindingXMLRPC.py @@ -577,6 +577,10 @@ pool = API.StoragePool(spUUID) return pool.removeVM(vmUUID, sdUUID) + def sendExtendMsg(self, spUUID, volDict, newSize): + pool = API.StoragePool(spUUID) + return pool.sendExtendMsg(volDict, newSize) + def volumeCopy(self, sdUUID, spUUID, vmUUID, srcImgUUID, srcVolUUID, dstImgUUID, dstVolUUID, description='', dstSdUUID=API.StorageDomain.BLANK_UUID, @@ -766,7 +770,8 @@ (self.vmHotplugDisk, 'hotplugDisk'), (self.vmHotunplugDisk, 'hotunplugDisk'), (self.vmHotplugNic, 'hotplugNic'), - (self.vmHotunplugNic, 'hotunplugNic')) + (self.vmHotunplugNic, 'hotunplugNic'), + (self.sendExtendMsg, 'sendExtendMsg')) def getIrsMethods(self): return ((self.domainActivate, 'activateStorageDomain'), diff --git a/vdsm_cli/vdsClient.py b/vdsm_cli/vdsClient.py index fe2f083..d08851a 100644 --- a/vdsm_cli/vdsClient.py +++ b/vdsm_cli/vdsClient.py @@ -962,6 +962,19 @@ return status['status']['code'], status['status']['message'] return 0, '' + def sendExtendMsg(self, args): + sdUUID = args[0] + spUUID = args[1] + imgUUID = args[2] + volUUID = args[3] + newSize = args[4] + status = self.s.sendExtendMsg(spUUID, { + 'poolID': spUUID, 'domainID': sdUUID, 'imageID': imgUUID, + 'volumeID': volUUID}, newSize) + if status['status']['code']: + return status['status']['code'], status['status']['message'] + return 0, '' + def uploadVolume(self, args): sdUUID = args[0] spUUID = args[1] @@ -2048,6 +2061,11 @@ '<new disk size>', 'Extend volume (SAN only)' )), + 'sendExtendMsg': (serv.sendExtendMsg, + ('<sdUUID> <spUUID> <imgUUID> <volUUID> ' + '<new disk size>', + 'Send extend volume request to the SPM (SAN only)' + )), 'uploadVolume': (serv.uploadVolume, ('<sdUUID> <spUUID> <imgUUID> <volUUID> <srcPath> ' '<size>', -- To view, visit http://gerrit.ovirt.org/8286 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2099c2dee0bfdb172036edee389cca259f13ce0e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
