summaryrefslogtreecommitdiffstats
path: root/lib/pengine/common.c
blob: 6351bac004be52fa8be5f6a96118dba0569ba6e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
 * Copyright 2004-2024 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.
 */

#include <crm_internal.h>
#include <crm/crm.h>
#include <crm/common/xml.h>
#include <crm/common/util.h>

#include <glib.h>

#include <crm/common/scheduler_internal.h>
#include <crm/pengine/internal.h>

// Deprecated functions kept only for backward API compatibility
// LCOV_EXCL_START

#include <crm/pengine/common_compat.h>

const char *
role2text(enum rsc_role_e role)
{
    return pcmk_role_text(role);
}

enum rsc_role_e
text2role(const char *role)
{
    return pcmk_parse_role(role);
}

const char *
task2text(enum action_tasks task)
{
    return pcmk_action_text(task);
}

enum action_tasks
text2task(const char *task)
{
    return pcmk_parse_action(task);
}

const char *
pe_pref(GHashTable * options, const char *name)
{
    return pcmk__cluster_option(options, name);
}

const char *
fail2text(enum action_fail_response fail)
{
    return pcmk_on_fail_text(fail);
}

// LCOV_EXCL_STOP
// End deprecated API