Francesco Romani has uploaded a new change for review. Change subject: vm: graphdev: rename a parameter for clarity ......................................................................
vm: graphdev: rename a parameter for clarity The multiple updateDevice API for grpahics device has not clients yet, so this patch changes the naming to make one parameter more self-explanatory. As nice side effect, this allows a cleaner and shorter implementation. Change-Id: I3716b48a5fbe5beebb819754d0f500b097f04677 Signed-off-by: Francesco Romani <from...@redhat.com> --- M tests/vmTests.py M vdsm/virt/vm.py M vdsm_api/vdsmapi-schema.json 3 files changed, 6 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/28036/1 diff --git a/tests/vmTests.py b/tests/vmTests.py index 804a9a2..896cb7e 100644 --- a/tests/vmTests.py +++ b/tests/vmTests.py @@ -968,7 +968,8 @@ 'graphicsType': device['device'], 'password': '***', 'ttl': 0, - 'existingConnAction': 'disconnect'}) + 'existingConnAction': 'disconnect', + 'hookParams': {}}) self.assertEquals(fake._dom.devXml, devXml) diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 878a144..93e10c7 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -3244,13 +3244,9 @@ def _updateGraphicsDevice(self, params): graphics = self._findGraphicsDeviceXMLByType(params['graphicsType']) if graphics: - params.pop('deviceType') - params.pop('graphicsType') - password = params.pop('password') - ttl = params.pop('ttl') - connAct = params.pop('existingConnAction') return self._setTicketForGraphicDev( - graphics, password, ttl, connAct, params) + graphics, params['password'], params['ttl'], + params['existingConnAction'], params['hookParams']) else: return errCode['updateDevice'] diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json index 01a42b6..4812f9b 100644 --- a/vdsm_api/vdsmapi-schema.json +++ b/vdsm_api/vdsmapi-schema.json @@ -6256,14 +6256,14 @@ # # @existingConnAction: Indicate what to do with any existing connections # -# @params: Arbitrary key:val pairs that will be passed to hooks +# @hookParams: Arbitrary key:val pairs that will be passed to hooks # # Since: 4.15.0 ## {'type': 'vmUpdateGraphicsDeviceParams', 'data': {'graphicsType': 'VmGraphicsDeviceType', 'password': 'str', 'ttl': 'int', 'existingConnAction': 'VmTicketConflictAction', - 'params': 'StringMap'}} + 'hookParams': 'StringMap'}} ## # @VM.updateDevice: -- To view, visit http://gerrit.ovirt.org/28036 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3716b48a5fbe5beebb819754d0f500b097f04677 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches