]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Report capability of multiattach for FlashSystem
authorJinru Yan <yanjr@cn.ibm.com>
Thu, 9 Jul 2015 01:30:45 +0000 (09:30 +0800)
committerEdwin Wang <edwin.wang@cn.ibm.com>
Wed, 15 Jul 2015 15:24:24 +0000 (15:24 +0000)
This patch enables the multiattach capability reporting in
_update_volume_stats. This will allow nova to attach and detach
a volume to multiple virtual machine instances.

Change-Id: Ie66850c954168612dd1c17c14e75cd64c0c6d1e7
Implements: blueprint ibm-flashsystem-multiattach

cinder/volume/drivers/ibm/flashsystem_common.py
cinder/volume/drivers/ibm/flashsystem_fc.py
cinder/volume/drivers/ibm/flashsystem_iscsi.py

index 9744dbbf3dd9ab823f8190098ce28367eb79957e..678eecb8a5843bc61116d9575eba3536e56e2e32 100644 (file)
@@ -72,10 +72,11 @@ class FlashSystemDriver(san.SanDriver):
             initialize/terminate
     1.0.3 - Initial driver for iSCSI
     1.0.4 - Split Flashsystem driver into common and FC
+    1.0.5 - Report capability of volume multiattach
 
     """
 
-    VERSION = "1.0.4"
+    VERSION = "1.0.5"
 
     def __init__(self, *args, **kwargs):
         super(FlashSystemDriver, self).__init__(*args, **kwargs)
@@ -843,16 +844,17 @@ class FlashSystemDriver(san.SanDriver):
         """Retrieve stats info from volume group."""
 
         LOG.debug("Updating volume stats.")
-        data = {}
 
-        data['vendor_name'] = 'IBM'
-        data['driver_version'] = self.VERSION
-        data['storage_protocol'] = self._protocol
-
-        data['total_capacity_gb'] = 0
-        data['free_capacity_gb'] = 0
-        data['reserved_percentage'] = self.configuration.reserved_percentage
-        data['QoS_support'] = False
+        data = {
+            'vendor_name': 'IBM',
+            'driver_version': self.VERSION,
+            'storage_protocol': self._protocol,
+            'total_capacity_gb': 0,
+            'free_capacity_gb': 0,
+            'reserved_percentage': self.configuration.reserved_percentage,
+            'QoS_support': False,
+            'multiattach': True,
+        }
 
         pool = FLASHSYSTEM_VOLPOOL_NAME
         backend_name = self.configuration.safe_get('volume_backend_name')
index ba3ac951d3881026eb32ba9c6b0dc45bc567f55f..329b0207fef2dec9757595ad92500154b1a20477 100644 (file)
@@ -63,10 +63,11 @@ class FlashSystemFCDriver(fscommon.FlashSystemDriver,
             initialize/terminate
     1.0.3 - Initial driver for iSCSI
     1.0.4 - Split Flashsystem driver into common and FC
+    1.0.5 - Report capability of volume multiattach
 
     """
 
-    VERSION = "1.0.4"
+    VERSION = "1.0.5"
 
     def __init__(self, *args, **kwargs):
         super(FlashSystemFCDriver, self).__init__(*args, **kwargs)
index b378a0812eedec5126c43656a00da0f82b0a30de..5634a0b2025496d0e61ea407656695e63d4a1307 100644 (file)
@@ -62,10 +62,11 @@ class FlashSystemISCSIDriver(fscommon.FlashSystemDriver,
             initialize/terminate
     1.0.3 - Initial driver for iSCSI
     1.0.4 - Split Flashsystem driver into common and FC
+    1.0.5 - Report capability of volume multiattach
 
     """
 
-    VERSION = "1.0.4"
+    VERSION = "1.0.5"
 
     def __init__(self, *args, **kwargs):
         super(FlashSystemISCSIDriver, self).__init__(*args, **kwargs)