This removes the facility in the API router to have limited lists of
extensions. From this point forward, what is in Nova is loaded, no
exceptions.
A number of unit tests and fakes have to be updated to pass after
this, as many unit tests were sending small lists of extensions to the
API router to simplify the responses they were getting back. This also
required stubbing out the request db cache in some cases, because
extensions later get content from there to avoid additional db
hits. As well as adjusting a few samples tests which now return more
data because all the extensions are always loaded.
There is much cleanup to happen after this, but this is the smallest
unit to get us over this boundary which will start letting us to
refold extensions back into the base views (and massively simplify the
API code).
This does not yet remove the config options because there is another
place those get used in servers.py and the testing fallout of that is
much bigger.
The reno will come with that patch.
Change-Id: I3e72f5e23ce39148f31dfdb76d18f403c6d04842
When we put validation into the project_id in urls we had to expand
the default set of allowed values to include 'openstack' and
'fake'. This cleans up all the instances of 'openstack' in the
functional tests, and api samples, and instead uses a constant string
which looks like a real project_id.
We need a stable project_id and not a sentinel otherwise the samples
will be arbitrarily changes on every update.
Change-Id: I1099fd43d2374abd1658b0917765d5375c4b8d1d
While the API allows for strings which happen to end in an ID for
flavorRef/imageRef, the common path is really just the ID itself, and
we should have the samples do this. The use of full urls in our
samples makes it seem like this is more meaningful than it really is,
and that you could pass a url to a remote system, for instance, which
won't work at all.
Change-Id: I669619b627f954232712d54498b3744353d25451
nova-cert is only needed for 1 API resource (os-certificates) and the
ec2 api. We don't need to run it on all the other functional
tests. Getting rid of a service start / stop on all of them shaves a
little time off each test, and means noise in logs.
Change-Id: I175b8913fe5d19c8b552c60c793565c042c6b874
Instead of having cells service started for every api samples test,
whether or not it is used, only start it on test_cells. This saves
some setup / teardown time, and makes things a bit more explicit.
It also removes the cells service from service listing for a couple of
api samples (az and hosts). That's more indicative of what people will
see in real systems as cells is still a minority and experimental
deploy option.
Change-Id: Ie6d7e8978fd2b3441a141c69d4191266d76e7327
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
Currently v2 and v2.1 have separate functional tests and their
corresponding sample files. As v2 and v2.1 are supposed to be identical,
there is overhead to maintain two set of functional tests and sample files.
We can have one set of tests which can run for both v2 and v2.1.
This commit merges availability_zone functional tests.
In V2.1 os-access-ip is separate plugin where in v2 it was mixed in server
plugin itself. So os-access-ip extension is enabled to run
merged functional tests for both v2 and v2.1.
Also enabling some required extension for v2 tests.
Change-Id: I82e7011da212cb4699c4c19b95523a54a6c2f259
In I5a580fc323c3809790b4a68a9f8f8129ecdc2cf0 we switched off XML support. In
this review we entirely remove all the testcases and supporting files.
Change-Id: I83827d438753fd3899053dd6e09bc77c997c7406