HomeClusterLabs Projects

Refactor: libcrmcommon, libcib: Check for element in CIB diff

Description

Refactor: libcrmcommon, libcib: Check for element in CIB diff

Convert pcmkalert_in_patchset() to a more generic function,
cib
element_in_patchset(), that tests whether a given element was
modified by a CIB update. Since checking a v2 CIB update involves string
comparisons rather than searching an XML object for the desired element,
this function can't support arbitrary XPath queries. Supported elements
are those that are supported by pcmk__abs_xpath_for_element().

Also move the function to libcib since we're using F_CIB_UPDATE_RESULT.

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

Details

Provenance
nrwahl2Authored on Aug 8 2023, 10:55 PM
Parents
rP29648f0e6110: Refactor: libcrmcommon: Best practices in pcmk__alert_in_patchset()
Branches
Unknown
Tags
Unknown