diff options
| author | Steve Martinelli <s.martinelli@gmail.com> | 2016-06-16 14:25:33 -0400 |
|---|---|---|
| committer | Steve Martinelli <s.martinelli@gmail.com> | 2016-06-20 16:42:36 -0400 |
| commit | 4e62e1e2e18cb93ba0f88bff8727182b1002de4b (patch) | |
| tree | 413776b14a9fdda3dbfafbc69b67ff666a6a032f /functional | |
| parent | f5ae23ab86c662e2f75952e6aa62c02ab3855b9b (diff) | |
| download | python-openstackclient-4e62e1e2e18cb93ba0f88bff8727182b1002de4b.tar.gz | |
support multi-delete for volume-type
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
Diffstat (limited to 'functional')
| -rw-r--r-- | functional/tests/volume/v1/test_volume_type.py | 13 | ||||
| -rw-r--r-- | functional/tests/volume/v2/test_volume_type.py | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/functional/tests/volume/v1/test_volume_type.py b/functional/tests/volume/v1/test_volume_type.py index 824b20d7..5f1f957e 100644 --- a/functional/tests/volume/v1/test_volume_type.py +++ b/functional/tests/volume/v1/test_volume_type.py @@ -10,6 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. +import time import uuid from functional.tests.volume.v1 import common @@ -59,3 +60,15 @@ class VolumeTypeTests(common.BaseVolumeTests): self.assertEqual("", raw_output) raw_output = self.openstack('volume type show ' + self.NAME + opts) self.assertEqual("c='d'\n", raw_output) + + def test_multi_delete(self): + vol_type1 = uuid.uuid4().hex + vol_type2 = uuid.uuid4().hex + self.openstack('volume type create ' + vol_type1) + time.sleep(5) + self.openstack('volume type create ' + vol_type2) + time.sleep(5) + cmd = 'volume type delete %s %s' % (vol_type1, vol_type2) + time.sleep(5) + raw_output = self.openstack(cmd) + self.assertOutput('', raw_output) diff --git a/functional/tests/volume/v2/test_volume_type.py b/functional/tests/volume/v2/test_volume_type.py index 4c315334..114e4298 100644 --- a/functional/tests/volume/v2/test_volume_type.py +++ b/functional/tests/volume/v2/test_volume_type.py @@ -10,6 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. +import time import uuid from functional.tests.volume.v2 import common @@ -69,3 +70,15 @@ class VolumeTypeTests(common.BaseVolumeTests): raw_output = self.openstack( 'volume type unset --project admin ' + self.NAME) self.assertEqual("", raw_output) + + def test_multi_delete(self): + vol_type1 = uuid.uuid4().hex + vol_type2 = uuid.uuid4().hex + self.openstack('volume type create ' + vol_type1) + time.sleep(5) + self.openstack('volume type create ' + vol_type2) + time.sleep(5) + cmd = 'volume type delete %s %s' % (vol_type1, vol_type2) + time.sleep(5) + raw_output = self.openstack(cmd) + self.assertOutput('', raw_output) |
