pacemaker 2.1.8-2.1.8
Scalable High-Availability cluster resource manager
Loading...
Searching...
No Matches
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
19
20// Deprecated functions kept only for backward API compatibility
21// LCOV_EXCL_START
22
24
25const char *
27{
28 return pcmk_role_text(role);
29}
30
31enum rsc_role_e
32text2role(const char *role)
33{
34 return pcmk_parse_role(role);
35}
36
37const char *
39{
40 return pcmk_action_text(task);
41}
42
43enum action_tasks
44text2task(const char *task)
45{
46 return pcmk_parse_action(task);
47}
48
49const char *
50pe_pref(GHashTable * options, const char *name)
51{
52 return pcmk__cluster_option(options, name);
53}
54
55const char *
57{
58 return pcmk_on_fail_text(fail);
59}
60
61// LCOV_EXCL_STOP
62// End deprecated API
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
action_tasks
Definition actions.h:83
const char * pcmk_action_text(enum action_tasks action)
Get string equivalent of an action type.
Definition actions.c:37
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
Utility functions.
enum action_tasks text2task(const char *task)
Definition common.c:44
const char * fail2text(enum action_fail_response fail)
Definition common.c:56
const char * role2text(enum rsc_role_e role)
Definition common.c:26
const char * task2text(enum action_tasks task)
Definition common.c:38
const char * pe_pref(GHashTable *options, const char *name)
Definition common.c:50
enum rsc_role_e text2role(const char *role)
Definition common.c:32
Deprecated Pacemaker scheduler utilities.
A dumping ground.
const char * pcmk__cluster_option(GHashTable *options, const char *name)
Definition options.c:1412
const char * pcmk_role_text(enum rsc_role_e role)
Get readable description of a resource role.
Definition roles.c:23
enum rsc_role_e pcmk_parse_role(const char *role)
Parse a resource role from a string role specification.
Definition roles.c:59
rsc_role_e
Definition roles.h:34
Wrappers for and extensions to libxml2.