HomeClusterLabs Projects

Refactor: tools,libcrmcommon: Remove --xml-simple-list.

Description

Refactor: tools,libcrmcommon: Remove --xml-simple-list.

  • Any tools that were previously using --xml-simple-list can just have that call removed. The default format creates that style of list.
  • stonith_admin and some parts of crm_resource need pcmk__output_enable_list_element because they create lists with begin_list/end_list and did not previously use --xml-simple-list. Their schema requires use of the <list> element for now.

This patch only adds a call to pcmk__output_enable_list_element where it
is needed. In any other tools, this call is omitted meaning that XML
lists will not use the <list> element. I've checked everywhere we're
using the XML output format and I think this is okay:

  • crm_attribute, crm_error, crm_rule, and crm_verify do create lists, but they don't use begin_list/end_list. Instead, they just output XML nodes in a for loop. So they never got the <list> vs. not element wrapping around their lists.
  • attrd_updater, crm_shadow, and all the daemons do not create any lists. Several of these tools just use formatted output to display information while they are running, all of which would be skipped for XML output.

This does potentially create a gotcha in the future if we add lists to
any of these tools. However, I don't think any of it will come as a
surprise because we will need to add schema at the same time.

Details

Provenance
clumensAuthored on Feb 21 2024, 10:12 AM
Parents
rP3d45bbcbdcbf: Refactor: libcrmcommon: Add pcmk__output_enable_list_element.
Branches
Unknown
Tags
Unknown