[ovs-dev] [PATCH] interface-reconfigure+vif: accept openvswitch in /etc/xensource/network.conf

Ian Campbell ian.campbell at citrix.com
Thu Apr 8 14:00:21 UTC 2010


Signed-off-by: Ian Campbell <ian.campbell at citrix.com>

diff -r 9158c175a8ef -r 9ae78a1d53e0 scripts/InterfaceReconfigure.py
--- a/scripts/InterfaceReconfigure.py	Thu Apr 08 14:54:24 2010 +0100
+++ b/scripts/InterfaceReconfigure.py	Thu Apr 08 14:54:24 2010 +0100
@@ -863,7 +863,7 @@
     if network_backend == "bridge":
         from InterfaceReconfigureBridge import DatapathBridge
         return DatapathBridge(pif)
-    elif network_backend == "vswitch":
+    elif network_backend in ["openvswitch", "vswitch"]:
         from InterfaceReconfigureVswitch import DatapathVswitch
         return DatapathVswitch(pif)
     else:
diff -r 9158c175a8ef -r 9ae78a1d53e0 scripts/vif
--- a/scripts/vif	Thu Apr 08 14:54:24 2010 +0100
+++ b/scripts/vif	Thu Apr 08 14:54:24 2010 +0100
@@ -36,7 +36,7 @@
 		    *) echo 0 > /sys/class/net/${dev}/brport/promisc ;;
 		esac
 		;;
-	    vswitch)
+	    openvswitch)
 		logger -t script-vif "${dev}: Promiscuous ports are not supported via Open vSwitch."
 		;;
 	esac
@@ -127,7 +127,7 @@
 	    ${BRCTL} setfd "${bridge}" 0                        || logger -t scripts-vif "Failed to brctl setfd ${bridge} 0"
 	    ${BRCTL} addif "${bridge}" "${dev}"                 || logger -t scripts-vif "Failed to brctl addif ${bridge} ${dev}"
 	    ;;
-	vswitch)
+	openvswitch)
 	    if [ "$TYPE" = "vif" ] ; then
 		local vif_details=$(handle_vswitch_vif_details)
 	    fi
@@ -145,7 +145,7 @@
 	bridge)
 	    # Nothing to do
 	    ;;
-	vswitch)
+	openvswitch)
             # If ovs-brcompatd is running, it might already have deleted the
             # port.  Use --if-exists to suppress the error that would otherwise
             # arise in that case.
@@ -165,7 +165,8 @@
 fi
 
 case $NETWORK_MODE in
-    bridge|vswitch) ;;
+    bridge|openvswitch) ;;
+    vswitch) NETWORK_MODE=openvswitch ;;
     *)
 	logger -t scripts-vif "Unknown network mode $NETWORK_MODE"
 	exit 1




More information about the dev mailing list