Hello Nir Soffer, Francesco Romani,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/65108
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(a)redhat.com>
Reviewed-on:
https://gerrit.ovirt.org/65007
Continuous-Integration: Jenkins CI
Reviewed-by: Nir Soffer <nsoffer(a)redhat.com>
Reviewed-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/65108/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 = {
--
To view, visit
https://gerrit.ovirt.org/65108
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I642eb607785a1b6f877092e187c91b7a065b38e1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>