[ovs-dev] [PATCH 2/2] xenserver: Allow bond_mode configuration in xen.

Ethan Jackson ethan at nicira.com
Wed Jan 12 00:14:40 UTC 2011


This commit adds bond_mode configuration to Interface Reconfigure
so that it may be changed using standard XenServer commands.
---
 ...ensource_libexec_InterfaceReconfigureVswitch.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
index c352594..d70baa4 100644
--- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
+++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py
@@ -171,6 +171,12 @@ def datapath_configure_bond(pif,slaves):
                 argv += ['bond_%s=%d' % (name, value)]
             except ValueError:
                 log("bridge %s has invalid %s '%s'" % (bridge, name, value))
+        elif name == "mode":
+
+            if val in ['balance-slb', 'active-backup']:
+                argv += ['bond_%s=%s' % (name, val)]
+            else:
+                log("bridge %s has invalid %s '%s'" % (bridge, name, val))
         else:
             # Pass other bond options into other_config.
             argv += ["other-config:%s=%s" % (vsctl_escape("bond-%s" % name),
-- 
1.7.2





More information about the dev mailing list