root/include/crm/pengine/common_compat.h

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

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. recovery2text

   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 #ifndef PCMK__CRM_PENGINE_COMMON_COMPAT__H
  11 #  define PCMK__CRM_PENGINE_COMMON_COMPAT__H
  12 
  13 #include <crm/common/scheduler.h>
  14 
  15 #ifdef __cplusplus
  16 extern "C" {
  17 #endif
  18 
  19 /**
  20  * \file
  21  * \brief Deprecated Pacemaker scheduler utilities
  22  * \ingroup pengine
  23  * \deprecated Do not include this header directly. The utilities in this
  24  *             header, and the header itself, will be removed in a future
  25  *             release.
  26  */
  27 
  28 //! \deprecated Use (pcmk_role_promoted + 1) instead
  29 #define RSC_ROLE_MAX    (pcmk_role_promoted + 1)
  30 
  31 //! \deprecated Use pcmk_role_text(pcmk_role_unknown) instead
  32 #define RSC_ROLE_UNKNOWN_S      pcmk_role_text(pcmk_role_unknown)
  33 
  34 //! \deprecated Use pcmk_role_text(pcmk_role_stopped) instead
  35 #define RSC_ROLE_STOPPED_S      pcmk_role_text(pcmk_role_stopped)
  36 
  37 //! \deprecated Use pcmk_role_text(pcmk_role_started) instead
  38 #define RSC_ROLE_STARTED_S      pcmk_role_text(pcmk_role_started)
  39 
  40 //! \deprecated Use pcmk_role_text(pcmk_role_unpromoted) instead
  41 #define RSC_ROLE_UNPROMOTED_S   pcmk_role_text(pcmk_role_unpromoted)
  42 
  43 //! \deprecated Use pcmk_role_text(pcmk_role_promoted) instead
  44 #define RSC_ROLE_PROMOTED_S     pcmk_role_text(pcmk_role_promoted)
  45 
  46 //! \deprecated Do not use
  47 #define RSC_ROLE_UNPROMOTED_LEGACY_S    "Slave"
  48 
  49 //! \deprecated Do not use
  50 #define RSC_ROLE_SLAVE_S                RSC_ROLE_UNPROMOTED_LEGACY_S
  51 
  52 //! \deprecated Do not use
  53 #define RSC_ROLE_PROMOTED_LEGACY_S      "Master"
  54 
  55 //! \deprecated Do not use
  56 #define RSC_ROLE_MASTER_S               RSC_ROLE_PROMOTED_LEGACY_S
  57 
  58 //! \deprecated Use pcmk_role_text() instead
  59 const char *role2text(enum rsc_role_e role);
  60 
  61 //! \deprecated Use pcmk_parse_role() instead
  62 enum rsc_role_e text2role(const char *role);
  63 
  64 //! \deprecated Use pcmk_action_text() instead
  65 const char *task2text(enum action_tasks task);
  66 
  67 //! \deprecated Use pcmk_parse_action() instead
  68 enum action_tasks text2task(const char *task);
  69 
  70 //! \deprecated Use pcmk_on_fail_text() instead
  71 const char *fail2text(enum action_fail_response fail);
  72 
  73 //! \deprecated Do not use
  74 static inline const char *
  75 recovery2text(enum rsc_recovery_type type)
     /* [previous][next][first][last][top][bottom][index][help] */
  76 {
  77     switch (type) {
  78         case pcmk_multiply_active_stop:
  79             return "shutting it down";
  80         case pcmk_multiply_active_restart:
  81             return "attempting recovery";
  82         case pcmk_multiply_active_block:
  83             return "waiting for an administrator";
  84         case pcmk_multiply_active_unexpected:
  85             return "stopping unexpected instances";
  86     }
  87     return "Unknown";
  88 }
  89 
  90 //! \deprecated Do not use
  91 const char *pe_pref(GHashTable * options, const char *name);
  92 
  93 #ifdef __cplusplus
  94 }
  95 #endif
  96 
  97 #endif // PCMK__CRM_PENGINE_COMMON_COMPAT__H

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