summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgordon chung <gord@live.ca>2014-12-02 09:59:19 -0500
committergordon chung <gord@live.ca>2014-12-15 11:55:31 -0500
commit3d18b9c8ed269b489015c71ef6691ac4357f639e (patch)
tree94f2310b2148ca563f9b4f67e4ba418cd5151b23
parentdb8a91fe1316b8e843ee7360451b24b6c06de1c7 (diff)
downloadpycadf-3d18b9c8ed269b489015c71ef6691ac4357f639e.tar.gz
deprecate audit middleware
we should deprecate audit middleware as soon as possible so we can remove it from library. switch oslo.messaging to test as it is only a requirement for middleware and not pycadf in general. Change-Id: I60820cc15d05b3c07215c2000d806b4a0aa42889 Closes-Bug: #1398411
-rw-r--r--pycadf/middleware/audit.py7
-rw-r--r--requirements.txt1
-rw-r--r--test-requirements.txt1
3 files changed, 8 insertions, 1 deletions
diff --git a/pycadf/middleware/audit.py b/pycadf/middleware/audit.py
index 87642f0..859dd1b 100644
--- a/pycadf/middleware/audit.py
+++ b/pycadf/middleware/audit.py
@@ -19,6 +19,9 @@ AuditMiddleware filter should be placed after Keystone's auth_token middleware
in the pipeline so that it can utilize the information Keystone provides.
"""
+import logging
+
+from pycadf._i18n import _LW
from pycadf.audit import api as cadf_api
from pycadf.middleware import notifier
@@ -27,6 +30,10 @@ class AuditMiddleware(notifier.RequestNotifier):
def __init__(self, app, **conf):
super(AuditMiddleware, self).__init__(app, **conf)
+ LOG = logging.getLogger(conf.get('log_name', __name__))
+ LOG.warning(_LW('pyCADF middleware is deprecated as of version 0.7.0,'
+ ' in favour of keystonemiddleware.audit.'
+ 'AuditMiddleware'))
map_file = conf.get('audit_map_file', None)
self.cadf_audit = cadf_api.OpenStackAuditApi(map_file)
diff --git a/requirements.txt b/requirements.txt
index 72596f9..679cf9a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,7 +4,6 @@
Babel>=1.3
oslo.config>=1.4.0 # Apache-2.0
oslo.i18n>=1.0.0 # Apache-2.0
-oslo.messaging>=1.4.0,!=1.5.0
oslo.serialization>=1.0.0 # Apache-2.0
pytz
six>=1.7.0
diff --git a/test-requirements.txt b/test-requirements.txt
index b7bcc94..3357df5 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -8,6 +8,7 @@ coverage>=3.6
discover
fixtures>=0.3.14
mock>=1.0
+oslo.messaging>=1.4.0,!=1.5.0
oslotest>=1.2.0 # Apache-2.0
python-subunit>=0.0.18
testrepository>=0.0.18