]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove cinder.context warning logging
authorgit-harry <git-harry@live.co.uk>
Mon, 7 Jul 2014 09:53:43 +0000 (10:53 +0100)
committergit-harry <git-harry@live.co.uk>
Mon, 7 Jul 2014 09:53:43 +0000 (10:53 +0100)
The code removed creates a large volume of log entries that are of
limited use. Removing them should improve the readability of the logs.

Change-Id: I2a7f20cfa6cd57aa7ae05bf9685947207cbb9502
Closes-Bug: #1329156

cinder/context.py
cinder/tests/test_context.py

index 8ac8962231ad52cfdc6630256909f43fe2beb32c..04c0c3e5c296df8300ae0400d02853dbfad58ff4 100644 (file)
@@ -59,9 +59,6 @@ class RequestContext(object):
         :param kwargs: Extra arguments that might be present, but we ignore
             because they possibly came in from older rpc messages.
         """
-        if kwargs:
-            LOG.warn(_('Arguments dropped when creating context: %s') %
-                     str(kwargs))
 
         self.user_id = user_id
         self.project_id = project_id
index 1eea1a995dea4b63ea607453a6a7672d7ed2c3a4..c32fd3ebe4829c1e9262e35ce66019b71f102092 100644 (file)
@@ -54,22 +54,6 @@ class ContextTestCase(test.TestCase):
                           'read_deleted',
                           True)
 
-    def test_extra_args_to_context_get_logged(self):
-        info = {}
-
-        def fake_warn(log_msg):
-            info['log_msg'] = log_msg
-
-        self.stubs.Set(context.LOG, 'warn', fake_warn)
-
-        c = context.RequestContext('user',
-                                   'project',
-                                   extra_arg1='meow',
-                                   extra_arg2='wuff')
-        self.assertTrue(c)
-        self.assertIn("'extra_arg1': 'meow'", info['log_msg'])
-        self.assertIn("'extra_arg2': 'wuff'", info['log_msg'])
-
     def test_service_catalog_nova_only(self):
         service_catalog = [
             {u'type': u'compute', u'name': u'nova'},