summaryrefslogtreecommitdiff
path: root/nova/console
diff options
context:
space:
mode:
authorChen Fan <fan.chen@easystack.cn>2016-06-22 20:32:18 +0800
committerChen Fan <fan.chen@easystack.cn>2016-07-06 10:13:19 +0800
commit46b3a3ca1ac3a5ffdc7c5420263223f2d3b9a660 (patch)
tree07b6484e5f003b598f0f4914cc33bdb2a1b7dd6c /nova/console
parentbaaeec1b63429d48cd1137e33e3e550a14f7838c (diff)
downloadnova-46b3a3ca1ac3a5ffdc7c5420263223f2d3b9a660.tar.gz
xvp: change the default xvp conf path to CONF.xvp group
Since option console_xvp_XXX has been move to opt group 'xvp'. so the CONF.XXX should change to CONF.xvp.XXX Closes-Bug: 1597978 Change-Id: I33894ecc5586da9b760c43c765a8a1b2b2dcd667
Diffstat (limited to 'nova/console')
-rw-r--r--nova/console/xvp.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/nova/console/xvp.py b/nova/console/xvp.py
index f5f83e32fa..3bbbd81107 100644
--- a/nova/console/xvp.py
+++ b/nova/console/xvp.py
@@ -38,7 +38,7 @@ class XVPConsoleProxy(object):
"""Sets up XVP config, and manages XVP daemon."""
def __init__(self):
- self.xvpconf_template = open(CONF.console_xvp_conf_template).read()
+ self.xvpconf_template = open(CONF.xvp.console_xvp_conf_template).read()
self.host = CONF.host # default, set by manager.
super(XVPConsoleProxy, self).__init__()
@@ -51,7 +51,7 @@ class XVPConsoleProxy(object):
# TODO(mdragon): implement port selection for non multiplex ports,
# we are not using that, but someone else may want
# it.
- return CONF.console_xvp_multiplex_port
+ return CONF.xvp.console_xvp_multiplex_port
def setup_console(self, context, console):
"""Sets up actual proxies."""
@@ -84,7 +84,7 @@ class XVPConsoleProxy(object):
LOG.debug('No console pools!')
self._xvp_stop()
return
- conf_data = {'multiplex_port': CONF.console_xvp_multiplex_port,
+ conf_data = {'multiplex_port': CONF.xvp.console_xvp_multiplex_port,
'pools': pools}
tmpl_path, tmpl_file = os.path.split(CONF.injected_network_template)
env = jinja2.Environment(loader=jinja2.FileSystemLoader(tmpl_path))
@@ -95,8 +95,8 @@ class XVPConsoleProxy(object):
def _write_conf(self, config):
try:
- LOG.debug('Re-wrote %s', CONF.console_xvp_conf)
- with open(CONF.console_xvp_conf, 'w') as cfile:
+ LOG.debug('Re-wrote %s', CONF.xvp.console_xvp_conf)
+ with open(CONF.xvp.console_xvp_conf, 'w') as cfile:
cfile.write(config)
except IOError:
with excutils.save_and_reraise_exception():
@@ -119,9 +119,9 @@ class XVPConsoleProxy(object):
LOG.debug('Starting xvp')
try:
utils.execute('xvp',
- '-p', CONF.console_xvp_pid,
- '-c', CONF.console_xvp_conf,
- '-l', CONF.console_xvp_log)
+ '-p', CONF.xvp.console_xvp_pid,
+ '-c', CONF.xvp.console_xvp_conf,
+ '-l', CONF.xvp.console_xvp_log)
except processutils.ProcessExecutionError as err:
LOG.error(_LE('Error starting xvp: %s'), err)
@@ -136,7 +136,7 @@ class XVPConsoleProxy(object):
def _xvp_pid(self):
try:
- with open(CONF.console_xvp_pid, 'r') as pidfile:
+ with open(CONF.xvp.console_xvp_pid, 'r') as pidfile:
pid = int(pidfile.read())
except IOError:
return None