The 2.71 compute API includes the "server_groups" parameter
in the response to the following APIs:
- GET /servers/{server_id} (show)
- PUT /servers/{server_id} (update)
- POST /servers/{server_id}/action (rebuild)
This will be used in an upcoming change to test attaching
and detaching the root volume of a shelved offloaded instance.
Change-Id: I612a15c475404ded0af15b6241b9ac8ec9fb8e26
This adds the compute API response schema validation for the
2.70 microversion and the following APIs:
- GET /servers/{server_id}/os-volume_attachments (list)
- GET /servers/{server_id}/os-volume_attachments/{volume_id} (show)
- POST /servers/{server_id}/os-volume_attachments (attach)
This will be used in an upcoming change for testing root volume
attach/detach of a shelved offloaded server.
Since the response schema for these have not changed since 2.1 we
have to backfill all of the other servers API response schema
files going back to 2.1.
Change-Id: I2f36a51fa47b28df1afada5396dec3ce7dc43d78
This change introduces a true cinder host to host attached volume
migration test in addition to the existing attached volume retype test.
To enable this two new calls are introduced to the v3 volume client to
allow all volume backends to be listed per project and to also call for
a direct volume migration between backends.
Related-bug: #1803961
Depends-On: I1bdf3431bda2da98380e0dcaa9f952e6768ca3af
Change-Id: I501eb0cd5eb101b4dc553c2cdbc414693dd5b681
Previously only the volume type and timestamp data was checked when
retyping an attached volume. This change adds additional assertions to
ensure the volume state remains `in-use`, volume migration state is
`success` and the same `volume_id` remains attached to the instance
after the retype completes. This final check ensures that nova has
correctly called the os-migrate_volume_completion cinder API.
Related-bug: #1803961
Change-Id: I32f0611bdfd2ccede73e7ab774286f5315ff92c3
When I specified COMPUTE_MICROVERSION = 2.53,
the error message made me confused. It doesn't
tell me whether the type I set is int or a string,
so I recommend adding a type check.
Change-Id: I620c90f1652fa22bff2ffff9b84b1addc31285ff
APIMicroversionFixture is used to set the microversion on
service clients which will take care of reseting the microversion.
This interface has been added to set the microversion on all supported
service clients which use microverison. User can set multiple
service microversion all together.
Using the new interface in compute tests to make sure it is all
working in serial and parallel testing.
Change-Id: I6ed41b02041d38c2c92c58b0d3dd6613d03da3f7
This decorator can be used to temporarily mark some tests as unstable.
This may help sometimes to debug such test which is failing often
but not always in the gate because it will still be run but will
not cause all job failure when it fails.
This may be also used to easily track in logstash how often
such test is failing by looking for describption of unstability
reason set in decorator.
Change-Id: I79ce70f479506ec2b3216747d533ff2e450685aa
Related-Bug: #1813198
When importing unicode_literals from __future__ in tempest plugins as in
watcher, type is set as unicode instead of string when running in
python2, so the type is not properly detected. This is making that only
3 tests are detected as smoke in watcher tests plugins with python2 (other
may be affected) instead of 52 which are discovered as smoke with python3.
This patch uses six to make this compatible with both string and unicode
in python2.
Change-Id: Ibba9d8217f543fae0c232757ddb18c4fdf957aff
Co-Authored-By: yatin <ykarel@redhat.com>
autopep8 is an automated code formatting tool for python,
it does not know everything, also not super fast,
but it is faster than I can manually reformat the code.
tools/format.sh will call the formatting,
the tox will check did you called it.
Also adding a tox -eautopep8 way to use it.
autopep8 formats the lines in one way,
where tempest used a another way it was changed.
Change-Id: I6d51b14a5a5b87761071d0927fca23ba1651aa41
The primary goal is to be able to run all Tempest tests
and verify OpenStack when profiling is enabled. Also this patch
allows to:
* manually verify that certain services are properly instrumented
and produce trace events when a scenario is executed;
* write automatic tests for trace coverage;
* profile certain tests from performance perspective.
A new parameter is introduced into tempest.conf:
* profiler.key - the key used to enable OSProfiler (should
match the one configured in OpenStack services)
To test the patch on DevStack:
1. Enable osprofiler with Redis collector in local.conf:
enable_plugin osprofiler https://git.openstack.org/openstack/osprofiler master
OSPROFILER_COLLECTOR=redis
2. Run all Tempest tests or select some, e.g.:
tempest run --regex tempest.api.network.test_networks.NetworksTest.test_list_networks*
Change-Id: I64f30c36adbf7fb26609142f22d3e305ac9e82b5
There are cases where we want to conditionally apply an
attribute to a test function, for example, if SSH validation
is enabled then a test may run much slower than if it is not.
This adds a 'condition' kwarg to the attr() decorator which
behaves similarly to the 'condition' kwarg on the skip_because()
decorator.
Change-Id: I83233854a217b6961e7614d7d9df1b4fc8d5a640
oauthlib uses the request URI as input for generating an oauth
signature and matching it against the incoming oauth_signature request
attribute. tempest also uses the URI to generate this signature, which
means the URIs must match exactly.
If the keystone catalog contains an endpoint with a trailing slash, such
as https://keystone.example.org/v3/, then the URI that tempest uses for
the signature generation will be
https://keystone.example.org/v3//OS-OAUTH1/request_token. The incoming
request URI that oauthlib sees will not have the duplicate slash and so
the resulting signature will differ, and the auth request will be
rejected due to mismatching HMAC-SHA1 signatures.
This patch corrects the issue for deployments that use a trailing slash
in their keystone catalogs (which is valid) by normalizing the path
before generating the signature.
Change-Id: Ie827b1af7b23c6d6eaf2c2894cc2629d0e252108
The new 2.5.0 release of pycodestyle enforces E117
and is not managed by upper-constraints so we have
to fix the violations. Thankfully there are only a
few and they are fixed here.
Change-Id: Ic71eaf9b3552dfa6603632e556b102696c8d76e4
This commit removes warnings.simplefilter from
tempest.lib.services.clients code to suppress annoying ResourceWarning
like following.
ResourceWarning: unclosed file <_io.FileIO....
Change-Id: I9e96cfc062bbdaf73f8a4efb9af9dc581c96994f
Several docstrings have incorrect format, what prevents to generate
a documentation using sphinx-apidoc extension.
Change-Id: I66431c7030089173d7635c1e2a72765db21f9780
import_backup in backups_client.py has kwargs parameter,
but no api ref link for a full list of available parameters,
this is to add the link.
Change-Id: Ie30eb1ee76ee6521c5bdc9c8c3349a17ad6604b3
Some tests need to verify that the first response from an API is indeed
a redirect, this can not be done if the client automatically follows
redirects. Introduce a parameter that allows consumers to disable the
default behaviour, so that they can see the 301 response instead.
Change-Id: I366fa8d1971cd7502a1cd985f5ee6ad5e1ecb216
Closes-Bug: 1616892
This is to add response schema validation for volume
qos-specs.
Besides, there are some inconsistencies in volume qos-specs api ref,
Ib5c9b3a15ee2ca40c19e7a530d1ff5351d3dcaf8 will fix them.
Change-Id: I433c78821185600a230803cddec54a5d264c2ca5
partially-implements: blueprint volume-response-schema-validation
Add test to cover the request to "Show API v2 details"[0] action.
Add the show_version function to the NetworkVersionsClient class.
Modify the list_versions function of the NetworkVersionsClient class
to use the .get() function instead of the .raw_request() function
because using the .get() makes the function simplier and abstracts out
the logging and retrying a request for us.
Add the unit tests for the show_version function.
[0] https://developer.openstack.org/api-ref/network/v2/index.html#show-api-v2-details
Change-Id: I7ebea0c53437e929fc613495bcb8a8f8838c2044
The class variable 'create_resp' in v3 snapshots_client is not unnecessary,
and it can be substituted by constant string 202.
Change-Id: I983465f34b4130d4db39e2be82d33d54aec0d537