def mainMethod(srcDir, resourcedataDoc, dataTypeDoc, compileConfigsDoc, alarmDataDoc, alarmAssociationDoc): import cor import fm import omids cor.mainMethod(srcDir, resourcedataDoc, dataTypeDoc, compileConfigsDoc, alarmDataDoc, alarmAssociationDoc) fm.mainMethod(srcDir, compileConfigsDoc, resourcedataDoc) omids.mainMethod(srcDir, resourcedataDoc)
else: print "Cannot find file "+componentdataXmi if os.path.exists(compileConfigsXmi): compileConfigsDoc = xml.dom.minidom.parse(compileConfigsXmi) else: print "Cannot find file "+compileConfigsXmi if os.path.exists(dataTypeXmi): dataTypeDoc = xml.dom.minidom.parse(dataTypeXmi) else: print "Cannot find file "+dataTypeXmi if os.path.exists(alarmdataXmi): alarmDataDoc = xml.dom.minidom.parse(alarmdataXmi) else : alarmDataDoc = None if os.path.exists(alarmAssociationXml): alarmAssociationDoc = xml.dom.minidom.parse(alarmAssociationXml) else: alarmAssociationDoc = None sys.path[len(sys.path):] = [os.path.join(codetemplateDir, "default")] import cor import fm import omids cor.mainMethod(resourcedataDoc, dataTypeDoc, compileConfigsDoc, alarmDataDoc, alarmAssociationDoc) fm.mainMethod(compileConfigsDoc, resourcedataDoc) omids.mainMethod(resourcedataDoc)
if os.path.exists(resourcedataXmi): resourcedataDoc = xml.dom.minidom.parse(resourcedataXmi) else: print "Cannot find file "+resourcedataXmi if os.path.exists(componentdataXmi): componentdataDoc = xml.dom.minidom.parse(componentdataXmi) else: print "Cannot find file "+componentdataXmi if os.path.exists(compileConfigsXmi): compileConfigsDoc = xml.dom.minidom.parse(compileConfigsXmi) else: print "Cannot find file "+compileConfigsXmi if os.path.exists(dataTypeXmi): dataTypeDoc = xml.dom.minidom.parse(dataTypeXmi) else: print "Cannot find file "+dataTypeXmi sys.path[len(sys.path):] = [os.path.join(codetemplateDir, "default")] import cor import fm import snmp import omids cor.mainMethod(resourcedataDoc, dataTypeDoc, compileConfigsDoc) fm.mainMethod(compileConfigsDoc, resourcedataDoc) #snmp.mainMethod(resourcedataDoc, componentdataDoc) omids.mainMethod(resourcedataDoc)