X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fusr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py;h=99dd15d8da52bdd5d7ca958c0443b305ee0b108c;hb=76f105d9be03588c2d5ec0b94ff769a1d269f2e4;hp=31a48c37dc47ac0586efdcabb2986a31c73c9f43;hpb=e8b52a913a8fc3d2ef0dae82eda5905668ebfae1;p=openvswitch diff --git a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py index 31a48c37..99dd15d8 100644 --- a/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py +++ b/xenserver/usr_lib_xsconsole_plugins-base_XSFeatureVSwitch.py @@ -13,8 +13,7 @@ import os import socket import subprocess -cfg_mod="/usr/bin/ovs-cfg-mod" -vswitchd_cfg_filename="/etc/ovs-vswitchd.conf" +vsctl="/usr/bin/ovs-vsctl" if __name__ == "__main__": raise Exception("This script is a plugin for xsconsole and cannot run independently") @@ -78,10 +77,9 @@ class VSwitchService: class VSwitchConfig: @staticmethod - def Get(key): + def Get(action): try: - output = ShellPipe([cfg_mod, "-vANY:console:emer", "-F", - vswitchd_cfg_filename, "-q", key]).Stdout() + output = ShellPipe([vsctl, "-vANY:console:emer", action]).Stdout() except StandardError, e: XSLogError("config retrieval error: " + str(e)) return "" @@ -285,7 +283,7 @@ class XSFeatureVSwitch: if dbController == "": dbController = Lang("") inPane.AddStatusField(Lang("Controller (config)", 20), dbController) - controller = VSwitchConfig.Get("mgmt.controller") + controller = VSwitchConfig.Get("get-controller") if controller == "": controller = Lang("") elif controller[0:4] == "ssl:":