summaryrefslogtreecommitdiff
path: root/openstackclient/tests/functional/volume/v2
Commit message (Collapse)AuthorAgeFilesLines
* volume: Add 'volume qos set --no-property' optionStephen Finucane2023-05-171-5/+11
| | | | | | | | | Supporting "--no-property" option will apply user a convenient way to clean all properties of volume qos in a short command. The patch adds "--no-property" option in "volume qos set" command and update related test cases and docs. Change-Id: I1fb5b4f0a923bbf557a3af3f63809bde9e84ffd4
* Blacken openstackclient.volumeStephen Finucane2023-05-108-351/+237
| | | | | | | | | | Black used with the '-l 79 -S' flags. A future change will ignore this commit in git-blame history by adding a 'git-blame-ignore-revs' file. Change-Id: Ic318617c67ab7ce6527f9016b759a1d4b0b80802 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* tests: Convert volume tests to use 'parse_output'Stephen Finucane2022-11-297-278/+347
| | | | | Change-Id: Iec8ca873f6bc3993e0ba557f68895d9aefb6f9c6 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Fix typosCyril Roelandt2021-10-261-2/+2
| | | | Change-Id: Idd502c8df21da79ff3b9339870f38378f5337879
* tests: Handle removal of block-storage v2 APIStephen Finucane2021-07-231-1/+10
| | | | | | | | | | | | | | 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>
* 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
* 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
* Remove deprecated volume commands and argsSean McGinnis2019-05-202-2/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* 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-271-1/+1
|\ \ | |/ |/| | | 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-111-1/+1
| | | | | | | | | | | | | | | | 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-071-14/+28
| | | | | | | | | | | | | | | | | | | | | | | 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-222-42/+95
| | | | | | | 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-151-16/+16
| | | | | | | | | | | | 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
* Merge "Clean up the changes of os.environ in functional tests"Jenkins2017-07-214-16/+28
|\
| * Clean up the changes of os.environ in functional testsRui Chen2017-07-204-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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-231-2/+1
|/ | | | | | | 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-063-61/+29
| | | | | | | | | | | | | 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-261-2/+33
| | | | | | | | | | | | | | | | | | 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-251-0/+93
|\
| * Add functional test for volume servicezhiyong.dai2016-11-301-0/+93
| | | | | | | | | | | | Add functional test for volume service, v1 and v2 Change-Id: If226c82ef8df339e4ae63d8241e0bd15b69264d2
* | Merge "Convert volume functional tests into JSON format"Jenkins2017-05-252-82/+73
|\ \
| * | Convert volume functional tests into JSON formatAkihiro Motoki2017-05-172-82/+73
| | | | | | | | | | | | | | | | | | | | | | | | 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 transfers request commandsDean Troyer2017-03-271-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | * 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-061-5/+17
|\ \
| * | Support --no-property in "volume set" commandzhiyong.dai2017-02-231-5/+17
| | | | | | | | | | | | | | | | | | | | | Add "--no-property" option to "volume set" command in v1 and v2 and update the test cases. Change-Id: Id5660f23b3b2d9aa72f4c16b19ce83f3f7ed2fa4
* | | Merge "Add "encryption-*" options in volume type commands"Jenkins2017-02-181-0/+87
|\ \ \ | |/ / |/| |
| * | Add "encryption-*" options in volume type commandsHuanxuan Ao2017-01-141-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Functional test for volume qosjiahui.qiang2017-01-181-39/+102
| |/ |/| | | | | | | | | Refactor functional tests for testing more command options. Change-Id: I6d5a82eb0e84f72e8da76b17c952e4daae9dbc08
* | Support "--no-property" option in volume snapshot setzhiyong.dai2017-01-251-10/+26
| | | | | | | | | | | | | | | | | | | | | | 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
|\ \
| * | Error in the return of command 'volume qos create'jiahui.qiang2017-01-171-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | This patch fixed a 'volume qos create' display mistake in argument of 'specs'[1]. For command such as: $ openstack volume qos create hello [1]https://bugs.launchpad.net/python-openstackclient/+bug/1656767 Closes-bug:#1656767 Change-Id: Ia9fce833d318d9b52b97c12cfb89e2d3c5465fbe
* | Merge "Functional test for volume snapshot"Jenkins2017-01-191-41/+198
|\ \
| * | Functional test for volume snapshotjiahui.qiang2017-01-171-41/+198
| |/ | | | | | | | | | | Refactor functional tests in volume snapshot. Change-Id: I2fcc468096b3a26c83b8af1e379a62c80eb9c63e
* | functional test for volumejiahui.qiang2017-01-091-101/+204
|/ | | | | | | | Rework functional tests to remove resource create/delete from setupClass() and teardownClass() methods. Add test for more command options Change-Id: I2b6ad1fce26f04c11ed43f8d73515fde4a7d09af
* Add --default option to "volume type list"jiahui.qiang2016-12-061-0/+5
| | | | | | | | | Add "--default" option to volume v2's "type list" command, it will show which volume type the volume service has set as default. Implements: bp cinder-command-support Change-Id: Iae7ebc633ebe5554cc88390a84361887ec211fb2
* Refactor "snapshot" commandsHuanxuan Ao2016-11-032-19/+23
| | | | | | | | | | | | | | | 1.change the command name ``snapshot create/delete/list/ show/set/unset`` to ``volume snapshot create/delete/list/ show/set/unset``. 2.change the optional parameter "--name <name>" to a positional parameter "<snapshot-name>"; Change the positional parameter "<volume>" to a optional parameter "--volume <volume>" Change-Id: If03276ecdf6f0d96893d5ecf91c2aaa64929cff3 Implements: bp backup-snapshot-renamed-for-volume-resource Co-Authored-By: Sheel Rana <ranasheel2000@gmail.com>
* Add functional test for snapshot in volume v1Huanxuan Ao2016-09-251-3/+6
| | | | | | | Add functional test for snapshot commands in volume v1. Tests can always help to find or avoid bugs. Change-Id: Ieb0ab9c763d381a6343b4c4a8a5874f3e682f24f
* Implement "volume transfer request show/accept" commandHuanxuan Ao2016-09-221-0/+38
| | | | | | | | | | | | Add "volume transfer request show" and "volume transfer accept" commands in volume v1 and v2. Also add the unit tests, docs, release note and functional tests Implements: bp cinder-command-support Co-Authored-By: Sheel Rana <ranasheel2000@gmail.com> Change-Id: I5787fc486b3401307125caa316f517b9c96a95a5
* Merge "Support mark volume as bootable in volume set"Jenkins2016-09-141-0/+11
|\
| * Support mark volume as bootable in volume setqtang2016-09-141-0/+11
| | | | | | | | | | | | | | | | Add --bootable | --non-bootable option in volume set to mark or unmark volume as bootable. Change-Id: Ifa6c2dd1642202f55b6d50e3b8614d3513d488f6 Closes-Bug:#1535704
* | Add functional tests for unset multiple volume type propsRui Chen2016-09-121-0/+15
|/ | | | | | | | | | | CinderClient bug/1596511 cause that OSC can't unset multiple properties of volume type, obviously no functional test case cover the part of logic in OSC, that make the issue raising, the patch add functional test cases for this scenario. Change-Id: I42cf9ac8cc72ccc2f1208926d8faf7b80ee2d288 Partial-Bug: #1596511 Depends-On: I60378a32cdc52aacdf869d69b246dec7eb6cdb77