root/include/crm/common/roles.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2004-2023 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 #ifndef PCMK__CRM_COMMON_ROLES__H
  11 #  define PCMK__CRM_COMMON_ROLES__H
  12 
  13 #ifdef __cplusplus
  14 extern "C" {
  15 #endif
  16 
  17 /*!
  18  * \file
  19  * \brief Scheduler API for resource roles
  20  * \ingroup core
  21  */
  22 
  23 /*!
  24  * Possible roles that a resource can be in
  25  * (order matters; values can be compared with less than and greater than)
  26  */
  27 enum rsc_role_e {
  28     pcmk_role_unknown       = 0, //!< Resource role is unknown
  29     pcmk_role_stopped       = 1, //!< Stopped
  30     pcmk_role_started       = 2, //!< Started
  31     pcmk_role_unpromoted    = 3, //!< Unpromoted
  32     pcmk_role_promoted      = 4, //!< Promoted
  33 
  34 #if !defined(PCMK_ALLOW_DEPRECATED) || (PCMK_ALLOW_DEPRECATED == 1)
  35     //! \deprecated Use pcmk_role_unknown instead
  36     RSC_ROLE_UNKNOWN        = pcmk_role_unknown,
  37 
  38     //! \deprecated Use pcmk_role_stopped instead
  39     RSC_ROLE_STOPPED        = pcmk_role_stopped,
  40 
  41     //! \deprecated Use pcmk_role_started instead
  42     RSC_ROLE_STARTED        = pcmk_role_started,
  43 
  44     //! \deprecated Use pcmk_role_unpromoted instead
  45     RSC_ROLE_UNPROMOTED         = pcmk_role_unpromoted,
  46 
  47     //! \deprecated Use pcmk_role_unpromoted instead
  48     RSC_ROLE_SLAVE              = pcmk_role_unpromoted,
  49 
  50     //! \deprecated Use pcmk_role_promoted instead
  51     RSC_ROLE_PROMOTED           = pcmk_role_promoted,
  52 
  53     //! \deprecated Use pcmk_role_promoted instead
  54     RSC_ROLE_MASTER             = pcmk_role_promoted,
  55 #endif
  56 };
  57 
  58 #ifdef __cplusplus
  59 }
  60 #endif
  61 
  62 #endif // PCMK__CRM_COMMON_ROLES__H

/* [previous][next][first][last][top][bottom][index][help] */