pacemaker  1.1.18-7fdfbbe
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
complex.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2004 Andrew Beekhof <andrew@beekhof.net>
3  *
4  * This program 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 of the License, or (at your option) any later version.
8  *
9  * This software 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  * 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 PENGINE_COMPLEX__H
19 # define PENGINE_COMPLEX__H
20 
21 # define n_object_classes 3
22 
23 /*#define PE_OBJ_F_ ""*/
24 
25 # define PE_OBJ_T_NATIVE "native"
26 # define PE_OBJ_T_GROUP "group"
27 # define PE_OBJ_T_INCARNATION "clone"
28 # define PE_OBJ_T_MASTER "master"
29 
31  pe_unknown = -1,
32  pe_native = 0,
33  pe_group = 1,
34  pe_clone = 2,
35  pe_master = 3,
37 };
38 
39 enum pe_obj_types get_resource_type(const char *name);
40 const char *get_resource_typename(enum pe_obj_types type);
41 
43  gboolean(*unpack) (resource_t *, pe_working_set_t *);
44  resource_t *(*find_rsc) (resource_t * parent, const char *search, node_t * node, int flags);
45  /* parameter result must be free'd */
46  char *(*parameter) (resource_t *, node_t *, gboolean, const char *, pe_working_set_t *);
47  void (*print) (resource_t *, const char *, long, void *);
48  gboolean(*active) (resource_t *, gboolean);
49  enum rsc_role_e (*state) (const resource_t *, gboolean);
50  node_t *(*location) (resource_t *, GListPtr *, gboolean);
51  void (*free) (resource_t *);
53 
55 void get_meta_attributes(GHashTable * meta_hash, resource_t * rsc, node_t * node,
56  pe_working_set_t * data_set);
57 void get_rsc_attributes(GHashTable * meta_hash, resource_t * rsc, node_t * node,
58  pe_working_set_t * data_set);
59 
60 #ifdef ENABLE_VERSIONED_ATTRS
61 void pe_get_versioned_attributes(xmlNode * meta_hash, resource_t * rsc, node_t * node,
62  pe_working_set_t * data_set);
63 #endif
64 
65 typedef struct resource_alloc_functions_s resource_alloc_functions_t;
66 
67 gboolean is_parent(resource_t *child, resource_t *rsc);
69 
70 #endif
gboolean(* unpack)(resource_t *, pe_working_set_t *)
Definition: complex.h:43
gboolean is_parent(resource_t *child, resource_t *rsc)
Definition: complex.c:880
void(* free)(resource_t *)
Definition: complex.h:51
void get_rsc_attributes(GHashTable *meta_hash, resource_t *rsc, node_t *node, pe_working_set_t *data_set)
Definition: complex.c:174
struct resource_object_functions_s resource_object_functions_t
resource_t * uber_parent(resource_t *rsc)
Definition: complex.c:897
const char * get_resource_typename(enum pe_obj_types type)
Definition: complex.c:105
gboolean(* active)(resource_t *, gboolean)
Definition: complex.h:48
pe_obj_types
Definition: complex.h:30
resource_object_functions_t resource_class_functions[]
Definition: complex.c:29
enum pe_obj_types get_resource_type(const char *name)
Definition: complex.c:83
void(* print)(resource_t *, const char *, long, void *)
Definition: complex.h:47
enum rsc_role_e(* state)(const resource_t *, gboolean)
Definition: complex.h:49
rsc_role_e
Definition: common.h:81
void get_meta_attributes(GHashTable *meta_hash, resource_t *rsc, node_t *node, pe_working_set_t *data_set)
Definition: complex.c:131
struct resource_alloc_functions_s resource_alloc_functions_t
Definition: complex.h:65
Definition: status.h:174
GList * GListPtr
Definition: crm.h:218
uint64_t flags
Definition: remote.c:156
enum crm_ais_msg_types type
Definition: internal.h:51