def deserializeFromXML(self, domNode): if domNode.nodeName != SLURMLauncher.rootNodeName: raise ValueError, "Failed to deserialize SLURMLauncher. Programmatic error" try: self.schedId = int(domutil.getValue(domNode)) except ValueError, e: raise ValueError, "Failed to deserialize SLURMLauncher. Invalid scheduler ID '%s'" % ( domutil.getValue(domNode))
sysConfig['templates']['mouse'][newObj.getType()] = newObj # If we are asked for templates only, then we are done. if onlyTemplates: return sysConfig # Check the master config file. try: dom = minidom.parse(vsapi.masterConfigFile) except xml.parsers.expat.ExpatError, e: raise vsapi.VizError(vsapi.VizError.BAD_CONFIGURATION, "Failed to parse XML file '%s'. Reason: %s"%(vsapi.masterConfigFile, str(e))) root_node = dom.getElementsByTagName("masterconfig")[0] system_node = domutil.getChildNode(root_node, "system") type_node = domutil.getChildNode(system_node, "type") system_type = domutil.getValue(type_node) if system_type=='standalone': raise vsapi.VizError(vsapi.VizError.BAD_CONFIGURATION, "FATAL : Standalone configurations are not managed by the SSM") # Read in the node configuration file. This includes the scheduler information try: dom = minidom.parse(node_config_file) except xml.parsers.expat.ExpatError, e: raise vsapi.VizError(vsapi.VizError.BAD_CONFIGURATION, "Failed to parse XML file '%s'. Reason: %s"%(node_config_file, str(e))) root_node = dom.getElementsByTagName("nodeconfig")[0] nodes_node = domutil.getChildNode(root_node,"nodes") nodeIdx = 0 for node in domutil.getChildNodes(nodes_node, "node"): nodeName = domutil.getValue(domutil.getChildNode(node,"hostname"))