Change in vdsm[master]: network: canonicalize defaultRoute as a boolean

osvoboda at redhat.com osvoboda at redhat.com
Tue Mar 1 23:47:02 UTC 2016


Ondřej Svoboda has uploaded a new change for review.

Change subject: network: canonicalize defaultRoute as a boolean
......................................................................

network: canonicalize defaultRoute as a boolean

vdsClient hands defaultRoute to setupNetworks as a string.
The value is treated as a boolean in network configurators (in ifcfg,
it is passed to _to_ifcfg_bool) so it is necessary to make it a boolean
on the way, as early as feasible.

Change-Id: Ie9315c7facc874e8e6f82502ee83ef0f858f1fa1
Signed-off-by: Ondřej Svoboda <osvoboda at redhat.com>
---
M lib/vdsm/network/canonize.py
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/54235/1

diff --git a/lib/vdsm/network/canonize.py b/lib/vdsm/network/canonize.py
index 8fffa15..e26ac4f 100644
--- a/lib/vdsm/network/canonize.py
+++ b/lib/vdsm/network/canonize.py
@@ -44,6 +44,7 @@
         _canonize_bridged(attrs)
         _canonize_stp(attrs)
         _canonize_ipv6(attrs)
+        _canonicalize_default_route(attrs)
 
 
 def _canonize_remove(data):
@@ -89,3 +90,8 @@
 def _canonize_ipv6(data):
     if 'dhcpv6' not in data:
         data['dhcpv6'] = False
+
+
+def _canonicalize_default_route(data):
+    default_route = data.get('defaultRoute')
+    data['defaultRoute'] = utils.tobool(default_route)


-- 
To view, visit https://gerrit.ovirt.org/54235
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9315c7facc874e8e6f82502ee83ef0f858f1fa1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>


More information about the vdsm-patches mailing list