diff options
Diffstat (limited to 'include/crm/common/roles.h')
-rw-r--r-- | include/crm/common/roles.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/crm/common/roles.h b/include/crm/common/roles.h index 1498097..e315d6b 100644 --- a/include/crm/common/roles.h +++ b/include/crm/common/roles.h @@ -1,5 +1,5 @@ /* - * Copyright 2004-2023 the Pacemaker project contributors + * Copyright 2004-2024 the Pacemaker project contributors * * The version control history for this file may have further details. * @@ -8,7 +8,7 @@ */ #ifndef PCMK__CRM_COMMON_ROLES__H -# define PCMK__CRM_COMMON_ROLES__H +#define PCMK__CRM_COMMON_ROLES__H #ifdef __cplusplus extern "C" { @@ -20,6 +20,13 @@ extern "C" { * \ingroup core */ +// String equivalents of enum rsc_role_e + +#define PCMK_ROLE_STOPPED "Stopped" +#define PCMK_ROLE_STARTED "Started" +#define PCMK_ROLE_UNPROMOTED "Unpromoted" +#define PCMK_ROLE_PROMOTED "Promoted" + /*! * Possible roles that a resource can be in * (order matters; values can be compared with less than and greater than) @@ -55,6 +62,9 @@ enum rsc_role_e { #endif }; +const char *pcmk_role_text(enum rsc_role_e role); +enum rsc_role_e pcmk_parse_role(const char *role); + #ifdef __cplusplus } #endif |