QNAP: Support QES FW on TDS series NAS
Support both QTS and QES FW on TDS series NAS models. Change-Id: I87129fae531b6d50b8490785badcb054a9dd9397
This commit is contained in:
parent
cf41d1867c
commit
bc2a18eee5
@ -74,9 +74,10 @@ class QnapShareDriver(driver.ShareDriver):
|
||||
1.0.5 - Fix bug #1773761, when user tries to manage share, the size
|
||||
of managed share should not be changed.
|
||||
1.0.6 - Add support for QES fw 2.1.0.
|
||||
1.0.7 - Add support for QES fw on TDS series NAS model.
|
||||
"""
|
||||
|
||||
DRIVER_VERSION = '1.0.6'
|
||||
DRIVER_VERSION = '1.0.7'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""Initialize QnapShareDriver."""
|
||||
@ -131,10 +132,10 @@ class QnapShareDriver(driver.ShareDriver):
|
||||
model_type = matches.group(1)
|
||||
|
||||
ts_model_types = (
|
||||
"TS", "SS", "IS", "TVS", "TDS", "TBS"
|
||||
"TS", "SS", "IS", "TVS", "TBS"
|
||||
)
|
||||
tes_model_types = (
|
||||
"TES",
|
||||
"TES", "TDS"
|
||||
)
|
||||
es_model_types = (
|
||||
"ES",
|
||||
|
@ -173,6 +173,62 @@ FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TES_ES_2_2_0 = """
|
||||
</firmware>
|
||||
</QDocRoot>"""
|
||||
|
||||
FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_TS_4_0_0 = """
|
||||
<QDocRoot version="1.0">
|
||||
<model>
|
||||
<displayModelName><![CDATA[TDS-16489U R2]]></displayModelName>
|
||||
<internalModelName><![CDATA[TS-X89]]></internalModelName>
|
||||
</model>
|
||||
<firmware>
|
||||
<version><![CDATA[4.0.0]]></version>
|
||||
</firmware>
|
||||
</QDocRoot>"""
|
||||
|
||||
FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_TS_4_3_0 = """
|
||||
<QDocRoot version="1.0">
|
||||
<model>
|
||||
<displayModelName><![CDATA[TDS-16489U R2]]></displayModelName>
|
||||
<internalModelName><![CDATA[TS-X89]]></internalModelName>
|
||||
</model>
|
||||
<firmware>
|
||||
<version><![CDATA[4.3.0]]></version>
|
||||
</firmware>
|
||||
</QDocRoot>"""
|
||||
|
||||
FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_ES_1_1_1 = """
|
||||
<QDocRoot version="1.0">
|
||||
<model>
|
||||
<displayModelName><![CDATA[TDS-16489U R2]]></displayModelName>
|
||||
<internalModelName><![CDATA[ES-X85U]]></internalModelName>
|
||||
</model>
|
||||
<firmware>
|
||||
<version><![CDATA[1.1.1]]></version>
|
||||
</firmware>
|
||||
</QDocRoot>"""
|
||||
|
||||
FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_ES_2_1_0 = """
|
||||
<QDocRoot version="1.0">
|
||||
<model>
|
||||
<displayModelName><![CDATA[TDS-16489U R2]]></displayModelName>
|
||||
<internalModelName><![CDATA[ES-X85U]]></internalModelName>
|
||||
</model>
|
||||
<firmware>
|
||||
<version><![CDATA[2.1.0]]></version>
|
||||
</firmware>
|
||||
</QDocRoot>"""
|
||||
|
||||
FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_ES_2_2_0 = """
|
||||
<QDocRoot version="1.0">
|
||||
<model>
|
||||
<displayModelName><![CDATA[TDS-16489U R2]]></displayModelName>
|
||||
<internalModelName><![CDATA[ES-X85U]]></internalModelName>
|
||||
</model>
|
||||
<firmware>
|
||||
<version><![CDATA[2.2.0]]></version>
|
||||
</firmware>
|
||||
</QDocRoot>"""
|
||||
|
||||
|
||||
FAKE_RES_DETAIL_DATA_GETBASIC_INFO_ERROR = """
|
||||
<QDocRoot version="1.0">
|
||||
<model>
|
||||
@ -625,6 +681,56 @@ class FakeGetBasicInfoResponseTesEs_2_2_0(object):
|
||||
return FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TES_ES_2_2_0
|
||||
|
||||
|
||||
class FakeGetBasicInfoResponseTdsTs_4_0_0(object):
|
||||
"""Fake GetBasicInfoTS response from TS nas."""
|
||||
|
||||
status = 'fackStatus'
|
||||
|
||||
def read(self):
|
||||
"""Mock response.read."""
|
||||
return FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_TS_4_0_0
|
||||
|
||||
|
||||
class FakeGetBasicInfoResponseTdsTs_4_3_0(object):
|
||||
"""Fake GetBasicInfoTS response from TS nas."""
|
||||
|
||||
status = 'fackStatus'
|
||||
|
||||
def read(self):
|
||||
"""Mock response.read."""
|
||||
return FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_TS_4_3_0
|
||||
|
||||
|
||||
class FakeGetBasicInfoResponseTdsEs_1_1_1(object):
|
||||
"""Fake GetBasicInfoTS response from ES nas."""
|
||||
|
||||
status = 'fackStatus'
|
||||
|
||||
def read(self):
|
||||
"""Mock response.read."""
|
||||
return FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_ES_1_1_1
|
||||
|
||||
|
||||
class FakeGetBasicInfoResponseTdsEs_2_1_0(object):
|
||||
"""Fake GetBasicInfoTS response from ES nas."""
|
||||
|
||||
status = 'fackStatus'
|
||||
|
||||
def read(self):
|
||||
"""Mock response.read."""
|
||||
return FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_ES_2_1_0
|
||||
|
||||
|
||||
class FakeGetBasicInfoResponseTdsEs_2_2_0(object):
|
||||
"""Fake GetBasicInfoTS response from ES nas."""
|
||||
|
||||
status = 'fackStatus'
|
||||
|
||||
def read(self):
|
||||
"""Mock response.read."""
|
||||
return FAKE_RES_DETAIL_DATA_GETBASIC_INFO_TDS_ES_2_2_0
|
||||
|
||||
|
||||
class FakeGetBasicInfoResponseError(object):
|
||||
"""Fake GetBasicInfoTS response from TS nas."""
|
||||
|
||||
|
@ -159,6 +159,12 @@ class QnapShareDriverLoginTestCase(QnapShareDriverBaseTestCase):
|
||||
}, {
|
||||
'fake_basic_info': fakes.FakeGetBasicInfoResponseTesEs_2_1_0(),
|
||||
'expect_result': api.QnapAPIExecutor
|
||||
}, {
|
||||
'fake_basic_info': fakes.FakeGetBasicInfoResponseTdsTs_4_3_0(),
|
||||
'expect_result': api.QnapAPIExecutorTS
|
||||
}, {
|
||||
'fake_basic_info': fakes.FakeGetBasicInfoResponseTdsEs_2_1_0(),
|
||||
'expect_result': api.QnapAPIExecutor
|
||||
}, {
|
||||
'fake_basic_info': fakes.FakeGetBasicInfoResponseEs_1_1_3(),
|
||||
'expect_result': api.QnapAPIExecutor
|
||||
@ -194,6 +200,15 @@ class QnapShareDriverLoginTestCase(QnapShareDriverBaseTestCase):
|
||||
}, {
|
||||
'fake_basic_info': fakes.FakeGetBasicInfoResponseTesEs_2_2_0(),
|
||||
'expect_result': exception.ShareBackendException
|
||||
}, {
|
||||
'fake_basic_info': fakes.FakeGetBasicInfoResponseTdsTs_4_0_0(),
|
||||
'expect_result': exception.ShareBackendException
|
||||
}, {
|
||||
'fake_basic_info': fakes.FakeGetBasicInfoResponseTdsEs_1_1_1(),
|
||||
'expect_result': exception.ShareBackendException
|
||||
}, {
|
||||
'fake_basic_info': fakes.FakeGetBasicInfoResponseTdsEs_2_2_0(),
|
||||
'expect_result': exception.ShareBackendException
|
||||
}, {
|
||||
'fake_basic_info': fakes.FakeGetBasicInfoResponseEs_1_1_1(),
|
||||
'expect_result': exception.ShareBackendException
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
QNAP Manila driver supports QES FW on TDS series NAS.
|
Loading…
Reference in New Issue
Block a user