From: Elena Ezhova Date: Tue, 13 Oct 2015 08:13:51 +0000 (+0300) Subject: Register oslo_service.wsgi options correctly X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0a762191a89732710f640c7536682e7e1ef585cd;p=openstack-build%2Fneutron-build.git Register oslo_service.wsgi options correctly oslo_service 0.10.0 release added register_opts function to wsgi module that is why it is no longer needed to access its private _options module. Change-Id: I4803a3540a6bc9c8f08db49e209668d0736abec7 Depends-On: Id0f9f93758c68aa954d37e3566e35deae2961268 --- diff --git a/neutron/common/config.py b/neutron/common/config.py index cbd31713d..973973203 100644 --- a/neutron/common/config.py +++ b/neutron/common/config.py @@ -25,7 +25,6 @@ from oslo_config import cfg from oslo_db import options as db_options from oslo_log import log as logging import oslo_messaging -from oslo_service import _options from oslo_service import wsgi from neutron.api.v2 import attributes @@ -151,9 +150,7 @@ core_cli_opts = [ # Register the configuration options cfg.CONF.register_opts(core_opts) cfg.CONF.register_cli_opts(core_cli_opts) -# TODO(eezhova): Replace it with wsgi.register_opts(CONF) when oslo.service -# 0.10.0 releases. -cfg.CONF.register_opts(_options.wsgi_opts) +wsgi.register_opts(cfg.CONF) # Ensure that the control exchange is set correctly oslo_messaging.set_transport_defaults(control_exchange='neutron') diff --git a/neutron/wsgi.py b/neutron/wsgi.py index b129aa35f..eb5805fda 100644 --- a/neutron/wsgi.py +++ b/neutron/wsgi.py @@ -28,7 +28,6 @@ from oslo_config import cfg import oslo_i18n from oslo_log import log as logging from oslo_serialization import jsonutils -from oslo_service import _options from oslo_service import service as common_service from oslo_service import sslutils from oslo_service import systemd @@ -60,9 +59,7 @@ socket_opts = [ CONF = cfg.CONF CONF.register_opts(socket_opts) -# TODO(eezhova): Replace it with wsgi.register_opts(CONF) when oslo.service -# 0.10.0 releases. -CONF.register_opts(_options.wsgi_opts) +wsgi.register_opts(CONF) LOG = logging.getLogger(__name__) diff --git a/requirements.txt b/requirements.txt index ce1e425e3..a30604159 100644 --- a/requirements.txt +++ b/requirements.txt @@ -36,7 +36,7 @@ oslo.middleware>=2.8.0 # Apache-2.0 oslo.policy>=0.5.0 # Apache-2.0 oslo.rootwrap>=2.0.0 # Apache-2.0 oslo.serialization>=1.4.0 # Apache-2.0 -oslo.service>=0.9.0 # Apache-2.0 +oslo.service>=0.10.0 # Apache-2.0 oslo.utils>=2.0.0 # Apache-2.0 oslo.versionedobjects>=0.9.0