Commit Graph

2204 Commits (cd147631f8254c2f727ccfc937566a7a200349f9)

Author SHA1 Message Date
Andrea Frittoli 986407ddd3 Move the object client to tempest.lib
Move the object client to tempest.lib and cleanup the last bits
of code that were required to manage internal-only tempest service
clients.

Change-Id: Ia9aeab78e530c798dfa7b7d6f71e4b3ea3a84b7f
6 years ago
ghanshyam f36476e65a Fix object_client methods to accept headers and query param
Many of the method of object_client accept many headers and
query param.
This commit makes them to accept all headers and query param.

Partially implements blueprint consistent-service-method-names

Change-Id: I80668c00a38db00958bbe54421e69798d54482d7
6 years ago
ghanshyam 88eadcf26d Remove wrapper methods from object_client
There are few methods in object_clients which are
wrapper on PUT API with different combination of
headers.

As object_client is going to be declared as lib interface
it is better to remove these wrapper.

NOTE: Those methods are not being used outside of Tempest.

Partially implements blueprint consistent-service-method-names

Change-Id: Ia70ef3913c1650fad7b8f6b9019378b074c88155
6 years ago
ghanshyam cddfdced59 Move object storage container_client to lib interface
object storage container_client is stable now and good to be moved
as stable library interface.

Unit tests will be next step for those clients which should
be ok after miving to lib.

Partially implements blueprint consistent-service-method-names

Change-Id: I74c6d62058e0dcf9284f313c6f45d83c20597fc4
6 years ago
ghanshyam eed4031a9e Fix create container method
Swift accept lot many headers in create container API but service
client method only accept the metadata headers.
This commit makes the PUT method to accept headers as kwargs.
Also this commit renames the PUT method to update_container because
that is PUT operation. In addition, this adds create_container as
the alias for the usability.

Details- https://developer.openstack.org/api-ref/object-store/#create-container

Partially implements blueprint consistent-service-method-names

Change-Id: I2a722bf181853ca903d05d4518b4c98764fadc12
6 years ago
ghanshyam 7351cbdc09 Fix create, update or delete container metadata method
Swift provides a single API to Create, Update or Delete
container metadata.
With different headers or values those operation can be
achieved. For example:
- delete metadata by passing metadata without value
- update metadata by passing updated value with same key

Details- https://developer.openstack.org/api-ref/object-store/?expanded=create-update-or-delete-container-metadata-detail

But current service client for account has 2 different
method for these operation. update_, delete_

To make it consistent with other service client and to have
single service client method per API, this patch merge those
methods.

Partially implements blueprint consistent-service-method-names

Change-Id: I75e40fc5c19d5b56d2be5f68e6cdb41bda4f9595
6 years ago
ghanshyam 871b1a837e Make list methods consistent for container client
Make the list methods naming and doc string consistent
for container clients.

Partially implements blueprint consistent-service-method-names

Change-Id: Ibc770eef75a74880231d18670478e6ec99c90d1f
6 years ago
ghanshyam b72cf49c87 Move object storage account_client to lib interface
object storage account_client is stable now and good to be moved
as stable library interface.

Partially implements blueprint consistent-service-method-names

Change-Id: I03863fbb23e914b4115f2c0aaec0ecf266ccc060
6 years ago
ghanshyam 97f6a843fc Move object storage capabilities_client to lib interface
object storage capabilities_client is stable now and good to be moved
as stable library interface.

Partially implements blueprint consistent-service-method-names

Change-Id: I06e874300a7b042ed09dc666aaeed578e814acf1
6 years ago
ghanshyam 5b7f6b9205 Move object storage bulk_middleware_client to lib interface
object storage bulk_middleware_client is stable now and good to be moved
as stable library interface.

Partially implements blueprint consistent-service-method-names

