HomeClusterLabs Projects

Refactor: libcrmcommon: New pcmk__xml_copy()

Description

Refactor: libcrmcommon: New pcmk__xml_copy()

Accepts a NULL src argument and NULL-checks doc. Replaces copy_xml().

It also accepts a parent argument, which is currently always NULL. This
is in anticipation of replacing add_node_copy() as well. The resulting
structure is similar to that of create_xml_node().

At first I tried to make this pcmkxe_copy() and require that the src
argument be an element node. However, it turns out that we're also
copying (at least) comment nodes (see pcmk
xc_update()).

Note: We should either assert on NULL in create_xml_node() or NOT assert
on NULL in pcmk__xml_copy(). Not sure which approach we want to take.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Feb 3 2024, 5:43 PM
Parents
rPfb7e94fc8f97: Doc: controller: Remove reference to nonexistent T_CL_STATUS
Branches
Unknown
Tags
Unknown