From fa9881a891290ef92d50131bc90d6215b751a2aa Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Thu, 24 Jan 2019 16:29:16 +0800 Subject: [PATCH] QNAP: Add support for QTS 4.4.0 This patch adds support for QNAP QTS firmware 4.4.0 to the QNAP Cinder driver. Change-Id: I191d630b8c730feb50e7eb80f514a0d3b6261dee --- cinder/tests/unit/volume/drivers/test_qnap.py | 2 ++ cinder/volume/drivers/qnap.py | 9 ++++++--- .../notes/qnap-support-qts-440-c482f109694cb77f.yaml | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/qnap-support-qts-440-c482f109694cb77f.yaml diff --git a/cinder/tests/unit/volume/drivers/test_qnap.py b/cinder/tests/unit/volume/drivers/test_qnap.py index e7de6d1078d..7c3e925f1a3 100644 --- a/cinder/tests/unit/volume/drivers/test_qnap.py +++ b/cinder/tests/unit/volume/drivers/test_qnap.py @@ -4735,6 +4735,7 @@ class QnapAPIExecutorTsTestCase(QnapDriverBaseTestCase): fake_params['poolID'] = 'fakepool' fake_params['lv_ifssd'] = 'no' fake_params['LUNCapacity'] = 100 + fake_params['LUNSectorSize'] = '512' fake_params['lv_threshold'] = '80' fake_params['sid'] = 'fakeSid' @@ -4792,6 +4793,7 @@ class QnapAPIExecutorTsTestCase(QnapDriverBaseTestCase): fake_params['poolID'] = 'fakepool' fake_params['lv_ifssd'] = 'no' fake_params['LUNCapacity'] = 100 + fake_params['LUNSectorSize'] = '512' fake_params['lv_threshold'] = '80' fake_params['sid'] = 'fakeSid' diff --git a/cinder/volume/drivers/qnap.py b/cinder/volume/drivers/qnap.py index a67ee0f7c60..4d6f09795c1 100644 --- a/cinder/volume/drivers/qnap.py +++ b/cinder/volume/drivers/qnap.py @@ -77,6 +77,8 @@ class QnapISCSIDriver(san.SanISCSIDriver): Add support for QES fw 2.1.0. 1.2.004: Add support for QES fw on TDS series NAS model. + 1.2.005: + Add support for QTS fw 4.4.0. NOTE: Set driver_ssl_cert_verify as True under backend section to enable SSL verification. @@ -85,7 +87,7 @@ class QnapISCSIDriver(san.SanISCSIDriver): # ThirdPartySystems wiki page CI_WIKI_NAME = "QNAP_CI" - VERSION = '1.2.004' + VERSION = '1.2.005' TIME_INTERVAL = 3 @@ -187,7 +189,7 @@ class QnapISCSIDriver(san.SanISCSIDriver): ] LOG.debug('fw_version: %s', fw_version) if model_type in ts_model_types: - if (fw_version >= "4.2") and (fw_version <= "4.4"): + if (fw_version >= "4.2") and (fw_version <= "4.4.9999"): LOG.debug('Create TS API Executor') # modify the pool name to pool index self.configuration.qnap_poolname = ( @@ -201,7 +203,7 @@ class QnapISCSIDriver(san.SanISCSIDriver): verify_ssl=self.configuration.driver_ssl_cert_verify)) elif model_type in tes_model_types: if 'TS' in internal_model_name: - if (fw_version >= "4.2") and (fw_version <= "4.4"): + if (fw_version >= "4.2") and (fw_version <= "4.4.9999"): LOG.debug('Create TS API Executor') # modify the pool name to poole index self.configuration.qnap_poolname = ( @@ -1817,6 +1819,7 @@ class QnapAPIExecutorTS(QnapAPIExecutor): poolID=pool_name, lv_ifssd='yes' if ssd_cache else 'no', LUNCapacity=volume['size'], + LUNSectorSize='512', lv_threshold='80', sid=self.sid) finally: diff --git a/releasenotes/notes/qnap-support-qts-440-c482f109694cb77f.yaml b/releasenotes/notes/qnap-support-qts-440-c482f109694cb77f.yaml new file mode 100644 index 00000000000..22c79b6fa34 --- /dev/null +++ b/releasenotes/notes/qnap-support-qts-440-c482f109694cb77f.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Added support for QTS fw 4.4.0 to QNAP Cinder driver.