| 1 |
# IPsrcaddr |
| 2 |
|
| 3 |
CONFIG |
| 4 |
Agent IPsrcaddr |
| 5 |
AgentRoot /usr/lib/ocf/resource.d/heartbeat |
| 6 |
InstallPackage iproute2 |
| 7 |
HangTimeout 20 |
| 8 |
|
| 9 |
CASE-BLOCK required_args |
| 10 |
Env OCF_RESKEY_ipaddress= # put here your IP |
| 11 |
Env OCF_RESKEY_cidr_netmask= # and the netmask |
| 12 |
|
| 13 |
CASE-BLOCK default_status |
| 14 |
AgentRun stop |
| 15 |
|
| 16 |
CASE-BLOCK prepare |
| 17 |
Include required_args |
| 18 |
Include default_status |
| 19 |
|
| 20 |
CASE "check base env" |
| 21 |
Include prepare |
| 22 |
AgentRun start OCF_SUCCESS |
| 23 |
|
| 24 |
CASE "check base env: unset 'OCF_RESKEY_ipaddress'" |
| 25 |
Include prepare |
| 26 |
Unenv OCF_RESKEY_ipaddress |
| 27 |
AgentRun start OCF_ERR_CONFIGURED |
| 28 |
|
| 29 |
CASE "check base env: set invalid 'OCF_RESKEY_ipaddress'" |
| 30 |
Include prepare |
| 31 |
Env OCF_RESKEY_ipaddress=not_ip_address |
| 32 |
AgentRun start OCF_ERR_CONFIGURED |
| 33 |
|
| 34 |
CASE "normal start" |
| 35 |
Include prepare |
| 36 |
AgentRun start OCF_SUCCESS |
| 37 |
|
| 38 |
CASE "normal stop" |
| 39 |
Include prepare |
| 40 |
AgentRun start |
| 41 |
AgentRun stop OCF_SUCCESS |
| 42 |
|
| 43 |
CASE "double start" |
| 44 |
Include prepare |
| 45 |
AgentRun start |
| 46 |
AgentRun start OCF_SUCCESS |
| 47 |
|
| 48 |
CASE "double stop" |
| 49 |
Include prepare |
| 50 |
AgentRun stop OCF_SUCCESS |
| 51 |
|
| 52 |
CASE "monitor with running" |
| 53 |
Include prepare |
| 54 |
AgentRun start |
| 55 |
AgentRun monitor OCF_SUCCESS |
| 56 |
|
| 57 |
CASE "monitor with not running" |
| 58 |
Include prepare |
| 59 |
AgentRun monitor OCF_NOT_RUNNING |
| 60 |
|
| 61 |
CASE "unimplemented command" |
| 62 |
Include prepare |
| 63 |
AgentRun no_cmd OCF_ERR_UNIMPLEMENTED |