pacemaker
1.1.16-94ff4df
Scalable High-Availability cluster resource manager
Main Page
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
lib
pengine
variant.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net>
3
*
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
#ifndef PE_VARIANT__H
19
# define PE_VARIANT__H
20
21
# if VARIANT_CLONE
22
23
typedef
struct
clone_variant_data_s {
24
int
clone_max;
25
int
clone_node_max;
26
27
int
master_max;
28
int
master_node_max;
29
30
int
total_clones;
31
int
active_clones;
32
int
max_nodes;
33
34
int
masters_active;
35
int
masters_allocated;
36
37
gboolean interleave;
38
gboolean ordered;
39
gboolean applied_master_prefs;
40
gboolean merged_master_weights;
41
42
notify_data_t
*stop_notify;
43
notify_data_t
*start_notify;
44
notify_data_t
*demote_notify;
45
notify_data_t
*promote_notify;
46
47
xmlNode *xml_obj_child;
48
49
gboolean notify_confirm;
50
51
} clone_variant_data_t;
52
53
# define get_clone_variant_data(data, rsc) \
54
CRM_ASSERT(rsc != NULL); \
55
CRM_ASSERT(rsc->variant == pe_clone || rsc->variant == pe_master); \
56
data = (clone_variant_data_t *)rsc->variant_opaque;
57
58
# elif VARIANT_GROUP
59
60
typedef
struct
group_variant_data_s {
61
int
num_children;
62
resource_t
*first_child;
63
resource_t
*last_child;
64
65
gboolean colocated;
66
gboolean ordered;
67
68
gboolean child_starting;
69
gboolean child_stopping;
70
71
} group_variant_data_t;
72
73
# define get_group_variant_data(data, rsc) \
74
CRM_ASSERT(rsc != NULL); \
75
CRM_ASSERT(rsc->variant == pe_group); \
76
CRM_ASSERT(rsc->variant_opaque != NULL); \
77
data = (group_variant_data_t *)rsc->variant_opaque; \
78
79
# elif VARIANT_NATIVE
80
81
typedef
struct
native_variant_data_s {
82
int
dummy;
83
} native_variant_data_t;
84
85
# define get_native_variant_data(data, rsc) \
86
CRM_ASSERT(rsc != NULL); \
87
CRM_ASSERT(rsc->variant == pe_native); \
88
CRM_ASSERT(rsc->variant_opaque != NULL); \
89
data = (native_variant_data_t *)rsc->variant_opaque;
90
91
# endif
92
93
#endif
notify_data_s
Definition:
internal.h:34
resource_s
Definition:
status.h:243
Generated on Wed Jun 7 2017 12:15:12 for pacemaker by
1.8.8