| 1505 | } |
| 1506 | |
| 1507 | gboolean |
| 1508 | unpack_rsc_order(xmlNode * xml_obj, pe_working_set_t * data_set) |
| 1509 | { |
| 1510 | gboolean any_sets = FALSE; |
| 1511 | |
| 1512 | resource_t *rsc = NULL; |
| 1513 | |
| 1514 | /* |
| 1515 | resource_t *last_rsc = NULL; |
| 1516 | */ |
| 1517 | |
| 1518 | action_t *set_end = NULL; |
| 1519 | action_t *set_begin = NULL; |
| 1520 | |
| 1521 | action_t *set_inv_end = NULL; |
| 1522 | action_t *set_inv_begin = NULL; |
| 1523 | |
| 1524 | xmlNode *set = NULL; |
| 1525 | xmlNode *last = NULL; |
| 1526 | |
| 1527 | xmlNode *orig_xml = NULL; |
| 1528 | xmlNode *expanded_xml = NULL; |
| 1529 | |
| 1530 | /* |
| 1531 | action_t *last_end = NULL; |
| 1532 | action_t *last_begin = NULL; |
| 1533 | action_t *last_inv_end = NULL; |
| 1534 | action_t *last_inv_begin = NULL; |
| 1535 | */ |
| 1536 | |
| 1537 | const char *id = crm_element_value(xml_obj, XML_ATTR_ID); |
| 1538 | const char *invert = crm_element_value(xml_obj, XML_CONS_ATTR_SYMMETRICAL); |
| 1539 | enum pe_order_kind kind = get_ordering_type(xml_obj); |
| 1540 | |
| 1541 | gboolean invert_bool = TRUE; |
| 1542 | gboolean rc = TRUE; |
| 1543 | |
| 1544 | if (invert == NULL) { |
| 1545 | invert = "true"; |
| 1546 | } |
| 1547 | |
| 1548 | invert_bool = crm_is_true(invert); |
| 1549 | |
| 1550 | rc = unpack_order_template(xml_obj, &expanded_xml, data_set); |
| 1551 | if(expanded_xml) { |
| 1552 | orig_xml = xml_obj; |
| 1553 | xml_obj = expanded_xml; |
| 1554 | |
| 1555 | } else if (rc == FALSE) { |
| 1556 | return FALSE; |
| 1557 | } |
| 1558 | |
| 1559 | for (set = __xml_first_child(xml_obj); set != NULL; set = __xml_next(set)) { |
| 1560 | if (crm_str_eq((const char *)set->name, XML_CONS_TAG_RSC_SET, TRUE)) { |
| 1561 | any_sets = TRUE; |
| 1562 | set = expand_idref(set, data_set->input); |
| 1563 | if (unpack_order_set(set, kind, &rsc, &set_begin, &set_end, |
| 1564 | &set_inv_begin, &set_inv_end, invert, data_set) == FALSE) { |
no test coverage detected