-
Notifications
You must be signed in to change notification settings - Fork 365
Deprecate pcmk_evaluate_rule() and pcmk_rule_input_t, and minor location unpacking changes #4163
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
base: main
Are you sure you want to change the base?
Changes from all commits
cc4c360
f772937
f15d8e0
428beba
c0837f5
a902d6c
a5a88da
40c0aad
c04875e
0e51ccf
dfd1f49
141e168
dd94e69
239b0e5
58c6b48
2e063af
5b36bfb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,8 +18,8 @@ | |
| #include <glib.h> // gboolean, GHashTable | ||
| #include <libxml/tree.h> // xmlNode | ||
|
|
||
| #include <crm/common/rules.h> // pcmk_rule_input_t | ||
| #include <crm/common/iso8601.h> // crm_time_t | ||
| #include <crm/common/rules_internal.h> // pcmk__rule_input_t | ||
| #include <crm/common/strings_internal.h> // pcmk__str_eq(), etc. | ||
|
|
||
| #ifdef __cplusplus | ||
|
|
@@ -31,7 +31,7 @@ typedef struct { | |
| GHashTable *values; // Where to put name/value pairs | ||
| const char *first_id; // Block with this XML ID should sort first | ||
| xmlDoc *doc; // XML document to use for resolving IDREFs | ||
| pcmk_rule_input_t rule_input; // Data used to evaluate rules | ||
| pcmk__rule_input_t rule_input; // Data used to evaluate rules | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see what the commit message means, but on its own (like in the context of |
||
|
|
||
| /* Whether each block's values should overwrite any existing ones | ||
| * | ||
|
|
@@ -50,7 +50,7 @@ void pcmk__unpack_nvpair_block(void *data, void *user_data); | |
|
|
||
| void pcmk__unpack_nvpair_blocks(const xmlNode *xml, const char *element_name, | ||
| const char *first_id, | ||
| const pcmk_rule_input_t *rule_input, | ||
| const pcmk__rule_input_t *rule_input, | ||
| GHashTable *values, crm_time_t *next_change, | ||
| xmlDoc *doc); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| /* | ||
| * Copyright 2004-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__CRM_COMMON_RULES_COMPAT__H | ||
| #define PCMK__CRM_COMMON_RULES_COMPAT__H | ||
|
|
||
| #include <regex.h> // regmatch_t | ||
|
|
||
| #include <glib.h> // GHashTable | ||
| #include <libxml/tree.h> // xmlNode | ||
|
|
||
| #include <crm/common/iso8601.h> // crm_time_t | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| /** | ||
| * \file | ||
| * \brief Deprecated Pacemaker rules API | ||
| * \ingroup core | ||
| * \deprecated Do not include this header directly. The nvpair APIs in this | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| * header, and the header itself, will be removed in a future | ||
| * release. | ||
| */ | ||
|
|
||
| //!@{ | ||
| //! \deprecated Do not use | ||
| enum expression_type { | ||
| not_expr = 0, | ||
| nested_rule = 1, | ||
| attr_expr = 2, | ||
| loc_expr = 3, | ||
| role_expr = 4, | ||
| time_expr = 5, | ||
| version_expr = 6, | ||
| rsc_expr = 7, | ||
| op_expr = 8, | ||
| }; | ||
| //!@} | ||
|
|
||
| //!@{ | ||
| //! \deprecated Do not use | ||
| typedef struct pcmk_rule_input { | ||
| const crm_time_t *now; | ||
| const char *rsc_standard; | ||
| const char *rsc_provider; | ||
| const char *rsc_agent; | ||
| const char *op_name; | ||
| unsigned int op_interval_ms; | ||
| GHashTable *node_attrs; | ||
| GHashTable *rsc_params; | ||
| GHashTable *rsc_meta; | ||
| const char *rsc_id; | ||
| const regmatch_t *rsc_id_submatches; | ||
| int rsc_id_nmatches; | ||
| } pcmk_rule_input_t; | ||
| //!@} | ||
|
|
||
| //! \deprecated Do not use | ||
| int pcmk_evaluate_rule(xmlNode *rule, const pcmk_rule_input_t *rule_input, | ||
| crm_time_t *next_change); | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| #endif // PCMK__CRM_COMMON_RULES_COMPAT__H | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't see any way to comment on a commit message. There's a typo in the second paragraph -
woudlshould bewould.