2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-23 14:57:06 +00:00

xenserver: Use ovs-vsctl for controller configuration in xsconsole

This commit is contained in:
Justin Pettit
2009-12-18 14:14:37 -08:00
parent dd8ac6fe86
commit f95c85e28c
2 changed files with 18 additions and 35 deletions

View File

@@ -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 "<unknown>"
@@ -285,7 +283,7 @@ class XSFeatureVSwitch:
if dbController == "":
dbController = Lang("<None>")
inPane.AddStatusField(Lang("Controller (config)", 20), dbController)
controller = VSwitchConfig.Get("mgmt.controller")
controller = VSwitchConfig.Get("get-controller")
if controller == "":
controller = Lang("<None>")
elif controller[0:4] == "ssl:":