Regenerate the iSCSI patch

Change-Id: Ib5b2223d23fed607cf79f5aeb3cd570167813279
diff --git a/patches/openstack/cinder/sep-sp-iscsi.patch b/patches/openstack/cinder/sep-sp-iscsi.patch
index 6df5e6e..1ec0908 100644
--- a/patches/openstack/cinder/sep-sp-iscsi.patch
+++ b/patches/openstack/cinder/sep-sp-iscsi.patch
@@ -1,4 +1,4 @@
-From bfc35f997b9ad20ac9a7ad0c363594230ab820c8 Mon Sep 17 00:00:00 2001
+From 2acfdddf0794754aa0e32a56800e77387f75ce38 Mon Sep 17 00:00:00 2001
 From: Peter Penchev <openstack-dev@storpool.com>
 Date: Mon, 12 Mar 2018 12:00:10 +0200
 Subject: [PATCH] Add iSCSI export support to the StorPool driver
@@ -25,15 +25,15 @@
 
 Change-Id: I9de64306e0e6976268df782053b0651dd1cca96f
 ---
- .../unit/volume/drivers/test_storpool.py      | 522 +++++++++++++++++-
+ .../unit/volume/drivers/test_storpool.py      | 521 +++++++++++++++++-
  cinder/volume/drivers/storpool.py             | 379 ++++++++++++-
  .../drivers/storpool-volume-driver.rst        |  68 ++-
  .../storpool-iscsi-cefcfe590a07c5c7.yaml      |  15 +
- 4 files changed, 973 insertions(+), 11 deletions(-)
+ 4 files changed, 972 insertions(+), 11 deletions(-)
  create mode 100644 releasenotes/notes/storpool-iscsi-cefcfe590a07c5c7.yaml
 
 diff --git a/cinder/tests/unit/volume/drivers/test_storpool.py b/cinder/tests/unit/volume/drivers/test_storpool.py
-index 80b68a8af..d0bb568a6 100644
+index 44707d0b8..d6347e1d5 100644
 --- a/cinder/tests/unit/volume/drivers/test_storpool.py
 +++ b/cinder/tests/unit/volume/drivers/test_storpool.py
 @@ -14,14 +14,24 @@
@@ -61,15 +61,15 @@
  
  fakeStorPool = mock.Mock()
  fakeStorPool.spopenstack = mock.Mock()
-@@ -31,12 +41,21 @@ fakeStorPool.sptypes = mock.Mock()
+@@ -31,6 +41,7 @@ fakeStorPool.sptypes = mock.Mock()
  sys.modules['storpool'] = fakeStorPool
  
  
 +from cinder.common import constants
  from cinder import exception
-+from cinder.tests.unit import fake_constants as fconst
+ from cinder.tests.unit import fake_constants
  from cinder.tests.unit import test
- from cinder.volume import configuration as conf
+@@ -38,6 +49,13 @@ from cinder.volume import configuration as conf
  from cinder.volume.drivers import storpool as driver
  
  
@@ -81,9 +81,9 @@
 +_ISCSI_PORTAL_GROUP = 'openstack_pg'
 +
  volume_types = {
-     1: {},
-     2: {'storpool_template': 'ssd'},
-@@ -70,6 +89,10 @@ def snapshotName(vtype, vid):
+     fake_constants.VOLUME_TYPE_ID: {},
+     fake_constants.VOLUME_TYPE2_ID: {'storpool_template': 'ssd'},
+@@ -71,6 +89,10 @@ def snapshotName(vtype, vid):
      return 'os--snap--{t}--{id}'.format(t=vtype, id=vid)
  
  
@@ -94,7 +94,7 @@
  class MockDisk(object):
      def __init__(self, diskId):
          self.id = diskId
-@@ -194,6 +217,315 @@ def MockVolumeUpdateDesc(size):
+@@ -195,6 +217,315 @@ def MockVolumeUpdateDesc(size):
      return {'size': size}
  
  
@@ -177,8 +177,8 @@
 +
 +        targets = {
 +            '0': MockIscsiTarget(
-+                name=targetName(fconst.VOLUME2_ID),
-+                volume=volumeName(fconst.VOLUME2_ID),
++                name=targetName(fake_constants.VOLUME2_ID),
++                volume=volumeName(fake_constants.VOLUME2_ID),
 +            ),
 +        }
 +        if tcase.volume is not None:
@@ -242,7 +242,7 @@
 +            {
 +                'initiator': _ISCSI_IQN_OURS,
 +                'portalGroup': _ISCSI_PORTAL_GROUP,
-+                'volumeName': volumeName(fconst.VOLUME_ID),
++                'volumeName': volumeName(fake_constants.VOLUME_ID),
 +            },
 +        )
 +        self._asrt.assertEqual(cfg.initiators['1'].name, cmd['initiator'])
