xen: Remove Nicira branding from vSwitch xsconsole plugin
authorJustin Pettit <jpettit@nicira.com>
Mon, 18 May 2009 23:22:40 +0000 (16:22 -0700)
committerJustin Pettit <jpettit@nicira.com>
Mon, 18 May 2009 23:26:37 +0000 (16:26 -0700)
Since the plan is to eventually integrate this code into the Xen
distribution, the Nicira tags have been removed.  The copyright is still
held by Nicira until a better one is found.

xenserver/README
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureNiciraVSwitch.py [deleted file]
xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py [new file with mode: 0644]
xenserver/vswitch-xen.spec

index 7088e2788c7e19e8884fa8298da24558b0280439..be853ac0df07626292b88a4006723f7ecbca2e07 100644 (file)
@@ -48,7 +48,7 @@ files are:
 
         vswitch-aware replacement for Citrix script of the same name.
 
-    usr_lib_xsconsole_plugins-base_XSFeatureNiciraVSwitch.py
+    usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py
 
         xsconsole plugin to configure the pool-wide configuration keys
         used to control vswitch when integrated with Citrix management
diff --git a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureNiciraVSwitch.py b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureNiciraVSwitch.py
deleted file mode 100644 (file)
index 9db5907..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-# Copyright (c) Citrix Systems 2008. All rights reserved.
-# xsconsole is proprietary software.
-#
-# Xen, the Xen logo, XenCenter, XenMotion are trademarks or registered
-# trademarks of Citrix Systems, Inc., in the United States and other
-# countries.
-
-# Copyright (c) 2009 Nicira Networks.
-
-import logging
-log = logging.getLogger("vswitch-cfg-update")
-logging.basicConfig(filename="/var/log/vswitch-xsplugin.log", level=logging.DEBUG)
-
-import os
-import subprocess
-
-cfg_mod="/root/vswitch/bin/ovs-cfg-mod"
-vswitchd_cfg_filename="/etc/vswitchd.conf"
-
-if __name__ == "__main__":
-    raise Exception("This script is a plugin for xsconsole and cannot run independently")
-
-from XSConsoleStandard import *
-
-class NiciraService:
-    service = {}
-
-    def __init__(self, name, processname=None):
-        self.name = name
-        self.processname = processname
-        if self.processname == None:
-            self.processname = name
-
-    def status(self):
-        try:
-            output = ShellPipe(["service", self.name, "status"]).Stdout()
-        except StandardError, e:
-            log.error("status retrieval error: " + str(e))
-            return "<unknown>"
-        if len(output) == 0:
-            return "<unknown>"
-        for l in output:
-            if self.processname not in l:
-                continue
-            elif "running" in l:
-                return "Running"
-            elif "stop" in l:
-                return "Stopped"
-            else:
-                return "<unknown>"
-        return "<unknown>"
-
-    def restart(self):
-        try:
-            ShellPipe(["service", self.name, "restart"]).Call()
-        except StandardError, e:
-            log.error("restart error: " + str(e))
-
-    @classmethod
-    def Inst(cls, name, processname=None):
-        key = name
-        if processname != None:
-            key = key + "-" + processname
-        if name not in cls.service:
-            cls.service[key] = NiciraService(name, processname)
-        return cls.service[key]
-
-class VSwitchConfig:
-
-    @staticmethod
-    def Get(key):
-        try:
-            output = ShellPipe([cfg_mod, "-vANY:console:emer", "-F", 
-                    vswitchd_cfg_filename, "-q", key]).Stdout()
-        except StandardError, e:
-            log.error("config retrieval error: " + str(e))
-            return "<unknown>"
-
-        if len(output) == 0:
-            output = ""
-        else:
-            output = output[0].strip()
-        return output
-
-
-class NiciraControllerDialogue(Dialogue):
-    def __init__(self):
-        Dialogue.__init__(self)
-        data=Data.Inst()
-
-        self.hostsInPool = 0
-        self.hostsUpdated = 0
-        self.controller = data.GetPoolForThisHost().get("other_config", {}).get("niciraController", "")
-
-        choiceDefs = [
-            ChoiceDef(Lang("Set pool-wide controller"),
-                      lambda: self.getController()),
-            ChoiceDef(Lang("Delete pool-wide controller"),
-                      lambda: self.deleteController()),
-            ChoiceDef(Lang("Resync server controller config"),
-                      lambda: self.syncController()),
-#             ChoiceDef(Lang("Restart vswitchd"),
-#                       lambda: self.restartService("vswitch")),
-#             ChoiceDef(Lang("Restart brcompatd"),
-#                       lambda: self.restartService("vswitch-brcompatd"))
-            ]
-        self.menu = Menu(self, None, Lang("Configure Nicira vSwitch"), choiceDefs)
-
-        self.ChangeState("INITIAL")
-
-    def BuildPane(self):
-        pane = self.NewPane(DialoguePane(self.parent))
-        pane.TitleSet(Lang("Configure Nicira vSwitch"))
-        pane.AddBox()
-
-    def ChangeState(self, inState):
-        self.state = inState
-        self.BuildPane()
-        self.UpdateFields()
-
-    def UpdateFields(self):
-        self.Pane().ResetPosition()
-        getattr(self, "UpdateFields" + self.state)() # Dispatch method named 'UpdateFields'+self.state
-
-    def UpdateFieldsINITIAL(self):
-        pane = self.Pane()
-        pane.AddTitleField(Lang("Select an action"))
-        pane.AddMenuField(self.menu)
-        pane.AddKeyHelpField( { Lang("<Enter>") : Lang("OK"), Lang("<Esc>") : Lang("Cancel") } )
-
-    def UpdateFieldsGETCONTROLLER(self):
-        pane = self.Pane()
-        pane.ResetFields()
-
-        pane.AddTitleField(Lang("Enter IP address of controller"))
-        pane.AddInputField(Lang("Address", 16), self.controller, "address")
-        pane.AddKeyHelpField( { Lang("<Enter>") : Lang("OK"), Lang("<Esc>") : Lang("Exit") } )
-        if pane.CurrentInput() is None:
-            pane.InputIndexSet(0)
-
-    def HandleKey(self, inKey):
-        handled = False
-        if hasattr(self, "HandleKey" + self.state):
-            handled = getattr(self, "HandleKey" + self.state)(inKey)
-        if not handled and inKey == 'KEY_ESCAPE':
-            Layout.Inst().PopDialogue()
-            handled = True
-        return handled
-
-    def HandleKeyINITIAL(self, inKey):
-        return self.menu.HandleKey(inKey)
-
-    def HandleKeyGETCONTROLLER(self, inKey):
-        pane = self.Pane()
-        if pane.CurrentInput() is None:
-            pane.InputIndexSet(0)
-        if inKey == 'KEY_ENTER':
-            inputValues = pane.GetFieldValues()
-            self.controller = inputValues['address']
-            Layout.Inst().PopDialogue()
-            Layout.Inst().TransientBanner(Lang("Setting controller..."))
-            try:
-                self.SetController(self.controller)
-                Layout.Inst().PushDialogue(InfoDialogue(Lang("Setting controller successful")))
-            except Exception, e:
-                Layout.Inst().PushDialogue(InfoDialogue(Lang("Setting controller failed")))
-
-            self.ChangeState("INITIAL")
-            return True
-        else:
-            return pane.CurrentInput().HandleKey(inKey)
-
-    def restartService(self, name):
-        s = NiciraService.Inst(name)
-        s.restart()
-        Layout.Inst().PopDialogue()
-
-    def getController(self):
-        self.ChangeState("GETCONTROLLER")
-        self.Pane().InputIndexSet(0)
-
-    def deleteController(self):
-        self.controller = ""
-        Layout.Inst().PopDialogue()
-        Layout.Inst().TransientBanner(Lang("Deleting controller..."))
-        try:
-            self.SetController(None)
-            Layout.Inst().PushDialogue(InfoDialogue(Lang("Controller deletion successful")))
-        except Exception, e:
-            Layout.Inst().PushDialogue(InfoDialogue(Lang("Controller deletion failed")))
-
-    def syncController(self):
-        Layout.Inst().PopDialogue()
-        Layout.Inst().TransientBanner(Lang("Resyncing controller setting..."))
-        try:
-            Task.Sync(lambda s: self._updateThisServer(s))
-            Layout.Inst().PushDialogue(InfoDialogue(Lang("Resyncing controller config successful")))
-        except Exception, e:
-            Layout.Inst().PushDialogue(InfoDialogue(Lang("Resyncing controller config failed")))
-
-    def SetController(self, ip):
-        self.hostsInPool = 0
-        self.hostsUpdated = 0
-        Task.Sync(lambda s: self._modifyPoolConfig(s, "niciraController", ip))
-        # Should be done asynchronously, maybe with an external script?
-        Task.Sync(lambda s: self._updateActiveServers(s))
-
-    def _modifyPoolConfig(self, session, key, value):
-        """Modify pool configuration.
-
-        If value == None then delete key, otherwise set key to value."""
-        pools = session.xenapi.pool.get_all()
-        # We assume there is only ever one pool...
-        if len(pools) == 0:
-            log.error("No pool for host.")
-            raise XenAPIPlugin.Failure("NO_POOL_FOR_HOST", [])
-        if len(pools) > 1:
-            log.error("More than one pool for host.")
-            raise XenAPIPlugin.Failure("MORE_THAN_ONE_POOL_FOR_HOST", [])
-        session.xenapi.pool.remove_from_other_config(pools[0], key)
-        if value != None:
-            session.xenapi.pool.add_to_other_config(pools[0], key, value)
-        Data.Inst().Update()
-
-    def _updateActiveServers(self, session):
-        hosts = session.xenapi.host.get_all()
-        self.hostsUpdated = 0
-        self.hostsInPool = len(hosts)
-        self.UpdateFields()
-        for host in hosts:
-            Layout.Inst().TransientBanner("Updating host %d out of %d" 
-                    % (self.hostsUpdated + 1, self.hostsInPool))
-            self.hostsUpdated = self.hostsUpdated + 1
-
-    def _updateThisServer(self, session):
-        data = Data.Inst()
-        host = data.host.opaqueref()
-        session.xenapi.host.call_plugin(host, "vswitch-cfg-update", "update", {})
-
-
-class XSFeatureNiciraVSwitch:
-
-    @classmethod
-    def StatusUpdateHandler(cls, inPane):
-        data = Data.Inst()
-
-        inPane.AddTitleField(Lang("Nicira vSwitch"))
-
-        inPane.NewLine()
-
-        versionStr = data.host.other_config({}).get("niciraSwitchVersion", "<Unknown>")
-        inPane.AddStatusField(Lang("Version", 20), versionStr)
-
-        inPane.NewLine()
-        dbController = data.GetPoolForThisHost().get("other_config", {}).get("niciraController", "")
-        if dbController == "":
-            dbController = Lang("<None>")
-        inPane.AddStatusField(Lang("Controller (config)", 20), dbController)
-        controller = VSwitchConfig.Get("mgmt.controller")
-        if controller == "":
-            controller = Lang("<None>")
-        elif controller[0:4] == "ssl:":
-            controller = controller[4:]
-        inPane.AddStatusField(Lang("Controller (in-use)", 20), controller)
-
-        inPane.NewLine()
-        inPane.AddStatusField(Lang("vswitchd status", 20),
-                              NiciraService.Inst("vswitch", "vswitchd").status())
-        inPane.AddStatusField(Lang("brcompatd status", 20),
-                              NiciraService.Inst("vswitch", "brcompatd").status())
-
-        inPane.AddKeyHelpField( {
-            Lang("<Enter>") : Lang("Reconfigure"),
-            Lang("<F5>") : Lang("Refresh")
-        })
-
-    @classmethod
-    def ActivateHandler(cls):
-        DialogueUtils.AuthenticatedOnly(lambda: Layout.Inst().PushDialogue(NiciraControllerDialogue()))
-
-    def Register(self):
-        Importer.RegisterNamedPlugIn(
-            self,
-            'NiciraVSwitch', # Key of this plugin for replacement, etc.
-            {
-                'menuname' : 'MENU_NETWORK',
-                'menupriority' : 800,
-                'menutext' : Lang('Nicira vSwitch') ,
-                'statusupdatehandler' : self.StatusUpdateHandler,
-                'activatehandler' : self.ActivateHandler
-            }
-        )
-
-# Register this plugin when module is imported
-XSFeatureNiciraVSwitch().Register()
diff --git a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py
new file mode 100644 (file)
index 0000000..a9a8cc8
--- /dev/null
@@ -0,0 +1,295 @@
+# Copyright (c) Citrix Systems 2008. All rights reserved.
+# xsconsole is proprietary software.
+#
+# Xen, the Xen logo, XenCenter, XenMotion are trademarks or registered
+# trademarks of Citrix Systems, Inc., in the United States and other
+# countries.
+
+# Copyright (c) 2009 Nicira Networks.
+
+import logging
+log = logging.getLogger("vswitch-cfg-update")
+logging.basicConfig(filename="/var/log/vswitch-xsplugin.log", level=logging.DEBUG)
+
+import os
+import subprocess
+
+cfg_mod="/root/vswitch/bin/ovs-cfg-mod"
+vswitchd_cfg_filename="/etc/vswitchd.conf"
+
+if __name__ == "__main__":
+    raise Exception("This script is a plugin for xsconsole and cannot run independently")
+
+from XSConsoleStandard import *
+
+class VSwitchService:
+    service = {}
+
+    def __init__(self, name, processname=None):
+        self.name = name
+        self.processname = processname
+        if self.processname == None:
+            self.processname = name
+
+    def status(self):
+        try:
+            output = ShellPipe(["service", self.name, "status"]).Stdout()
+        except StandardError, e:
+            log.error("status retrieval error: " + str(e))
+            return "<unknown>"
+        if len(output) == 0:
+            return "<unknown>"
+        for l in output:
+            if self.processname not in l:
+                continue
+            elif "running" in l:
+                return "Running"
+            elif "stop" in l:
+                return "Stopped"
+            else:
+                return "<unknown>"
+        return "<unknown>"
+
+    def restart(self):
+        try:
+            ShellPipe(["service", self.name, "restart"]).Call()
+        except StandardError, e:
+            log.error("restart error: " + str(e))
+
+    @classmethod
+    def Inst(cls, name, processname=None):
+        key = name
+        if processname != None:
+            key = key + "-" + processname
+        if name not in cls.service:
+            cls.service[key] = VSwitchService(name, processname)
+        return cls.service[key]
+
+class VSwitchConfig:
+
+    @staticmethod
+    def Get(key):
+        try:
+            output = ShellPipe([cfg_mod, "-vANY:console:emer", "-F", 
+                    vswitchd_cfg_filename, "-q", key]).Stdout()
+        except StandardError, e:
+            log.error("config retrieval error: " + str(e))
+            return "<unknown>"
+
+        if len(output) == 0:
+            output = ""
+        else:
+            output = output[0].strip()
+        return output
+
+
+class VSwitchControllerDialogue(Dialogue):
+    def __init__(self):
+        Dialogue.__init__(self)
+        data=Data.Inst()
+
+        self.hostsInPool = 0
+        self.hostsUpdated = 0
+        self.controller = data.GetPoolForThisHost().get("other_config", {}).get("vswitchController", "")
+
+        choiceDefs = [
+            ChoiceDef(Lang("Set pool-wide controller"),
+                      lambda: self.getController()),
+            ChoiceDef(Lang("Delete pool-wide controller"),
+                      lambda: self.deleteController()),
+            ChoiceDef(Lang("Resync server controller config"),
+                      lambda: self.syncController()),
+#             ChoiceDef(Lang("Restart vswitchd"),
+#                       lambda: self.restartService("vswitch")),
+#             ChoiceDef(Lang("Restart brcompatd"),
+#                       lambda: self.restartService("vswitch-brcompatd"))
+            ]
+        self.menu = Menu(self, None, Lang("Configure vSwitch"), choiceDefs)
+
+        self.ChangeState("INITIAL")
+
+    def BuildPane(self):
+        pane = self.NewPane(DialoguePane(self.parent))
+        pane.TitleSet(Lang("Configure vSwitch"))
+        pane.AddBox()
+
+    def ChangeState(self, inState):
+        self.state = inState
+        self.BuildPane()
+        self.UpdateFields()
+
+    def UpdateFields(self):
+        self.Pane().ResetPosition()
+        getattr(self, "UpdateFields" + self.state)() # Dispatch method named 'UpdateFields'+self.state
+
+    def UpdateFieldsINITIAL(self):
+        pane = self.Pane()
+        pane.AddTitleField(Lang("Select an action"))
+        pane.AddMenuField(self.menu)
+        pane.AddKeyHelpField( { Lang("<Enter>") : Lang("OK"), Lang("<Esc>") : Lang("Cancel") } )
+
+    def UpdateFieldsGETCONTROLLER(self):
+        pane = self.Pane()
+        pane.ResetFields()
+
+        pane.AddTitleField(Lang("Enter IP address of controller"))
+        pane.AddInputField(Lang("Address", 16), self.controller, "address")
+        pane.AddKeyHelpField( { Lang("<Enter>") : Lang("OK"), Lang("<Esc>") : Lang("Exit") } )
+        if pane.CurrentInput() is None:
+            pane.InputIndexSet(0)
+
+    def HandleKey(self, inKey):
+        handled = False
+        if hasattr(self, "HandleKey" + self.state):
+            handled = getattr(self, "HandleKey" + self.state)(inKey)
+        if not handled and inKey == 'KEY_ESCAPE':
+            Layout.Inst().PopDialogue()
+            handled = True
+        return handled
+
+    def HandleKeyINITIAL(self, inKey):
+        return self.menu.HandleKey(inKey)
+
+    def HandleKeyGETCONTROLLER(self, inKey):
+        pane = self.Pane()
+        if pane.CurrentInput() is None:
+            pane.InputIndexSet(0)
+        if inKey == 'KEY_ENTER':
+            inputValues = pane.GetFieldValues()
+            self.controller = inputValues['address']
+            Layout.Inst().PopDialogue()
+            Layout.Inst().TransientBanner(Lang("Setting controller..."))
+            try:
+                self.SetController(self.controller)
+                Layout.Inst().PushDialogue(InfoDialogue(Lang("Setting controller successful")))
+            except Exception, e:
+                Layout.Inst().PushDialogue(InfoDialogue(Lang("Setting controller failed")))
+
+            self.ChangeState("INITIAL")
+            return True
+        else:
+            return pane.CurrentInput().HandleKey(inKey)
+
+    def restartService(self, name):
+        s = VSwitchService.Inst(name)
+        s.restart()
+        Layout.Inst().PopDialogue()
+
+    def getController(self):
+        self.ChangeState("GETCONTROLLER")
+        self.Pane().InputIndexSet(0)
+
+    def deleteController(self):
+        self.controller = ""
+        Layout.Inst().PopDialogue()
+        Layout.Inst().TransientBanner(Lang("Deleting controller..."))
+        try:
+            self.SetController(None)
+            Layout.Inst().PushDialogue(InfoDialogue(Lang("Controller deletion successful")))
+        except Exception, e:
+            Layout.Inst().PushDialogue(InfoDialogue(Lang("Controller deletion failed")))
+
+    def syncController(self):
+        Layout.Inst().PopDialogue()
+        Layout.Inst().TransientBanner(Lang("Resyncing controller setting..."))
+        try:
+            Task.Sync(lambda s: self._updateThisServer(s))
+            Layout.Inst().PushDialogue(InfoDialogue(Lang("Resyncing controller config successful")))
+        except Exception, e:
+            Layout.Inst().PushDialogue(InfoDialogue(Lang("Resyncing controller config failed")))
+
+    def SetController(self, ip):
+        self.hostsInPool = 0
+        self.hostsUpdated = 0
+        Task.Sync(lambda s: self._modifyPoolConfig(s, "vswitchController", ip))
+        # Should be done asynchronously, maybe with an external script?
+        Task.Sync(lambda s: self._updateActiveServers(s))
+
+    def _modifyPoolConfig(self, session, key, value):
+        """Modify pool configuration.
+
+        If value == None then delete key, otherwise set key to value."""
+        pools = session.xenapi.pool.get_all()
+        # We assume there is only ever one pool...
+        if len(pools) == 0:
+            log.error("No pool for host.")
+            raise XenAPIPlugin.Failure("NO_POOL_FOR_HOST", [])
+        if len(pools) > 1:
+            log.error("More than one pool for host.")
+            raise XenAPIPlugin.Failure("MORE_THAN_ONE_POOL_FOR_HOST", [])
+        session.xenapi.pool.remove_from_other_config(pools[0], key)
+        if value != None:
+            session.xenapi.pool.add_to_other_config(pools[0], key, value)
+        Data.Inst().Update()
+
+    def _updateActiveServers(self, session):
+        hosts = session.xenapi.host.get_all()
+        self.hostsUpdated = 0
+        self.hostsInPool = len(hosts)
+        self.UpdateFields()
+        for host in hosts:
+            Layout.Inst().TransientBanner("Updating host %d out of %d" 
+                    % (self.hostsUpdated + 1, self.hostsInPool))
+            self.hostsUpdated = self.hostsUpdated + 1
+
+    def _updateThisServer(self, session):
+        data = Data.Inst()
+        host = data.host.opaqueref()
+        session.xenapi.host.call_plugin(host, "vswitch-cfg-update", "update", {})
+
+
+class XSFeatureVSwitch:
+
+    @classmethod
+    def StatusUpdateHandler(cls, inPane):
+        data = Data.Inst()
+
+        inPane.AddTitleField(Lang("vSwitch"))
+
+        inPane.NewLine()
+
+        versionStr = data.host.other_config({}).get("vSwitchVersion", "<Unknown>")
+        inPane.AddStatusField(Lang("Version", 20), versionStr)
+
+        inPane.NewLine()
+        dbController = data.GetPoolForThisHost().get("other_config", {}).get("vSwitchController", "")
+        if dbController == "":
+            dbController = Lang("<None>")
+        inPane.AddStatusField(Lang("Controller (config)", 20), dbController)
+        controller = VSwitchConfig.Get("mgmt.controller")
+        if controller == "":
+            controller = Lang("<None>")
+        elif controller[0:4] == "ssl:":
+            controller = controller[4:]
+        inPane.AddStatusField(Lang("Controller (in-use)", 20), controller)
+
+        inPane.NewLine()
+        inPane.AddStatusField(Lang("vswitchd status", 20),
+                              VSwitchService.Inst("vswitch", "vswitchd").status())
+        inPane.AddStatusField(Lang("brcompatd status", 20),
+                              VSwitchService.Inst("vswitch", "brcompatd").status())
+
+        inPane.AddKeyHelpField( {
+            Lang("<Enter>") : Lang("Reconfigure"),
+            Lang("<F5>") : Lang("Refresh")
+        })
+
+    @classmethod
+    def ActivateHandler(cls):
+        DialogueUtils.AuthenticatedOnly(lambda: Layout.Inst().PushDialogue(VSwitchControllerDialogue()))
+
+    def Register(self):
+        Importer.RegisterNamedPlugIn(
+            self,
+            'VSwitch', # Key of this plugin for replacement, etc.
+            {
+                'menuname' : 'MENU_NETWORK',
+                'menupriority' : 800,
+                'menutext' : Lang('vSwitch') ,
+                'statusupdatehandler' : self.StatusUpdateHandler,
+                'activatehandler' : self.ActivateHandler
+            }
+        )
+
+# Register this plugin when module is imported
+XSFeatureVSwitch().Register()
index 5640c85b9780650659cec8930eb97ea27c6bf0f4..7f1c054e4777a45a0fc9923cd8816ee03d9f2017 100644 (file)
@@ -65,8 +65,8 @@ install -m 755 xenserver/opt_xensource_libexec_interface-reconfigure \
 install -m 755 xenserver/etc_xensource_scripts_vif \
              $RPM_BUILD_ROOT%{_prefix}/scripts/vif
 install -m 755 \
