From c04709b127d6f2dea32c5faa37cc1e27f6792cd9 Mon Sep 17 00:00:00 2001 From: git-harry Date: Mon, 7 Jul 2014 10:53:43 +0100 Subject: [PATCH] Remove cinder.context warning logging 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 | 3 --- cinder/tests/test_context.py | 16 ---------------- 2 files changed, 19 deletions(-) diff --git a/cinder/context.py b/cinder/context.py index 8ac896223..04c0c3e5c 100644 --- a/cinder/context.py +++ b/cinder/context.py @@ -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 diff --git a/cinder/tests/test_context.py b/cinder/tests/test_context.py index 1eea1a995..c32fd3ebe 100644 --- a/cinder/tests/test_context.py +++ b/cinder/tests/test_context.py @@ -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'}, -- 2.45.2