pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
common.c
Go to the documentation of this file.
1 /*
2  * Copyright 2004-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 #include <crm_internal.h>
11 #include <crm/crm.h>
12 #include <crm/common/xml.h>
13 #include <crm/common/util.h>
14 
15 #include <glib.h>
16 
18 #include <crm/pengine/internal.h>
19 
20 // Deprecated functions kept only for backward API compatibility
21 // LCOV_EXCL_START
22 
24 
25 const char *
27 {
28  return pcmk_role_text(role);
29 }
30 
31 enum rsc_role_e
32 text2role(const char *role)
33 {
34  return pcmk_parse_role(role);
35 }
36 
37 const char *
39 {
40  return pcmk_action_text(task);
41 }
42 
43 enum action_tasks
44 text2task(const char *task)
45 {
46  return pcmk_parse_action(task);
47 }
48 
49 const char *
50 pe_pref(GHashTable * options, const char *name)
51 {
52  return pcmk__cluster_option(options, name);
53 }
54 
55 const char *
57 {
58  return pcmk_on_fail_text(fail);
59 }
60 
61 // LCOV_EXCL_STOP
62 // End deprecated API
A dumping ground.
const char * pcmk_role_text(enum rsc_role_e role)
Get readable description of a resource role.
Definition: roles.c:23
enum action_tasks pcmk_parse_action(const char *action_name)
Parse an action type from an action name.
Definition: actions.c:92
const char * name
Definition: cib.c:26
Deprecated Pacemaker scheduler utilities.
action_tasks
Definition: actions.h:83
const char * pcmk_on_fail_text(enum action_fail_response on_fail)
Get string equivalent of a failure handling type.
Definition: actions.c:147
action_fail_response
Definition: actions.h:130
const char * task2text(enum action_tasks task)
Definition: common.c:38
const char * pcmk__cluster_option(GHashTable *options, const char *name)
Definition: options.c:1419
enum rsc_role_e pcmk_parse_role(const char *role)
Parse a resource role from a string role specification.
Definition: roles.c:59
enum rsc_role_e text2role(const char *role)
Definition: common.c:32
const char * role2text(enum rsc_role_e role)
Definition: common.c:26
Utility functions.
Wrappers for and extensions to libxml2.
rsc_role_e
Definition: roles.h:34
const char * pcmk_action_text(enum action_tasks action)
Get string equivalent of an action type.
Definition: actions.c:37
const char * pe_pref(GHashTable *options, const char *name)
Definition: common.c:50
enum action_tasks text2task(const char *task)
Definition: common.c:44
const char * fail2text(enum action_fail_response fail)
Definition: common.c:56