MCPcopy Create free account
hub / github.com/apache/cloudstack / MarvinInit

Class MarvinInit

tools/marvin/marvin/marvinInit.py:40–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38
39
40class MarvinInit:
41
42 def __init__(self, config_file,
43 deploy_dc_flag=False,
44 test_mod_name="deploydc",
45 zone=None,
46 hypervisor_type=None,
47 user_logfolder_path=None):
48 self.__configFile = config_file
49 self.__deployFlag = deploy_dc_flag
50 self.__logFolderPath = None
51 self.__tcRunLogger = None
52 self.__testModName = test_mod_name
53 self.__testClient = None
54 self.__tcResultFile = None
55 self.__testDataFilePath = None
56 self.__zoneForTests = zone
57 self.__parsedConfig = None
58 self.__hypervisorType = hypervisor_type
59 self.__userLogFolderPath = user_logfolder_path
60
61 def __parseConfig(self):
62 '''
63 @Name: __parseConfig
64 @Desc : Parses the configuration file passed and assigns
65 the parsed configuration
66 @Output : SUCCESS or FAILED
67 '''
68 try:
69 if not os.path.isfile(self.__configFile):
70 print("\n=== Marvin Parse Config Init Failed ===")
71 return FAILED
72 self.__parsedConfig = getSetupConfig(self.__configFile)
73 print("\n=== Marvin Parse Config Successful ===")
74 return SUCCESS
75 except Exception as e:
76 print("\nException Occurred Under __parseConfig : " \
77 "%s" % GetDetailExceptionInfo(e))
78 return FAILED
79
80 def getParsedConfig(self):
81 return self.__parsedConfig
82
83 def getLogFolderPath(self):
84 return self.__logFolderPath
85
86 def getTestClient(self):
87 return self.__testClient
88
89 def getLogger(self):
90 return self.__tcRunLogger
91
92 def getResultFile(self):
93 '''
94 @Name : getDebugFile
95 @Desc : Creates the result file at a given path.
96 @Output : Returns the Result file to be used for writing
97 test outputs

Callers 2

start_marvinMethod · 0.90
startMarvinMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected