summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glustolibs-gluster/glustolibs/gluster/nfs_ganesha_libs.py4
-rw-r--r--tests/functional/nfs_ganesha/test_cthon.py12
-rw-r--r--tests/functional/nfs_ganesha/test_ganesha_add_brick.py17
-rw-r--r--tests/functional/nfs_ganesha/test_ganesha_replace_brick.py18
-rw-r--r--tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py18
-rw-r--r--tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py17
-rw-r--r--tests/functional/nfs_ganesha/test_nfs_ganesha_acls.py10
-rw-r--r--tests/functional/nfs_ganesha/test_nfs_ganesha_run_io_multiple_clients.py7
-rwxr-xr-xtests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py18
-rwxr-xr-xtests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py57
10 files changed, 93 insertions, 85 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/nfs_ganesha_libs.py b/glustolibs-gluster/glustolibs/gluster/nfs_ganesha_libs.py
index 2da786c..19e9840 100644
--- a/glustolibs-gluster/glustolibs/gluster/nfs_ganesha_libs.py
+++ b/glustolibs-gluster/glustolibs/gluster/nfs_ganesha_libs.py
@@ -46,7 +46,7 @@ class NfsGaneshaClusterSetupClass(GlusterBaseClass):
Setup variable for nfs-ganesha tests.
"""
# pylint: disable=too-many-statements, too-many-branches
- GlusterBaseClass.setUpClass.im_func(cls)
+ super(NfsGaneshaClusterSetupClass, cls).setUpClass()
# Check if enable_nfs_ganesha is set in config file
if not cls.enable_nfs_ganesha:
@@ -189,7 +189,7 @@ class NfsGaneshaClusterSetupClass(GlusterBaseClass):
def tearDownClass(cls, delete_nfs_ganesha_cluster=True):
"""Teardown nfs ganesha cluster.
"""
- GlusterBaseClass.tearDownClass.im_func(cls)
+ super(NfsGaneshaClusterSetupClass, cls).tearDownClass()
if delete_nfs_ganesha_cluster:
ret = teardown_nfs_ganesha_cluster(
diff --git a/tests/functional/nfs_ganesha/test_cthon.py b/tests/functional/nfs_ganesha/test_cthon.py
index 5c1c586..9b950fe 100644
--- a/tests/functional/nfs_ganesha/test_cthon.py
+++ b/tests/functional/nfs_ganesha/test_cthon.py
@@ -20,7 +20,7 @@
"""
from glusto.core import Glusto as g
-from glustolibs.gluster.gluster_base_class import GlusterBaseClass, runs_on
+from glustolibs.gluster.gluster_base_class import runs_on
from glustolibs.gluster.nfs_ganesha_libs import NfsGaneshaClusterSetupClass
from glustolibs.gluster.exceptions import ExecutionError
from glustolibs.io.utils import run_cthon
@@ -40,7 +40,7 @@ class TestCthon(NfsGaneshaClusterSetupClass):
"""
Setup nfs-ganesha if not exists.
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -65,7 +65,7 @@ class TestCthon(NfsGaneshaClusterSetupClass):
"""
Setup volume
"""
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
g.log.info("Starting to setup volume %s", self.volname)
ret = self.setup_volume(volume_create_force=True)
@@ -90,7 +90,7 @@ class TestCthon(NfsGaneshaClusterSetupClass):
"""
Cleanup volume
"""
- GlusterBaseClass.tearDown.im_func(self)
+ self.get_super_method(self, 'tearDown')()
# Cleanup volume
ret = self.cleanup_volume()
@@ -115,7 +115,3 @@ class TestCthon(NfsGaneshaClusterSetupClass):
"Check log errors for more info")
else:
g.log.info("Test repo cleanup successfull on all clients")
-
- @classmethod
- def tearDownClass(cls):
- NfsGaneshaClusterSetupClass.tearDownClass.im_func(cls)
diff --git a/tests/functional/nfs_ganesha/test_ganesha_add_brick.py b/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
index d82dc63..9d54d40 100644
--- a/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
+++ b/tests/functional/nfs_ganesha/test_ganesha_add_brick.py
@@ -14,7 +14,10 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import sys
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.nfs_ganesha_libs import NfsGaneshaClusterSetupClass
from glustolibs.gluster.gluster_base_class import runs_on
from glustolibs.gluster.exceptions import ExecutionError
@@ -42,7 +45,7 @@ class TestGaneshaAddBrick(NfsGaneshaClusterSetupClass):
Setup nfs-ganesha if not exists.
Upload IO scripts to clients
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -90,13 +93,14 @@ class TestGaneshaAddBrick(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
- "--num-of-files 5 %s" % (self.script_upload_path, count,
- mount_obj.mountpoint))
+ "--num-of-files 5 %s" % (
+ sys.version_info.major, self.script_upload_path, count,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -180,6 +184,5 @@ class TestGaneshaAddBrick(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)
diff --git a/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py b/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
index 918ac6e..3ea0fac 100644
--- a/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
+++ b/tests/functional/nfs_ganesha/test_ganesha_replace_brick.py
@@ -13,7 +13,11 @@
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import sys
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.nfs_ganesha_libs import NfsGaneshaClusterSetupClass
from glustolibs.gluster.gluster_base_class import runs_on
from glustolibs.gluster.exceptions import ExecutionError
@@ -41,7 +45,7 @@ class TestGaneshaReplaceBrick(NfsGaneshaClusterSetupClass):
Setup nfs-ganesha if not exists.
Upload IO scripts to clients
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -90,13 +94,14 @@ class TestGaneshaReplaceBrick(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
- "--num-of-files 5 %s" % (self.script_upload_path, count,
- mount_obj.mountpoint))
+ "--num-of-files 5 %s" % (
+ sys.version_info.major, self.script_upload_path, count,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -171,6 +176,5 @@ class TestGaneshaReplaceBrick(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)
diff --git a/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py b/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py
index 77c484a..be33b50 100644
--- a/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py
+++ b/tests/functional/nfs_ganesha/test_new_mount_while_io_in_progress.py
@@ -14,7 +14,10 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from copy import deepcopy
+import sys
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.nfs_ganesha_libs import NfsGaneshaClusterSetupClass
from glustolibs.gluster.gluster_base_class import runs_on
from glustolibs.gluster.exceptions import ExecutionError
@@ -35,7 +38,7 @@ class TestMountWhileIoInProgress(NfsGaneshaClusterSetupClass):
Setup nfs-ganesha if not exists.
Upload IO scripts to clients
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -102,14 +105,14 @@ class TestMountWhileIoInProgress(NfsGaneshaClusterSetupClass):
# Start IO
g.log.info("Starting IO on %s:%s", mount_object.client_system,
mount_object.mountpoint)
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
- "--num-of-files 5 %s" % (self.script_upload_path,
- dirname_start_num,
- mount_object.mountpoint))
+ "--num-of-files 5 %s" % (
+ sys.version_info.major, self.script_upload_path,
+ dirname_start_num, mount_object.mountpoint))
proc = g.run_async(mount_object.client_system, cmd,
user=mount_object.user)
all_mounts_procs.append(proc)
@@ -146,6 +149,5 @@ class TestMountWhileIoInProgress(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)
diff --git a/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py b/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py
index c4c39a9..034f06a 100644
--- a/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py
+++ b/tests/functional/nfs_ganesha/test_new_volume_while_io_in_progress.py
@@ -19,7 +19,10 @@
IO is in progress on another volume
"""
from copy import deepcopy
+import sys
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.nfs_ganesha_libs import (
NfsGaneshaClusterSetupClass, wait_for_nfs_ganesha_volume_to_get_exported)
from glustolibs.gluster.gluster_base_class import runs_on
@@ -47,7 +50,7 @@ class TestNewVolumeWhileIoInProgress(NfsGaneshaClusterSetupClass):
Setup nfs-ganesha if not exists.
Upload IO scripts to clients
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -97,13 +100,14 @@ class TestNewVolumeWhileIoInProgress(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
- "--num-of-files 5 %s" % (self.script_upload_path, count,
- mount_obj.mountpoint))
+ "--num-of-files 5 %s" % (
+ sys.version_info.major, self.script_upload_path, count,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -245,6 +249,5 @@ class TestNewVolumeWhileIoInProgress(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)
diff --git a/tests/functional/nfs_ganesha/test_nfs_ganesha_acls.py b/tests/functional/nfs_ganesha/test_nfs_ganesha_acls.py
index 249b24d..5921f3b 100644
--- a/tests/functional/nfs_ganesha/test_nfs_ganesha_acls.py
+++ b/tests/functional/nfs_ganesha/test_nfs_ganesha_acls.py
@@ -26,7 +26,7 @@ from glustolibs.gluster.nfs_ganesha_ops import (
from glustolibs.gluster.nfs_ganesha_libs import (
NfsGaneshaClusterSetupClass,
wait_for_nfs_ganesha_volume_to_get_unexported)
-from glustolibs.gluster.gluster_base_class import runs_on, GlusterBaseClass
+from glustolibs.gluster.gluster_base_class import runs_on
from glustolibs.gluster.exceptions import ExecutionError
import time
import re
@@ -45,7 +45,7 @@ class TestNfsGaneshaAcls(NfsGaneshaClusterSetupClass):
"""
Setup nfs-ganesha if not exists.
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha
ret = cls.setup_nfs_ganesha()
@@ -57,7 +57,7 @@ class TestNfsGaneshaAcls(NfsGaneshaClusterSetupClass):
"""
Setup Volume
"""
- GlusterBaseClass.setUp.im_func(self)
+ self.get_super_method(self, 'setUp')()
# Setup and mount volume
g.log.info("Starting to setip and mount volume %s", self.volname)
@@ -152,7 +152,3 @@ class TestNfsGaneshaAcls(NfsGaneshaClusterSetupClass):
g.log.info("Successfull unmount and cleanup of volume")
else:
raise ExecutionError("Failed to unmount and cleanup volume")
-
- @classmethod
- def tearDownClass(cls):
- NfsGaneshaClusterSetupClass.tearDownClass.im_func(cls)
diff --git a/tests/functional/nfs_ganesha/test_nfs_ganesha_run_io_multiple_clients.py b/tests/functional/nfs_ganesha/test_nfs_ganesha_run_io_multiple_clients.py
index c8b9379..39a5076 100644
--- a/tests/functional/nfs_ganesha/test_nfs_ganesha_run_io_multiple_clients.py
+++ b/tests/functional/nfs_ganesha/test_nfs_ganesha_run_io_multiple_clients.py
@@ -40,7 +40,7 @@ class TestNfsGaneshaWithDifferentIOPatterns(NfsGaneshaClusterSetupClass):
"""
Setup nfs-ganesha if not exists.
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -131,6 +131,5 @@ class TestNfsGaneshaWithDifferentIOPatterns(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)
diff --git a/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py b/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
index 9ee246f..e2a9887 100755
--- a/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
+++ b/tests/functional/nfs_ganesha/test_nfs_ganesha_sanity.py
@@ -17,7 +17,11 @@
""" Description:
Test Cases in this module test NFS-Ganesha Sanity.
"""
+
+import sys
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.gluster_base_class import runs_on
from glustolibs.gluster.nfs_ganesha_libs import (
NfsGaneshaClusterSetupClass)
@@ -44,7 +48,7 @@ class TestNfsGaneshaSanity(NfsGaneshaClusterSetupClass):
Setup nfs-ganesha if not exists.
Upload IO scripts to clients
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -105,13 +109,14 @@ class TestNfsGaneshaSanity(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
- "--num-of-files 5 %s" % (self.script_upload_path, count,
- mount_obj.mountpoint))
+ "--num-of-files 5 %s" % (
+ sys.version_info.major, self.script_upload_path, count,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -236,6 +241,5 @@ class TestNfsGaneshaSanity(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)
diff --git a/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py b/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py
index 63331ec..083697b 100755
--- a/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py
+++ b/tests/functional/nfs_ganesha/test_nfs_ganesha_volume_exports.py
@@ -19,11 +19,14 @@
refresh configs, cluster enable/disable functionality.
"""
-from time import sleep
+from copy import deepcopy
import os
import re
-from copy import deepcopy
+import sys
+from time import sleep
+
from glusto.core import Glusto as g
+
from glustolibs.gluster.gluster_base_class import runs_on
from glustolibs.gluster.nfs_ganesha_libs import (
NfsGaneshaClusterSetupClass,
@@ -57,7 +60,7 @@ class TestNfsGaneshaVolumeExports(NfsGaneshaClusterSetupClass):
"""
Setup nfs-ganesha if not exists.
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -197,9 +200,8 @@ class TestNfsGaneshaVolumeExports(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)
@runs_on([['replicated', 'distributed', 'distributed-replicated',
@@ -215,7 +217,7 @@ class TestNfsGaneshaVolumeExportsWithIO(NfsGaneshaClusterSetupClass):
Setup nfs-ganesha if not exists.
Upload IO scripts to clients
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -261,13 +263,14 @@ class TestNfsGaneshaVolumeExportsWithIO(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
- "--num-of-files 5 %s" % (self.script_upload_path, count,
- mount_obj.mountpoint))
+ "--num-of-files 5 %s" % (
+ sys.version_info.major, self.script_upload_path, count,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -340,9 +343,8 @@ class TestNfsGaneshaVolumeExportsWithIO(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)
@runs_on([['replicated', 'distributed', 'distributed-replicated',
@@ -358,7 +360,7 @@ class TestNfsGaneshaMultiVolumeExportsWithIO(NfsGaneshaClusterSetupClass):
Setup nfs-ganesha if not exists.
Upload IO scripts to clients
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -402,13 +404,14 @@ class TestNfsGaneshaMultiVolumeExportsWithIO(NfsGaneshaClusterSetupClass):
for mount_obj in self.mounts:
g.log.info("Starting IO on %s:%s", mount_obj.client_system,
mount_obj.mountpoint)
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 10 "
"--max-num-of-dirs 5 "
- "--num-of-files 5 %s" % (self.script_upload_path, count,
- mount_obj.mountpoint))
+ "--num-of-files 5 %s" % (
+ sys.version_info.major, self.script_upload_path, count,
+ mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
all_mounts_procs.append(proc)
@@ -519,9 +522,8 @@ class TestNfsGaneshaMultiVolumeExportsWithIO(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)
@runs_on([['replicated', 'distributed', 'distributed-replicated',
@@ -537,7 +539,7 @@ class TestNfsGaneshaSubDirExportsWithIO(NfsGaneshaClusterSetupClass):
Setup nfs-ganesha if not exists.
Upload IO scripts to clients
"""
- NfsGaneshaClusterSetupClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Setup nfs-ganesha if not exists.
ret = cls.setup_nfs_ganesha()
@@ -571,14 +573,14 @@ class TestNfsGaneshaSubDirExportsWithIO(NfsGaneshaClusterSetupClass):
g.log.info("Starting IO on all mounts.")
self.all_mounts_procs = []
for mount_obj in mount_objs:
- cmd = ("python %s create_deep_dirs_with_files "
+ cmd = ("/usr/bin/env python%d %s create_deep_dirs_with_files "
"--dirname-start-num %d "
"--dir-depth 2 "
"--dir-length 15 "
"--max-num-of-dirs 5 "
- "--num-of-files 10 %s" % (self.script_upload_path,
- self.dir_start,
- mount_obj.mountpoint))
+ "--num-of-files 10 %s" % (
+ sys.version_info.major, self.script_upload_path,
+ self.dir_start, mount_obj.mountpoint))
proc = g.run_async(mount_obj.client_system, cmd,
user=mount_obj.user)
self.all_mounts_procs.append(proc)
@@ -760,6 +762,5 @@ class TestNfsGaneshaSubDirExportsWithIO(NfsGaneshaClusterSetupClass):
@classmethod
def tearDownClass(cls):
- (NfsGaneshaClusterSetupClass.
- tearDownClass.
- im_func(cls, delete_nfs_ganesha_cluster=False))
+ cls.get_super_method(cls, 'tearDownClass')(
+ delete_nfs_ganesha_cluster=False)