This commit makes to use sequence directly instead of using
len(SEQUENCE). The original code works correctly, and it's really
straight forward. However, PEP8 recommends like below[1]. And it
makes code more simple, too.
```
For sequences, (strings, lists, tuples), use the fact that empty
sequences are false.
Yes: if not seq:
if seq:
No: if len(seq):
if not len(seq):
```
[1] https://www.python.org/dev/peps/pep-0008/#programming-recommendations
Change-Id: I8d41e16d82b1b3860a98e5217cb7a541fc83b907
I think it's a good idea to move all utility decorators into
tempest/lib/decorators.py. This patch does that for the `attr`
decorator.
Change-Id: Iaafbb112b6eee458089cc49918359a8a8d0485e2
This commit improves docstring examples. The original examples are
written in interactive mode style. However, I feel it's weird when it is
multiple lines, especially. So, this commit just removes '>>> ' and
updates some code block attributes.
Change-Id: I2f46042607c0f57d93634fbdffbb4400256a8489
I think it's a good idea to move all utility decorators into
tempest/lib/decorators.py. This patch does that for the `related_bug`
decorator.
Change-Id: I846d575e41f4dddfd5642b7750e988f75a717e7d
This is to remove leading underscore in _create_test_user,
and to generate some random values for the fields that
are not given, so create_test_user can be more widely
used to make code clean.
Change-Id: Iacb6c1390de3718694dc3a1bb5ec2012e4164b13
Rather than repeating the list of services twice, use the
one defined in get_service_list. Note that this removes
baremetal from the list of accepted services.
Change-Id: Ib5a9b33a54ef1064f5dc8f6206ddd1c7d218fc8e
This was a leftover from when paremetrs was replaced with
configuration from the registry. Anything that is not standard
configuration must be passed from CONF.
Change-Id: I78fc364d10a1e56285766c57d5ec4c90be28fb18
Config options v3_endpoint_type, v2_public_endpoint_type and
v2_admin_endpoint_type only allow dedicated values[1],
oslo.config 4.0 will check overridden value type by default[2],
so need remove invalid overridden values.
[1] 0d93900ba6/tempest/config.py (L145-L164)
[2] https://review.openstack.org/#/c/328692/
Closes-Bug: #1517839
Change-Id: I86cc9e53b86a69357254b68ba564df716a2284a5
The test_volume_list_with_detail_param_marker has been skipped
since Ic1c62311b32ed0c26b9aa085c64d4d44a1271840 The problem
is that the test assumed that the created volumes (in the test
setup) were ordered by ID.
This patch fixes the test by testing explicitely that all the
volumes ID we got in response to our list request have an ID
greater than a given/choosen marker.
Change-Id: Ie480a00abcb4c6be494aaa6afb2c061c2e0d4816
Closes-Bug: #1572765
client_parameters was been designed as a way to pass parameters
for service clients to the ServiceClients class.
After the initial implementation, the client registry was added,
which allows for automatic registration of all clients and their
parameters. If configuration is available, parameters will be
pushed into the registry automatically.
When the registry part was implemented, the client_parameters logic
has been broken. Parameters are loaded and prepared correctly, but
ultimately they are not used for registration, they are basically ignored.
So this commit simply deprecates client_parameters, so that once it's not
used in tempest/clients.py anymore and the deprecation periodic is over
it can be removed.
closes-bug: #1680915
Change-Id: Ib37bde098d15ce440297728f0d0e1087b8693b6c
This commit makes bash shebangs through /usr/bin/env. The originals work
correctly. However, it could be more flexible through /usr/bin/env. And
we already have a same thing in tools/tox_install.sh. So this commit
makes them consistent, too.
Change-Id: I35a6940cbd95c3b0f0d0f6391584b826e4de2ce5
Current compute baremetal tests involve ironic and nova. Ironic to
create baremetal node and then GET nodes using nova APIs.
Nova only provides GET APIs for baremetal nodes which has been deprecated.
This tests is testing Ironic node GET/POST etc which are covered on
ironic tempest plugin and nova API testing is covered in nova functional
tests.
It needs Ironic to be present and so ironic baremetal client.
With all points in consideration we should remove this tests from tempest.
It satisfy all rules as defined in tests removal procedure.
1. Nova functional test is enough for this API testing.
-http://git.openstack.org/cgit/openstack/nova/tree/nova/tests/functional/api_sample_tests/test_baremetal_nodes.py
2. gate does not run this test.
3. No external usage:
- http://codesearch.openstack.org/?q=test_list_get_baremetal_nodes&i=nope&files=&repos=
Change-Id: Ide9ca3a349f396c994f1c822c3d040d93547ad48
Closes-Bug: #1675416
This is to add name param in setup_test_role, only when
name is not specified then random name is generated, thus
setup_test_role can be more widely used to make the code
clean.
Change-Id: Ice8cf92cdbb7294f43cb880997cc5d51f6406f50
Api ref links in TransfersClient are broken, this is
to fix them.
No other broken links in current code.
Change-Id: I19be9d4afcb82b546cda093655d35c930f85c932
Don't use 'list' as a parameter name since this assert can be used
for any sequence or collection. Add docstring for both helpers.
Change-Id: I747507c3a5d0cf6f84915c8dd9222f4c082cbc04
This is to put api link in one line and fix some
broken api links.
This is the last patch before api-site making any
change of ref links.
Change-Id: I6fe6883f888bdb2678d29ab66b84aaf0f602b2fa
This commit fixes the top level header for the write_tests doc.
Previously, the doc title was set as the same as the section. This
caused things like table of contents to confuse the hierarchy of the
sections in the docs. This commit fixes that by setting the doc title
to be a higher lever in the hierarchy.
Change-Id: I2ecb110c766a71e1dc2d9e663ca38ece76dc327d
oslo.serialization and oslo.utils don't have any config options at all,
and `tempest init` command did output warning message when generating
tempest.conf. So this patch removes these entries from config-generator.
Closes-Bug: #1620861
Change-Id: Icad81bca5e3e3b69dee99fdac71174c149fd6df2