HomeClusterLabs Projects

Refactor: tools: Add formatted output messages for attribute updates.

Description

Refactor: tools: Add formatted output messages for attribute updates.

We only want to output the list header if we're doing an XML output
format since crm_resource already outputs attribute changes in text mode
without any list header. We don't want to break tools that might be
relying on that information.

Thus, we need to build up a list of results as we loop through
update_attribute and only once that function is done, pass the entire
list of results to an output function. And in order to do that, we need
to build up a structure that holds the pieces of information we'll
output.

There's not really a good way to accomplish the same thing without
knowing what the output format is going to be, which is something we try
very hard to avoid.

Fixes T614

Details

Provenance
clumensAuthored on Apr 1 2024, 10:13 AM
Parents
rP5da72ce1ed5d: Refactor: tools: Change the find_resource_attr out params.
Branches
Unknown
Tags
Unknown
Tasks
Restricted Maniphest Task