summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/volume
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix typos"Zuul2022-05-163-6/+6
|\
| * Fix typosCyril Roelandt2021-10-263-6/+6
| | | | | | | | Change-Id: Idd502c8df21da79ff3b9339870f38378f5337879
* | Fix volume set functional testDr. Jens Harbott2022-01-111-0/+1
|/ | | | | | | | | Sometimes it can happen that when extending a volume it is shown as status "extending" with the original size for a while. Wait for the volume to enter state "available" again before checking the result. Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Change-Id: Ib70cfa1c241ce94426214c7a05c550213f427caa
* tests: Handle removal of block-storage v2 APIStephen Finucane2021-07-233-19/+26
| | | | | | | | | | | | | | Cinder recently removed their v2 API [1] which is causing the functional tests to fail. Improve our 'is_service_enabled' test helper to use the 'versions show' command, which queries the service catalog and can give us information about the service version as well as answer the more general "is this service available" question. We also resolve a long-standing TODO in the process. [1] https://review.opendev.org/c/openstack/cinder/+/792299 Change-Id: I381069357aa008344e15327adf3a863c0c2e1f04 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* 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
* | 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>
* 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
* 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>
* 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-131-2/+1
| | | | | | | | | | | | | | | | | | | | | 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 "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
* | Merge "This fix removes an erroneous underscore found within the function ↵Zuul2019-02-272-2/+2
|\ \ | |/ |/| | | named test_snapshot_delete within test_snapshot.py found in both volume v1 and v2 of python-openstackclient."
| * This fix removes an erroneous underscore found within the function namedJeremy Houser2019-02-112-2/+2
| | | | | | | | | | | | | | | | test_snapshot_delete within test_snapshot.py found in both volume v1 and v2 of python-openstackclient. Story: 2004977 Change-Id: Iae29ba7992dcf8596f4fb4333d8bcf1889ecd7e6
* | More state handling in volume transfer requests functional testsDean Troyer2019-02-061-8/+19
|/ | | | | | | | | | | | Using addCleanup() for removing the pending volume transfer request has no way to wait for the volume status to become available before cleaning up the volume and gets racy when the tests are run with slow performance in the volume backend. So we pause at the end of the test after either accepting the transfer request or explicitly deleting it so the cleanup can delete the volume. Change-Id: I04862069cab28bc76eeafd60ba32be646f478d86 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* More volume functional test fixesDean Troyer2018-12-181-43/+48
| | | | | | | | | | Remove the use of class setup/teardown from volume transfer functional tests as that just doesn't work too well here. Also wait for volume status before attempting transfer request operations, some test nodes take a while to create the volumes. Change-Id: Ib9378ab5c973deb2aa86c9b9ed31408f3a05115a Signed-off-by: Dean Troyer <dtroyer@gmail.com>
* Fix broken gate jobsFan Zhang2018-08-073-28/+53
| | | | | | | | | | | | | | | | | | | | | | | This patch aims at fixing the broken gate jobs because of cinder and glance patches [1], [2], [3] and [4]. * Remove parameter `--source-replicated` to drop volume replication v1 support * Address some timing issues with volume transfer requests * Only run Image v1 tests when the test cloud has v1 available * Get tolerant of unexpected additional attributes being returned in Image data [1].https://review.openstack.org/#/c/586293/ [2].https://review.openstack.org/#/c/532503/ [3].https://review.openstack.org/#/c/533564/ [4].https://review.openstack.org/#/c/578755/ Co-Authored-By: Dean Troyer <dtroyer@gmail.com> Co-Authored-By: Monty Taylor <mordred@inaugust.com> Depends-on: https://review.openstack.org/588664 Change-Id: I2a785750e92155185d3344e6116c7f5c6fdd3cbe Signed-off-by: Fan Zhang <zh.f@outlook.com>
* Fix volume type functional testsDean Troyer2018-06-223-77/+175
| | | | | | | Convert functional VolumeTypeTests to not use class methods for setup. Depends-On: https://review.openstack.org/577147 Change-Id: I855583ad1a50bf5f5046acdb85e977ab9e3c45d2
* Clean up W503 and E402 pep8 errorsSean McGinnis2018-04-152-29/+29
| | | | | | | | | | | | pycodestyle 2.40 and later enforce these rules that were not previously enforced. Rather than just skipping them, this cleans up the trivial instances of these violations. This does also include some other updates that were not triggering errors in an attempt to keep some of the style consistent. Change-Id: Id7c0a6b8f1f835e69d844b000e3ed751852ada63 Closes-bug: #1762803
* Merge "Add "volume service list --host" functional test case"Jenkins2017-09-261-2/+12
|\
| * Add "volume service list --host" functional test caselihaijing2017-09-191-2/+12
| | | | | | | | Change-Id: I467252d9fc6083fb891a8701d7992f16ce42556f
* | Add functional test cases for "volume qos associate/disassociate"lihaijing2017-09-181-1/+93
|/ | | | | Change-Id: I07b25bebb8a0ea18cdf042357be65c4ec6e1cfed Closes-Bug: #1717874
* Skip Volume v1 functional tests if v1 not presentDean Troyer2017-09-121-3/+24
| | | | | | | | Volume v1 is gone in Queens Just skip it for now until DevStack does not create a v1 endpoint Change-Id: I2aa2f78b0d5c8ac2048c922c7835e5c4574028cc
* Merge "Clean up the changes of os.environ in functional tests"Jenkins2017-07-2114-71/+72
|\
| * Clean up the changes of os.environ in functional testsRui Chen2017-07-2014-71/+72
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | Enable some off-by-default checksblue552017-06-232-6/+2
|/ | | | | | | Some of the available checks are disabled by default, like: [H203] Use assertIs(Not)None to check for None Change-Id: I59dafb62cedc5217b6e5eb6efb997a9ee3c29bbb
* volume functest: ensure snapshots deleted when volume deleteAkihiro Motoki2017-06-068-112/+115
| | | | | | | | | | | | | Deleting snapshot may take time. The current volume API does not allow to delete volumes with snapshots, so if deleting snapshot may take time, a delete request for a parent volume will fail. This sometimes causes functional test failures in slow environments. wait_for_status() checks whether volume status is in error statuses but previously the expected error status was wrong. Cinder API uses lower case as volume status, so it did not work expectedly. Change-Id: I095894ba39f23bf81d71351818d24dbb5ca459fb
* Replace "Display Name" by "Name" in volume listRui Chen2017-05-263-8/+82
| | | | | | | | | | | | | | | | | | Current "volume list --name" command use "display_name" as search_opts to send to cinder API, and show the result table with "Display Name" column title in osc, cinder list API support "name" as search opts too, and there is "name" attribute in volume response body, so we can replace all "Display Name" by "Name" in order to keep "volume list" command consistent with other commands, like: server list, network list and so on, only use "Name" attribute for all objects. Support a mapping for volume list -c "Display Name" (Volume v1 and v2) and volume create/show -c "display_name" (Volume v1) for minimal backward compatibility until R release. Change-Id: I120be0118e7bb30093b4237c5eeb69a9eedef077 Closes-Bug: #1657956 Depends-On: I1fb62219b092346ea380099811cbd082cae5bafe
* Merge "Add functional test for volume service"Jenkins2017-05-252-0/+186
|\
| * Add functional test for volume servicezhiyong.dai2016-11-302-0/+186
| | | | | | | | | | | | Add functional test for volume service, v1 and v2 Change-Id: If226c82ef8df339e4ae63d8241e0bd15b69264d2
* | Merge "Convert volume functional tests into JSON format"Jenkins2017-05-254-153/+135
|\ \
| * | Convert volume functional tests into JSON formatAkihiro Motoki2017-05-174-153/+135
| | | | | | | | | | | | | | | | | | | | | | | | volume_type and transfer_request func tests have not been converted into JSON func tests. This commit converts them into JSON format. Change-Id: I56820c4e15bda95e911e57657c1ff5437daf83ae
* | | Make block-device-mapping more stable and clearRui Chen2017-05-171-1/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fix the following issues: 1. ValueError is raised if input don't contain "=". Sometimes the whole "server create" command is very complex, it's difficult to find out root reason directly. 2. Don't support to add block device from snapshot, like: --block-device-mapping vdb=0c8ae9d8-cadc-4a23-8337-4254614d277e:snapshot:1, it's supported by novaclient, but not in osc. 3. If input "vdb=", not add any mapping information, the server will be launched successfully, not raise error message to let use add volume/snapshot id, just ignore "--block-device-mapping" option. 4. The help message of "block-device-mapping" option is so simple, need to add some details about how to add <type>, <delete_on_terminate> contains. Change-Id: Ib7f7a654c3dc2a8272545f168b4c4ced230ce39e Depends-On: Ib37913891bbf7a31b570404c4668c490d5ac859b Closes-Bug: #1667266
* | Fix volume qos spec listDean Troyer2017-04-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been sporadically failing in functional tests due to the way the volume qos spec list command calls get_associations() for each spec. When tests run in parallel occasionally a spec from another test is present in the list returned and is deleted before the get_associations() call is made, causing a NotFound exception. We should just keep going when this occurs. * make v1 match v2 * add tests to ensure the exception is being caught and handled Closes-Bug: #1687083 Change-Id: If2d17c1deb53d293fc2c7f0c527a4e4ef6f69976
* | Fix volume transfers request commandsDean Troyer2017-03-272-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | * Fix volume transfer request accept to actually not crash when trying to call Volume API. * Fix volume transfer request accept syntax to have only one positional argument, which is the ID of the resource in the command * Change the output column order in volume transfer request list to have ID followed by Name then the remaining columns. Closes-bug: 1633582 Change-Id: I5cc005f039d171cc70859f60e7fe649b09ead229
* | Merge "Support --no-property in "volume set" command"Jenkins2017-03-062-9/+22
|\ \
| * | Support --no-property in "volume set" commandzhiyong.dai2017-02-232-9/+22
| | | | | | | | | | | | | | | | | | | | | Add "--no-property" option to "volume set" command in v1 and v2 and update the test cases. Change-Id: Id5660f23b3b2d9aa72f4c16b19ce83f3f7ed2fa4
* | | Merge "Add Cinder v3 client support for volumes"Jenkins2017-03-017-0/+139
|\ \ \
| * | | Add Cinder v3 client support for volumesJustin A Wilson2017-02-207-0/+139
| | |/ | |/| | | | | | | | | | | | | Initial Cinder v3 support Change-Id: Idd5074832e80697ed0671f06d3291dfd92dbfb08
* | | Fix properties format for volume qos in volume v1Huanxuan Ao2017-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notice that patch [1] fixed the error of properties format for volume qos in volume v2, but there is the same bug in volume v1, and the patch missed that, so fix the problem in v1 as well [1] https://review.openstack.org/#/c/421065/ Partial-Bug: #1656767 Change-Id: I156bf13d164dbd0d0a7ce394964176718c4ff0e5
* | | Merge "Add "encryption-*" options in volume type commands"Jenkins2017-02-182-0/+158
|\ \ \ | |_|/ |/| |
| * | Add "encryption-*" options in volume type commandsHuanxuan Ao2017-01-142-0/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "--encryption-provider", "--encryption-cipher", "--encryption-key-size" and "--encryption-control-location" options to "volume type set" and "volume type create" commands. Add "--encryption-type" option to "volume type unset", "volume type list" and "volume type show" commands. Change-Id: I3572635d5913d971a723a62d7790ffe0f20ec39a Implements: bp cinder-command-support Closes-Bug: #1651117
* | | Merge "Refactor volume functional test in volume v1"Jenkins2017-02-141-63/+183
|\ \ \
| * | | Refactor volume functional test in volume v1Huanxuan Ao2017-02-131-63/+183
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | There is a patch for refactor of volume funtional test in volume v2 [1], but v1 is missing, this change add the v1 refactor with json format. [1]: https://review.openstack.org/#/c/417349 Change-Id: I969df3c8dbca21a62f6245e3e95680cf3cd47dc1
* | | Functional test for volume qosjiahui.qiang2017-01-182-73/+202
|/ / | | | | | | | | | | Refactor functional tests for testing more command options. Change-Id: I6d5a82eb0e84f72e8da76b17c952e4daae9dbc08
* | Support "--no-property" option in volume snapshot setzhiyong.dai2017-01-252-54/+232
| | | | | | | | | | | | | | | | | | | | | | Supporting "--no-property" option will apply user a convenient way to clean all properties of volume snapshot in a short command, and this kind of behavior is the recommended way to devref. The patch adds "--no-property" option in "volume snapshot set" command, and update related test cases and devref document. Change-Id: I5f10cc2b5814553699920c4343995b2e11416e4e Implements: blueprint allow-overwrite-set-options
* | Merge "Error in the return of command 'volume qos create'"Jenkins2017-01-211-2/+2
|\ \