From 78f3643f19c004c7a7b43c29e1b48e671a5231eb Mon Sep 17 00:00:00 2001 From: Shwetha-H-Panduranga Date: Thu, 19 Jan 2012 15:21:11 +0530 Subject: 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 --- libs/utils/atfutils.py | 13 +++++++++++-- 1 file 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'] -- cgit