Ensure XenAPI options are loaded

Options for XenAPI support are supposed to have been deprecated, but
actually they were removed by the deprecation patch[1]. This change is
a partial revert of that patch[1], and ensures that these options are
loaded, so that warning messages about these deprecated options appear
in logs.

This change also removes these deprecated options from the example
rootwrap conf file.

[1] a6dbf97242

Change-Id: Id024dabf276e492268e723e526d7a787156eb9c1
This commit is contained in:
Takashi Kajinami 2021-01-03 20:51:22 +09:00
parent 74e4cd31f1
commit 459716e644
3 changed files with 13 additions and 7 deletions

View File

@ -28,10 +28,3 @@ syslog_log_level=ERROR
# Rootwrap daemon exits after this seconds of inactivity
daemon_timeout=600
[xenapi]
# XenAPI configuration is only required by the L2 agent if it is to
# target a XenServer/XCP compute host's dom0.
xenapi_connection_url=<None>
xenapi_connection_username=root
xenapi_connection_password=<None>

View File

@ -17,6 +17,7 @@ from oslo_config import cfg
from neutron._i18n import _
XENAPI_CONF_SECTION = 'xenapi'
XENAPI_DEPRECATION_REASON = ('XenAPI support has been removed from Nova, it '
'will be removed in X.')
@ -40,3 +41,7 @@ XENAPI_OPTS = [
deprecated_since='Wallaby',
deprecated_reason=XENAPI_DEPRECATION_REASON)
]
def register_xenapi_opts(cfg=cfg.CONF):
cfg.register_opts(XENAPI_OPTS, group=XENAPI_CONF_SECTION)

View File

@ -31,6 +31,7 @@ import neutron.conf.agent.linux
import neutron.conf.agent.metadata.config as meta_conf
import neutron.conf.agent.ovs_conf
import neutron.conf.agent.ovsdb_api
import neutron.conf.agent.xenapi_conf
import neutron.conf.common
import neutron.conf.db.dvr_mac_db
import neutron.conf.db.extraroute_db
@ -340,3 +341,10 @@ def list_ironic_auth_opts():
opt_list.append(plugin_option)
opt_list.sort(key=operator.attrgetter('name'))
return [(IRONIC_GROUP, opt_list)]
def list_xenapi_opts():
return [
('xenapi',
neutron.conf.agent.xenapi_conf.XENAPI_OPTS)
]