]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Update driver version to 1.1
authorWalter A. Boring IV <walter.boring@hp.com>
Fri, 2 Aug 2013 21:22:27 +0000 (14:22 -0700)
committerWalter A. Boring IV <walter.boring@hp.com>
Fri, 2 Aug 2013 21:22:27 +0000 (14:22 -0700)
This patch includes bumping the driver versions for both
Fibre Channel and iSCSI to 1.1.  Included a history change
that describes the changes since 1.0.

This patch also changes the way we do clone volume.  We no
longer have to check the status of the volume clone on the 3par
as it's instantly done now since 3.1.2 MU2 firmware.

Change-Id: I541ac7f97e6d1290bac6232d6c80e8ecf3a75dda

cinder/tests/test_hp3par.py
cinder/volume/drivers/san/hp/hp_3par_common.py
cinder/volume/drivers/san/hp/hp_3par_fc.py
cinder/volume/drivers/san/hp/hp_3par_iscsi.py

index 26eb9c9701fae3c9829482d77df12ac16c8c7825..9e6935382e9072ecc62f7e18a6fb38b58ba98963 100644 (file)
@@ -637,8 +637,6 @@ class TestHP3PARFCDriver(HP3PARBaseDriver, test.TestCase):
 
     def test_create_cloned_volume(self):
         self.flags(lock_path=self.tempdir)
-        self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_get_volume_state",
-                       self.fake_get_volume_state)
         self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_copy_volume",
                        self.fake_copy_volume)
         self.state_tries = 0
@@ -843,8 +841,6 @@ class TestHP3PARISCSIDriver(HP3PARBaseDriver, test.TestCase):
 
     def test_create_cloned_volume(self):
         self.flags(lock_path=self.tempdir)
-        self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_get_volume_state",
-                       self.fake_get_volume_state)
         self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_copy_volume",
                        self.fake_copy_volume)
         self.state_tries = 0
@@ -963,22 +959,6 @@ class TestHP3PARISCSIDriver(HP3PARBaseDriver, test.TestCase):
         host = self.driver._create_host(self.volume, self.connector)
         self.assertEqual(host['name'], self.FAKE_HOST)
 
-    def test_get_volume_state(self):
-        self.flags(lock_path=self.tempdir)
-
-        #record
-        self.clear_mox()
-        _run_ssh = self.mox.CreateMock(hpdriver.hpcommon.HP3PARCommon._run_ssh)
-        self.stubs.Set(hpdriver.hpcommon.HP3PARCommon, "_run_ssh", _run_ssh)
-
-        show_vv_cmd = ('showvv -state '
-                       'volume-d03338a9-9115-48a3-8dfc-35cdfcdc15a7')
-        _run_ssh(show_vv_cmd, False).AndReturn([pack(VOLUME_STATE_RET), ''])
-        self.mox.ReplayAll()
-
-        status = self.driver.common._get_volume_state(self.VOLUME_NAME)
-        self.assertEqual(status, 'normal')
-
     def test_get_ports(self):
         self.flags(lock_path=self.tempdir)
 
index 14e7e327b05112f9e4b8e4ed4df5333355f26071..da64e474df438a74eb39403647d4de4546141504 100644 (file)
@@ -19,7 +19,8 @@
 #
 """
 Volume driver common utilities for HP 3PAR Storage array
-The 3PAR drivers requires 3.1.2 firmware on the 3PAR array.
+
+The 3PAR drivers requires 3.1.2 MU2 firmware on the 3PAR array.
 
 You will need to install the python hp3parclient.
 sudo pip install hp3parclient
@@ -786,16 +787,6 @@ exit
     def _copy_volume(self, src_name, dest_name):
         self._cli_run('createvvcopy -p %s %s' % (src_name, dest_name), None)
 
-    def _get_volume_state(self, vol_name):
-        out = self._cli_run('showvv -state %s' % vol_name, None)
-        status = None
-        if out:
-            # out[0] is the header
-            info = out[1].split(',')
-            status = info[5]
-
-        return status
-
     def get_next_word(self, s, search_string):
         """Return the next word.
 
@@ -827,24 +818,6 @@ exit
             # can't delete the original until the copy is done.
             self._copy_volume(orig_name, vol_name)
 
-            # this can take a long time to complete
-            done = False
-            while not done:
-                status = self._get_volume_state(vol_name)
-                if status == 'normal':
-                    done = True
-                elif status == 'copy_target':
-                    LOG.debug("3Par still copying %s => %s"
-                              % (orig_name, vol_name))
-                else:
-                    msg = _("Unexpected state while cloning %s") % status
-                    LOG.warn(msg)
-                    raise exception.CinderException(msg)
-
-                if not done:
-                    # wait 5 seconds between tests
-                    time.sleep(5)
-
             return new_vol
         except hpexceptions.HTTPForbidden:
             raise exception.NotAuthorized()
index 29f7be9034d23845275018806c02e88fb4c4138e..0553ae6f019088cfe84cce88961324432a4bf291 100644 (file)
@@ -18,8 +18,8 @@
 #    under the License.
 #
 """
-Volume driver for HP 3PAR Storage array. This driver requires 3.1.2 firmware
-on the 3PAR array.
+Volume driver for HP 3PAR Storage array.
+This driver requires 3.1.2 MU2 firmware on the 3PAR array.
 
 You will need to install the python hp3parclient.
 sudo pip install hp3parclient
@@ -40,7 +40,7 @@ import cinder.volume.driver
 from cinder.volume.drivers.san.hp import hp_3par_common as hpcommon
 from cinder.volume.drivers.san import san
 
-VERSION = 1.0
+VERSION = 1.1
 LOG = logging.getLogger(__name__)
 
 
@@ -49,7 +49,9 @@ class HP3PARFCDriver(cinder.volume.driver.FibreChannelDriver):
 
     Version history:
         1.0 - Initial driver
-
+        1.1 - QoS, extend volume, multiple iscsi ports, remove domain,
+              session changes, faster clone, requires 3.1.2 MU2 firmware,
+              copy volume <--> Image.
     """
 
     def __init__(self, *args, **kwargs):
index fc4602855aaef1a468b4083fbcd89dcb214fb63a..48db1bee7f5fe389a4ec9c29b0a0537d9db8679e 100644 (file)
@@ -18,8 +18,8 @@
 #    under the License.
 #
 """
-Volume driver for HP 3PAR Storage array. This driver requires 3.1.2 firmware
-on the 3PAR array.
+Volume driver for HP 3PAR Storage array.
+This driver requires 3.1.2 MU2 firmware on the 3PAR array.
 
 You will need to install the python hp3parclient.
 sudo pip install hp3parclient
@@ -41,7 +41,7 @@ import cinder.volume.driver
 from cinder.volume.drivers.san.hp import hp_3par_common as hpcommon
 from cinder.volume.drivers.san import san
 
-VERSION = 1.0
+VERSION = 1.1
 LOG = logging.getLogger(__name__)
 DEFAULT_ISCSI_PORT = 3260
 
@@ -51,6 +51,8 @@ class HP3PARISCSIDriver(cinder.volume.driver.ISCSIDriver):
 
     Version history:
         1.0 - Initial driver
+        1.1 - QoS, extend volume, multiple iscsi ports, remove domain,
+              session changes, faster clone, requires 3.1.2 MU2 firmware.
 
     """
     def __init__(self, *args, **kwargs):