Commit Graph

10 Commits

Author SHA1 Message Date
haixin a73b299374 Remove usage of six lib for third party/vendors drivers.
Python2 is no longer supported, so in this patch
set we remove the usage of the six (py2 and py3
compatibility library) in favor of py3 syntax.

Change-Id: I3ddfad568a1b578bee23a6d1a96de9551e336bb4
2022-01-29 03:01:17 +00:00
Goutham Pacha Ravi 598223985a Use unittest.mock instead of third party lib
mock was adopted into standard python
in version 3.3 [1]. Since manila no longer
supports python2.7, we can use the inbuilt
mock package rather than the third party
lib.

Fix some issues with imports that weren't
following our import conventions of grouping
imports [3]

Add a hacking test to ensure we don't regress
on this.

[1] https://docs.python.org/3/library/unittest.mock.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-March/013281.html
[3] https://docs.openstack.org/hacking/latest/user/hacking.html#imports

Co-Authored-By: Sean McGinnis <sean.mcginnis@gmail.com>
Change-Id: If857a49fbf526983e712282a25d7e8bef5093533
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2020-04-17 16:24:27 -07:00
Chris Yang ad62e9dde3 QNAP: Fix inconsistent cases while create/manage from snapshot
There are two situation may cause the size of share/snapshot
managed by manila is inconsistent with the NAS backend.
One is to create a share from snapshot. While the other one
is to manage an existing snapshot.

Change-Id: Iaef8d8cb4be0d8872a2796c0fc69279c14f15a80
Closes-Bug: #1810476
2019-01-04 18:38:32 +08:00
Chris Yang cb7b8e292a QNAP: driver should not manage snapshot which does not exist
The snapshot which does not exist in NAS shuold not be managed.

Change-Id: I06475ccc507ee62f3da8f8795694f6da14064036
Closes-Bug: #1810374
2019-01-03 17:03:21 +08:00
Chris Yang bc2a18eee5 QNAP: Support QES FW on TDS series NAS
Support both QTS and QES FW on TDS series NAS models.

Change-Id: I87129fae531b6d50b8490785badcb054a9dd9397
2019-01-01 14:20:40 +08:00
Chris Yang a8ccc1ac12 QNAP: Add support for QES 2.1.0
This patch do the following change to the QNAP Manila driver:
1. Add support for QNAP QES firmware 2.1.0.

Change-Id: I81320b6af988d19526241fd0856b427fcf1f96d7
Implements: blueprint qnap-support-qes-210
2018-07-20 11:17:28 +08:00
Chris Yang 487aa691fd Add support for enhanced features to the QNAP Manila driver
This adds enhanced supports to the QNAP Manila driver:
 - Thin Provisioning
 - SSD Cache
 - Deduplication
 - Compression

Change-Id: I0c92ecf6ac55e2f6fbf1d41132e97fa2d40c3ebd
Implements: blueprint qnap-enhance-support
2018-01-05 15:01:10 +08:00
Chris Yang 205ef44283 QNAP Manila driver: Access rule setting is override by the later rule setting.
When user try to add access rule1 and access rule2, share will first set to
the rule1 and then override by the rule2.

We expect that share should apply both access rule1 and access rule2.

Change-Id: Id77cffb5efe4388e3b66aa85fc89cf6f51d5bd98
Closes-Bug: #1736370
2017-12-25 09:32:02 +08:00
Chris Yang 4c2b5e9335 QNAP: Add support for QES 1.1.4
This patch do the following changes to the QNAP Manila driver:
1. Add support for QNAP QES firmware 1.1.4.
2. Correct the default parameters in edit share function.
2. Remove unused code flow.
4. Add more debug log and write more test cases.

    Implements: blueprint support-qes-114

Change-Id: I977ef3e66a21a52116b44059ad5aeaf1560b47b7
2017-12-06 14:47:52 +08:00
Pony Chou cf182947b7 Add QNAP Manila Driver
This driver supports below features:
 - Create NFS Share
 - Delete NFS Share
 - Allow NFS Share access (IP access type)
 - Deny NFS Share access
 - Create snapshot
 - Delete snapshot
 - Create share from snapshot
 - Extend share
 - Manage share
 - Unmanage share
 - Manage snapshot
 - Unmanage snapshot

DocImpact
Implements: blueprint qnap-manila-driver

Change-Id: I4e4278a870af7be1c026385b85ea309b2d1773a9
2017-01-21 21:46:15 +08:00