| 583 | } |
| 584 | |
| 585 | int |
| 586 | do_find_node_list(xmlNode * xml_node) |
| 587 | { |
| 588 | int found = 0; |
| 589 | xmlNode *node = NULL; |
| 590 | xmlNode *nodes = get_object_root(XML_CIB_TAG_NODES, xml_node); |
| 591 | |
| 592 | for (node = __xml_first_child(nodes); node != NULL; node = __xml_next(node)) { |
| 593 | if (crm_str_eq((const char *)node->name, XML_CIB_TAG_NODE, TRUE)) { |
| 594 | |
| 595 | if (BASH_EXPORT) { |
| 596 | printf("export %s=%s\n", |
| 597 | crm_element_value(node, XML_ATTR_UNAME), |
| 598 | crm_element_value(node, XML_ATTR_ID)); |
| 599 | } else { |
| 600 | printf("%s node: %s (%s)\n", |
| 601 | crm_element_value(node, XML_ATTR_TYPE), |
| 602 | crm_element_value(node, XML_ATTR_UNAME), |
| 603 | crm_element_value(node, XML_ATTR_ID)); |
| 604 | } |
| 605 | found++; |
| 606 | } |
| 607 | } |
| 608 | |
| 609 | if (found == 0) { |
| 610 | printf("NO nodes configured\n"); |
| 611 | } |
| 612 | |
| 613 | return found; |
| 614 | } |
no test coverage detected