-        xenserver/usr_lib_xsconsole_plugins-base_XSFeatureNiciraVSwitch.py \
-               $RPM_BUILD_ROOT%{_prefix}/scripts/XSFeatureNiciraVSwitch.py
+        xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py \
+               $RPM_BUILD_ROOT%{_prefix}/scripts/XSFeatureVSwitch.py
 
 install -d -m 755 $RPM_BUILD_ROOT%{_prefix}/kernel_modules
 find datapath/linux-2.6 -name *.ko -exec install -m 755  \{\} $RPM_BUILD_ROOT%{_prefix}/kernel_modules/ \;
@@ -119,7 +119,7 @@ fi
 source /etc/xensource-inventory
 
 xe host-param-set \
-    "other-config:niciraSwitchVersion=%{version}" uuid="$INSTALLATION_UUID"
+    "other-config:vSwitchVersion=%{version}" uuid="$INSTALLATION_UUID"
 
 # Ensure vswitchd.conf exists
 touch /etc/vswitchd.conf
@@ -137,15 +137,15 @@ do
         mv "$f" %{_prefix}/xs-original/ \
             || printf "Could not save original XenServer $s script\n"
         ln -s "%{_prefix}/scripts/$s" "$f" \
-            || printf "Could not link to Nicira $s script\n"
+            || printf "Could not link to vSwitch $s script\n"
     fi
 done
 
 # Install xsconsole plugin
