[ovs-dev] [PATCH 3/5] xenserver: Report the system type and version as external ids

Justin Pettit jpettit at nicira.com
Wed Aug 25 23:10:21 UTC 2010


The configuration schema defines the system-type and system-version
external-ids for the Open_vSwitch table.  This commit adds support for
reporting them on XenServer.
---
 xenserver/etc_init.d_openvswitch |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch
index c52864e..cad6bf5 100755
--- a/xenserver/etc_init.d_openvswitch
+++ b/xenserver/etc_init.d_openvswitch
@@ -290,12 +290,14 @@ EOF
     esac
 }
 
-function set_system_uuid {
-    if test -n "$INSTALLATION_UUID"; then
-        action "Configuring Open vSwitch system UUID" true
+function set_system_ids {
+    if [ -f /etc/xensource-inventory ]; then
+        action "Configuring Open vSwitch system IDs" true
+        $vsctl --no-wait set Open_vSwitch . external-ids:system-type="$PRODUCT_BRAND"
+        $vsctl --no-wait set Open_vSwitch . external-ids:system-version="$PRODUCT_VERSION-$BUILD_NUMBER"
         $vsctl --no-wait set Open_vSwitch . external-ids:system-uuid="$INSTALLATION_UUID"
     else
-        action "Configuring Open vSwitch system UUID" false
+        action "Configuring Open vSwitch system IDs" false
     fi
 }
 
@@ -333,7 +335,7 @@ function start {
         done
     fi
 
-    set_system_uuid
+    set_system_ids
 
     start_vswitchd
     if [ "${ENABLE_BRCOMPAT}" = "y" ] ; then
-- 
1.7.1





More information about the dev mailing list