core extension comes from V2 API and we don't need that now
so this patch removes the code related to the extension.
Partially implements blueprint remove-legacy-v2-api-code
Change-Id: Idd3e54f757713d3bdb5f817a6cd34c04e6c681ab
As extensions options has been deprecated, API sample tests
should run against all extension enable.
This commit enables all extensions for all the remaining sample tests
and remove extensions specific tests and sample files.
Also remove extension setting specific logic from base test class
along with TODOs.
Partially implements blueprint api-sample-tests-with-all-extensions
Change-Id: I66b593760789e5b3b92137a672246f8d91e44cba
Now v2 API legacy code has been removed, functional
tests do not need to set the v2 extensions.
This patch removes the extension setting on osapi_compute_extension
flag.
Partially implements blueprint remove-legacy-v2-api-code
Change-Id: If5db4b141702fa94777fc5706dec6c3fb6c9c594
This is the fifth and final patch moving config options from the
nova/api directory. In this patch, the deprecated options from the
legacy_v2 directory have been moved to nova/conf/legacy_v2.py. A
subsequent patch will enhance the help text for these options.
Blueprint centralize-config-options-newton
Change-Id: I3fdff0d3c0c2f36155ad4f7060395e788b78d150
This is the second patch moving config options from the nova/api
directory. In this patch, the openstack common options are moved. A
subsequent patch will enhance the help text for these options.
Blueprint centralize-config-options-newton
Change-Id: If56965c88d910d4d3ed2232efa91b2033ed34468
This patches from the test scenarios for the legacy v2 from API
sample tests. There still have some codes for legacy v2 which should
be cleanup, but that can be done later patches. This patch just stop
the test on the legacy v2 API.
Partially implements blueprint remove-legacy-v2-api-code
Change-Id: I38626e5a4aa98cbfd7b65b5eb0edbcae96e5b3f2
oslo.config is very specific about what is allowed to be overridden in
our flags method. When run as a whole, the functional tests import
enough stuff so that all the tests pass. But if you attempt to run
just the versions tests, they will fail with an import error. This is
because the api_samples_base references osapi_compute_link_prefix and
osapi_compute_extension in all cases.
Adding this to the base class makes these tests runnable on their own.
Change-Id: I6e9800fdfb7a3c8495de71220bfec0597e45da82
Change Id92251243d9e92f30e466419110fce5781304823 added
API version 2.18, but because of a lot of rebases some
comments and class names has incorrect API version
(2.16 and 2.17). It may confuse developers in future.
These mistakes must be fixed.
Change-Id: I9719e9ddb3393f24976d1b5e4464e759daaa704e
This introduces microversion 2.18 which signals that the {project_id}
is no longer required in URLs.
It tests this with an additional scenario in api_samples which makes
all the requests without the project_id in the url (using a different
noauth middleware to accomplish this).
Update the link fixer in the ApiSamples matching code to also update
for optional project_id. This is the least worse approach here,
because if we set request_api_version, then we have to duplicate the
entire template tree as well, which we definitely don't want to do, as
it now correctly handles either url form.
This updates the auth tests to bifurcate with testscenarios instead of
the subclass model, which makes for more consistent tests.
In order to support adding routes without project_id we have to be
able to restrict project_id something that doesn't match any of our
top level routes.
The default for this is [0-9a-f\-]+ which will match all of the
following:
- keystone default generated project_ids [0-9a-f]{32}
- integer project_ids (\d+) - known in use by RAX
- uuids with dashes (no known users, but suspect there might be)
This can be overrided with the new (but already deprecated)
``project_id_regex`` config option.
NOTE: we used this feature to expand the regex to match 'fake' and
'openstack' as valid project ids in tests. Those concepts are deeply
embedded in our tests, and need to be unwound independently.
APIImpact
Implements bp:service-catalog-tng
Co-Authored-By: Augustina Ragwitz <auggy@cpan.org>
Change-Id: Id92251243d9e92f30e466419110fce5781304823
This API samples test was not using testscenarios properly,
and it wasn't extending the correct test class, so it was:
1. Not actually running tests.
2. Not running tests at the correct microversion (v2.13).
This fixes the testscenarios setup for the subclass and the
API samples and templates (since it's not using subs for the
intended project_id that was in the samples).
Also fixes a typo in ApiSampleTestBaseV21.
Change-Id: I27e8fce5d456914d88098c6cfabe05fa8afbc8eb
Closes-Bug: #1534354
_api_version and request_api_version are pretty confusing
semantically. Update these to more meaningful names to make the code
easier to understand: api_major_version, microversion.
Change-Id: Ief6b12fc755a6c48cbef7b82ba226e47850c0b9e
testscenarios was previously used to set an intermediary symbol, which
then set additional attributes. This got really complicated to figure
out what scenarios were really doing, and how to add more (or bypass
them in tests).
This clarifies that usage, unwinds the testscenarios simplifying what
gets set up.
It also starts making calls to API v2.1 on the v2.1 url. This is
supported with existing API samples docs with a mechanism to update
links if they exist in the docs.
Change-Id: I9affc046300295cdf3e284ccc736019ccaffb9f2
This is part of the v3 cleanup effort. The 'API_V3_CORE_EXTENSIONS'
attribute has been re-named to 'API_V21_CORE_EXTENSIONS'.
Partial-Bug: #1462901
Change-Id: I2867b7788b06a56c594153dd9e0361788112793f
This is part of the V3 cleanup effort. The 'ApiSampleTestBaseV3' class
has been renamed to 'ApiSampleTestBaseV21', and all references to it
updated. Also, all references to the 'nova.api.v3' extension namespace
have been renamed to 'nova.api.v21'. Finally, some code that used short
variable names like 'v1', 'v2', etc., has been updated to rename these
'vers1', 'vers2', to avoid confusion with the v3 issue.
Change-Id: I23eab21c7158ba319e060bd075ef25afc5365381
I have taken a look at:
* removed /v3
* /v2 and /v1.1 now uses v2.1 legacy mode
* add deprecation warnings for old v2 code and ec2
* ensure legacy v2 code is not used by default
DocImpact
UpgradeImpact
Depends-On: I513b54eeacee1486ea11b85913ab2d21727fc5f9
dropping a tempest test that assumes certain validation order
Change-Id: I94b1305882598cc259a267dc8e954ab242baf7d1
We want to remove the extension infrastructure in the v2.1 API during
the next release. To make that possible, we must deprecate the
configuration now.
Also deprecating the osapi_v3 group, and moving to osapi_v21.
UpgradeImpact
DocImpact
Part of blueprint nova-api-deprecate-extensions
Change-Id: I084444b11dceda7cf8f88c157aa67d36490fce49
All functional tests have been merged between v2 and v2.1.
This commit does the cleanup for all TODO added while merging the tests.
Partially implements blueprint test-collapse-v2-and-v21
Change-Id: I2f5a3dcc41e296c3baba6e4ea7e20079df48b43d
As functional tests have been shared among v2 and v2.1, some
function to get sample files present in api_samples_test_base.py
are now unused.
This commits removes those unused functions and moves the
correct one from api_sample_base.py to api_samples_test_base.py.
Partially implements blueprint test-collapse-v2-and-v21
Change-Id: I7b78483e6b2980e975b0ee451f1818a1b221472f
There are many place where server POST request has been used to tests
other API behavior. There was issue of having duplicate
server POST req and resp sample files in each API sample directory.
we added logic to share those sample files from common place
('servers' sample dir)
As microversion tests also need to share such logic, This commit
extends that logic to work for microversion tests also.
Partially implements blueprint test-collapse-v2-and-v21
Change-Id: I3448e1934585c2dabed6c45216ea0513db258b27
This patch move the all v2.1 api sample tests under
'functional/api_sample_tests'. Also move sample files under
'doc/api-samples'.
Co-Authored-By: Ed Leafe <ed@leafe.com>
Co-Authored-By: Alex Xu <hejie.xu@intel.com>
Partial-Bug: #1462901
Change-Id: I2b924f2ad7687a23a018a9b658e8acd9e04d7963