WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 4/4] xenserver: Add miimon configuration support for xe

To: <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH 4/4] xenserver: Add miimon configuration support for xenserver.
From: Dominic Curran <dominic.curran@xxxxxxxxxx>
Date: Mon, 14 Feb 2011 12:35:26 +0000
Cc: dominic.curran@xxxxxxxxxx
Delivery-date: Tue, 15 Feb 2011 08:41:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.24 (X11/20100411)
From 551d3a7363ddba8cad2ee9f343a807c4711f542e Mon Sep 17 00:00:00 2001
From: Ethan Jackson <ethan@xxxxxxxxxx>
Date: Tue, 11 Jan 2011 19:10:28 -0800
Subject: [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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH 4/4] xenserver: Add miimon configuration support for xenserver., Dominic Curran <=