X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fusr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py;h=8adb93609d4c88507a600ca0db32f9da7a6e228d;hb=c6278d208924bb04c41266ddca276712f95533bc;hp=6ecf4784f9d9cda8f5f279a638b318266a38a46d;hpb=a0bc29a541fc7dc6e20137d5558e2094d614e6ab;p=openvswitch diff --git a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py index 6ecf4784..8adb9360 100644 --- a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py +++ b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py @@ -5,7 +5,7 @@ # trademarks of Citrix Systems, Inc., in the United States and other # countries. -# Copyright (c) 2009 Nicira Networks. +# Copyright (c) 2009, 2010 Nicira Networks. from XSConsoleLog import * @@ -117,13 +117,13 @@ class VSwitchControllerDialogue(Dialogue): # ChoiceDef(Lang("Restart ovs-brcompatd"), # lambda: self.restartService("vswitch-brcompatd")) ] - self.menu = Menu(self, None, Lang("Configure vSwitch"), choiceDefs) + self.menu = Menu(self, None, Lang("Configure Open vSwitch"), choiceDefs) self.ChangeState("INITIAL") def BuildPane(self): pane = self.NewPane(DialoguePane(self.parent)) - pane.TitleSet(Lang("Configure vSwitch")) + pane.TitleSet(Lang("Configure Open vSwitch")) pane.AddBox() def ChangeState(self, inState): @@ -251,13 +251,13 @@ class VSwitchControllerDialogue(Dialogue): for host in hosts: Layout.Inst().TransientBanner("Updating host %d out of %d" % (self.hostsUpdated + 1, self.hostsInPool)) - session.xenapi.host.call_plugin(host, "vswitch-cfg-update", "update", {}) + session.xenapi.host.call_plugin(host, "openvswitch-cfg-update", "update", {}) 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", {}) + session.xenapi.host.call_plugin(host, "openvswitch-cfg-update", "update", {}) class XSFeatureVSwitch: @@ -266,12 +266,12 @@ class XSFeatureVSwitch: def StatusUpdateHandler(cls, inPane): data = Data.Inst() - inPane.AddTitleField(Lang("vSwitch")) + inPane.AddTitleField(Lang("Open vSwitch")) inPane.NewLine() inPane.AddStatusField(Lang("Version", 20), - VSwitchService.Inst("vswitch", "ovs-vswitchd").version()) + VSwitchService.Inst("openvswitch", "ovs-vswitchd").version()) inPane.NewLine() @@ -295,9 +295,15 @@ class XSFeatureVSwitch: inPane.NewLine() inPane.AddStatusField(Lang("ovs-vswitchd status", 20), - VSwitchService.Inst("vswitch", "ovs-vswitchd").status()) - inPane.AddStatusField(Lang("ovs-brcompatd status", 20), - VSwitchService.Inst("vswitch", "ovs-brcompatd").status()) + VSwitchService.Inst("openvswitch", "ovs-vswitchd").status()) + inPane.AddStatusField(Lang("ovsdb-server status", 20), + VSwitchService.Inst("openvswitch", "ovsdb-server").status()) + + # Only XenServer 5.5.0 runs ovs-brcompatd + xs_version = data.host.software_version.product_version('') + if (xs_version == "5.5.0"): + inPane.AddStatusField(Lang("ovs-brcompatd status", 20), + VSwitchService.Inst("openvswitch", "ovs-brcompatd").status()) inPane.AddKeyHelpField( { Lang("") : Lang("Reconfigure"), @@ -315,7 +321,7 @@ class XSFeatureVSwitch: { 'menuname' : 'MENU_NETWORK', 'menupriority' : 800, - 'menutext' : Lang('vSwitch') , + 'menutext' : Lang('Open vSwitch') , 'statusupdatehandler' : self.StatusUpdateHandler, 'activatehandler' : self.ActivateHandler }