13545 Commits

Author SHA1 Message Date
zhufl
d89c6cb4a0 Fix flavor swap default value for compute microversion 2.75
As of microversion 2.75 default return value of swap in the response of
create_flavor is 0 instead of empty string, so this is to fix
test_create_list_flavor_without_extra_data for microversion 2.75.

https://docs.openstack.org/api-ref/compute/?expanded=create-flavor-detail#create-flavor

Change-Id: Ib086f9977f838cf884c7324b7b6eead698adaa9e
2020-06-05 16:32:41 +08:00
zhufl
3cb4772db4 Add response schema validation for volumes
This is to add response schema validation for volumes.

NOTE: upload_volume schema is under discussion, so will be merged
in a seperate patch.
https://bugs.launchpad.net/cinder/+bug/1880566

Change-Id: I0613c36e9cc512a1aba1f7952ffbc7447b05198b
partially-implements: blueprint volume-response-schema-validation
2020-06-05 10:27:31 +08:00
zhufl
cf96636cfa Fix test_list_flavors for compute microversion 2.55
Description field is added to the response of list_flavors in
compute microversion 2.55, so we should add description to flavor_min_detail
when microversion is greater than 2.54.

Change-Id: I0f18994344f6a16f7e0942928093beda31dc9e0a
2020-06-04 17:14:18 +08:00
Piotr Kopec
fc7dd52a79 [compute] Blacklist test_create_second_image due to race
The test_create_second_image_when_first_image_is_being_saved
introduces race and might if the first image was created quickly.
Blacklisting this for now untli we decide what to do with this next.

Change-Id: I15df606fd163c75bf265d406771e4e946a1d38b9
Closes-Bug: #1881592
2020-06-03 16:00:07 +02:00
Rodolfo Alonso Hernandez
c1449d4ff2 Remove any reference to "tenant_id" in network
Change-Id: I43789e243581aa176c11d6a85691f36acfa55b27
Partially-Implements: blueprint adopt-oslo-versioned-objects-for-db
2020-06-02 08:28:47 +00:00
Zuul
257f3b009f Merge "Move ceph job to voting" 2020-05-30 16:14:20 +00:00
Zuul
df5eef915b Merge "Use unittest.mock instead of third party mock" 2020-05-30 15:46:02 +00:00
zhurong
1f4bf49330 Allow snapshot name with null
According to cinder api schema [0],
snapshot name is allow null and minLength 0.

[0]:https://github.com/openstack/cinder/blob/master/cinder/api/schemas/snapshots.py#L29

Change-Id: I0d9e07fb1249d3daaed95520a8c771c083f5d54b
2020-05-29 16:00:37 +08:00
zhufl
a0e87dc582 Adding description for testcases - compute part3
When Tempest is used in customer site, often we are required to
provide a testcase list including testcase names and descriptions.
Now no this kind of doc is available, so we can add descriptions
with the format of doc string for every testcase, so later we
can generata such a testcase description list.

There are hundreds of testcases missing descriptions, so we can
add them gradually, and limit the modified files in one patch
for the convenience of reviewing.

Change-Id: I3726f5df4afd23366a5a34de9c9da8b69287d30e
partially-implements: blueprint testcase-description
2020-05-29 07:53:33 +08:00
Zuul
232744fcc2 Merge "Fix check_floating_ip_status utility's output" 2020-05-28 14:39:09 +00:00
Zuul
17bf0e1d3b Merge "Sort roles in keystone token" 2020-05-28 00:51:36 +00:00
Zuul
d70a1ae68e Merge "compute: Fix boot from volume stable rescue tests" 2020-05-27 15:45:54 +00:00
zhufl
7454db5d4c Add response schema validation for show_default_group_type
This is to add response schema validation for show_default_group_type.

Change-Id: Iaed564689588b1a4fe0a9118e9de330ec0a63e61
partially-implements: blueprint volume-response-schema-validation
2020-05-27 15:04:45 +08:00
zhufl
da8d258491 Add response schema validation for volume groups
This is to add response schema validation for volume groups.

Change-Id: Ibc4c59f63e56ec6ea6f9a850d2340d8c91775532
partially-implements: blueprint volume-response-schema-validation
2020-05-27 12:56:50 +08:00
zhufl
9f0c59aed5 Add response schema validation for volume group snapshots
This is to add response schema validation for volume group snapshots

Change-Id: I5708d4c41bc948178d4bfdc147216656875bbe15
partially-implements: blueprint volume-response-schema-validation
2020-05-27 10:09:34 +08:00
Zuul
3c272360d4 Merge "Add image "version" metadata in test_snapshot_pattern" 2020-05-26 23:23:06 +00:00
Hervé Beraud
eee87b504c Cap jsonschema 3.2.0 as the minimal version
Previous versions of jsonschema (<3.2.0) doesn't support python 3.8 [1].
Python 3.8 is part of the victoria supported runtimes [2] so we now force
to use jsonschema version 3.2.0 to avoid issues, remove ambiguity and ensure
that everything works with python 3 in general.

