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

Function template_op_key

lib/pengine/complex.c:174–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174static char *
175template_op_key(xmlNode * op)
176{
177 const char *name = crm_element_value(op, "name");
178 const char *role = crm_element_value(op, "role");
179 char *key = NULL;
180
181 if (role == NULL || crm_str_eq(role, RSC_ROLE_STARTED_S, TRUE)
182 || crm_str_eq(role, RSC_ROLE_SLAVE_S, TRUE)) {
183 role = RSC_ROLE_UNKNOWN_S;
184 }
185
186 key = crm_concat(name, role, '-');
187 return key;
188}
189
190static gboolean
191unpack_template(xmlNode * xml_obj, xmlNode ** expanded_xml, pe_working_set_t * data_set)

Callers 1

unpack_templateFunction · 0.85

Calls 3

crm_element_valueFunction · 0.85
crm_str_eqFunction · 0.85
crm_concatFunction · 0.85

Tested by

no test coverage detected