Hello Nir Soffer, Milan Zamazal,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/65307
to review the following change.
Change subject: virt: Make boolean values from boolean migration options ......................................................................
virt: Make boolean values from boolean migration options
`compressed' and `autoConverge' migration options have boolean values in the string form. They must be converted to actual booleans before they are checked.
Change-Id: I642eb607785a1b6f877092e187c91b7a065b38e1 Bug-Url: https://bugzilla.redhat.com/1380822 Backport-To: 4.0 Signed-off-by: Milan Zamazal mzamazal@redhat.com Reviewed-on: https://gerrit.ovirt.org/65007 Continuous-Integration: Jenkins CI Reviewed-by: Nir Soffer nsoffer@redhat.com Reviewed-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/65108 --- M vdsm/virt/migration.py 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/65307/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py index e502756..edd2c79 100644 --- a/vdsm/virt/migration.py +++ b/vdsm/virt/migration.py @@ -100,6 +100,8 @@ self._dstparams = dstparams self._enableGuestEvents = kwargs.get('enableGuestEvents', False) self._machineParams = {} + # TODO: utils.tobool shouldn't be used in this constructor, the + # conversions should be handled properly in the API layer self._tunneled = utils.tobool(tunneled) self._abortOnError = utils.tobool(abortOnError) self._consoleAddress = consoleAddress @@ -110,8 +112,8 @@ kwargs.get('maxBandwidth') or config.getint('vars', 'migration_max_bandwidth') ) - self._autoConverge = autoConverge - self._compressed = compressed + self._autoConverge = utils.tobool(autoConverge) + self._compressed = utils.tobool(compressed) self._incomingLimit = kwargs.get('incomingLimit') self._outgoingLimit = kwargs.get('outgoingLimit') self.status = {