nova/nova/tests/unit/api/openstack
Chris Dent ef6f4e4c8e Refactor WSGI apps and utils to limit imports
The file nova/api/openstack/__init__.py had imported a lot of
modules, notably nova.utils. This means that any code which
runs within that package, notably the placement service, imports
all those modules, even if it is not going to use them. This
results in scripts/binaries that are heavier than they need
to be and in some cases including modules, like eventlet, that
it would feel safe to not have in the stack.

Unfortunately we cannot sinply rename nova/api/openstack/__init__.py
to another name because it contains FaultWrapper and FaultWrapper
is referred to, by package path, from the paste.ini file and that
file is out there in config land, and something we prefer not to
change. Therefore alternate methods of cleaning up were explored
and this has led to some useful changes:

Fault wrapper is the only consumer of walk_class_hierarchy so
there is no reason for it it to be in nova.utils.

nova.wsgi contains a mismash of WSGI middleware and applications,
which need only a small number of imports, and Server classes
which are more complex and not required by the WSGI wares.

Therefore nova.wsgi was split into nova.wsgi and nova.api.wsgi.
The name choices may not be ideal, but they were chosen to limit
the cascades of changes that are needed across code and tests.

Where utils.utf8 was used it has been replaced with the similar (but not
exactly equivalient) method from oslo_utils.encodeutils.

Change-Id: I297f30aa6eb01fe3b53fd8c9b7853949be31156d
Partial-Bug: #1743120
2018-03-06 22:05:12 +00:00
..
compute Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00
placement [placement] use simple FaultWrapper 2018-02-28 20:34:12 +00:00
__init__.py
common.py [python3] Webob request body should be bytes 2015-12-28 13:51:29 -05:00
fakes.py Refactor WSGI apps and utils to limit imports 2018-03-06 22:05:12 +00:00
test_api_version_request.py Use assert(Not)Equal instead of assertTrue(A == X) 2016-06-03 16:53:15 +01:00
test_common.py Fix TypeError of _get_project_id when project_id is None 2017-11-21 22:21:12 -05:00
test_faults.py [Py34] api.openstack.test_faults.TestFaultWrapper 2015-12-10 20:56:42 +00:00
test_legacy_v2_compatible_wrapper.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00:00
test_mapper.py [Py34] Enable api.openstack.test_mapper unit test 2015-10-05 18:59:28 +03:00
test_requestlog.py log test: use fixtures.StandardLogging in setUp 2018-01-04 10:38:49 +08:00
test_wsgi.py Merge ResourceV21 obj into Resource obj 2017-12-21 19:33:35 +08:00