Commit Graph

251 Commits

Author SHA1 Message Date
Ghanshyam Mann fc1791f858 Retire tempest-lib in favor of tempest.lib
As of the 1.0.0 release tempest-lib as a separate
repository and project is deprecated. We moved all the
code to tempest.lib temepst version 10.

Hoping everyone is moved to tempest.lib now, We can retire
the tempest-lib. We discussed the same in PTG and agreed to
proceed on retirement
- https://etherpad.opendev.org/p/qa-zed-ptg

Needed-By: https://review.opendev.org/c/openstack/governance/+/836704

Change-Id: I37ceb96e084f569ea59e4849ca8770742ce17846
2022-04-05 23:41:14 +00:00
Andrea Frittoli (andreaf) 7d669295e0 Deprecation warning in tempest-lib
Add a depreaction warning to tempest-lib to let our users know
they should switch to tempest.lib if they want the latest and
greatest fixes and functionalities.

Partially implements bp tempest-lib-reintegration

Change-Id: I316f5b3c00d50345761b7678297b894730d968e5
2016-02-24 17:02:10 +00:00
Jenkins 6ad0ce42c2 Merge "Add update attached volume function to servers_client" 2016-02-12 21:31:39 +00:00
Jenkins 118f2c6a60 Merge "Fix project domain problem in v3 token client" 2016-02-12 20:48:24 +00:00
John Warren 6ddbb9e70d Fix project domain problem in v3 token client
The project domain (name or ID) is omitted in auth requests
when the project ID is specified. This change fixes the issue.

Change-Id: I3d970acd9b5c61ee3436689f940a5e92b10ae299
Closes-Bug: #1542655
2016-02-10 07:10:24 -05:00
Masayuki Igawa 0dd7a103be Add cli execute test case
This commit adds a unit test case of cli.base.execute(). Originally, the
failure test case asserts 'fail_ok=True' condition only. However, the
execute() raises an exception when 'fail_ok=False'(default). So we
should test the behavior in our unit test.

Change-Id: I0d1a0dd74ad0884475010bdc88b899c41b86998a
2016-02-10 11:27:35 +09:00
Takashi NATSUME c9c3b55333 Add update attached volume function to servers_client
os-volume_attachments API for update:
PUT /v2.1/{tenant_id}/servers/{server_id}/os-volume_attachments/{attachment_id}

tenant_id: The project ID (tenant ID) that the target server belongs to
server_id: The server ID to update the volume attachment
attachment_id: The volume attachment ID to update

Request body sample:
{
    "volumeAttachment": {
        "volumeId": "a26887c6-c47b-4654-abb5-dfadf7d3f805"
    }
}

volumeId: The volume ID to attach instead of the volume
          that has already been attached

This API does not return a response body.

Reference:
- Request body sample
  https://github.com/openstack/nova/blob/master/doc/api_samples/os-volumes/update-volume-req.json

- Fuctional test
  test_volume_attachment_update method in
  VolumeAttachmentsSample class
  https://github.com/openstack/nova/blob/master/nova/tests/functional/api_sample_tests/test_volumes.py

Change-Id: Ic0258e5688be6ede3316ab4310e9ca6ac0f51659
Implements: blueprint add-nova-swap-volume-tests
2016-02-05 14:23:03 +09:00
Jenkins 1abd727c11 Merge "Add bulk methods to network service clients" 2016-02-05 04:46:45 +00:00
Jenkins d67e16d5b7 Merge "Migrated 2 network clients from tempest" 2016-02-04 15:53:15 +00:00
Jenkins 58109c842e Merge "Minor spelling fix" 2016-02-04 15:50:33 +00:00
Jenkins ce625da05c Merge "Added __init__.py to tests/services/identity/" 2016-02-03 11:03:09 +00:00
Ken'ichi Ohmichi d598f35ad9 Add bulk methods to network service clients
The tempest network_client still contains some bulk methods, but
they should be implemented on each resource client.
This patch addes them into each client. After this patch and a new
tempest-lib release, we can remove these bulk methods from Tempest.

Partially implements blueprint consistent-service-method-names

Change-Id: Iea34620ae8785cc593d9c68bf3c31840f3e79bd7
2016-02-03 07:51:12 +00:00
Jenkins 57c1c6e276 Merge "Alter image json schema to allow for null name and size values" 2016-02-02 13:09:32 +00:00
Ken'ichi Ohmichi 0dc33c6651 Migrated 2 network clients from tempest
This migrates the above files from tempest.
This includes tempest commits:

 * security_group_rules_client.py: I2cd6bef13a16672bf0dbf6aeab0c60f0221e1a49
 * extensions_client.py          : I49b30eac4d7db0b06a3b0946158e542801cf4e75

