summaryrefslogtreecommitdiff
path: root/openstackclient/tests/volume
Commit message (Collapse)AuthorAgeFilesLines
* Show project access for volume typeSheel Rana2016-07-202-0/+105
| | | | | | | | | | | | OSC does not support to show project access details for private volume types. This patch will provide support for showing project access details for private volume types. Closes-Bug:#1554891 Implements: bp cinder-command-support Change-Id: I218fb07a6e69033e9f8570748eee1df8df9d6fdc
* Merge "Support error handling for delete commands in volumev2"Jenkins2016-07-185-22/+273
|\
| * Support error handling for delete commands in volumev2Huanxuan Ao2016-07-145-22/+273
| | | | | | | | | | | | | | | | Some delete conmmands in volumev2 did not support error handling, this patch add them and also add the unit tests for bulk deletion Change-Id: I56ade6f9c7396c78fb989547476c4d94ccd76eae
* | Merge "Add "--project" option to "volume type create" command"Jenkins2016-07-181-0/+20
|\ \ | |/ |/|
| * Add "--project" option to "volume type create" commandHuanxuan Ao2016-07-121-0/+20
| | | | | | | | | | | | | | | | | | | | Add "--project" and "--project-domain" options to "volume type create" command. We can use these options to add the type access to a given project when we create the volume type. Change-Id: I483a6b61dae137682c3d1f7527531b40e508ba92 Closes-Bug: #1602169
* | Change the wrong import orderHuanxuan Ao2016-07-121-1/+2
|/ | | | Change-Id: Ia48f0aae0250a5d29c0f6fa46386465e118f760f
* Merge "Add "--incremental" option to "backup create" command in volume v2"Jenkins2016-07-111-0/+4
|\
| * Add "--incremental" option to "backup create" command in volume v2Paul Bourke2016-07-111-0/+4
| | | | | | | | | | | | | | | | | | | | Cinder V2 API supports creating volume backup with "--incremental" option. However, OSC doesn't support this argument. So this patch adds the "--incremental" option to allow users to create incremental style backups. Change-Id: Iefac5f1a6c9ef006ad9c22d4250ae6df50504781 Closes-Bug: 1600196
* | Merge "Unskip tests caused by bug 1599333"Jenkins2016-07-111-7/+6
|\ \ | |/ |/|
| * Unskip tests caused by bug 1599333Steve Martinelli2016-07-071-7/+6
| | | | | | | | | | | | | | | | | | | | There is now a second .get() call in osc_lib.utils.find_resources. These tests were failing because they only mocked a single access call to .get(). Ensure there are two calls to .get(), with the first one raising an exception. Change-Id: Idd2ad4a27a6db5bee633cc37a1042dbb0a57aa71 Closes-Bug: #1599333
* | Remove FakeService.get_serviceszheng yin2016-07-091-20/+0
|/ | | | | | FakeService.get_services is useless in other test files, so remove it Change-Id: If90b8742be97697f285750a05896b574c45f3504
* Merge "Add "--property" option to "snapshot create" command in volumev2"Jenkins2016-07-061-2/+7
|\
| * Add "--property" option to "snapshot create" command in volumev2Huanxuan Ao2016-07-061-2/+7
| | | | | | | | | | | | | | | | | | Add "--property" option to "snapshot create" command in volumev2 (v2 only) to support adding properties to a new snapshot. Change-Id: Ie0e90c9ccc2ac89b3b7b0ac89751fd864aada9a4 Closes-Bug: #1597192
* | Merge "Add '--force' option to 'backup delete' command in volumev2"Jenkins2016-07-061-1/+17
|\ \ | |/ |/|
| * Add '--force' option to 'backup delete' command in volumev2Huanxuan Ao2016-07-061-1/+17
| | | | | | | | | | | | | | | | | | Add '--force' option to 'backup delete' command in volumev2 (v2 only) to allow delete in state other than error or available. Change-Id: I661ea0d465db227e374cbacdde0206fa1a6dd3d5 Closes-Bug: #1597188
* | skip failing tests due to bug 1599333 is fixedSteve Martinelli2016-07-051-0/+5
|/ | | | | | | | latest osc-lib breaks some of the tests, skip them for now so we can continue to merge patches that are already approved. Change-Id: I433190e9f763bea1df3135612b281d925745f884 Related-Bug: 1599333
* fix a few spelling mistakesgecong19732016-07-042-5/+5
| | | | | | | - overwriten should be overwritten - retrun should be return Change-Id: I1567402f4d5c7253e6a54d8753e3f201af7e6a54
* Add "--snapshot" option to "backup create" command in volumev2Huanxuan Ao2016-07-012-1/+14
| | | | | | | | Add "--snapshot" option to "backup create" command to support backing up a snapshot. Change-Id: Ibecbf1902599875f422d372d529835f73211d3ec Closes-Bug: #1597184
* Merge "Add "--force" option to "volume qos delete" command"Jenkins2016-06-282-3/+35
|\
| * Add "--force" option to "volume qos delete" commandHuanxuan Ao2016-06-282-3/+35
| | | | | | | | | | | | | | | | Add ``--force`` option to ``volume qos delete`` command in volume v1 and v2 to allow users to delete in-use QoS specification(s). Change-Id: I46036e5f55ced8b8a1be54c521f2a5c242b89160 Closes-Bug: #1596821
* | Add "--force" option to "backup create" command in volumev2Huanxuan Ao2016-06-271-2/+6
|/ | | | | | | | | | Cinder V2 API supports creating volume backup with "--force" option. However, OSC doesn't support this argument. So this patch add the "--force" option to allow users to back up a in-use volume. Change-Id: I326f8d6172b2830da4cf1317348af50142cc5490 Closes-Bug: #1596443
* support multi-delete for volume-typeSteve Martinelli2016-06-201-2/+2
| | | | | | | | | Added the ability to delete multiple volume types at once. Note there are no unit tests exist for v1 volume-types, so instead a functional test was created. Partial-Bug: #1592906 Change-Id: I99f3f22901ab35252b91a3072b14de7d19cb17ca
* Standardize logger usage in volumeTang Chen2016-06-141-8/+11
| | | | | | | | | | | | | | | | | self.app.log is the logger in class OpenStackShell, which should be used to record logs that have nothing to do with any specific command. So, use the file logger instead. This patch also fixes some usage that doesn't follow rules in: http://docs.openstack.org/developer/oslo.i18n/guidelines.html 1. add variables to logger as an argument 2. do not wrap variables with str() Change-Id: I248861a38a4de0412a080046aa7a6f6473c3e082 Implements: blueprint log-usage
* osc-lib: utilsDean Troyer2016-06-137-7/+12
| | | | | | | | Use osc-lib directly for utils. Leave openstackclient.common.utils for deprecation period. Change-Id: I5bd9579abc4e07f45219ccd0565626e6667472f7
* osc-lib: exceptionsDean Troyer2016-06-131-1/+1
| | | | | | | | Use osc-lib directly for exceptions. Leave openstackclient.common.exceptions for deprecation period. Change-Id: Iea3e862302372e1b31ccd27f69db59b4953ca828
* Clean up fakes.py in volumev2Huanxuan Ao2016-06-081-188/+0
| | | | | | | | | All of volumev2 fake classes are completed. Now the unit tests of volumev2 are using fake classes so that the old codes are useless and can be removed. Change-Id: I502a8a0b0404975744d3b208af3e95c8692e6c47
* Update unit test test_extension with fake classHuanxuan Ao2016-06-071-20/+38
| | | | | | | Add FakeExtension class in networkv2, computev2, volumev2, identityv2_0 and update unit test test/common/test_extension.py Change-Id: I94815de7801860edb7fa91a7d146455cab946652
* Merge "Fix errors for "volume type unset" command"Jenkins2016-06-071-2/+4
|\
| * 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 "Make set/unset commands in volume return normally when nothing specified"Jenkins2016-06-061-3/+0
|\ \ | |/ |/|
| * Make set/unset commands in volume return normally when nothing specifiedTang Chen2016-06-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | set/unset commands should ends up normally instead of logging an error when nothing is specified to modify. The main reason is: When nothing is specified, the command sets/unsets nothing, which is a normal behavior, and ends up normally. No API call fails. No error happens. Change-Id: Ib03a512650e5da90aa1ef38019772448383d0d33 Partial-bug: #1588588
* | Merge "Add support for volume transfer request list"Jenkins2016-06-044-4/+334
|\ \ | |/ |/|
| * Add support for volume transfer request listSheel Rana2016-06-044-4/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-284-0/+464
|\ \
| * | Support for volume service listSheel Rana2016-04-254-11/+475
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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