From Dan Kenigsberg <[email protected]>:

Dan Kenigsberg has uploaded a new change for review.

Change subject: net: let users override Engine's default route
......................................................................

net: let users override Engine's default route

oVirt Engine sets default=True on the management network an on it alone.

Users may want to use another network for their host's default routing.

With this patch, they can modify this behavior by setting the custom
propery default_route to False on the management network attachement,
and to True on the would-be default route network.

Note that prior to using a custom property, one has to define it on
Engine by:
  sudo engine-config -g CustomDeviceProperties
  sudo engine-config -s 
CustomDeviceProperties='{type=interface;prop={default_reoute=^(true|false)$}}'
and restart of ovirt-engine.

(Cf. https://bugzilla.redhat.com/show_bug.cgi?id=1200963#c42 )

Change-Id: Iaf392ea05e1e39acbf1b74a7a31acda9e750b36e
Signed-off-by: Dan Kenigsberg <[email protected]>
---
M lib/vdsm/network/canonicalize.py
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/66127/1

diff --git a/lib/vdsm/network/canonicalize.py b/lib/vdsm/network/canonicalize.py
index 3468796..d7df415 100644
--- a/lib/vdsm/network/canonicalize.py
+++ b/lib/vdsm/network/canonicalize.py
@@ -132,6 +132,10 @@
     if 'defaultRoute' not in data:
         data['defaultRoute'] = False
 
+    custom_default_route = utils.rget(data, ('custom', 'default_route'))
+    if custom_default_route is not None:
+        data['defaultRoute'] = utils.tobool(custom_default_route)
+
 
 def _canonicalize_nameservers(data):
     if 'nameservers' not in data:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf392ea05e1e39acbf1b74a7a31acda9e750b36e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <[email protected]>
_______________________________________________
vdsm-patches mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to