Feature: pengine: formatted output for text
This commit complements the 2735a7d0cb15041eb29ffe09232efa2b07bb6091. It adds the functions-messages
to print information about resources in plain-text.
This PR together with the PR #1788 bring 8 new functions by splitting/refactoring
the existing ones
native_print --> (pe__resource_xml + pe__resource_text) group_print --> (pe__group_xml + pe__group_text) clone_print --> (pe__clone_text + pe__clone_text) pe__print_bundle --> (pe__bundle_xml + pe__bundle_text)
Unlike the *_xml functions, the *_text functions has the third parameter
const char *pre_text. Assuming that pre_text is simply prepending
spaces, it would have been possible implemented by counting identations
and inserting appropriate amount of spaces. There are however several
calls of print_resource function that give the pre_text not as simple
spaces, but as values (try $ grep -rI "print_resource("), thus the logic
that handles the pre_text was also copied.
Besides those 4 new function, this PR adds 5 more by almost identical
copying of existing functions:
print_bundle_replica --> pe__bundle_replica_output_text common_print --> pe__common_output_text print_rscs_brief --> pe__rscs_brief_output_text short_print --> pe__short_output_text native_print_attr --> pe__native_output_attr_text