root/include/crm/cluster/compat.h

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

INCLUDED FROM


   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_CLUSTER_COMPAT__H
  11 #  define PCMK__CRM_CLUSTER_COMPAT__H
  12 
  13 #include <stdint.h>         // uint32_t
  14 #include <sys/types.h>      // size_t
  15 
  16 #include <glib.h>           // gboolean, guint
  17 #include <libxml/tree.h>    // xmlNode
  18 
  19 #if SUPPORT_COROSYNC
  20 #include <corosync/cpg.h>   // cpg_handle_t
  21 #endif  // SUPPORT_COROSYNC
  22 
  23 #include <crm/cluster.h>    // crm_node_t
  24 
  25 #ifdef __cplusplus
  26 extern "C" {
  27 #endif
  28 
  29 /**
  30  * \file
  31  * \brief Deprecated Pacemaker cluster API
  32  * \ingroup cluster
  33  * \deprecated Do not include this header directly. The cluster APIs in this
  34  *             header, and the header itself, will be removed in a future
  35  *             release.
  36  */
  37 
  38 //! \deprecated Do not use
  39 enum crm_get_peer_flags {
  40     CRM_GET_PEER_CLUSTER   = 0x0001,
  41     CRM_GET_PEER_REMOTE    = 0x0002,
  42     CRM_GET_PEER_ANY       = CRM_GET_PEER_CLUSTER|CRM_GET_PEER_REMOTE,
  43 };
  44 
  45 // NOTE: sbd (as of at least 1.5.2) uses this
  46 //! \deprecated Use \c pcmk_cluster_t instead
  47 typedef pcmk_cluster_t crm_cluster_t;
  48 
  49 //! \deprecated Do not use Pacemaker for cluster node cacheing
  50 crm_node_t *crm_get_peer(unsigned int id, const char *uname);
  51 
  52 //! \deprecated Do not use Pacemaker for cluster node cacheing
  53 crm_node_t *crm_get_peer_full(unsigned int id, const char *uname, int flags);
  54 
  55 //! \deprecated Use stonith_api_kick() from libstonithd instead
  56 int crm_terminate_member(int nodeid, const char *uname, void *unused);
  57 
  58 //! \deprecated Use \c stonith_api_kick() from libstonithd instead
  59 int crm_terminate_member_no_mainloop(int nodeid, const char *uname,
  60                                      int *connection);
  61 
  62 /*!
  63  * \deprecated Use
  64  *             <tt>crm_xml_add(xml, attr, pcmk__cluster_node_uuid(node))</tt>
  65  *             instead
  66  */
  67 void set_uuid(xmlNode *xml, const char *attr, crm_node_t *node);
  68 
  69 #if SUPPORT_COROSYNC
  70 
  71 //! \deprecated Do not use
  72 gboolean cluster_connect_cpg(pcmk_cluster_t *cluster);
  73 
  74 //! \deprecated Do not use
  75 void cluster_disconnect_cpg(pcmk_cluster_t *cluster);
  76 
  77 //! \deprecated Do not use
  78 uint32_t get_local_nodeid(cpg_handle_t handle);
  79 
  80 //! \deprecated Do not use
  81 void pcmk_cpg_membership(cpg_handle_t handle,
  82                          const struct cpg_name *group_name,
  83                          const struct cpg_address *member_list,
  84                          size_t member_list_entries,
  85                          const struct cpg_address *left_list,
  86                          size_t left_list_entries,
  87                          const struct cpg_address *joined_list,
  88                          size_t joined_list_entries);
  89 
  90 //! \deprecated Do not use
  91 gboolean crm_is_corosync_peer_active(const crm_node_t * node);
  92 
  93 //! \deprecated Do not use
  94 gboolean send_cluster_text(enum crm_ais_msg_class msg_class, const char *data,
  95                            gboolean local, const crm_node_t *node,
  96                            enum crm_ais_msg_types dest);
  97 
  98 //! \deprecated Do not use
  99 char *pcmk_message_common_cs(cpg_handle_t handle, uint32_t nodeid, uint32_t pid,
 100                              void *msg, uint32_t *kind, const char **from);
 101 
 102 #endif  // SUPPORT_COROSYNC
 103 
 104 // NOTE: sbd (as of at least 1.5.2) uses this
 105 //! \deprecated Use \c pcmk_cluster_connect() instead
 106 gboolean crm_cluster_connect(pcmk_cluster_t *cluster);
 107 
 108 //! \deprecated Use \c pcmk_cluster_disconnect() instead
 109 void crm_cluster_disconnect(pcmk_cluster_t *cluster);
 110 
 111 //! \deprecated Do not use
 112 int crm_remote_peer_cache_size(void);
 113 
 114 //! \deprecated Do not use
 115 void crm_remote_peer_cache_refresh(xmlNode *cib);
 116 
 117 //! \deprecated Do not use
 118 crm_node_t *crm_remote_peer_get(const char *node_name);
 119 
 120 //! \deprecated Do not use
 121 void crm_remote_peer_cache_remove(const char *node_name);
 122 
 123 //! \deprecated Do not use
 124 gboolean crm_is_peer_active(const crm_node_t *node);
 125 
 126 //! \deprecated Do not use
 127 guint crm_active_peers(void);
 128 
 129 //! \deprecated Do not use
 130 guint reap_crm_member(uint32_t id, const char *name);
 131 
 132 // NOTE: sbd (as of at least 1.5.2) uses this enum
 133 //!@{
 134 //! \deprecated Use <tt>enum pcmk_cluster_layer</tt> instead
 135 enum cluster_type_e {
 136     // NOTE: sbd (as of at least 1.5.2) uses this value
 137     pcmk_cluster_unknown    = pcmk_cluster_layer_unknown,
 138 
 139     pcmk_cluster_invalid    = pcmk_cluster_layer_invalid,
 140 
 141     // NOTE: sbd (as of at least 1.5.2) uses this value
 142     pcmk_cluster_corosync   = pcmk_cluster_layer_corosync,
 143 };
 144 //!@}
 145 
 146 // NOTE: sbd (as of at least 1.5.2) uses this
 147 //! \deprecated Use \c pcmk_cluster_layer_text() instead
 148 const char *name_for_cluster_type(enum cluster_type_e type);
 149 
 150 // NOTE: sbd (as of at least 1.5.2) uses this
 151 //! \deprecated Use \c pcmk_get_cluster_layer() instead
 152 enum cluster_type_e get_cluster_type(void);
 153 
 154 //! \deprecated Use \c pcmk_get_cluster_layer() instead
 155 gboolean is_corosync_cluster(void);
 156 
 157 //! \deprecated Do not use
 158 void crm_peer_init(void);
 159 
 160 //! \deprecated Do not use
 161 void crm_peer_destroy(void);
 162 
 163 //! \deprecated Do not use
 164 gboolean send_cluster_message(const crm_node_t *node,
 165                               enum crm_ais_msg_types service,
 166                               const xmlNode *data, gboolean ordered);
 167 
 168 //! \deprecated Do not use
 169 const char *crm_peer_uuid(crm_node_t *node);
 170 
 171 //! \deprecated Do not use
 172 enum crm_ais_msg_types text2msg_type(const char *text);
 173 
 174 //! \deprecated Do not use
 175 char *get_node_name(uint32_t nodeid);
 176 
 177 //! \deprecated Do not use
 178 const char *get_local_node_name(void);
 179 
 180 //! \deprecated Do not use
 181 void crm_set_autoreap(gboolean enable);
 182 
 183 //! \deprecated Do not use
 184 void crm_set_status_callback(void (*dispatch)(enum crm_status_type,
 185                                               crm_node_t *, const void *));
 186 
 187 //! \deprecated Do not use
 188 const char *crm_peer_uname(const char *uuid);
 189 
 190 #ifdef __cplusplus
 191 }
 192 #endif
 193 
 194 #endif // PCMK_CLUSTER_COMPAT__H

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