[1] https://github.com/Julian/jsonschema/pull/627
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: Id2c662c0d6146423855714a0f240eed682e3c004
2020-05-26 22:14:02 +02:00
Zuul
a9ef5dbc73 Merge "Add response schema validation for volume pools" 2020-05-26 15:13:34 +00:00
Zuul
c1c070832b Merge "Add response schema validation for volume snapshots" 2020-05-26 15:13:31 +00:00
Sam
706723954d Sort roles in keystone token
Closes-bug: 1879359
https://bugs.launchpad.net/tempest/+bug/1879359

Sorts the roles in the scoped tokens so that the
test case does not fail

Change-Id: Iac94eab78035a9b0f3926bd7da237ae4f5fb68d8
2020-05-26 13:32:55 +00:00
Zuul
ad25f2577b Merge "[Trivial]Do not use self in class method" 2020-05-25 04:59:34 +00:00
Archit Modi
2c8e8ae0e5 Add image "version" metadata in test_snapshot_pattern
Add image "version" metadata to the snapshot image in
test_snapshot_pattern as shown in the related bug. Creating
another test just to update the metadata is not worth it.

Change-Id: I2f1093616dc7c4268a0bda5a4854da23423f4cab
Related-Bug: #1717547
2020-05-22 16:53:48 +00:00
Zuul
d145194f52 Merge "Change bytes to str in servers_client for python3" 2020-05-22 11:41:10 +00:00
zhufl
05fc4f72b6 Adding description for testcases - network part2
When Tempest is used in customer site, often we are required to
provide a testcase list including testcase names and descriptions.
Now no this kind of doc is available, so we can add descriptions
with the format of doc string for every testcase, so later we
can generata such a testcase description list.

There are hundreds of testcases missing descriptions, so we can
add them gradually, and limit the modified files in one patch
for the convenience of reviewing.

Change-Id: I38e445ae3a2b4b3c1bd909becf17504b42636c82
partially-implements: blueprint testcase-description
2020-05-22 13:39:16 +08:00
Zuul
f004447315 Merge "Add explicit external network for test_create_router_set_gateway_with_fixed_ip" 2020-05-21 12:57:43 +00:00
Zuul
b352e742d5 Merge "Adding description for testcases - image part2" 2020-05-21 11:22:27 +00:00
zhufl
adb162024d Add response schema validation for volume snapshots
This is to add response schema validation for volume snapshots.

Change-Id: I7de5569ed58fb6a3bf8115f89163cd951c19d951
partially-implements: blueprint volume-response-schema-validation
2020-05-21 09:42:49 +00:00
zhufl
126e996f0e Add response schema validation for volume pools
This is to add response schema validation for volume pools.
Besides, free_capacity and total_capacity in "List all back-end
storage pools" should be free_capacity_gb and total_capacity_gb,
Ic0690d12147fa63b903f3442eccde88c1d501711 will fix them.

Change-Id: I8ae2cd178b91756bb488c02a1a2fcdf64f572155
partially-implements: blueprint volume-response-schema-validation
2020-05-21 06:04:39 +00:00
zhufl
40e5eaa084 [Trivial]Do not use self in class method
This is to use cls in class method, instead of self.

Change-Id: I8db94bd689c7afe6b9aacd0ca4c5a62ad463e16e
2020-05-21 12:54:16 +08:00
Zuul
b19649ab0e Merge "Add response schema validation for encryption types" 2020-05-21 04:53:52 +00:00
Zuul
385873e65d Merge "Add response schema validation for volume group types" 2020-05-20 18:28:31 +00:00
Zuul
284a3a00cf Merge "Add response schema validation for volume limits" 2020-05-20 18:28:28 +00:00
Zuul
9d716814f4 Merge "Add migration uuid API schema validation for 2.59" 2020-05-20 18:28:20 +00:00
zhufl
19a487e5d4 Add response schema validation for volume group types
This is to add response schema validation for volume group
types.

Change-Id: I81c6cfd854507cdd295c1356370d73c1a4f0712c
partially-implements: blueprint volume-response-schema-validation
2020-05-19 09:28:57 +00:00
zhufl
e973452ce0 Add response schema validation for encryption types
This is to add response schema validation for encryption types.

Change-Id: Ic8e1dddd4a7e7bc57cc2959f1a7991dd4be22194
partially-implements: blueprint volume-response-schema-validation
2020-05-19 07:32:04 +00:00
Andreas Jaeger
0fbce17220 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.0 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* parallelizing building of documents

Update Sphinx version as well.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

Set openstackdocs_pdf_link to link to PDF file.

Depends-On: https://review.opendev.org/728938
Change-Id: Ia31f69f00eb24771bf700b4e25ae73a09c1c8aed
2020-05-18 19:34:29 +02:00
Sean McGinnis
eed8074e64 Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: If1de2f48da1fd6ed3f96c98b8dce9eace4f8095d
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-05-17 17:22:58 +00:00
Lee Yarwood
2fd745f97e compute: Fix boot from volume stable rescue tests
The initial set of tests would incorrectly attempt to use a volume based
snapshot image as the rescue image. Such images contain no actual image
data and are just used to store metadata such as the
block_device_mapping that is in turn used when creating new instances
from the backing volume snapshots.

