pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
pcmk_sched_constraints.c File Reference
#include <crm_internal.h>
#include <sys/param.h>
#include <sys/types.h>
#include <regex.h>
#include <crm/crm.h>
#include <crm/cib.h>
#include <crm/msg_xml.h>
#include <crm/common/xml.h>
#include <glib.h>
#include <crm/pengine/status.h>
#include <pacemaker-internal.h>
#include <crm/pengine/rules.h>
#include <../lib/pengine/unpack.h>
Include dependency graph for pcmk_sched_constraints.c:

Go to the source code of this file.

Macros

#define EXPAND_CONSTRAINT_IDREF(__set, __rsc, __name)
 

Enumerations

enum  pe_order_kind { pe_order_kind_optional, pe_order_kind_mandatory, pe_order_kind_serialize }
 

Functions

enum pe_ordering get_flags (const char *id, enum pe_order_kind kind, const char *action_first, const char *action_then, gboolean invert)
 
enum pe_ordering get_asymmetrical_flags (enum pe_order_kind kind)
 
gboolean unpack_constraints (xmlNode *xml_constraints, pe_working_set_t *data_set)
 
gboolean unpack_location (xmlNode *xml_obj, pe_working_set_t *data_set)
 
gboolean rsc_colocation_new (const char *id, const char *node_attr, int score, resource_t *rsc_lh, resource_t *rsc_rh, const char *state_lh, const char *state_rh, pe_working_set_t *data_set)
 
int new_rsc_order (resource_t *lh_rsc, const char *lh_task, resource_t *rh_rsc, const char *rh_task, enum pe_ordering type, pe_working_set_t *data_set)
 
int custom_action_order (resource_t *lh_rsc, char *lh_action_task, action_t *lh_action, resource_t *rh_rsc, char *rh_action_task, action_t *rh_action, enum pe_ordering type, pe_working_set_t *data_set)
 
gboolean unpack_rsc_order (xmlNode *xml_obj, pe_working_set_t *data_set)
 
gboolean unpack_rsc_colocation (xmlNode *xml_obj, pe_working_set_t *data_set)
 
gboolean rsc_ticket_new (const char *id, resource_t *rsc_lh, ticket_t *ticket, const char *state_lh, const char *loss_policy, pe_working_set_t *data_set)
 
gboolean unpack_rsc_ticket (xmlNode *xml_obj, pe_working_set_t *data_set)
 
gboolean is_active (pe__location_t *cons)
 

Macro Definition Documentation

#define EXPAND_CONSTRAINT_IDREF (   __set,
  __rsc,
  __name 
)
Value:
do { \
__rsc = pe_find_constraint_resource(data_set->resources, __name); \
if(__rsc == NULL) { \
crm_config_err("%s: No resource found for %s", __set, __name); \
return FALSE; \
} \
} while(0)
#define crm_config_err(fmt...)
Definition: crm_internal.h:179

Definition at line 33 of file pcmk_sched_constraints.c.

Enumeration Type Documentation

Enumerator
pe_order_kind_optional 
pe_order_kind_mandatory 
pe_order_kind_serialize 

Definition at line 27 of file pcmk_sched_constraints.c.

Function Documentation

int custom_action_order ( resource_t lh_rsc,
char *  lh_action_task,
action_t lh_action,
resource_t rh_rsc,
char *  rh_action_task,
action_t rh_action,
enum pe_ordering  type,
pe_working_set_t data_set 
)

Definition at line 1521 of file pcmk_sched_constraints.c.

enum pe_ordering get_asymmetrical_flags ( enum pe_order_kind  kind)

Definition at line 1582 of file pcmk_sched_constraints.c.

enum pe_ordering get_flags ( const char *  id,
enum pe_order_kind  kind,
const char *  action_first,
const char *  action_then,
gboolean  invert 
)

Definition at line 1595 of file pcmk_sched_constraints.c.

gboolean is_active ( pe__location_t cons)

Definition at line 2952 of file pcmk_sched_constraints.c.

int new_rsc_order ( resource_t lh_rsc,
const char *  lh_task,
resource_t rh_rsc,
const char *  rh_task,
enum pe_ordering  type,
pe_working_set_t data_set 
)

Definition at line 1355 of file pcmk_sched_constraints.c.

gboolean rsc_colocation_new ( const char *  id,
const char *  node_attr,
int  score,
resource_t rsc_lh,
resource_t rsc_rh,
const char *  state_lh,
const char *  state_rh,
pe_working_set_t data_set 
)

Definition at line 1296 of file pcmk_sched_constraints.c.

gboolean rsc_ticket_new ( const char *  id,
resource_t rsc_lh,
ticket_t ticket,
const char *  state_lh,
const char *  loss_policy,
pe_working_set_t data_set 
)

Definition at line 2606 of file pcmk_sched_constraints.c.

gboolean unpack_constraints ( xmlNode *  xml_constraints,
pe_working_set_t data_set 
)

Definition at line 51 of file pcmk_sched_constraints.c.

gboolean unpack_location ( xmlNode *  xml_obj,
pe_working_set_t data_set 
)

Definition at line 950 of file pcmk_sched_constraints.c.

gboolean unpack_rsc_colocation ( xmlNode *  xml_obj,
pe_working_set_t data_set 
)

Definition at line 2551 of file pcmk_sched_constraints.c.

gboolean unpack_rsc_order ( xmlNode *  xml_obj,
pe_working_set_t data_set 
)

Definition at line 2074 of file pcmk_sched_constraints.c.

gboolean unpack_rsc_ticket ( xmlNode *  xml_obj,
pe_working_set_t data_set 
)

Definition at line 2875 of file pcmk_sched_constraints.c.