xenserver: Allow bond_mode configuration in xen.
authorEthan Jackson <ethan@nicira.com>
Mon, 10 Jan 2011 20:18:50 +0000 (12:18 -0800)
committerEthan Jackson <ethan@nicira.com>
Wed, 12 Jan 2011 00:19:43 +0000 (16:19 -0800)
This commit adds bond_mode configuration to Interface Reconfigure
so that it may be changed using standard XenServer commands.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py

index c352594ac86c537b7781a830cf0158335f8c3286..d70baa493c94f43efbaeee0cf6af05d02e7206e6 100644 (file)
@@ -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),