@@ -257,7 +257,7 @@
 +                    exports=[
 +                        MockIscsiExport(
 +                            portalGroup=cmd['portalGroup'],
-+                            target=targetName(fconst.VOLUME_ID),
++                            target=targetName(fake_constants.VOLUME_ID),
 +                        ),
 +                    ],
 +                ),
@@ -275,7 +275,7 @@
 +            {
 +                'initiator': _ISCSI_IQN_OURS,
 +                'portalGroup': _ISCSI_PORTAL_GROUP,
-+                'volumeName': volumeName(fconst.VOLUME_ID),
++                'volumeName': volumeName(fake_constants.VOLUME_ID),
 +            },
 +        )
 +        self._asrt.assertEqual(cfg.initiators['1'].name, cmd['initiator'])
@@ -324,7 +324,7 @@
 +        """Add a target for a volume so that it may be exported."""
 +        self._asrt.assertDictEqual(
 +            cmd,
-+            {'volumeName': volumeName(fconst.VOLUME_ID)},
++            {'volumeName': volumeName(fake_constants.VOLUME_ID)},
 +        )
 +        self._asrt.assertListEqual(sorted(cfg.targets), ['0'])
 +        return dataclasses.replace(
@@ -332,8 +332,8 @@
 +            targets={
 +                **cfg.targets,
 +                '1': MockIscsiTarget(
-+                    name=targetName(fconst.VOLUME_ID),
-+                    volume=volumeName(fconst.VOLUME_ID),
++                    name=targetName(fake_constants.VOLUME_ID),
++                    volume=volumeName(fake_constants.VOLUME_ID),
 +                ),
 +            },
 +        )
@@ -346,7 +346,7 @@
 +        """Remove a target for a volume."""
 +        self._asrt.assertDictEqual(
 +            cmd,
-+            {'volumeName': volumeName(fconst.VOLUME_ID)},
++            {'volumeName': volumeName(fake_constants.VOLUME_ID)},
 +        )
 +
 +        self._asrt.assertListEqual(sorted(cfg.targets), ['0', '1'])
@@ -402,15 +402,15 @@
 +_ISCSI_TEST_CASES = [
 +    IscsiTestCase(None, None, False, 4),
 +    IscsiTestCase(_ISCSI_IQN_OURS, None, False, 2),
-+    IscsiTestCase(_ISCSI_IQN_OURS, fconst.VOLUME_ID, False, 1),
-+    IscsiTestCase(_ISCSI_IQN_OURS, fconst.VOLUME_ID, True, 0),
++    IscsiTestCase(_ISCSI_IQN_OURS, fake_constants.VOLUME_ID, False, 1),
++    IscsiTestCase(_ISCSI_IQN_OURS, fake_constants.VOLUME_ID, True, 0),
 +]
 +
 +
  def MockSPConfig(section = 's01'):
      res = {}
      m = re.match('^s0*([A-Za-z0-9]+)$', section)
-@@ -236,7 +568,15 @@ class StorPoolTestCase(test.TestCase):
+@@ -237,7 +568,15 @@ class StorPoolTestCase(test.TestCase):
          self.cfg.volume_backend_name = 'storpool_test'
          self.cfg.storpool_template = None
          self.cfg.storpool_replication = 3