Change-Id: I6b44fb9a692b947baadbe049b2f7d31e4ab51035
6 years ago
Jenkins afc9f2d0bd Merge "Fix object storage capabilities client return value" 6 years ago
Jenkins 2a1271b924 Merge "Fix object storage bulk middleware client return value" 6 years ago
ghanshyam 17d8a483ea Fix object storage capabilities client return value
All service clients methods return their response wrapped in
ResponseBody, ResponseBodyData or ResponseBodyList.

But object storage service clients were left out of this
because response from object storage APIs are not same way other
service return. Some APIs return is as string etc.

This commit makes capabilities_client to return ResponseBody
object with consistency to other service clients.

Also add unit tests for that.

This is step to move these clients to lib.

Partially implements blueprint consistent-service-method-names

Change-Id: Ida85033c06a50011b2cd9a86941089fb1ea7bedd
6 years ago
ghanshyam 609298cce7 Fix object storage bulk middleware client return value
All service clients methods return their response wrapped in
ResponseBody, ResponseBodyData or ResponseBodyList.

But object storage service clients were left out of this
because response from object storage APIs are not same way other
service return. Some APIs return is as string etc.

This commit makes bulk_middleware_client to return ResponseBodyData
object with consistency to other service clients.

This is step to move these clients to lib.

Partially implements blueprint consistent-service-method-names

Change-Id: Iade0a1afd0e28ea42f12df175f55eadb1bea7071
6 years ago
chenxing e98720a22f Update the documention for doc migration
Change-Id: Ie6d322d1b9c93118af7c74986993010b9f4b76b2
6 years ago
ghanshyam 9604aa0247 Fix create, update or delete account metadata method
Swift provides a single API to Create, Update or Delete
account metadata.
With different headers or values those operation can be
achieved. For example:
- delete metadata by passing metadata without value
- update metadata by passing updated value with same key

Details- http://developer.openstack.org/api-ref/object-storage/?expanded=create-update-or-delete-account-metadata-detail

But current service client for account has 3 different
method for these operation. create_, delete_ and create_and_delete_

To make it consistent with other service client and to have
single service client method per API, this patch merge those
methods.

Partially implements blueprint consistent-service-method-names

Change-Id: I098e4ccc0d7b443d77ee055f39958e983acf7113
6 years ago
ghanshyam 3608544b6f Separate object-storage bulk operation service clients
Swift support bulk operation for upload archive file and bulk
delete. Service client methods for those API request are
present in account_client.py

This patch separate those methods in new client and use accordingly.

Partially implements blueprint consistent-service-method-names

