-
Notifications
You must be signed in to change notification settings - Fork 359
Refactor: libcrmcommon: Use XML attribute foreach functions in more places #4124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
925d17f
Refactor: libcrmcommon: pcmk__xe_copy_attrs pcmk__xe_foreach_const_attr
nrwahl2 68598bc
Refactor: libcrmcommon: Use foreach functions in pcmk__xe_sort_attrs()
nrwahl2 21f9c7e
Refactor: libcrmcommon: pcmk__xe_foreach_attr for matching attr removal
nrwahl2 e83a0c3
Refactor: libcrmcommon: delete matching xe pcmk__xe_foreach_const_attr
nrwahl2 125c2b6
Refactor: libpe_status: get_meta_attributes pcmk__xe_foreach_const_attr
nrwahl2 31b392b
Refactor: libcrmcommon: pcmk__xe_foreach_const_attr() in xml2list()
nrwahl2 2bcf90c
Refactor: libcrmcommon: Drop check in add_xml_changes_to_patchset()
nrwahl2 19a5928
Refactor: libcrmcommon: Drop xpath check in add_xml_changes_to_patchset
nrwahl2 c2d7856
Refactor: libcrmcommon: Clarify pointers in add_xml_changes_to_patchset
nrwahl2 a1f472f
Refactor: libcrmcommon: Use foreach for adding attr changes to patchset
nrwahl2 f28ae6d
Refactor: libcrmcommon: Drop cIter in add_xml_changes_to_patchset()
nrwahl2 866c728
Refactor: libcrmcommon: Functionize adding modify change to patchset
nrwahl2 198f778
Refactor: libcrmcommon: Functionize adding create change to patchset
nrwahl2 65123b8
Refactor: libcrmcommon: Functionize adding move change to patchset
nrwahl2 80d7d7b
Refactor: libcrmcommon: Add modify change only if xml is dirty
nrwahl2 bff088a
Refactor: libcrmcommon: Functionize adding delete change to patchset
nrwahl2 21060bd
Refactor: libcrmcommon: Minor xml_create_patchset_v2() improvements
nrwahl2 6450f51
Refactor: libcrmcommon: Functionize setting version fields in patchset
nrwahl2 01956f7
Refactor: libcrmcommon: pcmk__xe_copy_attrs() in apply_v2_patchset()
nrwahl2 d2a49b9
Refactor: libcrmcommon: implicitly_allowed() pcmk__xe_foreach_const_attr
nrwahl2 daf53b0
Refactor: libcrmcommon: Clarify pcmk__xml_attr_value()
nrwahl2 260f8dc
Refactor: libcrmcommon: Simplify/clarify pcmk__dump_xml_attr()
nrwahl2 7259f36
Refactor: libcrmcommon: pcmk__xe_foreach_const_attr in dump_xml_element
nrwahl2 8faf718
Low: libcrmcommon: Drop "<null>" fallback in show_xml_element()
nrwahl2 182f64e
Refactor: libcrmcommon: Display attributes with NULL private data
nrwahl2 342984f
Refactor: libcrmcommon: Call pcmk__dump_xml_attr() in show_xml_element()
nrwahl2 86cf138
Refactor: libcrmcommon: Drop a couple checks from show_xml_element()
nrwahl2 f851a84
Refactor: libcrmcommon: pcmk__xe_foreach_const_attr in show_xml_element
nrwahl2 7e669e6
Refactor: libcrmcommon: Functionize checking whether attribute is hidden
nrwahl2 c6a526a
Refactor: libcrmcommon: Rename show_xml_changes_recursive argument
nrwahl2 a5bd47c
Refactor: libcrmcommon: foreach_const_attr in show_xml_changes_recursive
nrwahl2 0f1c8ad
Refactor: libcrmcommon: foreach const attr in pcmk__xe_sort_attrs test
nrwahl2 1a3f6d1
Refactor: libpe_status: foreach_const_attr in pcmk__unpack_action_meta
nrwahl2 9272bde
Refactor: libcrmcommon: foreach_const_attr() in unpack_ticket_state()
nrwahl2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /* | ||
| * Copyright 2025-2026 the Pacemaker project contributors | ||
| * | ||
| * The version control history for this file may have further details. | ||
| * | ||
| * This source code is licensed under the GNU Lesser General Public License | ||
| * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY. | ||
| */ | ||
|
|
||
| #ifndef PCMK__INCLUDED_CRM_COMMON_INTERNAL_H | ||
| #error "Include <crm/common/internal.h> instead of <xml_attr_internal.h> " \ | ||
| "directly" | ||
| #endif | ||
|
|
||
| #ifndef PCMK__CRM_COMMON_XML_ATTR_INTERNAL__H | ||
| #define PCMK__CRM_COMMON_XML_ATTR_INTERNAL__H | ||
|
|
||
| /* | ||
| * Internal-only wrappers for and extensions to libxml2 for processing XML | ||
| * attributes | ||
| */ | ||
|
|
||
| #include <stdbool.h> // bool | ||
|
|
||
| #include <libxml/tree.h> // xmlAttr | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| bool pcmk__xa_insert_dup(const xmlAttr *attr, void *user_data); | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| #endif // PCMK__XML_ATTR_INTERNAL__H | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.