magnum/magnum/tests
Dane LeBlanc 617b772e55 Modify magnum api context to use user_name and project_name
Problem description:
If DevStack is used to instantiate the magnum plugin, and the
devstack localrc/local.conf has the default values for:
   LOG_COLOR (default value = True)
   SYSLOG (default value = False)
then upon startup (i.e. running DevStack's stack.sh), the magnum devstack
lib calls the DevStack common setup_colorized_logging function, but
without passing the optional 'project_var' and 'user_var' arguments to
this function. As a result, the setup_colorized_logging
function uses its default values of "user_name" and "project_name"
when it defines the logging_context_format_string (which in turn gets
configured in /etc/magnum/magnum.conf). The problem is that "user_name"
and "project_name" are not defined in the API context used by Magnum,
so that whenever the magnum plugin does a logging call, a KeyError
exception for the non-existant key "user_name" is generated.

Fix description:
The fix is to modify the Magnum context to use "user_name" and
"project_name" attributes to be consistent with the default context
format string set up by DevStack.

Change-Id: Ia0c34899609735ff9d8b4597101e004e2684657e
Closes-Bug: #1464376
2015-06-15 18:27:15 -04:00
..
contrib Make functional test work with new tox env 2015-05-19 11:07:34 +08:00
functional Make functional test work with new tox env 2015-05-19 11:07:34 +08:00
unit Modify magnum api context to use user_name and project_name 2015-06-15 18:27:15 -04:00
__init__.py Remove imports from oslo namespaces 2015-02-08 02:59:30 +00:00
base.py Merge "Fix continuation line under/over indented problems" 2015-05-31 21:10:25 +00:00
conf_fixture.py Use oslo.log instead of oslo.incubator log module 2015-05-29 18:28:23 +08:00
config.py Add hooks to obtain conductor api 2014-12-30 23:07:05 +09:00
fakes.py Add support for API microversions 2015-06-08 11:14:36 +08:00
utils.py Change ctxt to context to for consistency 2015-02-08 22:50:27 -05:00