to see the commit history for these files refer to the above Change-Ids
in the tempest repository.

Partially implements blueprint migrate-service-clients-to-tempest-lib

Change-Id: I76b1d0b1c3ffb2c366c4e6d95105d9c8fde2a22b
2016-02-02 11:43:23 +00:00
Jake Yip 8f721c9a15 Minor spelling fix
Change-Id: Iba06b3c515b77cfb95a9f9260bed46a1739c9dda
2016-02-01 16:11:18 +11:00
Jenkins 5e02b7844b Merge "Change attach_id to volume_id in show_volume_attachment" 2016-01-26 16:11:16 +00:00
John Warren 33e2b5a732 Alter image json schema to allow for null name and size values
Tests are failing due to images that have null name or size values
even though these are valid images that happen to have been created
outside of tempest.

The API spec indicates that both values can be null:

http://developer.openstack.org/api-ref-image-v2.html#listImages-v2

Change-Id: I015bc569ac4dde5d06b5418b98ff29537b7a4b1c
Closes-Bug: #1533730
2016-01-26 10:07:44 -05:00
Jenkins ef27fd2d10 Merge "Raise IdentityError if auth_url doesn't exist" 2016-01-26 14:55:03 +00:00
Matt Riedemann d5e4067268 Change attach_id to volume_id in show_volume_attachment
The id in the os-volume_attachments GET request is actually the
volume id [1] so rename the variable so people like me aren't
super confused when writing code with tempest-lib.

[1] http://tinyurl.com/hl2mcwb

Change-Id: Ie5454963ce931a7238e34737b638e171c69d0125
2016-01-26 13:25:21 +00:00
Ken'ichi Ohmichi 773b506a64 Migrated 2 network clients from tempest
This migrates the above files from tempest.
This includes tempest commits:

 * agents_client.py     : I505fa196c574027692497848d235781d903cb9f6
 * subnetpools_client.py: I405a896b4da0c5cb5bc87622d07498c06932f406

to see the commit history for these files refer to the above Change-Ids
in the tempest repository.

Partially implements blueprint migrate-service-clients-to-tempest-lib

Change-Id: I97b67e2385452db6ef59bc4b8c63c211ca119bc2
2016-01-26 02:10:42 +00:00
Adrien Cunin 4725111e18 Raise IdentityError if auth_url doesn't exist
Otherwise a TypeError, not understandable for the user, is raised. This
happens for example when using tempest account-generator with no
identity uri defined in the config file.

Also added unit tests for this specific case.

Change-Id: Ia8d523f973240300e0010b9b28f5ee63b2b84341
2016-01-25 10:47:01 +01:00
Adrien Cunin 7c42ae0dad Added __init__.py to tests/services/identity/
This is necessary for the tests to actually be run.

Also use sort_keys=True for json.dumps() in both the auth() methods and the
unit tests that compare the expected and actual request bodies. Otherwise
the order of the keys is unpredictable and the tests fail randomly.

Change-Id: Ieb27be22367b419326939c4261388286e6c996c4
2016-01-25 09:53:53 +01:00
Ghanshyam 57e4d853e5 Migrate the skip_unless_attr decorator from tempest
This commit migrates the skip_unless_attr from tempest to
tempest-lib.

Change-Id: I6a1e7a411a4b27fa0f9bd533276d5cb4d4759976
2016-01-20 16:34:40 +09:00
Jenkins f4b5b12aaf Merge "Retry ssh connect when EOFError received" 2016-01-12 11:23:41 +00:00
Jenkins 3f49a48090 Merge "Migrated quotas_client and security_groups_client" 2016-01-08 06:05:21 +00:00
Jenkins 01370766a9 Merge "Prevent StopIteration exception during parse response" 2016-01-07 17:59:26 +00:00
Ken'ichi Ohmichi 85f7081d9d Migrated quotas_client and security_groups_client
This migrates the above files from tempest.
This includes tempest commits:

 * quotas_client.py         : I8087a7bf5e130778df9629065a8bfda8018fdbe0
 * security_groups_client.py: I88a43f44346671de5dfb759d07c4086cffa8d4d9

to see the commit history for these files refer to the above Change-Ids
in the tempest repository.

NOTE: reset_quotas() of quotas_client is different from the method
      naming rule, but is is the same as the api-site. So it is fine
      now.

Partially implements blueprint migrate-service-clients-to-tempest-lib

