summaryrefslogtreecommitdiff
path: root/openstackclient/tests/volume/v2
Commit message (Collapse)AuthorAgeFilesLines
* Fix errors for "volume type unset" commandHuanxuan Ao2016-06-061-2/+4
| | | | | | | | Normally, we can unset multi properties but the "volume type unset" command could not, because the action "append" was missed. So I add it and also fix the unit test and doc in this patch. Change-Id: I20470f2b7bb2a8d7f292cea498826669c3418c77
* Merge "Add support for volume transfer request list"Jenkins2016-06-042-2/+167
|\
| * Add support for volume transfer request listSheel Rana2016-06-042-2/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | OSC does not support to list volume transfer from one user to other user. This patch will provide support for listning volume transfer requests. Closes-Bug:#1554886 Implements: bp cinder-command-support Change-Id: Ie659bc39cb1d1e931cca7a40b2f126a067ee484c
* | Merge "Add FakeQos class and update unit test for qos_specs in VolumeV2"Jenkins2016-06-022-204/+207
|\ \
| * | Add FakeQos class and update unit test for qos_specs in VolumeV2Huanxuan Ao2016-05-312-204/+207
| | | | | | | | | | | | Change-Id: I108c8d343678f3d19d1ca1f93d998c46c7c32eff
* | | Fix unit test for volume commands in volumev2Huanxuan Ao2016-05-311-27/+21
|/ / | | | | | | | | | | | | | | | | | | | | There are some issues in test_volume.py in volumev2, I make three changes in this patch: 1.modified some codes that not used FakeVolume class. 2.added a fake image by FakeImage class for this test. 3.added a fake snapshot by FakeSnapshot class for this test. Change-Id: I02ba73d3aaee95624b0e2307b255e0e485b0c3a3
* | Merge "Refactor TestVolumeShow with FakeVolume"Jenkins2016-05-242-9/+50
|\ \
| * | Refactor TestVolumeShow with FakeVolumeting.wang2016-05-172-9/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the meantime, add some static methods in FakeVolume for ease of use and add info() method with "property" decorator in FakeResource to allow those static methods to get fake information. Change-Id: I98ad520f32afd529fda77a4592f645130282537f Co-Authored-By: xiexs <xiexs@cn.fujitsu.com> Implements: blueprint improve-volume-unittest-framework
* | | Add FakeType class and update volumetype test in VolumeV2Huanxuan Ao2016-05-232-117/+158
| | | | | | | | | | | | | | | | | | | | | This patch adds FakeType class and update unit tests for volume type with FakeType class Change-Id: I86ecc68dd1a1e919f3325cd9456974a0cfadbe61
* | | Add FakeSnapshot class and update snapshot test in VolumeV2Huanxuan Ao2016-05-212-122/+196
| | | | | | | | | | | | | | | | | | | | | Add FakeSnapshot class and update unit tests for snapshot commands with the FakeSnapshot class. Change-Id: If039a48b9d5f8430cc3d041b8c7ec30af8ff0e03
* | | Merge "Add support of setting snapshot state"Jenkins2016-05-181-2/+18
|\ \ \
| * | | Add support of setting snapshot stateXi Yang2016-03-091-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is going to add the functionality of setting snapshot state which OSC currently lacks. Closes-Bug:#1535239 Change-Id: I2afd6567416e75ba0c70b73351cf1eb5394b3373
* | | | Add FakeBackup class and updata backup unittest in volumeV2Huanxuan Ao2016-05-172-113/+193
| |/ / |/| | | | | | | | Change-Id: I39762bedaeaaf1894f48912ca1b7d59ab50f9f78
* | | Refactor TestVolumeList with FakeVolumeting.wang2016-05-112-64/+63
| |/ |/| | | | | | | | | Change-Id: Idbe7ee1d9688ea5937852cce1a746016bf98fa74 Co-Authored-By: xiexs <xiexs@cn.fujitsu.com> Implements: blueprint improve-volume-unittest-framework
* | Merge "Support for volume service list"Jenkins2016-04-282-0/+232
|\ \
| * | Support for volume service listSheel Rana2016-04-252-11/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC does not support to list volume services. This patch will provide support for adding volume service related support. Closes-bug:#1550999 Implements: bp cinder-command-support Change-Id: I50ac14aeb96c4b8ddbf7b33e519feea0d126f752
* | | Fix mutable default arguments in testsTang Chen2016-04-201-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python’s default arguments are evaluated only once when the function is defined, not each time the function is called. This means that if you use a mutable default argument (like list and dict) and mutate it, you will and have mutated that object for all future calls to the function as well. More details about this wrong usage here: http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments In unit tests, most FakeXXX classes' methods take mutable arguments with default values [] or {}. We should change them to None. Change-Id: Iea833b66aa1379829511ad5c6d4432b72f3488e2 Closed-bug: #1550320
* | | Remove methods argument from vloume/v2/fakes.pyTang Chen2016-04-181-9/+3
| | | | | | | | | | | | | | | | | | | | | methods argument in FakeAvailabilityZone class is not necessary. Remove it. Change-Id: Idf136bf90bd94e7045b0d471b8e03cd843693251
* | | Add support for removing volume-type-accessSheel Rana2016-04-161-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC does not support to remove volume type access to project. This feature will provide support to remove volume type access from project. Closes-Bug:#1554890 Implements: bp cinder-command-support Change-Id: I029a4292da05f028e8937962cb845ec6e00b0279
* | | Fix wrong attribute name and add functional test for --snapshotJirayut Nimsaeng2016-04-151-0/+43
| | | | | | | | | | | | | | | Change-Id: I91f2091ef06a55bcf5373d1beeea2dd81e9f1334 Closes-Bug: #1567895
* | | Merge "Add support for setting volume-type-access"Jenkins2016-04-122-0/+68
|\ \ \
| * | | Add support for setting volume-type-accessSheel Rana2016-04-112-0/+68
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC does not support to set volume type access to project. This patch will provide support for adding volume type access to existing project. Closes-Bug:#1554889 Implements: bp cinder-command-support Change-Id: Ie36e202bdde7de36eb263a476eb66699d82f7565
* | | Merge "Make snapshot and backup name optional"Jenkins2016-04-072-0/+48
|\ \ \ | |/ / |/| |
| * | Make snapshot and backup name optionalIvan Kolodyazhny2016-04-062-0/+48
| | | | | | | | | | | | | | | | | | | | | Cinder does not require snapshot and backup name. These arguments are optional. Change-Id: I05d59efc9642205a25684bf0b77758328296d959
* | | Add support for deleting Image-propertyroot2016-03-161-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSC does not support to delete volume's image property. This patch will provide support for deleting image property to existing volume. Closes-Bug:#1554879 Change-Id: I9256913948fae9e9a03fed173b826dfa918f78e9 Implements: bp cinder-command-support
* | | Add support for setting Image-propertyroot2016-03-161-0/+30
|/ / | | | | | | | | | | | | | | | | | | | | | | OSC does not support to set volume's image property. This patch will provide support for adding image property to existing volume. Closes-Bug:#1554877 Implements: bp cinder-command-support Change-Id: I4ff5532c228f010789b81c7587dd4a2838a90f20
* | Enhance list extension unit testFang Zhen2016-03-111-0/+20
|/ | | | | | | | Extension list involves identity, compute, volume and network. Current test covers only identity and network. This patch added test against compute and volum. Also refactored current implentation. Change-Id: If9b36cba24c50a817a17f685801e418fb898596a
* [Volume] Check return value is None in volume unit testsTang Chen2016-03-035-32/+52
| | | | | | | | | take_action() in commands inheriting from Command returns nothing. So we should assert the return is None in the unit tests of these commands. Change-Id: Idd961a5fa3db825353700837a559621d17f782c5 Partial-Bug: #1550636
* Trivial: Reorder unit tests in alphabetical order in volume testsTang Chen2016-03-022-165/+165
| | | | Change-Id: I622123f68e2bb53f8767069e4a717fcc34e37b5c
* Trivial: Reorder unit tests in test_type.pyTang Chen2016-02-291-55/+58
| | | | | | Unit test classes should be in alphabetical order. Change-Id: Ie741e1c170d8cc361d95d036115d0952e5108088
* Fixed a bunch of spacingBrandon Palm2016-02-236-3/+26
| | | | | | | Nothing too complicated here. I fixed a bunch of spacing issues that I saw in OSC. Change-Id: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
* Add functional tests for "volume" commands v2Tang Chen2016-02-211-2/+26
| | | | | | | | | | The tests for v2 "volume" commands are quite similar to v1. This patch also map 'metadata' to 'properties', 'volume_type' to 'type' to align to the v1 output. Change-Id: Icf2c5463b186fc78c890ccd96453090c4a2c2eb6 Partial-bug: #1519503
* Fix DisplayCommandBase comments for cliff ShowOne subclass testsTang Chen2016-02-101-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As bug #1477199 describes, the wrong comment below is all over the unit test code of OSC. # DisplayCommandBase.take_action() returns two tuples There is no such class named DisplayCommandBase in OSC. It is in cliff. All OSC command classes inherit from the base classes in cliff, class Command, class Lister and class ShowOne. It is like this: Object |--> Command |--> DisplayCommandBase |--> Lister |--> ShowOne take_action() is an abstract method of class Command, and generally is overwritten by subclasses. * Command.take_action() returns nothing. * Lister.take_action() returns a tuple which contains a tuple of columns and a generator used to generate the data. * ShowOne.take_action() returns an iterator which contains a tuple of columns and a tuple of data. So, this problem should be fixed in 3 steps: 1. Remove all DisplayCommandBase comments for tests of classes inheriting from class Command in cliff as it returns nothing. 2. Fix all DisplayCommandBase comments for tests of classes inheriting from class Lister in cliff. Lister.take_action() returns a tuple and a generator. 3. Fix all DisplayCommandBase comments for tests of classes inheriting from class ShowOne in cliff. ShowOne.take_action() returns two tuples. This patch finishes step 3 in all but identity tests. There are too many such comments in identity tests. So fix them all in another patch. Change-Id: I1afe4852069d25d562a9448ec2bf2cff58955052 Partial-bug: #1477199
* Merge "Refactor TestVolumeCreate to use FakeVolume"2.1.0Jenkins2016-02-041-67/+66
|\
| * Refactor TestVolumeCreate to use FakeVolumexiexs2016-02-021-67/+66
| | | | | | | | | | | | | | | | Class FakeVolume should be used in volume tests. Change-Id: Idf7d3e2a0654cd7d7993f169c4743b1d38902f1b Implements: blueprint improve-volume-unittest-framework Co-Authored-By: Tang Chen <chen.tang@easystack.cn>
* | Merge "Fix wrong type of volume attachments in FakeVolume"Jenkins2016-02-031-2/+3
|\ \
| * | Fix wrong type of volume attachments in FakeVolumeTang Chen2016-02-021-2/+3
| |/ | | | | | | | | | | The volume attachments should be a list of dict, not a single dict. Change-Id: I3cec62bcb3953e4f38f9d3dd23f3eb6ef984464c
* | Trivial: Reorder test class in test_volume.py into alphabetical orderTang Chen2016-02-031-41/+41
|/ | | | | | TestVolumeDelete should be after TestVolumeCreate. Change-Id: I764543a0e0723633aec6b18c2d50a01931465e6b
* Merge "Support listing volume availability zones"Jenkins2016-01-221-0/+54
|\
| * Support listing volume availability zonesRichard Theis2016-01-141-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the "os availability zone list" command to support listing volume availability zones along with the currently listed compute availability zones. This adds a --compute and --volume option to the command in order to select the availability zones to list. By default, all availability zones are listed. If the Block Storage API does not support listing availability zones then an warning message will be issued. Change-Id: I8159509a41bd1fb1b4e77fdbb512cf64a5ac11a9 Closes-Bug: #1532945
* | Refactor: Abstract columns and datalist out in volume test casesSaiKiran2016-01-205-335/+146
|/ | | | | | | | columns and datalist has been set in each test case in volume, which is not necessary. This patch abstract it out and remove all redundant code. Change-Id: I3a09d5d2db86da986bdcfbf2310978ced181017d
* Add multi deletion testcase for openstack volume deletexiexs2015-12-021-8/+32
| | | | Change-Id: Id8e6e8311e46e4c8644d41d773aeb27416ca6a7e
* Merge "Introduce FakeVolume class"Jenkins2015-12-011-0/+84
|\
| * Introduce FakeVolume classxiexs2015-11-301-0/+84
| | | | | | | | | | | | | | | | | | | | Introduce FakeVolume to improve the current volume unittest framework with following two advantages: 1. generate more than one faking volumes 2. all faking volumes generated by random Change-Id: I9d56efa4fd4f03c82cd4e29622b6312566dbc453 Implements: blueprint improve-volume-unittest-framework
* | Consistency of the --all argument for snapshotsJean-Philippe Evrard2015-11-301-1/+32
| | | | | | | | | | | | | | | | | | This change is inspired by the volume.py. It allow the user to use openstack snapshot list --all. Closes-Bug: #1517386 Change-Id: I72a53fcd0c5c5af539cd88b37e71b4331fa67473
* | Use is_public to set access of volume typeXi Yang2015-11-261-3/+3
|/ | | | | | | | Currently the 'public' and 'private' keys does not work when creating volume type, 'is_public' should be used. Change-Id: If34a66053ea6c192882a1b9d8bbb1d3666be3f83 Closes-bug: 1520115
* Follow-on for volume list - add tests, clean helpDean Troyer2015-10-162-10/+158
| | | | | | | | | | * Add volume list tests for v1 (a copy of the v2 tests) * Converts volume v2 tests to use Identity v3 so domains can be tested * Add volume list (v2) tests for new options * Re-orders volume list options (both v1 and v2) to match * MArks the new volume list (v2) options as v2-only in doc Change-Id: I2181b2c48cfde2147d7d0ef135322df8a81e7ce8
* Volume v2 list does not show server nameTerryHowe2015-08-282-8/+9
| | | | | | | | The volume v2 list was using the volume id rather than the server id. Change-Id: Ibe03d34b5b503af2d00202dabd640f796449cf9a Closes-Bug: #1489954
* Merge "Add set feature to volume type v2"Jenkins2015-08-071-0/+130
|\
| * Add set feature to volume type v2heha2015-08-061-0/+130
| | | | | | | | | | | | | | | | | | | | "volume type set" and "volume type unset" is not in the v2. Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com> implements bp: volume-v2 Change-Id: Ia804787d76d2029726c030b43c61eac3b411f66a