X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=xenserver%2Fusr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py;h=f62eaa8876a97a9ba0c060e3d0cff2c5dd70c296;hb=ea523221d4b11e9e067ec8b25a3955d1b64eb537;hp=015f4cc007a0fe75479dbd630bbf79fecfabb0ba;hpb=9b35536a145361285d341f83bc6fc19408bb04e5;p=sliver-openvswitch.git diff --git a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py index 015f4cc00..f62eaa887 100644 --- a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py +++ b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py @@ -1,5 +1,5 @@ -# Copyright (c) 2007-2010 Citrix Systems Inc. -# Copyright (c) 2009,2010 Nicira Networks. +# Copyright (c) 2007-2011 Citrix Systems Inc. +# Copyright (c) 2009,2010,2011,2012 Nicira, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -86,7 +86,7 @@ class VSwitchConfig: @staticmethod def Get(action): try: - arg = [vsctl, "--timeout=30", "-vANY:console:emer"] + action.split() + arg = [vsctl, "--timeout=30", "-vconsole:off"] + action.split() output = ShellPipe(arg).Stdout() except StandardError, e: XSLogError("config retrieval error: " + str(e)) @@ -109,10 +109,7 @@ class VSwitchControllerDialogue(Dialogue): self.xs_version = data.host.software_version.product_version('') pool = data.GetPoolForThisHost() if pool is not None: - if self.xs_version == "5.5.0": - self.controller = pool.get("other_config", {}).get("vSwitchController", "") - else: - self.controller = pool.get("vswitch_controller", "") + self.controller = pool.get("vswitch_controller", "") else: self.controller = "" @@ -125,8 +122,6 @@ class VSwitchControllerDialogue(Dialogue): lambda: self.syncController()), # ChoiceDef(Lang("Restart ovs-vswitchd"), # lambda: self.restartService("vswitch")), -# ChoiceDef(Lang("Restart ovs-brcompatd"), -# lambda: self.restartService("vswitch-brcompatd")) ] self.menu = Menu(self, None, Lang("Configure Open vSwitch"), choiceDefs) @@ -250,13 +245,7 @@ class VSwitchControllerDialogue(Dialogue): if len(pools) > 1: XSLogFatal(Lang("More than one pool for host.")) return - if self.xs_version == "5.5.0": - key = "vSwitchController" - session.xenapi.pool.remove_from_other_config(pools[0], key) - if value != None: - session.xenapi.pool.add_to_other_config(pools[0], key, value) - else: - session.xenapi.pool.set_vswitch_controller(value) + session.xenapi.pool.set_vswitch_controller(value) Data.Inst().Update() def _updateActiveServers(self, session): @@ -294,18 +283,14 @@ class XSFeatureVSwitch: pool = data.GetPoolForThisHost() if pool is not None: - if (xs_version == "5.5.0"): - dbController = pool.get("other_config", {}).get("vSwitchController", "") - else: - dbController = pool.get("vswitch_controller", "") + dbController = pool.get("vswitch_controller", "") else: dbController = "" if dbController == "": dbController = Lang("") inPane.AddStatusField(Lang("Controller (config)", 20), dbController) - controller = VSwitchConfig.Get("get Open_vSwitch . managers") - controller = controller.strip('[]"') + controller = VSwitchConfig.Get("get-manager") if controller == "": controller = Lang("") @@ -319,11 +304,6 @@ class XSFeatureVSwitch: inPane.AddStatusField(Lang("ovsdb-server status", 20), VSwitchService.Inst("openvswitch", "ovsdb-server").status()) - # Only XenServer 5.5.0 runs ovs-brcompatd - if (xs_version == "5.5.0"): - inPane.AddStatusField(Lang("ovs-brcompatd status", 20), - VSwitchService.Inst("openvswitch", "ovs-brcompatd").status()) - inPane.AddKeyHelpField( { Lang("") : Lang("Reconfigure"), Lang("") : Lang("Refresh")