Change-Id: I559c7ec29d6cc85060d59b8b7714a669a277f217
2016-01-06 01:37:37 +00:00
zhangguoqing 771402f2e9 Change LOG.warn to LOG.warning
Python 3 deprecated the logger.warn method, see:
https://docs.python.org/3/library/logging.html#logging.warning
so we prefer to use warning to avoid DeprecationWarning.

Change-Id: I912333466ac65aa3ad06732f3a16e7130b21e282
Closes-Bug: #1530742
2016-01-04 06:01:28 +00:00
Jenkins a63ba0d587 Merge "Keep py3.X compatibility for urllib" 2016-01-04 02:01:59 +00:00
Victor Ryzhenkin 6910813552 Prevent StopIteration exception during parse response
- Parse response body only if there is one top-level element
in JSON object because if there is nullable JSON in response body
six will throw us an StopIteration exception from six.next

Closes-Bug: #1529144

Change-Id: Iea2d0950b25cb8f576ca7e15383a205e04d7c9e3
2015-12-24 21:45:11 +03:00
Jenkins 62d0411064 Merge "Migrated 6 network clients from tempest" 2015-12-24 18:21:21 +00:00
Swapnil Kulkarni (coolsvap) ed0f122915 Keep py3.X compatibility for urllib
Change-Id: I7bfe6e685a71bde7fc079d95af895e20a8c9c088
Partial-Bug:#1280105
2015-12-24 12:20:42 +05:30
Ken'ichi Ohmichi 815c89a44d Migrated 6 network clients from tempest
This migrates the above files from tempest.
This includes tempest commits:

 * base.py                       : Icf9f6fa4ea52a1fe72253391abf4880b1f8ed497
 * floating_ips_client.py        : Iaeabf6cb827e4153d72353dab6d1d66f0f246eb6
 * metering_label_rules_client.py: Iddecde5f6f5c1ac88a18d71aab1fc26370b26ba8
 * metering_labels_client.py     : I3364fc9320640b875f5232c2ae5a4ae98121d821
 * networks_client.py            : Iff82c07bae2b1c82e5ff914ca90fcf5fc7de8daa
 * ports_client.py               : I1248cc6132f4a2e40ad13f6177c7ecda834db57d
 * subnets_client.py             : I52c9d099b97540440fa98343c736b894d130a07e

to see the commit history for these files refer to the above Change-Ids
in the tempest repository.

Partially implements blueprint migrate-service-clients-to-tempest-lib

Change-Id: Ic840c3697f727612dfe754948e9a5890e7f2505d
2015-12-17 00:38:20 +00:00
Ken'ichi Ohmichi 963f4943d6 Migrated servers_client.py from tempest
This migrates the above files from tempest.
This includes tempest commits:

 * servers_client.py     : I7174723f907fd8962d9d12fe76bec2dc06883938
 * servers.py            : I10a8c32b53f15063dab087d67123598800b141a0
 * test_servers_client.py: I7174723f907fd8962d9d12fe76bec2dc06883938

to see the commit history for these files refer to the above Change-Ids
in the tempest repository.

Partially implements blueprint migrate-service-clients-to-tempest-lib

Change-Id: I9234f063a72bd58100bfffd3db38718a257ce6ea
2015-12-16 23:41:59 +00:00
Ken'ichi Ohmichi b69368ad74 Migrated floating_ips_client.py from tempest
This migrates the above files from tempest.
This includes tempest commits:

 * floating_ips_client.py:      Ib7886438228f31142dd23d9ca3205e7d2b434c92
 * test_floating_ips_client.py: Ibbb6439d31f5379bcb5e92e8bf49bcab9ad51a0f

to see the commit history for these files refer to the above Change-Ids
in the tempest repository.

Partially implements blueprint migrate-service-clients-to-tempest-lib

Change-Id: Ide46dfbd437707c376bb44f86c99a87b739b9ef0
2015-12-08 01:20:47 +00:00
Ken'ichi Ohmichi 3201673322 Fix the links to api-site doc
The api-site doc contained invalid links which were duplicated in the
doc. We did put TODOs for fixing the links after the api-site changes.
Now these links have been fixed on the api-site, so this patch fixes
them in tempest-lib.

Change-Id: I8bbfc2933d5400b8ae35331bc63f128421486d02
2015-12-06 05:18:46 +00:00
Jenkins 4ef50e2c90 Merge "Remove get_server_group()" 2015-12-03 15:13:35 +00:00
Ken'ichi Ohmichi f68477508c Remove get_server_group()
server_groups_client is not released yet on the latest temepst-lib
(v0.11.0), so we can remove get_server_group() because nobody uses
this method.