Change-Id: Icceaf1bf4eddd2cf6501e76e52b54de2e105a165
6 years ago
Cindy Lu 0004b8fcf8 Swift list containers should test for reverse listing param
list_containers also takes in the param 'reverse'
we should have a test case for this
(http://docs.openstack.org/developer/swift/account.html

- s/matadata/metadata

Change-Id: I9bea26400ebfa7d2abc74371b39f793cbf8fe154
6 years ago
Jenkins 772d89b259 Merge "Port object_storage tests to Py3." 6 years ago
guo yunxian 7bbbec1ed9 Replace six.iteritems with dict.items
As [1] mentioned, we should use dict.items instead of six.iteritems.
Let's use dict.items as it should return iterators in PY3 as well.
(As for PY2, the performance about list should be negligible)

[1] https://wiki.openstack.org/wiki/Python3

Change-Id: I77b3a71faa71b5f671daff3415e2ae58289fd3ca
7 years ago
Jordan Pittier b84f2d409e Port object_storage tests to Py3.
Main changes:
* Use bytes instead of strings for object content (data)
* Use bytes when using crypto functions (hmac, md5)
* When we can't make the service client to always return strings
(because we can't know for sure the returned payload is a text),
use decode() in tests.

Change-Id: Ic56827e3401f36ccc555dd0568b606a8c3047f00
7 years ago
Martin Kopec 7dcd797745 Define v3 domains_client as library
Migrate identity v3 API domains_client to tempest.lib and implement
unit test for the service clients.
Init files are edited and the old ones in tempest/services/identity are removed
as this is the last identity client to migrate.

Partially implements blueprint consistent-service-method-names

Co-Authored-By: ghanshyam <ghanshyammann@gmail.com>
Change-Id: Ia3f5693156d6d9dff4f8b0b1986c5bc456af804a
7 years ago
Thiago Paiva 66cded2553 Removing baremetal tests from tempest tree
ironic project now has a tempest plugin and its tests will be maintained there.

Closes-Bug: #1614516
Depends-On: I0b7e32dfad2ed63f9dd4d7cad130da39bc869a8a
Change-Id: Id518a6d87d0949737cd1c50cb6a83149b85e5f85
7 years ago
Jenkins bc80debd90 Merge "Separate capabilities service method from account_client" 7 years ago
ghanshyam f29831d8dd Separate capabilities service method from account_client
list_extension() method in account_client is to lists
the activated capabilities of swift.

That is separate API than account service and should have
separate service client.
- http://developer.openstack.org/api-ref/object-storage/?expanded=list-activated-capabilities-detail
Partially implements blueprint consistent-service-method-names

Change-Id: I344c424020f9e10832040935fd0df43e596003c3
7 years ago
ghanshyam 8af17d65e4 Make identity v3 domains_client use **kwargs
As we discussed on
http://lists.openstack.org/pipermail/openstack-dev/2015-July/068864.html
All http POST/PUT methods need to contain **kwargs as their arguments.

This patch makes identity v3 domains_client use **kwargs.

Also add and correct doc string link.

Partially implements blueprint consistent-service-method-names

Change-Id: Ibe27a399e5b2774aae2c3585e2299616583c25f9
7 years ago
Benny Kopilov 37b2bee80e Remove old v3 volume services library and use lib/service for v3
Moving volume v3 folders to /lib/services/volumes
Remove old left overs from service/volumes.

The patch removes services/volume api code
Tempest volume api will run from /lib/service

Change-Id: I76fec9c42ecb7038f01a186f3eb51bb471b1679d
7 years ago
Rodrigo Duarte Sousa bd128d1b40 Move role_assignments_client to tempest lib
This patch adds unit tests for the role_assignments_client and also
moves it to the lib.

Additionally, the method is refactored to be generic and handle the
full set of the role_assignments API parameters.

Change-Id: I1452d4f7be927f87f180badee377afa116d55ed6
7 years ago
Jenkins 80095b9f09 Merge "Delete TimeoutException in tempest/exceptions.py" 7 years ago
guo yunxian ebb15f265e Delete TimeoutException in tempest/exceptions.py
Delete TimeoutException in tempest/exceptions.py because it repeats
in tempest/lib.exceptions.py

Change-Id: I4242d8156dcba7d8e893975de62c82547625afbc
7 years ago
lkuchlan 3fce7fb303 Remove services/volume/{v1,v2} directories
Since volume clients v1 and v2  have migrated under lib/services libery,
We do not neet these directories anymore.

Change-Id: Icbbce7622c9e0b8179c8311554d4401b9b68e369
7 years ago
Jenkins 17cca5850d Merge "delete list_all_container_objects in the container_client" 7 years ago
zheng yin 6736c2b4eb delete list_all_container_objects in the container_client
list_all_container_objects is not a real client method but more of an helper.
We can use list_container_contents replace it.  Therefore, I remove it.

Change-Id: I680868712461ab44c343b82fd007e6e9ea8d746b
Co-Authored-By: guo yunxian <yunxian.guo@easystack.cn>
7 years ago
Ken'ichi Ohmichi 17051e89b2 Remove unused arguments from _error_checker()
The arguments(method, url, headers and body) are not used in
_error_checker(). So this patch removes them for the cleanup.

Change-Id: I84e3be748af10b158037866e1ee4c1375b2c3541
7 years ago
lkuchlan f53947e7ca Move volume service clients under tempest.lib
Tempest provides a stable library interface and I think we can use it
for volume clients.

Partially implements blueprint consistent-service-method-names

Change-Id: Ia2d87360a6d88e5f54ecd00efbf6730b06484c99
7 years ago
Jenkins 80d8641847 Merge "Fix docstrings in Tempest REST client for Ironic" 7 years ago
Jordan Pittier 7efc155ae1 Remove Sahara tests from Tempest
I think now is a good time. It's been sitting here for ages. We
really should try to make Tempest smaller.

Change-Id: I3370a146042f23a5ba2ca40d2ddf76e7c9e9cf0f
7 years ago
Jenkins a8789c6140 Merge "Migrate backups clients to tempest.lib" 7 years ago
Kyrylo Romanenko a50ecab346 Fix docstrings in Tempest REST client for Ironic
Fix misprints in docstrings.

Change-Id: I8a681e362caca4e1096a5cb5f378452502528d9d
7 years ago
Jordan Pittier 3bdcf7ca8b Permission changes: Python file should be 0644 not 0775
I don't know how, but we ended up having a lot of Python files
with plain wrong permissions.

Change-Id: I22608e2bd39d8d2a4a267c5390bf0901866a5125
7 years ago
David Paterson 9eabc33da4 Migrate backups clients to tempest.lib
Split and migrate v1 and v2 backups__client to tempest.lib.

Partially implements blueprint consistent-service-method-names

Change-Id: I9d6ef9f069c449f392c245fdac10996517a1cc73
7 years ago
Jenkins 56c2997a52 Merge "Move wait_for_backup_status function to common.waiters" 7 years ago
Jenkins 4c9bf10339 Merge "Define v2 encryption_types_client as library" 7 years ago
Rodrigo Duarte 12f8d4a190 Add inherited role assignments tests
Inherited role assignments are really useful when dealing with
hierarchies - we must test that granting an inherited role in a higher
level of the hierarchy has effect in the project's tree.

The verification is done via the "role_assignments" API and its query
parameters, such as "effective" (which lists the role assignments that
take effect in each project layer).

Change-Id: I0f5a54d85a28c8c011fd3489cf55629b9caa1dcf
7 years ago
Jenkins 338c703380 Merge "Remove residual package" 7 years ago
lkuchlan 8f321d8b4a Move wait_for_backup_status function to common.waiters
Currently, wait_for_backup_status function resides on
services/volume/base/base_backups_client.py.
I think we should move it to common.waiters module as
other waiters functions.

Partially implements blueprint consistent-service-method-names

Change-Id: Ie1d416e32c583d8e48140c4046df989cc209b84f
7 years ago
guo yunxian 571aa574ea Remove residual package
Because we define clients as library before, this admin package's
all contents are moved to other places. This package is
unnecessary, so delete it.

Change-Id: I7b51cb20f51b6dc571fcfa8dd53efe1dbd1e6985
7 years ago
guo yunxian ea4f264335 Define v2 encryption_types_client as library
Migrate v2 API encryption_types_client to tempest.lib.

Partially implements blueprint consistent-service-method-names

Change-Id: Id3b41db66626cda2a50bf406fe4d6cff085c8dbf
7 years ago
David Paterson 16c4cf2eb2 Migrate V1 and V2 qos service to tempest lib
Split and migrate v1 and v2 API qos_client to tempest.lib.

Partially implements blueprint consistent-service-method-names
Change-Id: I14c3db7f1229a030a02f60f686826508afa01f61
7 years ago
Daniel Mellado 8ea47c2e09 Split base snapshots_client into v1 and v2
This patch splits the base client into v1 and v2 following the model
from the patch at [1] and also migrates those clients to tempest.lib.

[1] https://review.openstack.org/#/c/359442/

Change-Id: I03c254210aeff80173ced68cfa3f3e36ede10d22
7 years ago