Francesco Romani has posted comments on this change. Change subject: janitorial: use the response module in vmpowerdown ......................................................................
Patch Set 1: (3 comments) https://gerrit.ovirt.org/#/c/38445/1/lib/vdsm/response.py File lib/vdsm/response.py: Line 24: Line 25: def success(message=None, **kwargs): Line 26: kwargs["status"] = { Line 27: "code": 0, Line 28: "message": message or "Done" > Should move into the patch adding the response.success() Done Line 29: } Line 30: return kwargs Line 31: Line 32: https://gerrit.ovirt.org/#/c/38445/1/tests/responseTests.py File tests/responseTests.py: Line 57: res = response.success(message=MESSAGE) Line 58: Line 59: template = doneCode Line 60: self.assertEqual(res["status"]["code"], template["code"]) Line 61: self.assertEqual(res["status"]["message"], MESSAGE) > This should move into the patch adding response.success() Done Line 62: Line 63: def test_success_with_args(self): Line 64: res = response.success(a=1, b=2) Line 65: https://gerrit.ovirt.org/#/c/38445/1/vdsm/virt/vmpowerdown.py File vdsm/virt/vmpowerdown.py: Line 73: else: Line 74: # No tools, no ACPI Line 75: return response.error('exist', Line 76: message='VM without ACPI or active oVirt ' Line 77: 'guest agent. Try Forced Shutdown.') > Can move into the patch replacing doneCode with response.success() Done Line 78: Line 79: Line 80: class VmShutdown(VmPowerDown): Line 81: returnMsg = 'Machine shutting down' -- To view, visit https://gerrit.ovirt.org/38445 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I314d4b15eb6c6104cc7bb2e58ad07ca08d868c66 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
