summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/common
Commit message (Collapse)AuthorAgeFilesLines
* Skip test_quota_network_set_with_force func testDr. Jens Harbott2022-06-281-0/+1
| | | | | | | | | | | This test was added in [0] and it causes a lot of failures, since setting the network quota to 1 will result in quota errors for any other test that is trying to create a network in parallel. We can only run this test in a serial tempest task that would need to be created for such a scenario. Related-Story: 2010110 Change-Id: I6015c181ecabff26bdb1b0c11b0e33ad39e6f083
* Allow "--force" flag in quota network commandsRodolfo Alonso Hernandez2022-03-171-0/+47
| | | | | | | | | This flag allows to set a new Neutron quota resource limit without checking first the current resource usage. The new limit will be set anyway. This flag was used only by the compute engine. Related-Bug: #1953170 Change-Id: I7084f8208b804236ac99e6842db7a45854ce54d7
* Add network update quota "limit_check" parameterRodolfo Alonso Hernandez2021-12-071-0/+25
| | | | | | | | | | | | | This new parameter commands the Neutron server to first check the resource usage before setting the new quota limit. If the resource usage is below the new limit, the Neutron server will raise an exception. Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/806254 Depends-On: https://review.opendev.org/c/openstack/neutron/+/801470 Partial-Bug: #1936408 Change-Id: Idc1b99492d609eb699d0a6bef6cd760458a774f6
* Add 'server shelve --offload', 'server shelve --wait' optionsStephen Finucane2021-01-081-1/+1
| | | | | | | | | | | | The '--offload' option allows us to explicitly request that the server be offloaded once shelved or if already shelved. The '--wait' option allows us to wait for the shelve and/or offload operations to complete before returning. It is implied when attempting to offload a server than is not yet shelved. Change-Id: Id226831e3c09bc95c34b222151b27391a844b073 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* functional: Remove test for 'quota set --force'Stephen Finucane2020-11-061-44/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change I1d1ac1ac46f49f64794ffc8631e166935537966c introduced the 'quota set --force' parameter to force set nova quotas. As part of that fix, we introduced a functional test, 'QuotaTests.test_quota_set_force' that works by attempting to set the 'limit' of the quota for instances to the current usage ('is_use') minus one. This test is flawed. It doesn't create any instances so when it fires by itself, it will always set the 'limit' to 0. When it fires at the same time as other tests (remember, we run tests in parallel), notably tests that rely on booting instances, it can cause other tests to fail with the following error: Quota exceeded for instances: Requested 1, but already used 0 of 0 instances (HTTP 403) We could attempt to work around this by creating a new project and using that project to fiddle with quotas. That's a lot of work though, and the returns are questionable: the 'quota set' command is an admin-only command by default and the '--force' parameter should almost never be used. Simply remove this test. Change-Id: Ic07ff6f4a7c1c27852c892eb906bb144aae91788 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Story: #2008327 Task: #41225
* Add '--force; parameter to 'openstack quota set'hackertron2020-04-141-0/+44
| | | | | | | | | The compute service allows us to to force set a quota, setting a quota value that is less than the amount of the resource currently consumed. Expose this feature by way of a '--force' boolean parameter. Change-Id: I1d1ac1ac46f49f64794ffc8631e166935537966c
* Remove token_endpoint auth typeDean Troyer2019-08-271-13/+13
| | | | | | | | | | | The token_endpoint was a compatibility auth type to maintain support for the --url global option that dated back to the beginning of OpenStack CLI auth. The common keystoneauth library implements 'admin_token' which provides the same functionality using --endpoint rather than --url. Change-Id: I1b9fbb96e447889a41b705324725a2ffc8ecfd9f Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Add CLI argument tests before making changesDean Troyer2019-08-221-0/+79
| | | | | | | | Add these tests before hacking on the global args and removing the compatibility stuff so we can clearly see what actually changes. Change-Id: Ic86c89da1475b4914ff7cb2396199cd219a12097 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Make configuration show not require authDean Troyer2019-08-011-0/+27
| | | | | | | | | | | | | | The configuration show should not require auth to just display the OSC config object. Changes to make it not require auth have knock-on effects of needing to change a bunch of tests that use it assuming it _does_ require auth so change those to use 'extension list' instead. This sets up further testing of the command line options for changes in behaviour when we switch to straight SDK usage for configuration. Change-Id: I6c52485341214ba401064c0f2d1e2b95fdc225c0 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Fix service discovery in functional testsGlenn Van de Water2019-03-132-2/+2
| | | | | | | | | | | | | | | | | | | | | If a required service is not enabled then we skip the test. The discovery is done by tests/functional/base.py:is_service_enabled but this method is broken, credentials are not passed to the 'openstack service show' command so every call will fail and every test that relies on it will be skipped. This commit fixed that method and the issues that popped up when re-enabling tests. Network segment range: - issue where we assumed network-segment-range extension is always present - issue where we compare integers and string representations of numbers Subnet: - issue where we try to deepcopy an uncopyable object in UnsetSubnet Change-Id: Id3cc907c1ed2a25b49cf6f4a7233e0401a02383a Story: 2005169 Task: 29908
* Add support for get details of QuotaSławek Kapłoński2019-02-241-0/+32
| | | | | | | | | | With passing "--detail" argument to "openstack quota list", details about current usage should be returned. It is currently supported by Nova and Neutron so details of resources from those projects can be returned. Change-Id: I48fda15b34283bb7c66ea18ed28262f48b9229fe Related-Bug: #1716043
* Add command to show all service versionsMonty Taylor2018-07-231-0/+31
| | | | | | | | | | Knowing what services and what versions of those services exist on a cloud isn't always a spectacular experience. Add a command that will use get_all_version_data from keystoneauth to produce a report of the available services and the version info for each service. Depends-On: https://review.openstack.org/584944 Change-Id: I84751c175d0c5f6d857a5473d2db6d5f1b41f946
* Update command test for volume.v3Monty Taylor2018-05-181-1/+1
| | | | | | | | The default cinder version in devstack changed to v3 in https://review.openstack.org/#/c/566747/which breaks this test. Change the test to test what's going to happen. Change-Id: Iff4d8b47812a86d21bf5dbdddbd642b9d63ff8fe
* Cleanup error messages on failureMatthew Treinish2018-02-281-2/+6
| | | | | | | | When test_server_commands_main_help() fails it dumps a ton of unformatted text on an exception message. This commit attempts to clean it up to make it easier to read. Change-Id: I793e6337728a22302a5a87938dbec60d7f2320d8
* Make osc-functional-devstack-tips actually use tipsMonty Taylor2018-02-051-1/+1
| | | | | | | | | | | | | | | | | The base job has tox_install_siblings: false - which we want. But that means we need tox_install_siblings: true on the tips job. While we're at it - add fetch-tox-output so that we have tox log files in the fetched build output for easier verification of what wound up installed. Don't look for ResourceNotFound string in test The string ResourceNotFound is not in the error string anymore. Look for the text that is. Depends-On: https://review.openstack.org/541033 Change-Id: Id6de1485bcafb41f238f3e74277094ce64a6acf4
* Prepare for os-clinet-config to go awayDean Troyer2017-11-161-1/+0
| | | | | | | We used that module in a test functional for module list, it is being absorbed into python-openstacksdk and having it listed in this test breaks -tips jobs. Change-Id: I98fdf5a5d1b3c6e30cb4c5f5fec3dd8e43e53145
* Clean up the changes of os.environ in functional testsRui Chen2017-07-203-7/+9
| | | | | | | | | | | | Use fixtures to restore the API version changes of os.environ in each functional tests, aims to avoid the following test cases failing in unexpected context. And make sure setUpClass/tearDownClass call super class's corresponding methods first. Change-Id: Ie248fe9d3a9e25f1b076c9f2c363200f29a83817 Closes-Bug: #1696080
* Refactor Extension show and list commandAnkur Gupta2017-05-181-2/+29
| | | | | | | | | | | | | | 1.keep the column display order consist in extension list with and without "--long" option. 2.rework for network extentsion list, openstacksdk return object, so the logic should be same with other service. 3.add some unit test cases, like: extension list --network --long, extension list --network --compute, to cover regular use cases. 4.raise exact exception when network extension don't exist, avoid internal TypeError in "extension show" commands. Change-Id: I2e23ced80d8da8aa1106b22472db850367b351ce Closes-Bug: #1689233
* Nova net functional tests round 3Dean Troyer2017-04-281-12/+53
| | | | | | | | | | | | | | | | | | | | * network segment * network service * port * router * security group * security group rule * subnet * subnet pool * extension The extension tests were duplicated to have both compute and network extensions tests so the nova-net case will still exercise the extension commands. Also clean up formatting from previous reviews to make the Network functional tests look and act consistently. Change-Id: I286c40572faa31ddcef595cec740da933b2defc1
* Fix quota functional tests for nova-netDean Troyer2017-04-261-51/+102
| | | | | | | | | We need to skip some functional tests when testing against a nova-net cloud so add the bits to detect that. Also JSON-ify the quota functional tests and add the skips for nova-net. Change-Id: Ibfeeb3f967f34c98e80271a8214cf95dc50407f1
* Add help commands withouth auth in functionalRui Chen2017-04-031-0/+47
| | | | | | | | A special scenairo is that users want to check the commands help message, but don't set authentication info at all. Add a related functional test case to cover it. Change-Id: I7b09701df24d6f6dfcf369f89212f72e753be6e4
* Merge "OSC Extension Show"Jenkins2017-03-231-0/+42
|\
| * OSC Extension ShowSindhu Devale2017-03-221-0/+42
| | | | | | | | | | | | | | | | Implement Neutron feature of Extension Show into OpenStack Client. Change-Id: Ifecb794838cb3bf8c2466d178345349db3cd4003 Implements: blueprint extension-show
* | Merge "OSC Quota List"Jenkins2017-03-211-0/+21
|\ \
| * | OSC Quota ListSindhu Devale2017-03-101-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | Implement Neutron feature of Quota List into OpenStack Client. Change-Id: Idf941acf8d00b136776b7381b877c56d82622f57 Partially-Implements: blueprint neutron-client-quota
* | | Support list commands by group name keywordRui Chen2017-02-231-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output of current "command list" is so long, it's very difficult for users to find out the commands they care about. Add "--group <group-keyword>" option to filter the commands by group name keyword, like: --group volume, list all openstack.volume.v2 (cinder) commands That support the scenario that users need to know the current support commands of some OpenStack services(nova, neutron, cinder and so on) in OSC. Change-Id: Id673042729ad36a0cac0b81fb31a3537c24f03fc Closes-Bug: #1666780
* | | Show openstacksdk version info in "module list"Rui Chen2017-02-221-1/+2
|/ / | | | | | | | | | | | | | | | | openstacksdk bug/1588823 exist, no good way to add __version__ for openstack module properly, fix the issue in osc side, make openstacksdk module information be available. Change-Id: I27ff61792443d1aa07f31598bed3aa32f924ff40 Partial-Bug: #1662058
* | Merge "Refactor availability zone functional test"Jenkins2017-02-131-6/+13
|\ \
| * | Refactor availability zone functional testzhiyong.dai2016-11-281-6/+13
| | | | | | | | | | | | | | | | | | Using json format output in availability zone list functional test Change-Id: I7098b1c3bee680e47e414dcb4fa272628cdec1eb
* | | Merge "Refactor module functional test"Jenkins2017-02-131-8/+11
|\ \ \
| * | | Refactor module functional testzhiyong.dai2016-11-271-8/+11
| |/ / | | | | | | | | | | | | | | | | | | Combine "test_module_list_no_options" and "test_module_list_with_all_option" into one test, and modify the test for "--all' option. Change-Id: If4e7a73502a888c50de17ec19ef7e8d02dd23f1d
* | | Functional test for configurationzhiyong.dai2016-11-281-10/+33
|/ / | | | | | | | | | | Using json format output in configuration show functional test. Change-Id: I005b361ae70ced3f6cef77291db1d39dafb0793c
* | Fix "module list --all" failedRui Chen2017-02-061-0/+40
| | | | | | | | | | | | | | | | | | | | KeyError cause the command "module list --all" failed, fix it, and do refactor to filter private modules and reduce the loop times, add related unit tests and functional tests. Change-Id: Icd77739502e05b5f763a04a92547497bf82d5d63 Closes-Bug: #1661814
* | Fix OSC networking commands help errorsRui Chen2017-01-221-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC networking commands need to authenticate to get service catalog, then decide to show nova-network or neutron command help message. Fake token and fake auth_type in prepare_to_run_command() casue os-cloud-config use AdminToken auth plugin, but pass all the auth information (include: username, password and so on) to it, that casue the class initialization error. Pop the fake token and url, then try to load auth plugin again to fix the issue. Change-Id: I8b140f0b0a60681fc2a35a013bb0c84ff8cb9589 Closes-Bug: #1650026
* | Fix quota set command error for SDK > 0.9.10Huanxuan Ao2017-01-151-3/+0
| | | | | | | | | | | | | | | | | | | | A bug in OpenStack SDK 0.9.11 and 0.9.12 that causes quota set command to fail. This can be removed when the proposed SDK fix (https://review.openstack.org/#/c/419911/) is released and in the minimum SDK version in global requirements. Closes-Bug: #1655445 Change-Id: I63132f5f762f0120282f8b92e72512763063e3c6
* | Fix quota show --default commandDean Troyer2017-01-141-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Work around a bug in OpenStack SDK 0.9.11 and 0.9.12 that causes quota show --default to fail. This can be removed when the proposed SDK fix (https://review.openstack.org/420301) is reelased and in the minimum SDK version in global requirements. quota set --network is still broken, I can't fix it at the moment... Closes-bug: 1656572 Change-Id: Ice77e14782c33e672176afbab36bba95b73d7a11
* | skip tests related to SDK 0912 and keystone IdP changeSteve Martinelli2017-01-071-0/+6
| | | | | | | | | | | | | | the gate is super wedged, i will skip tests and unskip them as necessary. Change-Id: Ia4469738c876ec1293f91b96dcc7d15365f4f37d
* | Revert "WIP: Skip broken functional tests..."Dean Troyer2016-12-291-6/+0
| | | | | | | | | | | | | | | | | | SDK 0.9.11 caused some failures, its blocked now. Revert those breakages that occurred in 0.9.10 -> 0.9.11. This partially reverts commit 188e32f9e642fc5eaaec83d5c231aa890354671a. Change-Id: I8b350250dbdcbf5c4599dfb55f6685c0db18bb30
* | WIP: Skip broken functional tests...Dean Troyer2016-12-231-0/+6
|/ | | | | | | | | ...so we don't have to fix them all in one review. Do not merge this until https://review.openstack.org/#/c/414649 is merged and funtional tests pass. Change-Id: I4f187111d3e4d8c4a613c20a946d6b5d3562e879
* Fix openstack quota set/show --class not workqtang2016-09-141-2/+11
| | | | | | | | identity_client should not be used for quota class operation. Update code to fix the qutoa class set/show issue. Change-Id: I71c59c08a0d5da29982497f589e1efe131997f21 Closes-Bug: #1609233
* Support fetching network project default quotaRui Chen2016-09-131-0/+11
| | | | | | | | | | Neutron server and openstacksdk had supported to fetch network project default quota, this patch add the CLI support in openstackclient. Change-Id: If0ef74c268c41a866c62156da0603a40ae4e6e31 Closes-Bug: #1204956 Depends-On: I6a4e2a146351dd1e7d652442511f1ef2c279da42
* move all functional tests to tests moduleSteve Martinelli2016-09-095-0/+177
functional tests should be grouped with other tests (unit and integration tests). as part of this commit the "common" module was renamed to just "base", this was done for simplicity. the post_test_hook.sh file was also copied to the functional module since it should live there. a separate change to the infra repo will be made to call the new location, once that is merged we can remove the old one (a new change will also be posted for that) Needed-By: I49d54f009021d65c1ae49faf6b3f0a7acdadd7b3 Change-Id: Ie8c334f6223373b8e06df8bd8466500d2a2c8ede