xmlSetProp(xml_node, XML_ATTR_ID,         id); xmlSetProp(xml_node, XML_CIB_ATTR_NODETYPE,   type); xmlSetProp(xml_node, XML_CIB_ATTR_HEALTH,     CIB_VAL_HEALTH_DEFAULT); xmlSetProp(xml_node, XML_CIB_ATTR_NODESTATUS, CIB_VAL_NODESTATUS_DEFAULT); xmlSetProp(xml_node, XML_CIB_ATTR_SOURCE,     CIB_VAL_SOURCE_DEFAULT); xmlSetProp(xml_node, XML_ATTR_TSTAMP,     getNow());
if(type == NULL || strlen(type) < 1) { cl_log(LOG_WARNING, "You did not specify a value for %s for node (id=%s).  Using default: %s", XML_CIB_ATTR_NODETYPE, id, CIB_VAL_NODETYPE_DEFAULT); type = CIB_VAL_NODETYPE_DEFAULT; }  set_xml_property_copy(xml_node, XML_ATTR_ID,             id); set_xml_property_copy(xml_node, XML_CIB_ATTR_NODETYPE,   type); set_xml_property_copy(xml_node, XML_CIB_ATTR_HEALTH,     CIB_VAL_HEALTH_DEFAULT); set_xml_property_copy(xml_node, XML_CIB_ATTR_NODESTATUS, CIB_VAL_NODESTATUS_DEFAULT); set_xml_property_copy(xml_node, XML_CIB_ATTR_SOURCE,     CIB_VAL_SOURCE_DEFAULT); set_xml_property_copy(xml_node, XML_ATTR_TSTAMP,         getNow());
newHaNode(const char *id, const char *type){    CRM_DEBUG2("Creating " XML_CIB_TAG_NODE " (%s)...", id);    xmlNodePtr xml_node = xmlNewNode(NULL, XML_CIB_TAG_NODE);    xmlSetProp(xml_node, XML_ATTR_ID,         id);    xmlSetProp(xml_node, XML_CIB_ATTR_NODETYPE,   type);    xmlSetProp(xml_node, XML_CIB_ATTR_HEALTH,     CIB_VAL_HEALTH_DEFAULT);    xmlSetProp(xml_node, XML_CIB_ATTR_NODESTATUS, CIB_VAL_NODESTATUS_DEFAULT);    xmlSetProp(xml_node, XML_CIB_ATTR_SOURCE,     CIB_VAL_SOURCE_DEFAULT);    xmlSetProp(xml_node, XML_ATTR_TSTAMP,     getNow());    FNRET(xml_node);}