 
	
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH 4/4] xenserver: Add miimon configuration support for xenserver.
 From 551d3a7363ddba8cad2ee9f343a807c4711f542e Mon Sep 17 00:00:00 2001 From: Ethan Jackson <ethan@xxxxxxxxxx> Date: Tue, 11 Jan 2011 19:10:28 -0800Subject: [PATCH 4/4] xenserver: Add miimon configuration support for xenserver. This commit makes necessary changes to Interface Reconfigure to allow miimon bond-detect-mode and bond-miimon-interval to be changed using xapi. Signed-off-by: Ethan Jackson <ethan@xxxxxxxxxx> Signed-off-by: Dominic Curran <dominic.curran@xxxxxxxxxx> --- scripts/InterfaceReconfigureVswitch.py | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)diff --git a/scripts/InterfaceReconfigureVswitch.py b/scripts/InterfaceReconfigureVswitch.py 
index 61385b2..b380e45 100644
--- a/scripts/InterfaceReconfigureVswitch.py
+++ b/scripts/InterfaceReconfigureVswitch.py
@@ -171,6 +171,22 @@ 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 in ['miimon', 'use_carrier']: + try: + value = int(val) + if value < 0: + raise ValueError + + if name == 'use_carrier': + if value: + value = "carrier" + else: + value = "miimon" + argv += ["other-config:bond-detect-mode=%s" % value] + else:+ argv += ["other-config:bond-miimon-interval=%d" % value] + except ValueError:+ log("bridge %s has invalid %s '%s'" % (bridge, name, value)) 
        elif name == "mode":
            if val in ['balance-slb', 'active-backup']:
--
1.6.3.3
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
 | 
|  | Lists.xenproject.org is hosted with RackSpace, monitoring our |