root/lib/pengine/common.c

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

DEFINITIONS

This source file includes following definitions.
  1. role2text
  2. text2role
  3. task2text
  4. text2task
  5. pe_pref
  6. fail2text

   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 #include <crm_internal.h>
  11 #include <crm/crm.h>
  12 #include <crm/common/xml.h>
  13 #include <crm/common/util.h>
  14 
  15 #include <glib.h>
  16 
  17 #include <crm/common/scheduler_internal.h>
  18 #include <crm/pengine/internal.h>
  19 
  20 // Deprecated functions kept only for backward API compatibility
  21 // LCOV_EXCL_START
  22 
  23 #include <crm/pengine/common_compat.h>
  24 
  25 const char *
  26 role2text(enum rsc_role_e role)
     /* [previous][next][first][last][top][bottom][index][help] */
  27 {
  28     return pcmk_role_text(role);
  29 }
  30 
  31 enum rsc_role_e
  32 text2role(const char *role)
     /* [previous][next][first][last][top][bottom][index][help] */
  33 {
  34     return pcmk_parse_role(role);
  35 }
  36 
  37 const char *
  38 task2text(enum action_tasks task)
     /* [previous][next][first][last][top][bottom][index][help] */
  39 {
  40     return pcmk_action_text(task);
  41 }
  42 
  43 enum action_tasks
  44 text2task(const char *task)
     /* [previous][next][first][last][top][bottom][index][help] */
  45 {
  46     return pcmk_parse_action(task);
  47 }
  48 
  49 const char *
  50 pe_pref(GHashTable * options, const char *name)
     /* [previous][next][first][last][top][bottom][index][help] */
  51 {
  52     return pcmk__cluster_option(options, name);
  53 }
  54 
  55 const char *
  56 fail2text(enum action_fail_response fail)
     /* [previous][next][first][last][top][bottom][index][help] */
  57 {
  58     return pcmk_on_fail_text(fail);
  59 }
  60 
  61 // LCOV_EXCL_STOP
  62 // End deprecated API

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