+ # add also the infos node
+ xml_file.add_simple_node("infos",
+ attrib={"name" : "last update",
+ "JobsCommandStatus" : "running"})
+
+ # and put the history node
+ history_node = xml_file.add_simple_node("history")
+ name_board = os.path.basename(xml_file.logFile)[:-len(".xml")]
+ # serach for board files
+ expression = "^[0-9]{8}_+[0-9]{6}_" + name_board + ".xml$"
+ oExpr = re.compile(expression)
+ # Get the list of xml borad files that are in the log directory
+ for file_name in os.listdir(self.xml_dir_path):
+ if oExpr.search(file_name):
+ date = os.path.basename(file_name).split("_")[0]
+ file_path = os.path.join(self.xml_dir_path, file_name)
+ src.xmlManager.add_simple_node(history_node,
+ "link",
+ text=file_path,
+ attrib={"date" : date})
+
+
+ # Find in each board the squares that needs to be filled regarding the
+ # input csv files but that are not covered by a today job
+ for board in self.d_input_boards.keys():
+ xml_root_board = self.d_xml_board_files[board].xmlroot
+ # Find the missing jobs for today
+ xml_missing = src.xmlManager.add_simple_node(xml_root_board,
+ "missing_jobs")
+ for row, column in self.d_input_boards[board]["jobs"]:
+ found = False
+ for job in l_jobs:
+ if (job.application == column and
+ job.machine.distribution == row):
+ found = True
+ break
+ if not found:
+ src.xmlManager.add_simple_node(xml_missing,
+ "job",
+ attrib={"distribution" : row,
+ "application" : column })
+ # Find the missing jobs not today
+ xml_missing_not_today = src.xmlManager.add_simple_node(
+ xml_root_board,
+ "missing_jobs_not_today")
+ for row, column in self.d_input_boards[board]["jobs_not_today"]:
+ found = False
+ for job in l_jobs_not_today:
+ if (job.application == column and
+ job.machine.distribution == row):
+ found = True
+ break
+ if not found:
+ src.xmlManager.add_simple_node(xml_missing_not_today,
+ "job",
+ attrib={"distribution" : row,
+ "application" : column })