| 274 | } |
| 275 | |
| 276 | int |
| 277 | cib_process_delete(const char *op, int options, const char *section, xmlNode * req, xmlNode * input, |
| 278 | xmlNode * existing_cib, xmlNode ** result_cib, xmlNode ** answer) |
| 279 | { |
| 280 | xmlNode *obj_root = NULL; |
| 281 | |
| 282 | crm_trace("Processing \"%s\" event", op); |
| 283 | |
| 284 | if (options & cib_xpath) { |
| 285 | return cib_process_xpath(op, options, section, req, input, |
| 286 | existing_cib, result_cib, answer); |
| 287 | } |
| 288 | |
| 289 | if (input == NULL) { |
| 290 | crm_err("Cannot perform modification with no data"); |
| 291 | return -EINVAL; |
| 292 | } |
| 293 | |
| 294 | obj_root = get_object_root(section, *result_cib); |
| 295 | if (replace_xml_child(NULL, obj_root, input, TRUE) == FALSE) { |
| 296 | crm_trace("No matching object to delete"); |
| 297 | } |
| 298 | |
| 299 | return pcmk_ok; |
| 300 | } |
| 301 | |
| 302 | int |
| 303 | cib_process_modify(const char *op, int options, const char *section, xmlNode * req, xmlNode * input, |
nothing calls this directly
no test coverage detected