15 Commits

Author SHA1 Message Date
haixin
cea1f674ae Remove all usage of six library
Replace six with Python 3 style code.

Change-Id: I4b97e040f3e790ac114dcd43c68e6b67b1079adf
2021-03-04 16:03:35 +08:00
Rajat Dhasmana
8d0d0521c6 Add filters support for volume transfer
Currently ``id`` and ``volume_id`` filters are working
correctly for transfer-list command.
support for filtering by ``name`` is handled in patch
provided in Depends-On.
Since filtering by all parameters is supported by API,
we can happily add the filters option on the client for
volume transfers.

Also adds functional test for transfers.

Related-Bug: #1860100

Depends-On: https://review.opendev.org/#/c/703658/

Change-Id: I2fd3a6a7b9add65a9a21388df44efb6747065a74
2020-02-12 17:53:58 +00:00
TommyLike
afa10404bc [Optimize] Adds interval and increase waiting time
Gives more time to wait resource's status to change
in functional testcases and adds default interval
to reduce query amount.

Change-Id: I2a29a2d04836fd1261d45e404341bb1aa657417b
2017-06-16 10:27:35 +08:00
Gorka Eguileor
c022b73faf Fix pep8 errors
There are some PEP8 errors that are not caught by our gate because of
the pep8 package version installed by hacking.

This patch fixes E402, W503, and F999 erors from our codebase.

Change-Id: I0b86730b1493f161645a87c3daa91ec3d774d3b1
2017-03-15 13:42:49 +01:00
Ivan Kolodyazhny
35a434db70 Remove assertTableStruct from ClientTestBase
assertTableStruct is the same like in ClientTestBase, so we don't need
to duplicate the code.

Change-Id: I96c3bc450223d5f3f6f84c6313a0205cfb247514
2016-09-13 11:43:47 +03:00
liyuanzhen
426055c48e OS_TENANT_NAME is not required when we have OS_PROJECT_NAME
Cinder support both v2 and v3 auth. Use v3 if possible.
In consideration of backwards compatibility, when we have
OS_PROJECT_NAME, the v2 auth should be ok because
tenant_name can be set by env[OS_PROJECT_NAME].


Change-Id: I9eed9c41a9deb5ecafa8d9e12f6d1b50d34f986d
Closes-Bug: #1588261
2016-07-07 07:01:30 +00:00
wanghao
af91c23a45 Remove deprecated tempest_lib and use tempest.lib
Since 10.0.0 release tempest-ib is deprecated now.
Cinderclient should use tempest.lib in test code
and add tempest>=11.0.0 in requirements following
global-requirements.

Closes-Bug: #1583583
Change-Id: I9d766f46eb6fff29ae9c0267a60ff2ef4bf2343e
2016-05-20 21:13:07 +08:00
Kyrylo Romanenko
148e680fb3 Fix docstring according to function
Change-Id: I8cbe98ac2adfc00a482917a5bb8615662986441a
2016-03-09 16:51:46 +02:00
Yuriy Nesenenko
a17aa53f68 Remove duplicate code in functional tests
This patch allows to use a standard approach to volumes, snapshots
and backups to avoid duplicating code.

Change-Id: I0059fcb3bb8823105a7f960a30e70036bcbded8b
2015-10-07 20:12:11 +03:00
Yuriy Nesenenko
f805f5ac19 Add functional tests for python-cinderclient
Add functional tests for cinder volume snapshot creation and deletion.

Change-Id: I60f3a880102461f107a7f2d06c0b97f0bbe0c2e4
Partial-Implements: blueprint cinderclient-functional-tests
2015-08-25 15:15:20 +03:00
Yuriy Nesenenko
5e26906446 Add tests for python-cinderclient
Add tests for cinder volume creation and deletion
by ID and by Name.
Add test for cinder show volume output.
Add method to wait for given volume status.
Add method to check that volume deleted.
Add method to check that volume is not deleted (for negative cases).
Add method for volume deletion.
Add method to get Volume properties from CLI output.

Change-Id: I1e1f9bea2afc63e408a88e64fc1b6b6ee9f4e79b
Implements: partial blueprint cinderclient-functional-tests
Co-Authored-by: Kyrylo Romanenko <kromanenko@mirantis.com>
2015-08-11 13:14:04 +03:00
Jenkins
f2b94d48a8 Merge "Fix functional readonly_cli tests" 2015-06-02 17:32:29 +00:00
Anton Arefiev
d547d2779a Fix functional readonly_cli tests
Parser.listing method return empty list if env doesn't have resources,
so assertTableStruct works wrong, doesn't check field names in the
output table.

This change add new assert(assertTableHeaders) to check resource
attributes.

Change-Id: Ieca67b5cc2202467527c5a2dfbd7b2f2b4d5ad8d
Closes-Bug: #1458932
2015-05-26 19:22:32 +03:00
Adrien Vergé
dec3d08371 Fix functional tests and tox 2.0 errors
With the recent update to tox 2.0.x, environment variables such as
OS_AUTH_URL are not passed by default, resulting in tests errors
mentionning Keystone authentication failures.

This patch reads credentials from the 'functional_creds.conf' config
file, like it is done in novaclient (and soon in glanceclient and
neutronclient).

Reading credentials the old way (the environment) is still possible.

Change-Id: I2ec1df481aba7a3866fc8dbc912311de02c22d11
Related-Bug: #1455102
2015-05-18 15:09:58 +02:00
John Griffith
4c5e5e4bba Add CLI read-only functional tests
First pass at functional tests in cinderclient.  This patch
just takes some of the basic CLI tests from tempest and moves
them into the cinderclient functional tests.

These are read-only tests, and just do simple field checks
on the tables generated by the basic list commands.

Note: to run use "tox -efunctional", this requires that you
have a full cinderclient env and credentials are set. You may
be either running this locally (say in a devstack env) or
you may have a remote cloud handy that you can just source the
credentials for and run it that way.

Change-Id: I2f09a63be265d6a74cb103d80579068b9ab66bf4
2015-05-04 21:51:31 -06:00