Debian Codegraph @

tools/ocft/VirtualDomain

raw
1 # VirtualDomain
2 # by [email protected] on
3 # Tue Jul 8 12:48:03 CEST 2014
4
5 CONFIG
6 Agent VirtualDomain
7 AgentRoot /usr/lib/ocf/resource.d/heartbeat
8 HangTimeout 20
9
10 # set OCFT_config to the libvirt configuration file
11 # the guest is going to be stopped and started
12 VARIABLE
13 OCFT_config=/etc/libvirt/qemu/sle11-sp3.xml
14
15 CASE-BLOCK required_args
16 Env OCF_RESKEY_config=$OCFT_config
17
18 CASE-BLOCK unset_utilization
19 Env OCF_RESKEY_autoset_utilization_host_memory=false
20 Env OCF_RESKEY_autoset_utilization_hv_memory=false
21 Env OCF_RESKEY_autoset_utilization_cpu=false
22
23 CASE-BLOCK default_status
24 AgentRun stop
25
26 CASE-BLOCK prepare
27 Include required_args
28 Include unset_utilization
29 Include default_status
30
31 CASE "check base env"
32 Include prepare
33 AgentRun start OCF_SUCCESS
34
35 CASE "check base env: invalid 'OCF_RESKEY_config'"
36 Include prepare
37 Env OCF_RESKEY_config=/no_such_file
38 AgentRun start OCF_ERR_INSTALLED
39
40 CASE "check base env: unset 'OCF_RESKEY_config'"
41 Include prepare
42 Unenv OCF_RESKEY_config
43 AgentRun start OCF_ERR_CONFIGURED
44
45 CASE "normal stop"
46 Include prepare
47 AgentRun start
48 AgentRun stop OCF_SUCCESS
49
50 CASE "double start"
51 Include prepare
52 AgentRun start
53 AgentRun start OCF_SUCCESS
54
55 CASE "double stop"
56 Include prepare
57 AgentRun stop OCF_SUCCESS
58
59 CASE "monitor when running"
60 Include prepare
61 AgentRun start
62 AgentRun monitor OCF_SUCCESS
63
64 CASE "monitor when not running"
65 Include prepare
66 AgentRun monitor OCF_NOT_RUNNING
67
68 CASE "unimplemented command"
69 Include prepare
70 AgentRun no_cmd OCF_ERR_UNIMPLEMENTED
71