-plugin=$(readlink /usr/lib/xsconsole/plugins-base/XSFeatureNiciraVSwitch.py)
-if [ "$plugin" != "/root/vswitch/scripts/XSFeatureNiciraVSwitch.py" ]; then
-    rm -f /usr/lib/xsconsole/plugins-base/XSFeatureNiciraVSwitch.py
-    ln -s /root/vswitch/scripts/XSFeatureNiciraVSwitch.py /usr/lib/xsconsole/plugins-base/ || printf "Could not link to Nicira xsconsole plugin.\n"
+plugin=$(readlink /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.py)
+if [ "$plugin" != "/root/vswitch/scripts/XSFeatureVSwitch.py" ]; then
+    rm -f /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.py
+    ln -s /root/vswitch/scripts/XSFeatureVSwitch.py /usr/lib/xsconsole/plugins-base/ || printf "Could not link to vSswitch xsconsole plugin.\n"
 fi
 
 # Modify conf files for compatibility with our interface-reconfigure
@@ -164,11 +164,11 @@ done
 
 if [ "$1" = "1" ]; then    # $1 = 2 for upgrade
     printf "\nYou MUST reboot the server NOW to complete the change to the\n"
-    printf "the Nicira vswitch.  Attempts to modify networking on the server\n"
+    printf "the vSwitch.  Attempts to modify networking on the server\n"
     printf "or any hosted VM will fail until after the reboot and could\n"
     printf "leave the server in an state requiring manual recovery.\n\n"
 else
