Change in vdsm[master]: unified_persistence: Fix defaultRoute type in upgrade script

asegurap at redhat.com asegurap at redhat.com
Wed Apr 23 16:01:29 UTC 2014


Antoni Segura Puimedon has uploaded a new change for review.

Change subject: unified_persistence: Fix defaultRoute type in upgrade script
......................................................................

unified_persistence: Fix defaultRoute type in upgrade script

Despite the fact defaultRoute is defined by vdsm API to be a boolean
field, the upgrade to unified persistence script was retrieving it
as a string. This had the effect that when the ifcfg configurator
would convert from boolean to 'yes'/'no', both 'True' and 'False',
being strings would evaluate as True.

Change-Id: I0f468bed70fcb3e2af46944f10ef47eecb1c0e94
Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
---
M lib/vdsm/tool/unified_persistence.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/27021/1

diff --git a/lib/vdsm/tool/unified_persistence.py b/lib/vdsm/tool/unified_persistence.py
index 762c843..63e43b4 100644
--- a/lib/vdsm/tool/unified_persistence.py
+++ b/lib/vdsm/tool/unified_persistence.py
@@ -100,8 +100,8 @@
                     networks[network]['gateway'] = netParams['gateway']
 
             if defaultGateway is not None:
-                networks[network]['defaultRoute'] = \
-                    str(defaultGateway.device == topLevelDevice)
+                networks[network]['defaultRoute'] = (defaultGateway.device ==
+                                                     topLevelDevice)
 
             # What if the 'physical device' is actually a VLAN?
             if physicalDevice in netinfo.vlans:


-- 
To view, visit http://gerrit.ovirt.org/27021
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f468bed70fcb3e2af46944f10ef47eecb1c0e94
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>


More information about the vdsm-patches mailing list