summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShwetha-H-Panduranga <shwetha@gluster.com>2012-01-19 15:21:11 +0530
committerShwetha-H-Panduranga <shwetha@gluster.com>2012-01-19 15:23:04 +0530
commit78f3643f19c004c7a7b43c29e1b48e671a5231eb (patch)
treec60c6345f4c501e2c3c6267df9d8c841da2c766d
parent715716a7079e0ece85522455897710106ca29b44 (diff)
Adding new function get_active_volume to get the information about the active volume i.e the volume under test
Change-Id: I90135f932ae56680e8dd66af1b80214c3e4b8106 Signed-off-by: Shwetha-H-Panduranga <shwetha@gluster.com>
-rw-r--r--libs/utils/atfutils.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/utils/atfutils.py b/libs/utils/atfutils.py
index 79f7eba..d1c4e0a 100644
--- a/libs/utils/atfutils.py
+++ b/libs/utils/atfutils.py
@@ -110,10 +110,19 @@ def set_active_volume(volumekey):
'%s' Not defined in TestEnvironment" % volumekey )
return return_status
-
+def get_active_volume():
+ """
+ """
+ logger = GlobalObj.getLoggerObj()
+ env = GlobalObj.getTestenvObj()
+ active_volume = env.getActiveVolume()
+ if active_volume is None:
+ logger.error("Active Volume not set in the TestEnvironment")
+ return active_volume
__all__ = ['assert_success',
'assert_failure',
'print-stdout',
'print_stderr',
- 'set_active_volume']
+ 'set_active_volume',
+ 'get_active_volume']