diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:45:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:45:40 +0000 |
commit | 07d7f4cfa4b10de87a31b68191036ff446add675 (patch) | |
tree | 7162524d8aaf1aef62d2f4fa51f595ed113981ff /include/crm/common/roles.h | |
parent | Adding upstream version 2.1.6. (diff) | |
download | pacemaker-0d560556df519c6626cda7660f843a815b3c227e.tar.xz pacemaker-0d560556df519c6626cda7660f843a815b3c227e.zip |
Adding upstream version 2.1.7.upstream/2.1.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/crm/common/roles.h')
-rw-r--r-- | include/crm/common/roles.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/include/crm/common/roles.h b/include/crm/common/roles.h new file mode 100644 index 0000000..1498097 --- /dev/null +++ b/include/crm/common/roles.h @@ -0,0 +1,62 @@ +/* + * Copyright 2004-2023 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. + */ + +#ifndef PCMK__CRM_COMMON_ROLES__H +# define PCMK__CRM_COMMON_ROLES__H + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * \file + * \brief Scheduler API for resource roles + * \ingroup core + */ + +/*! + * Possible roles that a resource can be in + * (order matters; values can be compared with less than and greater than) + */ +enum rsc_role_e { + pcmk_role_unknown = 0, //!< Resource role is unknown + pcmk_role_stopped = 1, //!< Stopped + pcmk_role_started = 2, //!< Started + pcmk_role_unpromoted = 3, //!< Unpromoted + pcmk_role_promoted = 4, //!< Promoted + +#if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1) + //! \deprecated Use pcmk_role_unknown instead + RSC_ROLE_UNKNOWN = pcmk_role_unknown, + + //! \deprecated Use pcmk_role_stopped instead + RSC_ROLE_STOPPED = pcmk_role_stopped, + + //! \deprecated Use pcmk_role_started instead + RSC_ROLE_STARTED = pcmk_role_started, + + //! \deprecated Use pcmk_role_unpromoted instead + RSC_ROLE_UNPROMOTED = pcmk_role_unpromoted, + + //! \deprecated Use pcmk_role_unpromoted instead + RSC_ROLE_SLAVE = pcmk_role_unpromoted, + + //! \deprecated Use pcmk_role_promoted instead + RSC_ROLE_PROMOTED = pcmk_role_promoted, + + //! \deprecated Use pcmk_role_promoted instead + RSC_ROLE_MASTER = pcmk_role_promoted, +#endif +}; + +#ifdef __cplusplus +} +#endif + +#endif // PCMK__CRM_COMMON_ROLES__H |