This wasn't initially noticed as the tests pass on the default file
based imagebackend in Nova that allows zero length sparse files to be
created. This failed however when the rbd imagebackend was used as the
import process into rbd does not accept zero sized files to be used.

To correct this an image based instance is now always created and used
to generate a suitable rescue image with each test. An additional
instance is then also created for the boot from volume based tests to
ensure the correct mapping is used.

The boot from volume snapshot test is also removed and the remaining
boot from volume tests are marked as slow given the additional overhead
of creating a second instance using these tests.

Change-Id: I7356b54bef0c614d9bfd1ed0d7b42574b58966f9
Closes-Bug: #1876330
2020-05-15 16:39:42 +01:00
Paras Babbar
7ac89c977b Add explicit external network for test_create_router_set_gateway_with_fixed_ip
This avoid neutron error that IP address x.x.x.x already
allocated in subnet as the public network from tempest.conf
is shared amongs multiple test cases which may ask for ip
address in parallel to this test case execution and might end
up in race condition.

Note:Interop/Any other user doesn't use this test location
so we should be good to move the location

Change-Id: Ibf5ad52062b3719899a123a799f5f4f8e961f609
Closes-bug: #1676207
Logs: https://bugs.launchpad.net/tempest/+bug/1676207/comments/13
2020-05-14 13:51:47 -04:00
James Parker
4bbe5b58ec Add migration uuid API schema validation for 2.59
Microversion 2.59 [1] compute API added a "uuid" parameter to the body of
the following migration responses:

- GET /os-migrations
- GET /servers/{server_id}/migrations/{migration_id}
- GET /servers/{server_id}/migrations

This commit adds the uuid to the response validation schema for
list_migrations.

[1] https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id55

Change-Id: Ic748f70d90446c79324df30147e4a270b72d710e
2020-05-14 10:21:26 -04:00
Zuul
0c71fc29a1 Merge "test_server_rescue.py should use CONF.volume.volume_size" 2020-05-14 12:33:41 +00:00
Martin Kopec
f4b5df6d1d Fix check_floating_ip_status utility's output
floating_ip variable contains an old state of the floating ip - the state
which was correct before calling refresh method. In order to have the
latest floating ip data after calling refresh, the patch creates a class
as a wrapper around the refreshing ip's state and logging it.

Closes-Bug: 1788416
Change-Id: I83ca08ef77c243762210837bad800ce0c4d09fb5
2020-05-14 07:34:00 +00:00
Zuul
e67ebd83d9 Merge "Use new encryption provider constants (reprise)" 2020-05-14 04:56:18 +00:00
Zuul
714a92f0c3 Merge "Modify the fake data" 2020-05-14 03:00:19 +00:00
Zuul
7ad6abd520 Merge "Adding description for testcases - image part1" 2020-05-14 01:28:08 +00:00
Rodolfo Alonso Hernandez
15d63094c6 Prevent raising exception if IP address is set in _hotplug_server
In "_hotplug_server", when the new interfaces is added to the server,
the function tries to configure the Neutron assigned IP address in
this new interface. Although the IP addresses are listed before to
check that the new port IP is not present, as reported in the bug,
sometimes the address is already set when the "ip a add" command is
executed.

Change-Id: I9594482735b482eb477f342dfd9f265a41eb002d
Closes-Bug: #1869899
2020-05-13 15:03:33 +00:00
Ghanshyam Mann
8d1974efa5 Bump hacking min version to 3.0.1
hacking 3.0.1 fix the pinning of flake8 to avoid bringing in a new
version with new checks.

bumping the min version for hacking so that any older hacking versions
which auto adopt the new checks are not used.

The 2.6.0 version introduces some checks that cause failures
with the current code. hacking and flake8 cap could have solve
the pycodestyle compatible version but flake8-import-order which
does not cap the pycodestyle pulled its latest version and break
things.

Change-Id: I8996fec39e9b7c411b2708eb8baeb50aa2c28d42
2020-05-13 03:06:16 +00:00
Martin Kopec
abda8712a4 test_server_rescue.py should use CONF.volume.volume_size
test_server_rescue.py contains hard-coded volume_size value without
any option to override it. The tests should use CONF.volume.volume_size.

Closes-Bug: 1877259
Change-Id: Id502dfa06547023229ae2e6f9426eeb99da7dd89
2020-05-11 15:33:00 +00:00
Zuul
006e8d175e Merge "Switch testing to Victoria testing runtime" 2020-05-11 02:04:23 +00:00
Martin Kopec
a857880423 Improve logging in tempest cleanup
* add additional handler so that INFO messages are printed to stdout
  besided tempest.log
* replace print commands by LOG.info calls
* when --debug argument used print DEBUG messages to stdout
* add additional debug messages to improve transparency of the cleanup
  execution
* use --debug argument within tempest-cleanup ansible role to see more
  details directly in the output

Change-Id: Iee72dc411fdf5cda8a8eed8dd7f349e0866648ab
2020-05-07 05:54:48 +00:00