Commit Graph

14 Commits

Author SHA1 Message Date
ashrod98 47e7c78f37 Conditional Import for FIPS Compliance
Conditionally Import Parakimo
Separate SSH functions into ssh_utils.py for safe conditional import.

Change-Id: Ia1a3ee69bef76b52e4e6df1e73488c018ac0f3c9
2024-02-06 20:30:39 +00:00
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
zhufl fb7ddd6d8e Fix misuse of assertFalse
The first argument of assertFalse should not be False,
otherwise the assertFalse will be useless and always pass.

Change-Id: I3b6303ff3d2fb9b5fee1a8d73af4e5819fadde76
2019-04-02 17:08:00 +08:00
zhongjun2 2b40e5618f Enable IPv6 in manila(network plugins and drivers)
Please read spec for design detail [1].

Support IPv6 in IP drivers, networks and share
type extra specs.

Co-Authored-By: TommyLikeHu(tommylikehu@gmail.com)
Co-Authored-By: Ben Swartzlander <ben@swartzlander.org>

[1] f7202a6cfe32a057f752a4e393f848f8a0211c36

DocImpact

Partial-Implements: blueprint support-ipv6-access
Change-Id: I96d3389262e9829b8b4344870cdf5c76abd22828
2017-07-27 18:28:15 +08:00
zhongjun 341161eead Use parenthesis instead of backslashes in tests folder
Use parenthesis instead of backslashes in tests folder

TrivialFix
Change-Id: I6c2ea07b0bfc5852b28e44989406cc10eb972e53
2017-06-19 17:56:01 +08:00
zhongjun 5dfc143909 QoS support for shares
QoS is a common attribute, so add the QoS
capability in common capabilities doc.
This is a simple first step towards what the
blueprints proposes.

Partially implements: bp manila-support-qos
Change-Id: I377bf0abcc62239c9a1a5ee5c28c336b2b6c410a
2016-01-15 10:15:50 +08:00
yangyapeng fe1071267b Use assertTrue/False instead of assertEqual(T/F)
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).
This patch fixes the same in Manila.

Change-Id: I0623c17a939e5175c15986dc7b6b64114c346c78
Closes-Bug: #1512207
2015-10-28 11:08:10 -04:00
Li, Chen 549f855a07 Enable extend_share in HDFS driver
The extend_share is in Manila core, we can support the new API in
the HDFS drivers. This patch adds methods to the driver along with
its unit tests, and updates related docs.

Implements: blueprint hdfs-native-extend-share

Change-Id: Ia81291eda49dc20c3318f71c51d36682d2aae742
2015-10-08 10:33:01 +08:00
Li, Chen d86fb38340 Check the snapshot directory before copy it
1. HDFS do not support "-r" option when copy data
2. only un-empty directories can be copied

Change-Id: I525556842191be6ca273293457327d3d3480832d
Closes-Bug: 1494568
2015-09-11 15:09:49 +08:00
weiting-chen cf3ea378f0 Fix bug to locate hdfs command in HDFS native driver
No longer to locate hdfs command.
Assume the ssh user has the authority to launch hdfs command.
And the user must add hdfs in default PATH manually.

Change-Id: Ia5d118a49ecea092848796067ae48dbead83c40e
Closes-Bug: #1481568
2015-08-14 16:29:19 +08:00
weiting-chen bed9b9f3f2 Fix bug to run command as root in HDFS driver
A complete proposal is like below steps:
1. Assume the HDFS user in manila.conf has the authority to launch hdfs command.
2. Set run_as_root to False if there is no argument by default, all the cases in
Manila HDFS Driver don't need be a root to run hdfs command.
3. If root is required, please deliver run_as_root parameter and set it as True

Change-Id: I310713c3c1b74ff9990832f61e777cf4c12696fe
Closes-Bug: #1481567
2015-08-10 20:55:54 +08:00
Igor Malinovskiy 94e8c921db Remove passing DB reference to drivers in Share Manager
- Remove passing DB reference to drivers in __init__() method
- Remove db reference from Generic driver and service_instance
- Remove db reference from Netapp share driver
- Remove db reference from Glusterfs share driver
- Remove db reference from Glusterfs_Native share driver
- Remove db reference from Quobyte share driver
- Remove db reference from IBM GPFS driver
- Remove db reference from HDS_SOP driver
- Remove db reference from HDFSNative driver
- Remove db reference from fake driver
- Remove db reference from unit tests.

Change-Id: I74a636a8897caa6fc4af833c1568471fe1cb0987
2015-04-21 17:23:13 +03:00
Sun Jun 310dc5523a Add support for HDFS native protocol driver
Add basic support for hdfs native protocol exports.

A manila share in this driver is a sub-dir in hdfs root dir.
Instances talk directly to the hdfs backend with 'hdfs' protocol.
Access to the share is allowed by user based access type, which
is aligned with HDFS ACLs to support access control of multiple
users and groups.

Implements blueprint hdfs-driver

Change-Id: Id9bd391d829e11d332b03c2245691ea42fc30bcc
2015-02-13 00:59:45 +08:00