MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / invert_action

Function invert_action

pengine/constraints.c:102–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102static const char *
103invert_action(const char *action)
104{
105 if (safe_str_eq(action, RSC_START)) {
106 return RSC_STOP;
107
108 } else if (safe_str_eq(action, RSC_STOP)) {
109 return RSC_START;
110
111 } else if (safe_str_eq(action, RSC_PROMOTE)) {
112 return RSC_DEMOTE;
113
114 } else if (safe_str_eq(action, RSC_DEMOTE)) {
115 return RSC_PROMOTE;
116
117 } else if (safe_str_eq(action, RSC_PROMOTED)) {
118 return RSC_DEMOTED;
119
120 } else if (safe_str_eq(action, RSC_DEMOTED)) {
121 return RSC_PROMOTED;
122
123 } else if (safe_str_eq(action, RSC_STARTED)) {
124 return RSC_STOPPED;
125
126 } else if (safe_str_eq(action, RSC_STOPPED)) {
127 return RSC_STARTED;
128 }
129 crm_config_warn("Unknown action: %s", action);
130 return NULL;
131}
132
133static enum pe_order_kind
134get_ordering_type(xmlNode * xml_obj)

Callers 3

unpack_simple_rsc_orderFunction · 0.85
unpack_order_setFunction · 0.85
order_rsc_setsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected