def __init__(self,appDb=None,associatedDataKey=None): self.amf = Session() self.appDb = appDb self.associatedDataKey = associatedDataKey self.cfgfile = cfgpath + os.sep + "clustercfg.xml" self.d = None self.lock = threading.RLock() try: self.suppliedData = xml2dict.decode_file(self.cfgfile).cluster_config print self.suppliedData except IOError: # If the supplied data file does not exist just print a warning self.log("Supplied data file %s does not exist. You may need to enter node info manually" % self.cfgfile,asp.CL_LOG_SEV_WARNING) self.suppliedData = Dot() self.load()
def ParseAppCfg(self, file): """Private: Parse and return the application configuration file""" dict = xml2dict.decode_file(file) self.NormalizeCfg(dict) return dict