import pyslurm print pyslurm.slurm_load_node.__doc__ a, b = pyslurm.slurm_load_node() print pyslurm.get_node_data.__doc__ c = pyslurm.get_node_data(b) print c
xml_file.write('\t\t\t\t<%s>%s</%s>\n' % (task, step_info[task], task)) xml_file.write('\t\t\t</jobstep>\n') xml_file.write('\t\t</job>\n') xml_file.write("\t</jobs>\n") pyslurm.slurm_free_job_info_msg(b) # # XML output of Nodes # a, b = pyslurm.slurm_load_node() node_dict = pyslurm.get_node_data(b) if len(node_dict) > 0: xml_file.write( "\t<nodes>\n") for key, value in node_dict.iteritems(): xml_file.write('\t\t<node>\n') xml_file.write("\t\t\t<id>%s</id>\n" % key) for part_key in sorted(value.iterkeys()): xml_file.write("\t\t\t<%s>%s</%s>\n" % (part_key, value[part_key], part_key)) if key in primary: xml_file.write("\t\t\t<controller>Primary</controller>\n") elif key in backup: xml_file.write("\t\t\t<controller>backup</controller>\n")