summaryrefslogtreecommitdiff
path: root/openstackclient/tests/volume
Commit message (Collapse)AuthorAgeFilesLines
* 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-207-603/+226
|/ | | | | | | | 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-163-10/+340
| | | | | | | | | | * 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
* | Add list feature to volume v2heha2015-08-062-1/+219
| | | | | | | | | | | | | | | | | | | | "volume list" is not in the v2. Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com> implements bp: volume-v2 Change-Id: I9f4585202f5f9ec5f4c091278fc6c4036efb1290
* | Add support for volume v2 commandsAmey Bhide2015-07-242-2/+484
|/ | | | | | | | | | Adds the following commands: openstack volume create openstack volume set openstack volume unset Implements: blueprint volume-v2 Change-Id: Icb7404815763aa88550112fb42f5200ce05c2486
* Merge "Add create and list for volume type v2"Jenkins2015-07-201-0/+129
|\
| * Add create and list for volume type v2chengkunye2015-07-201-0/+129
| | | | | | | | | | | | | | | | Volume API v2 is missing create and list features. implements bp: volume-v2 Change-Id: I34a1ae440e9620b1c65546f4f43b369c8661250d
* | Format volume type properties when showingSteve Martinelli2015-07-192-2/+13
|/ | | | | | | | Currently, the properties of a volume type are unformatted. Use the formatter to keep things consistent with the way properties are represented in OSC. Change-Id: I81c6bd3fdbc30568c269e501c740473b2a1ffb4e
* Support multiple volume qos deleteTerryHowe2015-07-172-16/+16
| | | | | | | Also make sure that we are using the singular qos_spec when we should and the plural qos_specs otherwise. Change-Id: If4bbeb6fc245d7d80dc3d7dccfe9f949e802653c
* Fix wrong mock method calllin-hua-cheng2015-07-112-2/+2
| | | | | | | | | | | | | | | | | | | | There is no assert_called() method in mock, replace it with assert_called_with() method. The old method used to work with mock 1.0.1 because it was a noop in magicmock. Needs https://review.openstack.org/#/c/200583 to pass the requirements check. https://review.openstack.org/#/c/193935/ changed the OS_* vars we source by forcing v2password as the auth method. change our identity v3 test setup by setting v3password Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com> Closes-Bug: 1473454 Depends-on: I0cfab6d13e5d9e744cb302c86a2c21269923e75d Change-Id: Id22765c7e044797e03d19ad1b103fadec2726aa2
* Merge "Add tests for 'list' and 'show' for volume qos v1"Jenkins2015-07-012-0/+111
|\
| * Add tests for 'list' and 'show' for volume qos v1David Moreau Simard2015-06-292-0/+111
| | | | | | | | Change-Id: I1b4d998f3ec1bd5cb8dd4c9e0d04fd3b3049e9d7
* | Merge "Add support for volume API v2 QoS commands"Jenkins2015-06-302-0/+489
|\ \ | |/ |/|
| * Add support for volume API v2 QoS commandsDavid Moreau Simard2015-06-292-0/+489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the following commands: volume qos associate volume qos create volume qos delete volume qos disassociate volume qos list volume qos set volume qos show volume qos unset Change-Id: If3c679557ac9abb0dfc75d290b96fb9c8d46c7b7 Partial-Bug: #1467967
* | Alphabetize tests for v1 qos_specsDavid Moreau Simard2015-06-291-74/+74
| | | | | | | | | | | | | | As a follow up of sorting the methods for volume v1 qos_specs. Change-Id: I428167297e7110e586d139bf38fd22d321836e80
* | Add support for volume API v1 QoS commandsDavid Moreau Simard2015-06-262-0/+388
|/ | | | | | | | | | | | | | | This commit adds the following commands: volume qos associate volume qos create volume qos delete volume qos disassociate volume qos list volume qos set volume qos show volume qos unset Change-Id: I72ea1b9a4d0bd0e35eda03071ea438b75439fce9 Partial-Bug: #1467967
* Merge "Add support for volume backup v2 command"Jenkins2015-06-182-1/+153
|\
| * Add support for volume backup v2 commandAmey Bhide2015-06-042-1/+153
| | | | | | | | | | | | | | | | | | openstack backup create openstack backup list openstack backup restore Implements: blueprint volume-v2 Change-Id: I77965730065dd44f256c46bcc43c1e6a03b63145
* | Add support for volume snapshot v2 commandAmey Bhide2015-06-042-4/+194
|/ | | | | | | | | | openstack snapshot create openstack snapshot set openstack snapshot unset openstack snapshot list Implements: blueprint volume-v2 Change-Id: Ia1d9f4426baa0099281a9931f4eec99ebe1969b1
* Add support for volume v2 APIAmey Bhide2015-05-306-0/+464
| | | | | | | | | | | | | | | Added following commands for volume V2 API: volume show volume delete volume type show volume type delete snapshot show snapshot delete backup show backup delete Implements: blueprint volume-v2 Change-Id: I68bd303c194f304ad15f899d335b72a8bf3ebe10
* Defer client importsDean Troyer2015-04-151-0/+7
| | | | | | | | | | | | So we really weren't deferring the loading of client libs dadgummit, do that for real where possible. This shaves a couple of tenths off the static import times. Also defer as much import-time procesing as possible. This is a little ugly in api.auth but this also eliminates import of the auth plugins until they are needed. Change-Id: Ia11d4b9cf98231d37449103fc29101dc17afb009
* Check volume status before extending sizelin-hua-cheng2015-02-062-8/+191
| | | | | | | Added test for Volume Set as well. Change-Id: I8e6794f67b160ca328fcafa8f1d67138b4f3becd Closes-Bug: #1415182
* Fix volume create --imageDean Troyer2014-11-182-0/+159
| | | | | | | 'volume create --image' should allow an image name to be used. Closes-Bug: #1383333 Change-Id: I996d46db321eef2d75c3d19b480319f8a78c09b3
* assertEquals order wrongTerry Howe2014-09-041-10/+10
| | | | | Change-Id: I822b6ac5b8e8c3009d1ee2d647376eff84559c11 Partial-Bug: #1277104
* test_find_resource fails if run alonewanghong2014-08-071-0/+1
| | | | | | | | | | Currently, we set 'NAME_ATTR' attribute for Volume and Snapshot class in volume.client.py. When we test test_find_resource alone, the Volume and Snapshot class do not have 'NAME_ATTR' attribute since we do not import volume.client, which causes the tests to fail. Change-Id: I06f727ffa8d37afe1a1191c36574887fecc7a733 Closes-Bug: #1353788
* Fix PEP8 E265 errorsDean Troyer2014-06-271-2/+0
| | | | Change-Id: Ieb9a9af1da27d3935d1a4d3cfb61b0ccb03d099a
* Fix find_resource for keystone and cinderTerry Howe2014-06-171-0/+71
| | | | | | | | | | | | | | | | | | | The find_resource method had two hacks in in to support cinder and keystone and I have removed those in favor of a monkey patch for cinder. The find_resource method used to attempt to UUID parse the id, but it would do a manager.get anyway. I changed it to skip the UUID parsing. This will make things run minorly faster and it supports LDAP for keystone. The find_resource used to attempt to use display_name=name_or_id when finding. This was a hack for cinder support, but it breaks keystone because keystone totally messes up with the bogus filter and keystone refuses to fix it. Change-Id: I66e45a6341f704900f1d5321a0e70eac3d051665 Closes-Bug: #1306699
* Add support for extension listMatt Fischer2014-06-111-0/+22
| | | | | | | | | | | | - Add support in the common section for extension list. This only supports Identity for now. Once the APIs for volume and compute are supported in the respective APIs, they will be added. Once network is added to this client, it will be added (the API already supports it). - Include extension fakes for volume and compute for pre-enablement. Change-Id: Iebb0156a779887d2ab06488a2a27b70b56369376 Closes-Bug: #1319115
* Change volume create --volume-type to --typeDean Troyer2014-05-152-14/+148
| | | | | | | This makes it consistent with the other --type options in OSC. Also add a few more volume_create tests. Change-Id: I50ef927932cabf157ecdfd6c4faa1914b4fdf413
* Fix misspellings in python openstackclientShane Wang2014-02-072-4/+4
| | | | | | | | | Fix misspellings detected by: * pip install misspellings * git ls-files | grep -v locale | misspellings -f - Change-Id: Ic0d3efa26eb9a05ce16a8319c142f5bd1ce23821 Closes-Bug: #1257295
* Remove copyright from empty filesAlexander Ignatov2014-01-202-28/+0
| | | | | | | | | According to policy change in HACKING: http://docs.openstack.org/developer/hacking/#openstack-licensing empty files should no longer contain copyright notices. Change-Id: Iba09a00f24dfbd1cd03c1c9f70ea216788e64d93 Closes-Bug: #1262424
* Complete basic test infrastructureDean Troyer2013-11-183-282/+262
| | | | | | | This finally gets all of the API tests into a common framework regarding test classes and so forth. Change-Id: If675347129c50dcba0bfc5b6c58f5a2ca57ff46c
* Do lookups for user, project in volume createDean Troyer2013-10-255-51/+364
| | | | | | | | | This required https://review.openstack.org/26323 in keystoneclient, merged long ago... Also adds some tests for 'volume create' Change-Id: I55bededbc20b5dcf2833c59eb2b6b069703d8a9a
* Move tests into project package.Monty Taylor2013-06-302-0/+65
There are several reasons for this. One is that the majority of OpenStack packages behave this way. The second is that it makes writing software that extends something easier to test (which is a clear usecase for openstackclient) And third, tests/__init__.py implies a global package named "tests" - which I'm pretty sure we're not providing. Change-Id: Ic708ffd92aea78c2ffc1a8579af0587af4fca4ff