MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / find_resource

Function find_resource

tools/crm_simulate.c:70–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70static xmlNode *
71find_resource(xmlNode * cib_node, const char *resource)
72{
73 char *xpath = NULL;
74 xmlNode *match = NULL;
75 const char *node = crm_element_value(cib_node, XML_ATTR_UNAME);
76 int max = strlen(rsc_template) + strlen(resource) + strlen(node) + 1;
77
78 xpath = calloc(1, max);
79
80 snprintf(xpath, max, rsc_template, node, resource);
81 match = get_xpath_object(xpath, cib_node, LOG_DEBUG_2);
82
83 free(xpath);
84 return match;
85}
86
87static void
88create_node_entry(cib_t * cib_conn, char *node)

Callers 1

inject_resourceFunction · 0.85

Calls 2

crm_element_valueFunction · 0.85
get_xpath_objectFunction · 0.85

Tested by

no test coverage detected