- When flake8-import-order is installed the additional
ordering tests it provides are enabled by default.
- When devstack installs python projects from source
such as nova, the pip_install function installs both the
requirements.txt and test-requiremets.txt dependencies systemwide.
As a result, any python project that runs pep8 tests without a
python virtual environment will also have import ordering enforced
which may fail.
- This change removes flake8-import-order from the
test-requirements.txt to prevent failures in projects other
than nova that don't enforce pep8 import ordering.
Change-Id: I994df178f0000a0840f6658ccc2f277d5503f826
Use the flake8 plugin flake8-import-order to check import ordering. It
can do it automatically and don't need reviewers to check it.
Change-Id: Ia3d81bbbb44b40804b3268c0e648276a36cb4805
Use ostestr as runner instead of the custome pretty_tox.sh script
(pretty much removed everywhere). pretty_tox3.sh is just a wrapper
for ostestr but it could be probably removed as well going forward.
Also remove the tempest-lib dependency, which originally provided
subunit-trace (now from os-testr).
Change-Id: I4390964ce83167d634b80f696e82a0e199582ce6
hacking version is managed in test-requirements.txt and the latest
version is 0.13.0 now.
However 0.13.0 is in very sorry shape as the Change-Id of hacking
I714caa085fa35cb4aac3b65c73a7de6d4807d04d .
So this patch updates our test-requirements.txt to avoid using
0.13.0.
Change-Id: If94186a74a022bc689d7c9c7f56f4bdb9376e8a7
* Add osprofiler wsgi middleware. This middleware is used for 2 things:
1) It checks that person who want to trace is trusted and knows
secret HMAC key.
2) It starts tracing in case of proper trace headers
and adds the first wsgi trace point with info about the HTTP request
* Add initialization of osprofiler on start of a service
Currently that includes oslo.messaging notifier instance creation
to send Ceilometer backend notifications.
oslo-spec: https://review.openstack.org/#/c/103825/
python-novaclient change: https://review.openstack.org/#/c/254699/
based on: https://review.openstack.org/#/c/105096/
Co-Authored-By: Boris Pavlovic <boris@pavlovic.me>
Co-Authored-By: Munoz, Obed N <obed.n.munoz@intel.com>
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Co-Authored-By: Tovin Seven <vinhnt@vn.fujitsu.com>
Implements: blueprint osprofiler-support-in-nova
Change-Id: I82d2badc8c1fcec27c3fce7c3c20e0f3b76414f1
This test made a tortured trip into _create_image_helper without using
much of its functionality. We pull this out and have it call
_create_configdrive directly.
This leaves _create_image_helper with only a single caller:
test_create_image_with_flavor_swap. This test is almost identical in
purpose to the much better test_create_image_with_swap and
test_create_image_with_legacy_swap_resizing. We refactor
test_create_image_with_swap to use ddt to cover all 3 cases, and
remove _create_image_helper.
This introduces the first use of ddt in Nova tests. It is already in
global-requirements. It was approved for use in Nova tests during the
Ocata contributor meetup:
https://etherpad.openstack.org/p/ocata-nova-summit-meetup
Change-Id: I9d26ae3c26bab20ae60c2db011194ac0b2ead555
With the update to oslotest 2.11.0, we're missing testscenarios
now in the unit test environment[1], so depend on it.
1: https://review.openstack.org/#/c/385274/
Change-Id: I57da89ade9eb3fcf920ec6d333db7577ee3ef138
Upgrade to gabbi 1.26.1 to use the new inner_fixtures feature to
capture log and stdout/stderr per individual test request. The
existing nova fixtures are used for the capture.
Depends-On: Ic13dc14f62334aefbcced93872ec564cab157898
Change-Id: Ic6f5a50df37b4680a60c4aa94f7587aec232c367
The wsgi-intercept dependency is only used in the functional
tests for the placement API, so we should move it to the
test-requirements.txt file so people don't try to package
it for runtime installs.
Change-Id: I0d8325e12ed7d5d022877782d6aa4ba4055c30db
Closes-Bug: #1625653
The placement API will initially host resource provider
information and then will grow to provide a full placement
service. Eventually it will be fully extracted from Nova.
To facilitate that extraction, this service is being developed
with few ties to existing nova.wsgi structures. Instead it
uses relatively plain WSGI apps that are:
* uses the Routes library with declarative mapping defined in
ROUTE_DECLARATIONS
* basic wsgi apps, with webob and the request class, for each handler
define as functions
* does not use a paste-ini file to compose middleware, instead code
which minimally inspects the oslo config to know how to adjust
middleware (in the initial case choosing an auth_strategy)
Many of these "features" will be demonstrated in commits that
follow this one that enable specific behaviors for resource
providers and their inventories.
In order to ensure that this change can be merged in an atomic
fashion it includes microversion support that was previously in its
own commit.
The microversion_parse library is used in a WSGI middleware
to parse incoming microversion headers and place the
determined value into the WSGI environment at the
'placement.microversion' key. Response headers are adjusted to
add the required outgoing headers as described in:
http://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html
If a client requests an invalid microversion, they will receive
a 400 response. If the microversion is of a valid form but not
available, they will received a 406 response. The format of that
response is dependent on the accept header of the request. If it
is JSON, the min and max available microversions are presented.
A request to '/' will return version discovery information.
Thus far nothing else is done with the microversion information.
It is there for when we need it in the future. For now everything
is version 1.0.
The groundwork for using gabbi to test the API is in place in
nova/tests/functional/api/openstack/placement. The gabbi tests
are included in the functional target. To run just the placement
tests it is possible to run 'tox -efunctional placement'.
Change-Id: Icb9c8f7a1fa8a9eac66c2d72f4b7e4efd4e1944f
Partially-Implements: blueprint generic-resource-pools
os-api-ref is released on pypi now, so we can move to using it instead
of our in tree version. All future extension fixes will happen over
there instead of here.
Change-Id: Iee4b9c94b8b66a5b0481dd0b15beda03328c4f31
Depends-On: I0e615d36a2e5a8fa0d83f20bdcc2c33ad868ebd5