pacemaker 3.0.1-16e74fc4da
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
digest_internal.h
Go to the documentation of this file.
1/*
2 * Copyright 2015-2024 the Pacemaker project contributors
3 *
4 * The version control history for this file may have further details.
5 *
6 * This source code is licensed under the GNU Lesser General Public License
7 * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8 */
9
10#ifndef PCMK__CRM_COMMON_DIGEST_INTERNAL__H
11#define PCMK__CRM_COMMON_DIGEST_INTERNAL__H
12
13/*
14 * Internal-only functions to create digest strings from XML
15 */
16
17#include <stdbool.h>
18
19#include <libxml/tree.h> // xmlNode
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25// Digest comparison results
27 pcmk__digest_unknown, // No digest available for comparison
28 pcmk__digest_match, // Digests match
29 pcmk__digest_mismatch, // Any parameter changed (potentially reloadable)
30 pcmk__digest_restart, // Parameters that require a restart changed
31};
32
33// Information needed to compare operation digests
34typedef struct {
35 enum pcmk__digest_result rc; // Result of digest comparison
36 xmlNode *params_all; // All operation parameters
37 xmlNode *params_secure; // Parameters marked private
38 xmlNode *params_restart; // Parameters marked not reloadable
39 char *digest_all_calc; // Digest of params_all
40 char *digest_secure_calc; // Digest of params_secure
41 char *digest_restart_calc; // Digest of params_restart
43
44char *pcmk__digest_on_disk_cib(xmlNode *input);
45char *pcmk__digest_operation(xmlNode *input);
46char *pcmk__digest_xml(xmlNode *input, bool filter);
47
48bool pcmk__verify_digest(xmlNode *input, const char *expected);
49
50#ifdef __cplusplus
51}
52#endif
53
54#endif // PCMK__CRM_COMMON_DIGEST_INTERNAL__H
pcmk__digest_result
@ pcmk__digest_match
@ pcmk__digest_restart
@ pcmk__digest_mismatch
@ pcmk__digest_unknown
char * pcmk__digest_xml(xmlNode *input, bool filter)
Definition digest.c:160
char * pcmk__digest_operation(xmlNode *input)
Definition digest.c:133
char * pcmk__digest_on_disk_cib(xmlNode *input)
Definition digest.c:110
bool pcmk__verify_digest(xmlNode *input, const char *expected)
Definition digest.c:200
xmlNode * input
enum pcmk__digest_result rc