summaryrefslogtreecommitdiffstats
path: root/include/crm/pengine/remote_internal.h
blob: 46d58fc5e190940308ed0696897843b18d0164ee (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
/*
 * Copyright 2013-2019 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 pe_node_t *node);
bool pe__is_guest_node(const pe_node_t *node);
bool pe__is_guest_or_remote_node(const pe_node_t *node);
bool pe__is_bundle_node(const pe_node_t *node);
bool pe__resource_is_remote_conn(const pe_resource_t *rsc,
                                 const pe_working_set_t *data_set);
pe_resource_t *pe__resource_contains_guest_node(const pe_working_set_t *data_set,
                                                const pe_resource_t *rsc);
void pe_foreach_guest_node(const pe_working_set_t *data_set, const pe_node_t *host,
                           void (*helper)(const pe_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