Page MenuHomeClusterLabs Projects

No OneTemporary

diff --git a/tools/ocft/Makefile.am b/tools/ocft/Makefile.am
index b96d6d2e3..780654400 100644
--- a/tools/ocft/Makefile.am
+++ b/tools/ocft/Makefile.am
@@ -1,57 +1,59 @@
# Author: John Shi
# jshi@suse.de
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = $(ocftcfgs_DATA) $(ocft_DATA)
sbin_SCRIPTS = ocft
ocftcfgsdir = $(datadir)/$(PACKAGE_NAME)/ocft/configs
ocftcfgs_DATA = apache \
IPaddr2 \
IPaddr2v4 \
IPaddr2v6 \
IPv6addr \
Filesystem \
LVM \
Raid1 \
IPsrcaddr \
MailTo \
jboss \
mysql \
mysql-proxy \
pgsql \
db2 \
oracle \
drbd.linbit \
exportfs \
exportfs-multidir \
nfsserver \
portblock \
iscsi \
named \
postfix \
tomcat \
Xinetd \
+ Xen \
+ VirtualDomain \
SendArp
ocftdir = $(datadir)/$(PACKAGE_NAME)/ocft
ocft_DATA = README \
README.zh_CN \
caselib
diff --git a/tools/ocft/VirtualDomain b/tools/ocft/VirtualDomain
new file mode 100644
index 000000000..10302ce96
--- /dev/null
+++ b/tools/ocft/VirtualDomain
@@ -0,0 +1,70 @@
+# VirtualDomain
+# by dejan@suse.de on
+# Tue Jul 8 12:48:03 CEST 2014
+
+CONFIG
+ Agent VirtualDomain
+ AgentRoot /usr/lib/ocf/resource.d/heartbeat
+ HangTimeout 20
+
+# set OCFT_config to the libvirt configuration file
+# the guest is going to be stopped and started
+VARIABLE
+ OCFT_config=/etc/libvirt/qemu/sle11-sp3.xml
+
+CASE-BLOCK required_args
+ Env OCF_RESKEY_config=$OCFT_config
+
+CASE-BLOCK unset_utilization
+ Env OCF_RESKEY_autoset_utilization_hv_memory=false
+ Env OCF_RESKEY_autoset_utilization_cpu=false
+
+CASE-BLOCK default_status
+ AgentRun stop
+
+CASE-BLOCK prepare
+ Include required_args
+ Include unset_utilization
+ Include default_status
+
+CASE "check base env"
+ Include prepare
+ AgentRun start OCF_SUCCESS
+
+CASE "check base env: invalid 'OCF_RESKEY_config'"
+ Include prepare
+ Env OCF_RESKEY_config=/no_such_file
+ AgentRun start OCF_ERR_INSTALLED
+
+CASE "check base env: unset 'OCF_RESKEY_config'"
+ Include prepare
+ Unenv OCF_RESKEY_config
+ AgentRun start OCF_ERR_CONFIGURED
+
+CASE "normal stop"
+ Include prepare
+ AgentRun start
+ AgentRun stop OCF_SUCCESS
+
+CASE "double start"
+ Include prepare
+ AgentRun start
+ AgentRun start OCF_SUCCESS
+
+CASE "double stop"
+ Include prepare
+ AgentRun stop OCF_SUCCESS
+
+CASE "monitor when running"
+ Include prepare
+ AgentRun start
+ AgentRun monitor OCF_SUCCESS
+
+CASE "monitor when not running"
+ Include prepare
+ AgentRun monitor OCF_NOT_RUNNING
+
+CASE "unimplemented command"
+ Include prepare
+ AgentRun no_cmd OCF_ERR_UNIMPLEMENTED
+
diff --git a/tools/ocft/Xen b/tools/ocft/Xen
new file mode 100644
index 000000000..731564b0a
--- /dev/null
+++ b/tools/ocft/Xen
@@ -0,0 +1,65 @@
+# Xen
+# by dejan@suse.de on
+# Tue Jul 8 12:20:23 CEST 2014
+
+CONFIG
+ Agent Xen
+ AgentRoot /usr/lib/ocf/resource.d/heartbeat
+ HangTimeout 20
+
+# set OCFT_xmfile to the xen-xm format file
+# the guest is going to be stopped and started
+VARIABLE
+ OCFT_xmfile=/etc/xen/vm/xen-f
+
+CASE-BLOCK required_args
+ Env OCF_RESKEY_xmfile=$OCFT_xmfile
+
+CASE-BLOCK default_status
+ AgentRun stop
+
+CASE-BLOCK prepare
+ Include required_args
+ Include default_status
+
+CASE "check base env"
+ Include prepare
+ AgentRun start OCF_SUCCESS
+
+CASE "check base env: invalid 'OCF_RESKEY_xmfile'"
+ Include prepare
+ Env OCF_RESKEY_xmfile=/no_such_file
+ AgentRun start OCF_ERR_INSTALLED
+
+CASE "check base env: unset 'OCF_RESKEY_xmfile'"
+ Include prepare
+ Unenv OCF_RESKEY_xmfile
+ AgentRun start OCF_ERR_INSTALLED
+
+CASE "normal stop"
+ Include prepare
+ AgentRun start
+ AgentRun stop OCF_SUCCESS
+
+CASE "double start"
+ Include prepare
+ AgentRun start
+ AgentRun start OCF_SUCCESS
+
+CASE "double stop"
+ Include prepare
+ AgentRun stop OCF_SUCCESS
+
+CASE "monitor when running"
+ Include prepare
+ AgentRun start
+ AgentRun monitor OCF_SUCCESS
+
+CASE "monitor when not running"
+ Include prepare
+ AgentRun monitor OCF_NOT_RUNNING
+
+CASE "unimplemented command"
+ Include prepare
+ AgentRun no_cmd OCF_ERR_UNIMPLEMENTED
+

File Metadata

Mime Type
text/x-diff
Expires
Thu, Feb 27, 1:53 AM (1 d, 4 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1466018
Default Alt Text
(4 KB)

Event Timeline