-    printf "\nTo use the new Nicira vswitch, you should reboot the server\n"
+    printf "\nTo use the new vSwitch, you should reboot the server\n"
     printf "now.  Failure to do so may result in incorrect operation.\n\n"
 fi
 
@@ -188,10 +188,10 @@ fi
 %postun
 if [ "$1" = "0" ]; then     # $1 = 1 for upgrade
 
-    rm -f /usr/lib/xsconsole/plugins-base/XSFeatureNiciraVSwitch.py \
-        /usr/lib/xsconsole/plugins-base/XSFeatureNiciraVSwitch.pyc \
-        /usr/lib/xsconsole/plugins-base/XSFeatureNiciraVSwitch.pyo \
-        || printf "Could not remove Nicira xsconsole plugin.\n"
+    rm -f /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.py \
+        /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyc \
+        /usr/lib/xsconsole/plugins-base/XSFeatureVSwitch.pyo \
+        || printf "Could not remove vSwitch xsconsole plugin.\n"
 
     # Restore original XenServer scripts
     for f in \
@@ -210,7 +210,7 @@ if [ "$1" = "0" ]; then     # $1 = 1 for upgrade
     done
 
     find  %{_prefix} -type d -depth -exec rmdir \{\} \; \
-        || printf "Could not remove Nicira vswitch install directory.\n"
+        || printf "Could not remove vSwitch install directory.\n"
 
     # Remove all configuration and log files
     rm -f /etc/vswitchd.conf