Change-Id: Ibc63c797fa72ac265ca72a0786071c458531b87d
2015-12-03 05:36:58 +00:00
Ken'ichi Ohmichi 2921aab783 Add docstring for create/update methods([h-q]*)
As we discussed on
http://lists.openstack.org/pipermail/openstack-dev/2015-July/068864.html
we need to write docstring for http POST/PUT methods.
This patch adds docstring for create/update methods of compute client
[h-q]*. In addition, this patch fixes some inconsistencies like "Creates"
is changed to "Create".

Change-Id: I7c96053f0389b31b6321f0290a210a132862c90e
2015-12-03 00:09:59 +00:00
Ken'ichi Ohmichi f3af1ab54a Add docstring for create/update methods([a-f]*)
As we discussed on
http://lists.openstack.org/pipermail/openstack-dev/2015-July/068864.html
we need to write docstring for http POST/PUT methods.
This patch adds docstring for create/update methods of compute client
[a-f]*. In addition, this patch fixes some inconsistencies like "Creates"
is changed to "Create".

Change-Id: Ibb395364ee60c3a72daecb2b65d6525d19f28e7d
2015-12-02 23:58:50 +00:00
Ken'ichi Ohmichi 66a44f95c4 Add docstring for create/update methods([s-v]*)
As we discussed on
http://lists.openstack.org/pipermail/openstack-dev/2015-July/068864.html
we need to write docstring for http POST/PUT methods.
This patch adds docstring for create/update methods of compute client
[s-v]*. In addition, this patch fixes some inconsistencies like "Creates"
is changed to "Create".

Change-Id: I48917b6ddd40f1b959f2a1e1f2c6306524aeec99
2015-12-02 23:58:44 +00:00
Jenkins ca166499b5 Merge "Fix fixed_ip schema and service client" 2015-12-02 23:35:24 +00:00
Jenkins dc7a5ce865 Merge "Allow passing --insecure to python client binaries" 2015-12-01 16:04:48 +00:00
Jenkins 47385a425b Merge "Add 410 error code handling to REST client" 2015-11-26 06:55:58 +00:00
Jenkins a667145471 Merge "Rename get_server_group to show_server_group" 2015-11-24 03:12:38 +00:00
ghanshyam 2a6da4a5cd Fix fixed_ip schema and service client
There are two issues in fixed_ip schema and client.
1. Schema expect string in response body-
   Nova had bug#1356058 for response of reserve/unreserve fixed ip APIs,
   where plain text ("202 Accepted The request is accepted for processing.")
   was returned in response body.
   It is fixed on Nova side - Ifca3081f573407808a2196e71ac1db87180db6ec

2. Return value of reserve_fixed_ip client method-
    In Fixed ip service client, reserve_fixed_ip method does not
    return the response body.
    As per consistency in service client interfaces, this method should
    return the response value even that is empty body.

Those were fixed in Tempest but did not get sync in lib.
-I098ee0d1fa3056f8cfb0654e2b8fd3bf75fb3e2c
-I2cb1ef8dacd1994576656cfb108dd2eef2fbd988

Change-Id: I27b8d2165188ee069f5d8d22c0426f2c748f80c8
2015-11-24 11:49:12 +09:00
Jenkins 137cfd783b Merge "python3: converts binary data from channel" 2015-11-24 02:48:42 +00:00
Ken'ichi Ohmichi 54d25c9615 Rename get_server_group to show_server_group
[GET /resources] methods should be "list_<resource name>s"
or "show_<resource name>", so this patch applies the rule
to server_group client.

This patch makes tempest-lib sync for the commit of Tempest
I75307176c2f032301da6227249070c42af54dd6e, but get_server_group has
been released in tempest-lib 1.0.0 already.
So it is difficult to remove it directly for backwards compatibility
and this patch adds warning message for clarifying deprecated method.

Partially implements blueprint consistent-service-method-names

Change-Id: I9e321aaf4791e8ff11e3aa114b41eb612db481ca
2015-11-19 11:40:52 +00:00
Jenkins a6d6933ebf Merge "Support service client unit tests for headers also." 2015-11-17 23:40:49 +00:00
Vincent Untz 2fef45e301 Allow passing --insecure to python client binaries
This is needed when running tests against a deployment with insecure
SSL.

Change-Id: I837fd3107484aa50383f581553651a02e2e413aa
2015-11-17 09:28:14 +01:00