crm_debug("Dumping action%d as XML", action->id);
crm_devel("Dumping action%d as XML", action->id);
action2xml(action_t *action, gboolean as_input){	crm_data_t * action_xml = NULL;		if(action == NULL) {		return NULL;	}	crm_debug("Dumping action%d as XML", action->id);	switch(action->task) {		case stonith_node:		case shutdown_crm:			action_xml = create_xml_node(NULL, XML_GRAPH_TAG_CRM_EVENT);			set_xml_property_copy(				action_xml, XML_ATTR_ID, crm_itoa(action->id));			set_xml_property_copy(action_xml, XML_LRM_ATTR_TASK,					      task2text(action->task));			break;		default:			if(action->pseudo) {				action_xml = create_xml_node(NULL,XML_GRAPH_TAG_PSEUDO_EVENT);			} else {				action_xml = create_xml_node(NULL, XML_GRAPH_TAG_RSC_OP);			}			if(!as_input) {				add_node_copy(					action_xml,					safe_val3(NULL, action, rsc, xml));			}						set_xml_property_copy(				action_xml, XML_ATTR_ID, crm_itoa(action->id));			set_xml_property_copy(				action_xml, XML_LRM_ATTR_RSCID,				safe_val3("__no_rsc__", action, rsc, id));			set_xml_property_copy(action_xml, XML_LRM_ATTR_TASK,					      task2text(action->task));						break;	}	if(action->task != stonith_node	   && (action->pseudo == FALSE || action->node != NULL)) {		set_xml_property_copy(			action_xml, XML_LRM_ATTR_TARGET,			safe_val4("__no_node__", action, node, details,uname));		set_xml_property_copy(			action_xml, XML_LRM_ATTR_TARGET_UUID,			safe_val4("__no_uuid__", action, node, details, id));	}	set_xml_property_copy(		action_xml, "allow_fail",		action->failure_is_fatal?XML_BOOLEAN_FALSE:XML_BOOLEAN_TRUE);	set_xml_property_copy(		action_xml, XML_ATTR_TIMEOUT, action->timeout);		if(as_input) {		return action_xml;	}		crm_xml_debug(action->extra_attrs, "copying in extra attributes");	if(action->extra_attrs) {		copy_in_properties(action->args, action->extra_attrs);	}	add_node_copy(action_xml, action->args);		return action_xml;}