Report multiattach capability for Hitachi VSP drivers

This patch enables the reporting of the multiattach capability in
get_volume_stats for Hitachi VSP drivers.
Also repairs the comments of class.

Change-Id: I6fcc979c816415d0383bc80b8b7f7129623bf942
This commit is contained in:
Kazumasa Nomura 2016-12-21 20:13:42 -05:00
parent b3e96a58f0
commit 277059ad83
8 changed files with 9 additions and 38 deletions

View File

@ -1088,6 +1088,7 @@ class VSPHORCMFCDriverTest(test.TestCase):
"""Normal case: Refreshing data required."""
stats = self.driver.get_volume_stats(True)
self.assertEqual('Hitachi', stats['vendor_name'])
self.assertTrue(stats['multiattach'])
@mock.patch.object(vsp_utils, 'execute', side_effect=_execute)
def test_get_volume_stats_no_refresh(self, *args):

View File

@ -1157,6 +1157,7 @@ class VSPHORCMISCSIDriverTest(test.TestCase):
"""Normal case: Refreshing data required."""
stats = self.driver.get_volume_stats(True)
self.assertEqual('Hitachi', stats['vendor_name'])
self.assertTrue(stats['multiattach'])
@mock.patch.object(vsp_utils, 'execute', side_effect=_execute)
def test_get_volume_stats_no_refresh(self, *args):

View File

@ -128,15 +128,7 @@ def _str2int(num):
@six.add_metaclass(abc.ABCMeta)
class VSPCommon(object):
"""Common class for Hitachi VSP Driver.
Version history:
.. code-block:: none
1.0.0 - Initial driver.
"""
"""Common class for Hitachi VSP Driver."""
def __init__(self, conf, driverinfo, db):
"""Initialize instance variables."""
@ -520,6 +512,7 @@ class VSPCommon(object):
data['free_capacity_gb'] = free_gb
data['reserved_percentage'] = self.conf.safe_get('reserved_percentage')
data['QoS_support'] = False
data['multiattach'] = True
LOG.debug("Updating volume status. (%s)", data)
self._stats = data

View File

@ -56,7 +56,7 @@ class VSPFCDriver(driver.FibreChannelDriver):
.. code-block:: none
1.0.0 - Initial driver.
1.0.0 - Initial driver.
"""

View File

@ -305,15 +305,7 @@ def _check_ldev(ldev_info, ldev, existing_ref):
class VSPHORCM(common.VSPCommon):
"""HORCM interface class for Hitachi VSP Driver.
Version history:
.. code-block:: none
1.0.0 - Initial driver.
"""
"""HORCM interface class for Hitachi VSP Driver."""
def __init__(self, conf, storage_protocol, db):
"""Initialize instance variables."""

View File

@ -36,15 +36,7 @@ MSG = utils.VSPMsg
class VSPHORCMFC(horcm.VSPHORCM):
"""HORCM interface fibre channel class for Hitachi VSP Driver.
Version history:
.. code-block:: none
1.0.0 - Initial driver.
"""
"""HORCM interface fibre channel class for Hitachi VSP Driver."""
def __init__(self, conf, storage_protocol, db):
"""Initialize instance variables."""

View File

@ -40,15 +40,7 @@ MSG = utils.VSPMsg
class VSPHORCMISCSI(horcm.VSPHORCM):
"""HORCM interface iscsi class for Hitachi VSP Driver.
Version history:
.. code-block:: none
1.0.0 - Initial driver.
"""
"""HORCM interface iscsi class for Hitachi VSP Driver."""
def connect_storage(self):
"""Prepare for using the storage."""

View File

@ -63,7 +63,7 @@ class VSPISCSIDriver(driver.ISCSIDriver):
.. code-block:: none
1.0.0 - Initial driver.
1.0.0 - Initial driver.
"""