Update the StorPool CI Cinder patchset
Add the "fix the rename volume unit test API mock" patch.
Put the "improve clone_volume()" patch at the end where it belongs.
Refresh some of the patches.
Change-Id: I33f19ea5bd19ab711a50776535a52ea5824a4891
diff --git a/patches/openstack/cinder/sep-sp-fix-test-rename.patch b/patches/openstack/cinder/sep-sp-fix-test-rename.patch
new file mode 100644
index 0000000..742699f
--- /dev/null
+++ b/patches/openstack/cinder/sep-sp-fix-test-rename.patch
@@ -0,0 +1,29 @@
+StorPool: fix the "rename volume" unit test emulation
+
+Also update the "name" field of the actual data structure in
+the fake list of volumes.
+
+Change-Id: Iee9e3feea1af4f3d0acdf05ea1b540ecf59e755b
+--- a/cinder/tests/unit/volume/drivers/test_storpool.py
++++ b/cinder/tests/unit/volume/drivers/test_storpool.py
+@@ -135,7 +135,10 @@
+ volumes[name]['size'] = data['size']
+
+ if 'rename' in data and data['rename'] != name:
+- volumes[data['rename']] = volumes[name]
++ new_name = data['rename']
++ volumes[new_name] = volumes[name]
++ if volumes[new_name]['name'] == name:
++ volumes[new_name]['name'] = new_name
+ del volumes[name]
+
+
+@@ -259,6 +262,8 @@
+ def assertVolumeNames(self, names):
+ self.assertListEqual(sorted([volumeName(n) for n in names]),
+ sorted(volumes.keys()))
++ self.assertListEqual(sorted([volumeName(n) for n in names]),
++ sorted(data['name'] for data in volumes.values()))
+
+ @mock_volume_types
+ def test_create_delete_volume(self):