Mark noauth authentication as deprecated

Change-Id: Iac5a286ed171b5be303b8c4ba8ad1e2a4071cbf9
This commit is contained in:
Julien Danjou 2017-03-06 10:30:11 +01:00
parent 172546c85f
commit 09fd8c1403
2 changed files with 10 additions and 0 deletions

View File

@ -15,6 +15,7 @@
# under the License.
import os
import uuid
import warnings
from oslo_config import cfg
from oslo_log import log
@ -107,6 +108,11 @@ def load_app(conf, indexer=None, storage=None,
APPCONFIGS[configkey] = config
LOG.info("WSGI config used: %s", cfg_path)
if conf.api.auth_mode == "noauth":
warnings.warn("The `noauth' authentication mode is deprecated",
category=DeprecationWarning)
appname = "gnocchi+" + conf.api.auth_mode
app = deploy.loadapp("config:" + cfg_path, name=appname,
global_conf={'configkey': configkey})

View File

@ -0,0 +1,4 @@
---
deprecations:
- The `noauth` authentication mechanism is deprecated and will be removed in
a next version.