summaryrefslogtreecommitdiff
path: root/tempest/api/compute/admin/test_servers.py
Commit message (Collapse)AuthorAgeFilesLines
* Add compute response schema for microversion 2.75Ghanshyam Mann2022-03-051-0/+29
| | | | | | | | | | Compute microversion 2.75 made the rebuild and update server response same as get servers - https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id68 Partially Implements: blueprint fix-microversion-gap Change-Id: I1728e5de0e815def0fe31c242203bd9f36dc41f4
* Add 'xenapi_apis' compute feature flagStephen Finucane2020-09-101-0/+7
| | | | | | | | | | | | | | Nova is removing the XenAPI virt driver. There are a number of APIs that only work with this virt driver so those are being removed at the same time. Once removed, they will return a HTTP 410 response, regardless of the microversion. Add a feature flag that allows us to skip these tests on clouds that no longer provide these APIs. It default to False (skip). We will set this to True (do no skip) on stable branches of nova. Change-Id: I0ae3f7a81ca7b56f56871e61bcf196ca572ae6d6 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Adding description for testcases - compute part6zhufl2020-08-101-9/+23
| | | | | | | | | | | | | | | 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: I1469ad5a34bac75203b2eb063326eded096706a5 partially-implements: blueprint testcase-description
* Do not check flavor.id after Microversion 2.46zhufl2018-07-181-1/+1
| | | | | | | | | | | | | | | | | | flavor.id is longer included in server info after Microversion 2.46, so change to checking flavor info if 'id' is not in flavor. Note: We needn't check whether 'id' should be in flavor or not in different microversions because schema check already covers it. Besides, this is to make resize_server in base.py instance method, because it's not likely to be used in resource_setup, and so we can use assert check in it. Ref: https://developer.openstack.org/api-ref/compute/#rebuild-server-rebuild-action Implements blueprint: clear-deprecated-api Change-Id: Id376de39662a4799909b56ec1148c85910d95814
* Fix listing servers by invalid status after V2.38zhufl2018-04-271-3/+8
| | | | | | | | | | | | | | When using list_servers with status as filter, up to microversion 2.37, an empty list is returnd if an invalid status is specified, and starting from microversion 2.38, a 400 error is returned in that case. Ref: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#maximum-in-newton https://developer.openstack.org/api-ref/compute/#list-servers-detailed Implements blueprint: clear-deprecated-api Change-Id: I95badeda522f855242c4eff0dbc01fb84c3d4b21
* Do not create server in test_list_servers_filter_by_exist_hostzhufl2017-08-111-19/+8
| | | | | | | | | | | | In test_list_servers_filter_by_exist_host, a server is created using admin user, but in fact, we need not create that server, instead, we can use the server created in resource_setup, because admin user can list servers created by non-admin user. This is to use the server created in resource_setup, both to make the testcase faster and to make the code cleaner. Change-Id: I89d0cdd31f26748f1364cfa57a80984566b3f850
* Migrate the preprov creds module to tempest libMatthew Treinish2017-07-211-1/+1
| | | | | | | | | This commit migrates the preprovisioned credentials provider from tempest/common into tempest/lib. As part of this 2 dependencies are also migrated to lib: the InvalidTestResource exception class and the tempest.common.fixed_network module. Change-Id: Ib9e909aaaf81f7cb57e2382cec44598e918747b8
* Tests for Nova instance diagnostics (microversion v2.48)Sergey Nikitin2017-06-231-11/+0
| | | | | | | | | Existing instance diagnostics tests were moved to the new files to test diagnostics for different microversions (2.1 and 2.48). Depends-On: If0b1493cc5c1c7f0d9896dd68342ad4dea4f7da2 Change-Id: I7757c5beeea3d3b0bc15a51cafc5ea2ada65e76c
* Replace the use of 'os_adm' with 'os_admin'jeremy.zhang2017-05-241-1/+1
| | | | | | | | Property 'os_adm' has been moved to 'os_admin' in version Pike, and it will be removed in version Queens. This patch is to replace the usage of 'os_adm' with 'os_admin' in Tempest tests. Change-Id: Ie4cf457d0a521910a82e41e7dad775df75d56587
* Replace assertEqual([], items) with assertEmpty(items)jeremy.zhang2017-05-161-1/+1
| | | | | | | This patch is to replace assertEqual([], items) with assertEmpty(items), which the items is a empty list. Change-Id: Ibdd1e141740497b819e08ac8abeb74740b8a6cf9
* test.py: stop using aliases for creds managerJordan Pittier2017-04-261-1/+1
| | | | | | | | | | | | | | It could be confusing to new comers that the variables cls.os and cls.os_primary or cls.alt_manager and cls.os_alt actually are aliases. Besides we are not consistent in their usage. This patch normalizes the usage around os_admin, os_primary and os_alt. We keep the old aliases for compatibility but we should not use them anymore. This fix a long standing TODO item. Change-Id: I5f7164f7a7ec5d4380ca22885000caa0183a0bf7
* Move the `related_bug` decorator from test.py to tempest/libJordan Pittier2017-04-131-2/+1
| | | | | | | | 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
* Use min_count to create multi serverszhufl2017-04-051-2/+3
| | | | | | | | | | | When using min_count in test_create_server, it will not create and wait for server active one by one, and thus will reduce the testcase's excuting time. Besides, we can wait for server active after all servers' create requests are posted in order to save some time. Change-Id: I68614a27249cc2b17ef6a2b909f01b56dfd6efe9
* Use tempest.lib data_utils - computeKen'ichi Ohmichi2017-03-101-1/+1
| | | | | | | | | | Tempest has duplicated modules of data_utils, one is tempest.lib and the other is tempest.common. The difference is tempest.common module refers to the config option resources_prefix. And the option is marked as deprecated already. So it is nice to replace the calls with tempest.lib one. Change-Id: Idfa9824d14a1e5e4291fcb70bb2c00caf9083d67
* Add related bug#1659811 for tenant_id filter compute testsghanshyam2017-01-311-0/+2
| | | | | | | | | | | | | Bug#1659811 on compute side when admin try to filter servers with tenant_id but no all_tenant. On Py3 it did not work due to hash randomization is enabled by default on Py3. This commit adds that bug as related bug in respective tests for tracing the same in future. Change-Id: I2ae66f257ef52972ff1143c92b30aa8acb27d4ab
* Switch to decorators.idempotent_id on compute.adminKen'ichi Ohmichi2017-01-281-12/+11
| | | | | | | | So many modules are using test.idempotent_id and this is the first step for switching to decorators.idempotent_id. Change-Id: I55a61d40f18f8fa0fea8423ad65302c1e3559205 Related-Bug: #1616913
* [py35] Fixes to get more tempest tests workingDavanum Srinivas2017-01-201-3/+3
| | | | | | | | | | | | | | | | | | tempest/api/compute/admin/test_networks.py: tempest/api/compute/admin/test_servers.py tempest/api/volume/admin/v2/test_backends_capabilities.py: * map returns an iterator, we need to wrap it in a list() or switch to list comprehension. tempest/api/compute/images/test_images_oneserver.py: * use bytes+decode to get consistent result in both py27 and py35 tempest/api/volume/admin/test_volumes_backup.py: tempest/api/volume/test_volumes_backup.py * even if volume_feature_enabled.backup is enabled, without swift all the tests fail, so let's skip on this condition. Change-Id: Ia486ffcf3868f9ed04d29208e2a58fda3664d895
* Remove unused clients in setup_clientszhufl2016-12-161-1/+0
| | | | | | | | | | There are some unused clients in setup_clients, and this is to remove them for code clean. I have searched for unused clients in all api testcases and I hope this time nothing is missed. Change-Id: I268e1f99196ae3e6e008aae25b29a0c5a9cbe125
* Add list the primary tenantguo yunxian2016-10-081-0/+8
| | | | | | | | | | s1 and s2 belong to primary tenant. We have tests that can not list the primary tenant due to odd specified behavior and tests that can not list other tenants. But readers will be confused that whether s1 and s2 indeed belong to primary tenant? We do not test that we can list primary tenant with all_tenants specified. So I add this. Change-Id: I8a6ec2b4994258fb530c9fba1ddbd8a48290e607
* Permission changes: Python file should be 0644 not 0775Jordan Pittier2016-10-021-0/+0
| | | | | | | I don't know how, but we ended up having a lot of Python files with plain wrong permissions. Change-Id: I22608e2bd39d8d2a4a267c5390bf0901866a5125
* test_list_servers_by_admin(specified_tenant) for preexisting serverszhufl2016-09-271-3/+7
| | | | | | | | | | | | | This is the same with 3f9cd0c2668d52af05357ca3a53c58ae441da767 test_list_servers_by_admin_with_specified_tenant expected admin user should not have any pre-existing servers which may be possible on some clouds. As the original purpose of test_list_servers_by_admin_with_specified_ tenant, this is to change to verify the server list doesn't contain the other tenant's servers. Change-Id: I6af1b9da4754ca4c1e058ed912e1484708ff6cc7
* Merge "test_list_servers_by_admin for preexisting servers"Jenkins2016-09-061-7/+13
|\
| * test_list_servers_by_admin for preexisting serversKen'ichi Ohmichi2016-09-021-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_list_servers_by_admin has been implemented by corresponding to test_list_servers_by_admin_with_all_tenants which specifies an option all_tenants. As the bug report, test_list_servers_by_admin expected admin user should not have any pre-existing servers, but it is possible on some clouds. As the original purpose of test_list_servers_by_admin, it is fine to verify the server list doesn't contain the other tenants' servers. Then this patch changes test_list_servers_by_admin to do that. In addition, this patch moves test_list_servers_by_admin to next to test_list_servers_by_admin_with_all_tenants for comparing them easily. Change-Id: I4ba5bedef154c1313b6c60f24f177ae3d9ac15ef Closes-Bug: #1295369
* | Merge "Use 'OS-EXT-SRV-ATTR:host' directly"Jenkins2016-09-061-3/+1
|\ \ | |/ |/|
| * Use 'OS-EXT-SRV-ATTR:host' directlyKen'ichi Ohmichi2016-08-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | On the history, Tempest needed to support Nova v2 and v3 APIs which are different request/response parameters. And Tempest switched the parameter names by using class values. However, Nova team has dropped Nova v3 API and the corresponding tests also have been removed from Tempest. Now the class values are unuseful and less readability. This patch makes Tempest use 'OS-EXT-SRV-ATTR:host' directly. Change-Id: Ia5d8d45578854279c914613d1dd5590e3cc0c60b
* | Add admin list_servers test with invalid_statusKen'ichi Ohmichi2016-08-221-0/+7
|/ | | | | | | | | This test is for reproducing the problem of bug/1579706 on the gate test. Change-Id: Ib94e9250555d627e71a1f96ae0e82fe58e084fd6 Depends-On: I10bde78f0a9ac59b8646d58f62fa5056f989f54f Related-Bug: #1579706
* Use classname as prefix of volume namezhufl2016-08-191-3/+3
| | | | | | | | | Sometimes volume may not be cleaned properly and from its name (such as tempest-Volume-245831117) it is difficult to know which testcase created it. This is to use classname as prefix of volume name. Change-Id: Ic0e376098caa0c46473d92f6d043ab85fbbaee8c
* py3: Replace map/filter with a list comprehensionSirushti Murugesan2016-07-191-1/+1
| | | | | | | | | | The map and filter functions returns a list in python 2 but an iterator in python 3. However, there are instances where the code assumes the returned value from map/value to be a list. Substitute these functions to its list comprehension equivalent expression to enable compatibility with Python 3. Change-Id: Iccaa3d1f4b009f59ea575c955ee4015e964f2318
* Use tempest.lib code in tempestAndrea Frittoli (andreaf)2016-02-241-2/+1
| | | | | | | | | | | | | Now that tempest_lib code is copied back into tempest, stop using tempest_lib in tempest, and start using the copied code. Remove the dependency to tempest_lib from requirements, and drop the script to use tempest_lib in tempest. Add os-testr to the test-requirements. Partially implements bp tempest-lib-reintegration Change-Id: I21ab5fe6349f72c98ac9f960a29bf62e813f8b1b
* API/compute: create all servers through the common wrappersJordan Pittier2016-01-111-7/+6
| | | | | | | | Don't call client.create_server() directly but instead use one of the common wrappers. This should bring consistency and should ease later refactorings. Change-Id: Ia2d6428b4a21bec8e99e908d681b44fac984ef5a
* Make server action methods[m-z] use **kwargsKen'ichi Ohmichi2015-12-151-1/+1
| | | | | | | | | | | 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 server action methods[m-z] use **kwargs. Partially implements blueprint consistent-service-method-names Change-Id: I7174723f907fd8962d9d12fe76bec2dc06883938
* Fix T110 violations for servers_clientKen'ichi Ohmichi2015-11-201-1/+1
| | | | | | | servers_client contained T110 violations, and we need to fix them before migrating the client to tempest-lib for consistent interfaces. Change-Id: I10a8c32b53f15063dab087d67123598800b141a0
* Fix H404/405 violations for api tests(1/3)Ken'ichi Ohmichi2015-11-191-4/+1
| | | | | | | | | There is a lot of H404/405 violations in Tempest now, and that leads difficult to migrate the code to tempest-lib or the other projects' repos. This patch fixes these violations for api tests except compute and network. Change-Id: I783862867732b76d836153bf9ef18fb4a5ec6c6e
* Make create_server use **kwargsKen'ichi Ohmichi2015-09-161-2/+3
| | | | | | | | | | | 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 create_server use **kwargs. Partially implements blueprint consistent-service-method-names Change-Id: I4b9effc2c68f6a5336eee249ff76686aca8a8480
* Return complete response from servers_clientghanshyam2015-09-111-7/+8
| | | | | | | | | | | | | | | | | | | Currently compute servers_client returns Response by removing top key from Response. For example- return service_client.ResponseBody(resp, body['server']) As service clients are in direction to move to Tempest-lib, all service clients should return Response without any truncation. One good example is Resource pagination links which are lost with current way of return value. Resource pagination links are present in parallel (not inside) to top key of Response. This patch makes compute servers_client to return complete Response body. Change-Id: I6a7b5c6144cafcb8f0780db01bf67999a4229389 Implements: blueprint method-return-value-and-move-service-clients-to-lib
* Add "server" to action methodsKen'ichi Ohmichi2015-08-131-2/+2
| | | | | | | | | | As the qa-spec of consistent-service-method-names, basically all methods’ names should be "<verb>_<resource/object name>". So this patch adds the word "server" to compute action methods. Partially implements blueprint consistent-service-method-names Change-Id: Ib91dc75055b9e2331d243cac686fe19c7516f6ba
* Remove wait_for_server_status from servers_clientKen'ichi Ohmichi2015-07-131-5/+7
| | | | | | | | | | | | | wait_for_server_status of compute client just calls the one of waiters module and the method is a wrapper. So the method seems redundant and it doesn't fit as service clients. This patch removes wait_for_server_status from compute client and replaces it with waiters' one. Partially implements blueprint consistent-service-method-names Change-Id: Ie821ea4ba0924b71caba80132e1c383fb5bb125d
* Merge list_servers_with_detail to list_serversKen'ichi Ohmichi2015-07-101-7/+7
| | | | | | | | | | Through consistent-service-method-names dev, list_<resources>_detail methods are merged into list_<resources> method. This patch merges list_servers_with_detail into list_servers. Partially implements blueprint consistent-service-method-names Change-Id: I0eae2b04adfaf17cbba3e615fa13fcaee8652436
* Merge "Use the prefix-embedded rand_name method"Jenkins2015-07-071-1/+1
|\
| * Use the prefix-embedded rand_name methodFei Long Wang2015-07-061-1/+1
| | | | | | | | | | | | | | | | A version of data_utils.rand_name in tempest_lib was created in tempest to include a prefix specified in the conf file. This commit changes the data_utils imports to use the new one in tempest. Change-Id: Ie3fb5c3ac9afe365bf24e40b00be88d66da7c507
* | Apply a naming rule of GET to show_server methodKen'ichi Ohmichi2015-07-031-5/+5
|/ | | | | | | | | | [GET /resources] methods should be "list_<resource name>s" or "show_<resource name>", so this patch applies the rule to show_server method of compute clients. Partially implements blueprint consistent-service-method-names Change-Id: I92addd2ad6502fe00395e2b9455de25c2f53d115
* remove gate tag (part 1)Sean Dague2015-04-271-10/+0
| | | | | | | | This removes all bare gate attribute tags from functions, the gate tag was a never fully implemented idea in the past, and it's existence in the code mostly just confuses people. Change-Id: I462ca7a8cadeb5013e2bce44ed1e69bcf8f9d968
* Start instances using fixed network when possibleRohan Kanade2015-03-261-1/+5
| | | | | | | | | | | | | | | | | Uses the fixed_network_name option to select which network to boot test instances on. This allows Tempest to be run in environments where there are multiple networks available. This problem does not apply to nova-network environments because it will happily start instances with multiple networks attached, so the behavior is left as before in that case. Co-Authored-By: Ben Nemec <bnemec@redhat.com> Co-Authored-By: Vincent Untz <vuntz@suse.com> Co-Authored-By: git-harry <git-harry@live.co.uk> Change-Id: Ib5b84b59e3d182d8b9cc83954537c32f3eb9e388 Closes-Bug: #1250866
* Merge "Remove migrated utils code"Jenkins2015-03-101-1/+1
|\
| * Remove migrated utils codeMatthew Treinish2015-03-061-1/+1
| | | | | | | | | | | | | | This commit removes all the utils code which has been migrated to tempest-lib and updates the uses of it to point to the library instead. Change-Id: I9207641aa91c0ea7feb8e067316fc220880c3a3b
* | Split resource_setup for compute testsRohan Kanade2015-03-091-2/+6
|/ | | | | | | | | Split up the resource_setup method for all the compute tests, as per the latest spec. Partially-implements bp:resource-cleanup Change-Id: I6562534ca5eb5e33c6f8d6cbcac5e7735535916a
* Add UUIDs to all tempest tests and gate checkChris Hoge2015-02-261-0/+10
| | | | | | | | | | | | | Adds uuid4 as a decorator of the form: @test.idempotent_id('12345678-1234-1234-1234-123456789abc') to every test in the Tempest tree. Includes a gate check to ensure the existence and uniqueness of the ids. Modify check tool to ignore Tempest unit tests. Change-Id: I19e3c7dd555a3ea09d585fb9091c357a300e6559 Co-Authored-By: Sergey Slipushenko <sslypushenko@mirantis.com> Implements: bp test-uuid
* Change servers client to return one value and update testsDavid Kranz2015-02-171-26/+16
| | | | | | | | | get_console_output and rescue_server are a little different but I did not change them fundamentally in this commit. Partially implements: blueprint clients-return-one-value Change-Id: I44026cac62084b868eb47aedb43c17d38ac8e43b
* Change basic server client methods to return one value and update testsDavid Kranz2015-02-121-16/+13
| | | | | | | | | This includes create_server, update_server, get_server, delete_server and also some helper methods such as create_test_server Partially implements: blueprint clients-return-one-value Change-Id: I8e1fba7a31a0ed27e683dacd9a8e763759552c11
* Switch to using the skip_because decorator from tempest-libMatthew Treinish2015-02-061-1/+3
| | | | | | | | | Included in tempest-lib 0.2.0 was the migrated skip_because decorator. This commit switches all the usage of the skip decorator from tempest's internal copy to use the version in the library where it will be maintained moving forward. Change-Id: Ic2d7b9c9247f78aa43cd780e893ce1834a20045e