Handle different format of api exception

Currently, the issue of error message parse implemented "apiclient" module
of solo that has broken the python-ceilometerclient and
python-cinderclient error message presentation. Because the api exception
response has different format. i.e. the api use WSME following format:
{
    "error_message": {
        "debuginfo": None,
        "faultcode": "Client",
        "faultstring": "fake message"
    }
}

and the exception response format of cinder api is like this:
{
    "badRequest": {
        "message": "fake message",
	"code": 400
    }
}

This change can fix several bugs about this issue.

Change-Id: Idbb2ed3bb926153682915b735ba967c554c7fbac
Closes-bug: #1354470
Closes-bug: #1383771
Closes-bug: #1388714
Allow tempest to use new log w/o oslo.i18n

If we get an error importing oslo.i18n (since it's not in
its requirements), we should switch _ to a noop function

Change-Id: Iee20319e7596232de5bed5b9755381ead44e3f46
Make use_syslog=True log to syslog via /dev/log

After upgrade from Icehouse to Juno OpenStack services don't log to
syslog via /dev/log anymore. This behaviour was introduced in commit
1188d88a73e75da5c143d0dfad34e10dad0daee0. While /dev/log is arguably
not a very portable default, breaking the backwards compatibility is
even worse.

This commit restores the original behaviour. /dev/log portability
issues will be addressed separately.

Closes-Bug: #1385295
Related-Bug: #1391428

Change-Id: I4e84bca70eee6d6aa8d7525fe38d65ba235dd6b0
Report: Support Sequences and Mappings as Data

Previously, the ReportModel class assumed that data passed in
was a dict, without actually checking.  This could lead to errors
if anything else was passed in.  As it was likely one would want
to pass in arbitrary sequences (like lists) and mappings, support
was added.

It works as such:

- Mappings are transformed into dicts via the `dict` constructor

- Sequences are transformed into dicts by ziping the sequence
  together with its indicies, and then passing the result to
  the `dict` constructor.

Finally, instances of manually converting a list to a dict were
removed.

Change-Id: Ibcf7d01d69ac21f9ad8c3dcf604733e88122c8f4
threadgroup: don't log GreenletExit

This exception is always raised when a green thread is stopped. This
exception does not indicate any problem in a service, so it should not
be logged not to scare operators and developers that waste their time
debugging those exceptions in their deployment and unit test logs.

Change-Id: I03dd3484430166839219af4d4881ea404526ce72
Related-Bug: #1382573
ServiceRestartTest: make it more resilient

The test spawned new processes to run services in, but didn't guard test
suite with due attention not to leak those processes into test
environment.

Proper guarding mechanism is already implemented for another test,
ServiceLauncherTest. Hence it was moved to their common ancestor
(ServiceTestBase) and reused in both test classes.

Closes-Bug: #1382573
Change-Id: If4ee7ed09696c3f5f3273f4d280c567b328ca75c
policy: add a missing staticmethod declaration

Change-Id: I6f9b61c1cd23afbae75756288a095f23e25d2f46
oslo.context is graduating

bp/graduate-oslo-context

Change-Id: I4ac1f9be066018deb5fed932c26432aa67231385
Merge "threadgroup: don't log GreenletExit"
Merge "Report: Support Sequences and Mappings as Data"
Merge "oslo.context is graduating"
Expanding the help text for policy_dirs

This change adds more explanation to the proper usage of the policy_dirs
configuration option.

Change-Id: I88cee29fd304b2828c2847787dc88701937a9117
Closes-Bug: #1394363
Merge "Allow tempest to use new log w/o oslo.i18n"
Merge "Make use_syslog=True log to syslog via /dev/log"
Merge "Handle different format of api exception"
Merge "ServiceRestartTest: make it more resilient"
Merge "policy: add a missing staticmethod declaration"