summaryrefslogtreecommitdiffstats
path: root/libs/globals/testenv.py
diff options
context:
space:
mode:
Diffstat (limited to 'libs/globals/testenv.py')
-rwxr-xr-xlibs/globals/testenv.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/libs/globals/testenv.py b/libs/globals/testenv.py
index 9aa8ec8..0720c2c 100755
--- a/libs/globals/testenv.py
+++ b/libs/globals/testenv.py
@@ -23,7 +23,7 @@ class TestEnv():
self._active_volume = None
self._exportdir_tuple = namedtuple('ExportDir',
- ['dir', 'fstype', 'device'])
+ ['dir', 'fstype', 'device', 'options'])
self._server_tuple = namedtuple('Server',
['hostname', 'user', 'password',
@@ -50,14 +50,19 @@ class TestEnv():
def addExportdir(self, key, dir_, **arguments):
"""
"""
- fstype = device = None
+ fstype = None
+ device = None
+ options = None
if (arguments.has_key('fstype') and arguments['fstype']):
fstype = arguments['fstype']
if (arguments.has_key('device') and arguments['device']):
device = arguments['device']
-
- exportdir_obj = self._exportdir_tuple(dir_, fstype, device)
+
+ if (arguments.has_key('options') and arguments['options']):
+ options = arguments['options']
+
+ exportdir_obj = self._exportdir_tuple(dir_, fstype, device, options)
self._exportdirs[key] = exportdir_obj
def getExportdir(self, exportdirkey):
@@ -167,7 +172,7 @@ class TestEnv():
path_value = brick_obj.path
if re.match("^\/", path_value):
- path = path_value
+ newpath = path_value
else:
exportdir_obj = self.getExportdir(path_value)
if exportdir_obj:
@@ -204,11 +209,14 @@ class TestEnv():
brick_keys.extend(self._bricks.keys())
return brick_keys
- def addBricksToVolume(self, volumekey="ActiveVolume", *bricks):
+ def addBricksToVolume(self, *bricks, **arguments):
"""
"""
volume_obj = None
- if volumekey == "ActiveVolume":
+
+ if arguments.has_key("volumekey"):
+ volumekey = arguments[volumekey]
+ else:
volumekey = self._active_volume
if not (volumekey and self._volumes.has_key(volumekey)):