From 689f862f24f949361603a808250ae3f7ec9f40f6 Mon Sep 17 00:00:00 2001 From: Shwetha-H-Panduranga Date: Mon, 12 Dec 2011 11:29:47 +0530 Subject: Changes to logger class, Using the logger class in the framework, adding new global values, Changes made to argument parser, testruninfo --- libs/globals/atfglobals.py | 53 +++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 19 deletions(-) (limited to 'libs/globals/atfglobals.py') diff --git a/libs/globals/atfglobals.py b/libs/globals/atfglobals.py index ff1faad..f1e6946 100644 --- a/libs/globals/atfglobals.py +++ b/libs/globals/atfglobals.py @@ -16,28 +16,43 @@ import testenv import manager class AtfGlobals: - - def __init__(self): self._testruninfo = None - self._logger = logger.Log() + self._logger = None self._env = None - self._connectionsmanager = manager.ConnectionsManager() - - def getTestrunInfoObj(self): - """Returns TestrunInfo Object + self._connectionsmanager = None + self.logname = "ATFLOG" + self.atfdir = None + self.testruninfo_file = None + self.summarylog_file = "summarylog.out" + self.summarylog_level = 'INFO' + self.detaillog_file = "detaillog.out" + self.detaillog_level = 'DEBUG' + self.stdoutlog_dolog = 'yes' + self.stdoutlog_level = 'INFO' + self.testunits_maindir = "TestUnits" + self.testunit_mainmodule = "testunit" + self.testenv_file = "testenv.cfg" + self.testcaseslist_file = "testcaseslist" + self.glusterd_dir = "/etc/glusterd/*" + self.glusterd_log_paths = ["/var/log/glusterfs/*.log", + "/var/log/glusterfs/bricks/*"] + + + def initLoggerObj(self): + """Instantiation of Logger Object """ - return self._testruninfo - + self._logger = logger.Log(self.logname) + def getLoggerObj(self): """Returns Logger Object """ return self._logger - def getTestenvObj(self): - """Returns Current TestEnvironment Object. + def initConnectionsManagerObj(self): + """Instantiation of ConnectionsManager Object """ - return self._env + self._connectionsmanager = manager.ConnectionsManager() def getConnectionsManagerObj(self): """Returns ConnectionsManager Object @@ -48,21 +63,21 @@ class AtfGlobals: """Instantiation of TestrunInfo Object """ self._testruninfo = testruninfo.TestRunInfo() - - def initLoggerObj(self): - """Instantiation of Logger Object + + def getTestrunInfoObj(self): + """Returns TestrunInfo Object """ - self._logger = logger.Log() + return self._testruninfo def initTestenvObj(self): """Instantiation of Testenv Object """ self._env = testenv.TestEnv() - def initConnectionsManagerObj(self): - """Instantiation of ConnectionsManager Object + def getTestenvObj(self): + """Returns Current TestEnvironment Object. """ - self._connectionsmanager = manager.ConnectionsManager() + return self._env GlobalObj = AtfGlobals() __all__ = ['GlobalObj'] -- cgit