@@ -220,12 +220,12 @@ if [ "$1" = "0" ]; then     # $1 = 1 for upgrade
 
     if [ ! -f /etc/xensource-inventory ]; then
         printf "XenSource inventory not present in /etc/xensource-inventory\n"
-        printf "Could not remove niciraSwitchVersion from XAPI database.\n"
+        printf "Could not remove vSwitchVersion from XAPI database.\n"
         exit 1
     else
         source /etc/xensource-inventory
         xe host-param-remove \
-            param-name=other-config param-key=niciraSwitchVersion \
+            param-name=other-config param-key=vSwitchVersion \
             uuid="$INSTALLATION_UUID"
     fi
 
@@ -249,14 +249,14 @@ fi
 /root/vswitch/kernel_modules/veth_mod.ko
 /root/vswitch/scripts/interface-reconfigure
 /root/vswitch/scripts/vif
-/root/vswitch/scripts/XSFeatureNiciraVSwitch.py
+/root/vswitch/scripts/XSFeatureVSwitch.py
 # Following two files are generated automatically by rpm.  We don't
 # really need them and they won't be used on the XenServer, but there
 # isn't an obvious place to get rid of them since they are generated
 # after the install script runs.  Since they are small, we just
 # include them.
-/root/vswitch/scripts/XSFeatureNiciraVSwitch.pyc
-/root/vswitch/scripts/XSFeatureNiciraVSwitch.pyo
+/root/vswitch/scripts/XSFeatureVSwitch.pyc
+/root/vswitch/scripts/XSFeatureVSwitch.pyo
 /root/vswitch/sbin/brcompatd
 /root/vswitch/sbin/vswitchd
 /root/vswitch/bin/ovs-appctl