summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional
Commit message (Collapse)AuthorAgeFilesLines
* Fix ussuri jobsPete Zaitcev2020-06-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Squashed two changes together since both are needed to fix jobs: Resolve PEP8 No idea how this happened, but reviews started failing the pep8 gate job. The failures are legitimate, see the commit. I guess the pep8 tests became smarter and found these issues. (cherry picked from commit 52ff421e3d339f81c2625bff429e6829a2d9af67) Add libc6-dev to bindep The python-builder base image was updated to no longer install recommends. This is inline with the other Infra images and keeps image sizes smaller. gcc recommended libc6-dev - but it turns out we need that for limits.h for one of our depends. Add it to fix our image builds. (cherry picked from commit 97d027caecdb977779ff130bb9ee2b3204c5646c) Change-Id: Id9a0dad644134dafd68eed37fe8f41c583d7a619
* Merge "Fix faulthy state argument choice"5.1.0Zuul2020-03-241-0/+18
|\
| * Fix faulthy state argument choiceBram Verschueren2019-12-191-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | The correct state name for a failing volume snapshot deletion is 'error_deleting' instead of 'error-deleting'. [1] [1] https://opendev.org/openstack/cinder/src/commit/89d6a5042fcb2ede5a0b1112d72fae805ea52fcd/cinder/objects/fields.py#L126 Task: #37844 Story: #2007037 Change-Id: Ia99900ece4f1cd29769b22ddaa3965789d719556
* | Merge "Now we can add description for role creation in OSC"Zuul2020-03-202-1/+26
|\ \
| * | Now we can add description for role creation in OSCM V P Nitesh2018-09-182-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now user can add the description when user create's the role using OSC ``openstack role create`` command. User can add the description by adding `--description <Description>` to OSC ``openstack role create`` command. Co-Authored-By: Deepak Mourya<deepakmoriya7@gmail.com> Change-Id: I858e004c3b29c687b6a39c8a1ed5fb029eb19c67 Depends-on: I230af9cc833af13064636b5d9a7ce6334c3f6e9a Closes-Bug: #1669080
* | | Merge "Create Volume v3 functional tests"Zuul2020-01-135-11/+1031
|\ \ \
| * | | Create Volume v3 functional testsDean Troyer2019-11-185-11/+1031
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now-ish Volume v3 has been a pass-through to v2. In order to prepare to make the Volume v3 commands stand-alone copy the v2 functional tests to v3. This is the first of a series of reviews to completely separate Volume v2 and v3 commands. Once these are split we can begin to implement v3 microversion support and/or start using the OpenStack SDK as the REST library. Change-Id: Iefd78d8ef6bb851d7360596337a88ee8f8476767 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | Fix openstack server list --deleted --marker optionKeithMnemonic2020-01-021-0/+43
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes using the "name" option for a marker when --deleted is also used. The find_resource() function that is being called does not correctly handle using the marker as the "name" in the search when also using deleted=True. One simple way to fix this is force the marker to only be an ID when --deleted is used. This is how the nova client works. Using the --deleted option is available to users with the admin role by default. If you're an admin listing --deleted servers with a marker by name, find_resource() is going to fail to find it since it doesn't apply the --deleted filter to find_resource(). The find_resource() function is trying to find the marker server by name if it's not found by id, and to find it by name it's listing servers with the given marker as the name, but not applying the --deleted filter so it doesn't get back any results. In the story it was suggested modifying find_resource to include the deleted query param when it's specified on the command line but that didn't work because it still results in something like this: http://192.168.1.123/compute/v2.1/servers?deleted=True&name=4cecd49f-bc25-4a7e-826e-4aea6f9267d9 It seems like there are bugs in find_resource(). Restricting the marker to be the server ID when listing deleted servers is probably OK since if you're using --deleted you're an admin and you could be listing across all projects and if you're filtering by a server across all projects anyway (not that you have to, I'm just saying if you are), or even showing a server in another project, you have to do it by id rather than name because find_resource() won't find the server in another project by name, only ID. story: 2006761 Task: 37258 Change-Id: Ib878982b1d469212ca3483dcfaf407a8e1d2b417
* | Refactor AggregateTestsEric Fried2019-11-051-41/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While investigating the referenced story/bug I noticed that wait_for_status in openstackclient.tests.functional.compute.v2.test_aggregate.AggregateTests was doing a lot more than it should ever need to (it probably got copied in from somewhere). The two places calling it only need to a) check the output of `openstack aggregate show`, and b) try once -- since they just got done creating the aggregate synchronously, there should never be a need to delay/retry. So this commit removes the helper method and just inlines the check. At the same time, the addCleanup(aggregate delete) directives are moved above their respective creates. This is a defensive best practice which makes sure cleanup happens even if something fails very soon after the actual back-end create (as was in fact the case with the referenced bug/story). It is unknown whether this will impact the referenced bug. Change-Id: I0d7432f13642fbccd5ca79da9c76adfcbabb5fa9 Story: 2006811 Related-Bug: #1851391
* | Fix functional tests for py3Eric Fried2019-10-315-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix various things so the functional tests will work under python3: - A hashlib.md5() can only be update()d with an encoded string in py3. - There's no dict.iteritems(), change to dict.items() (which is already an iterator). - Open temp files with 'w+' mode rather than the default 'w+b' (as an alternative to encoding all the write and expected-read payloads as bytes). - (This is a weird one) Explicitly raise SkipTest from unittest (rather than unittest2, which is where cls.skipException landed). Not sure why this is busted, but this moves the ball. Change-Id: Ic9b2b47848a600e87a3674289ae7ae8c3e091fee
* | More aggregate functional race chasingDean Troyer2019-09-101-5/+3
| | | | | | | | | | | | | | | | AggregateTests.wait_for_status() was a classmethod, those often are sources of conflict in parallel testing... Change-Id: I6211fd9c36926ca97de51a11923933d4d9d2dfda Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | Remove races in floating ip functional testsDean Troyer2019-08-311-53/+67
| | | | | | | | | | | | | | | | Multiple subnets with the same name are occasionally created when running tests in parallel. Change-Id: Ifb85e39ee53b529e2b97abf782c7fba93d48e9e2 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | Merge "Remove token_endpoint auth type"Zuul2019-08-291-13/+13
|\ \
| * | 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>
* | | Merge "Format aggregate command fields and de-race functional tests"Zuul2019-08-271-8/+51
|\ \ \ | |/ / |/| |
| * | Format aggregate command fields and de-race functional testsDean Troyer2019-08-261-8/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rename metadata to property in all aggregate commands Beef up functional tests to reduce street racing Change-Id: I4598da73b85a954f3e6a3981db21891b45d9548c 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>
* | Fix functional.base.TestCase.openstack() to optionally omit --os-auth-typeDean Troyer2019-08-221-5/+19
| | | | | | | | | | | | | | | | | | Change the functional test TestCase.openstack() method to add a way to not include the --os-auth-type option in order to test the default auth-type logic. Change-Id: I0f1ca2f7517a41278afaad5aaf4e98accb16bea2 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | Merge "Add openstack server create --boot-from-volume option"Zuul2019-08-201-0/+76
|\ \
| * | Add openstack server create --boot-from-volume optionMatt Riedemann2019-08-091-0/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a --boot-from-volume option to the server create command which is used with the --image or --image-property option and will create a volume-backed server from the specified image with the specified size. Similar to the --volume option, the created root volume will not be deleted when the server is deleted. The --boot-from-volume option is not allowed with the --volume option since they both create a block device mapping with boot_index=0. Change-Id: I88c590361cb232c1df7b5bb010dcea307080d34c Story: 2006302 Task: 36017
* | | Merge "Support type=image with --block-device-mapping option"Zuul2019-08-201-0/+87
|\ \ \ | |/ /
| * | Support type=image with --block-device-mapping optionMatt Riedemann2019-08-091-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --block-device-mapping option on the server create command currently only supports booting from volume and volume snapshot. A common boot-from-volume scenario is providing an image and letting nova orchestrate the creation of the image-backed volume and attaching it to the server. This adds support for type=image in the --block-device-mapping option. The volume size is required in this case. Note that the CLI currently says if type=snapshot that size is also required but that's technically not true. When booting from a volume snapshot, the compute API will use the size of the volume snapshot to create the volume if an explicit size is not provided. For the purposes of this patch, we need the size anyway for the image being the block device mapping source type. Change-Id: I57b3c261d8309f7b9f62a3e91612bce592a887a3 Story: 2006302 Task: 36016
* | | Make configuration show not require authDean Troyer2019-08-012-3/+38
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge "Use cliff formattable columns in image commands"Zuul2019-06-232-14/+9
|\ \
| * | Use cliff formattable columns in image commandsAkihiro Motoki2019-06-222-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related functional tests are converted into JSON format. Otherwise, it is not easy to check results. Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: Ib82e15738544975fede0c54cc5eaf239f4c67277
* | | Merge "Use cliff formattable columns in volume v2 commands"Zuul2019-06-234-49/+45
|\ \ \
| * | | Use cliff formattable columns in volume v2 commandsAkihiro Motoki2019-06-224-49/+45
| |/ / | | | | | | | | | | | | | | | | | | Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: I761ccac126208927594ad0d98a3cf5ad8b44bd48
* | | Use cliff formattable columns in volume v1 commandsAkihiro Motoki2019-06-224-43/+37
|/ / | | | | | | | | | | | | Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: Ib4c5798171e32a8ddc08a37ee1d416e366a71d76
* | Merge "Use cliff formattable columns in network commands"Zuul2019-06-227-53/+38
|\ \
| * | Use cliff formattable columns in network commandsAkihiro Motoki2019-05-097-53/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use cliff formattable columns not to convert complex fields into a string when a machine readable format like JSON or YAML is requested. Partial-Bug: #1687955 Partially implement blueprint osc-formattable-columns Change-Id: I9878f327e39f56852cc0fb6e4eee9105b7141da9
* | | Merge "Remove deprecated volume commands and args"Zuul2019-06-223-3/+3
|\ \ \
| * | | Remove deprecated volume commands and argsSean McGinnis2019-05-203-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following were deprecated over two years ago and can now be removed: * Remove ``backup`` commands in favor of ``volume backup`` * Remove ``snapshot`` commands in favor of ``volume snapshot`` * Remove ``volume create`` options ``--project``, ``--user`` and ``--multi-attach`` * Use of an auth-key positional argument in volume transfers * ``volume transfer request`` no longer accepts 'auth_key' as a positional arg, ``--auth-key`` is now required Internal (non-user-visible) * Rename backup.py to volume_backup.py for Volume v1 and v2, update tests These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: I94aa7a9824e44f9585ffb45e5e7637b9588539b4 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | | Merge "Remove deprecated identity commands and args"Zuul2019-06-212-73/+0
|\ \ \ \ | |/ / /
| * | | Remove deprecated identity commands and argsSean McGinnis2019-05-192-73/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following were deprecated over two years ago and can now be removed/changed: * Remove ``service create`` option ``--type`` * Remove ``role list`` options ``--project`` and ``--user`` * Remove ``user role list`` command These are backwards incompatible changes and will require a major version bump after they are merged. Change-Id: I29e2fc9516dffbfd83eef0bc91e834dde99b4105 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com> Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | | Merge "Rename review.openstack.org to review.opendev.org"Zuul2019-06-141-1/+1
|\ \ \ \
| * | | | Rename review.openstack.org to review.opendev.orgmelissaml2019-05-121-1/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | There are many references to review.openstack.org, and while the redirect should work, we can also go ahead and fix them. Change-Id: I82e3797dd4c05e4944f40c950b4fafe9a5334cbf
* | | | Merge "Batch up minor cleanups for release"3.19.0Zuul2019-06-062-3/+3
|\ \ \ \
| * | | | Batch up minor cleanups for releaseDean Troyer2019-05-202-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id45788e17c5388cee54e79cab1c120cfcc8f9f62 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | | | Add changes-before attribute to server listzhangbailin2019-05-311-0/+78
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | Closes-Bug: #1827844 Part of bp support-to-query-nova-resources-filter-by-changes-before Change-Id: I4f28168188973730247bcbcb70ba0e70eb81e3be
* | | | Serialize more aggregate functional testsDean Troyer2019-05-171-98/+50
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | These tests are showing signs of problems running in parallel so serialse the create/delete/list/set/unset tests. They all used two aggregates each anyway... Change-Id: Iba4b52c179e6914eaeefea1da0f7eaefcdcf1f87 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | | Aggregate functional test tweakDean Troyer2019-05-161-2/+3
|/ / | | | | | | | | | | | | | | This seems to still be racy, lengthen the timeout to wait for agregate creation. Change-Id: I3601c5baee03745ae21714b9dff0e278ad016877 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | Tweak network segment range fiunction testsDean Troyer2019-04-121-8/+8
| | | | | | | | | | | | | | | | | | We seem to be having occasional overlaps in the ranges, as they were identical in all tests, change each test to not overlap the others so running in parallel is not racy. Change-Id: I7ea467a3aa2e4a4b4a334c10ea6ba21409c46af0 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | Volume backup functional test tweakDean Troyer2019-04-021-2/+3
| | | | | | | | | | | | | | Waiting for status in all the wrong places... Change-Id: I531ee6e0c00b623c6fd30d40df1f1f36bf86233f Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* | Fix service discovery in functional testsGlenn Van de Water2019-03-138-32/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Add network segment range command object"3.18.0Zuul2019-03-081-0/+145
|\ \
| * | Add network segment range command objectKailun Qin2019-03-071-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add network segment range command object in support of network segment range management. This patch set includes documentation, unit tests and functional tests (currently skipped unit network segment range enabled in Neutron by default) for the following new commands: - "os network segment range create" - "os network segment range delete" - "os network segment range list" - "os network segment range set" - "os network segment range show" Co-authored-by: Allain Legacy <Allain.legacy@windriver.com> [depends on removed by dtroyer as those are all +W and trying to pass the gate, OSC has it's freeze dealine looming] Depends: https://review.openstack.org/624708 Depends: https://review.openstack.org/624709 Depends: https://review.openstack.org/638386 Partially-implements: blueprint network-segment-range-management Change-Id: I335692f2db5be07c1c164f09b13f1abb80b7ba33
* | | Merge "Add support for get details of Quota"Zuul2019-03-071-0/+32
|\ \ \
| * | | 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
* | | Merge "Fix: Restore output 'VolumeBackupsRestore' object is not iterable"Zuul2019-02-281-0/+58
|\ \ \
| * | | Fix: Restore output 'VolumeBackupsRestore' object is not iterablewhoami-rajat2019-02-271-0/+58
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VolumeBackupsRetore object has '_info' attribute which contains the output data of the restore command which should be returned instead of the 'VolumeBackupsRestore' object. Change-Id: I64b75649c1ac9c24e05a197f7280975564b4d386 Story: 2004740 Task: 28811