summaryrefslogtreecommitdiffstats
path: root/include/crm/pengine/remote_internal.h
blob: 0e7c044a50386846561c318f0f64d2a71b3d3086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * Copyright 2013-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 PE_REMOTE__H
#  define PE_REMOTE__H

#ifdef __cplusplus
extern "C" {
#endif

#include <glib.h>                   // gboolean
#include <libxml/tree.h>            // xmlNode
#include <crm/pengine/status.h>

bool xml_contains_remote_node(xmlNode *xml);
bool pe__is_remote_node(const pcmk_node_t *node);
bool pe__is_guest_node(const pcmk_node_t *node);
bool pe__is_guest_or_remote_node(const pcmk_node_t *node);
bool pe__is_bundle_node(const pcmk_node_t *node);
bool pe__resource_is_remote_conn(const pcmk_resource_t *rsc);
pcmk_resource_t *pe__resource_contains_guest_node(const pcmk_scheduler_t *scheduler,
                                                  const pcmk_resource_t *rsc);
void pe_foreach_guest_node(const pcmk_scheduler_t *scheduler,
                           const pcmk_node_t *host,
                           void (*helper)(const pcmk_node_t*, void*),
                           void *user_data);
xmlNode *pe_create_remote_xml(xmlNode *parent, const char *uname,
                              const char *container_id, const char *migrateable,
                              const char *is_managed, const char *start_timeout,
                              const char *server, const char *port);

#ifdef __cplusplus
}
#endif

#endif