@@ -426,7 +426,7 @@
          mock_exec = mock.Mock()
          mock_exec.return_value = ('', '')
  
-@@ -245,7 +585,7 @@ class StorPoolTestCase(test.TestCase):
+@@ -246,7 +585,7 @@ class StorPoolTestCase(test.TestCase):
          self.driver.check_for_setup_error()
  
      @ddt.data(
@@ -435,7 +435,7 @@
          ({'no-host': None}, KeyError),
          ({'host': 'sbad'}, driver.StorPoolConfigurationInvalid),
          ({'host': 's01'}, None),
-@@ -261,7 +601,7 @@ class StorPoolTestCase(test.TestCase):
+@@ -262,7 +601,7 @@ class StorPoolTestCase(test.TestCase):
                                conn)
  
      @ddt.data(
@@ -444,7 +444,7 @@
          ({'no-host': None}, KeyError),
          ({'host': 'sbad'}, driver.StorPoolConfigurationInvalid),
      )
-@@ -300,7 +640,7 @@ class StorPoolTestCase(test.TestCase):
+@@ -301,7 +640,7 @@ class StorPoolTestCase(test.TestCase):
              self.assertEqual(21, pool['total_capacity_gb'])
              self.assertEqual(5, int(pool['free_capacity_gb']))
  
@@ -453,7 +453,7 @@
              self.assertFalse(pool['QoS_support'])
              self.assertFalse(pool['thick_provisioning_support'])
              self.assertTrue(pool['thin_provisioning_support'])
-@@ -703,3 +1043,179 @@ class StorPoolTestCase(test.TestCase):
+@@ -720,3 +1059,179 @@ class StorPoolTestCase(test.TestCase):
                                 'No such volume',
                                 self.driver.revert_to_snapshot, None,
                                 {'id': vol_id}, {'id': snap_id})
@@ -556,7 +556,7 @@
 +        with mock.patch.object(self.driver._attach, 'api', new=lambda: iapi):
 +            res = self.driver._get_iscsi_config(
 +                _ISCSI_IQN_OURS,
-+                fconst.VOLUME_ID,
++                fake_constants.VOLUME_ID,
 +            )
 +
 +        self._validate_iscsi_config(cfg_orig, res, tcase)
@@ -570,8 +570,8 @@
 +        with mock.patch.object(self.driver._attach, 'api', new=lambda: iapi):
 +            self.driver._create_iscsi_export(
 +                {
-+                    'id': fconst.VOLUME_ID,
-+                    'display_name': fconst.VOLUME_NAME,
++                    'id': fake_constants.VOLUME_ID,
++                    'display_name': fake_constants.VOLUME_NAME,
 +                },
 +                {
 +                    # Yeah, okay, so we cheat a little bit here...
@@ -585,11 +585,11 @@
 +        self.assertEqual(cfg_final.initiators['1'].name, _ISCSI_IQN_OURS)
 +        self.assertEqual(
 +            cfg_final.initiators['1'].exports[0].target,
-+            targetName(fconst.VOLUME_ID),
++            targetName(fake_constants.VOLUME_ID),
 +        )
 +        self.assertEqual(
 +            cfg_final.targets['1'].volume,
-+            volumeName(fconst.VOLUME_ID),
++            volumeName(fake_constants.VOLUME_ID),
 +        )
 +
 +    @ddt.data(*_ISCSI_TEST_CASES)
@@ -620,8 +620,8 @@
 +        with mock.patch.object(self.driver._attach, 'api', new=lambda: iapi):
 +            self.driver._remove_iscsi_export(
 +                {
-+                    'id': fconst.VOLUME_ID,
-+                    'display_name': fconst.VOLUME_NAME,
++                    'id': fake_constants.VOLUME_ID,
++                    'display_name': fake_constants.VOLUME_NAME,
 +                },
 +                {
 +                    'host': _ISCSI_IQN_OURS + '.hostname',