Blob Blame History Raw
commit 11627cc153c891b2e55d0d5e64d5a566516f29d8
Author: Marek 'marx' Grac <mgrac@redhat.com>
Date:   Mon Jan 5 10:15:36 2015 +0100

    fence_zvmip: Port fence agent to fencing library
    
    This rewrite adds a correct result codes, support for 'list' action and
    autogenerated manual page. The original code is still part of codebase as
    new agent requires additional testing.

diff --git a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml
index 0a4ede1..03220cb 100644
--- a/tests/data/metadata/fence_zvmip.xml
+++ b/tests/data/metadata/fence_zvmip.xml
@@ -1,50 +1,138 @@
 <?xml version="1.0" ?>
-<resource-agent name="fence_zvmip" shortdesc="Fence agent for use with z/VM Virtual Machines">
-<longdesc>The fence_zvm agent is intended to be used with with z/VM SMAPI service via TCP/IP</longdesc>
+<resource-agent name="fence_zvmip" shortdesc="Fence agent for use with z/VM Virtual Machines" >
+<longdesc>The fence_zvm agent is intended to be used with with z/VM SMAPI service via TCP/IP
+
+To  use this agent the z/VM SMAPI service needs to be configured to allow the virtual machine running this agent to connect to it and issue
+the image_recycle operation.  This involves updating the VSMWORK1 AUTHLIST VMSYS:VSMWORK1. file. The entry should look something similar to
+this:
+
+Column 1                   Column 66                Column 131
+
+   |                          |                        |
+   V                          V                        V
+
+XXXXXXXX                      ALL                      IMAGE_OPERATIONS
+
+Where XXXXXXX is the name of the virtual machine used in the authuser field of the request.
+</longdesc>
+<vendor-url>http://www.ibm.com</vendor-url>
 <parameters>
-	<parameter name="port" unique="1" required="1">
-		<getopt mixed="-n, --plug" />
-		<content type="string" />
-		<shortdesc lang="en">Name of the Virtual Machine to be fenced</shortdesc>
-	</parameter>
-	<parameter name="ipaddr" unique="1" required="1">
-		<getopt mixed="-i, --ip" />
-		<content type="string" />
-		<shortdesc lang="en">IP Name or Address of SMAPI Server</shortdesc>
-	</parameter>
-	<parameter name="login" unique="1" required="1">
-		<getopt mixed="-u, --username" />
-		<content type="string" />
-		<shortdesc lang="en">Name of authorized SMAPI user</shortdesc>
-	</parameter>
-	<parameter name="passwd" unique="1" required="1">
-		<getopt mixed="-p, --password" />
-		<content type="string" />
-		<shortdesc lang="en">Password of authorized SMAPI user</shortdesc>
-	</parameter>
-	<parameter name="action" unique="1" required="0">
-		<getopt mixed="-o, --action" />
-		<content type="string" default="off" />
-		<shortdesc lang="en">Fencing action</shortdesc>
-	</parameter>
-	<parameter name="delay" unique="1" required="0">
-		<getopt mixed="--delay" />
-		<content type="string" default="0" />
-		<shortdesc lang="en">Time to delay fencing action in seconds</shortdesc>
-	</parameter>
-	<parameter name="usage" unique="1" required="0">
+	<parameter name="ipport" unique="0" required="0">
+		<getopt mixed="-u, --ipport=[port]" />
+		<content type="string" default="44444"  />
+		<shortdesc lang="en">TCP/UDP port to use for connection with device</shortdesc>
+	</parameter>
+	<parameter name="port" unique="0" required="1">
+		<getopt mixed="-n, --plug=[id]" />
+		<content type="string"  />
+		<shortdesc lang="en">Physical plug number, name of virtual machine or UUID</shortdesc>
+	</parameter>
+	<parameter name="inet6_only" unique="0" required="0">
+		<getopt mixed="-6, --inet6-only" />
+		<content type="boolean"  />
+		<shortdesc lang="en">Forces agent to use IPv6 addresses only</shortdesc>
+	</parameter>
+	<parameter name="ipaddr" unique="0" required="1">
+		<getopt mixed="-a, --ip=[ip]" />
+		<content type="string"  />
+		<shortdesc lang="en">IP Address or Hostname</shortdesc>
+	</parameter>
+	<parameter name="inet4_only" unique="0" required="0">
+		<getopt mixed="-4, --inet4-only" />
+		<content type="boolean"  />
+		<shortdesc lang="en">Forces agent to use IPv4 addresses only</shortdesc>
+	</parameter>
+	<parameter name="method" unique="0" required="0">
+		<getopt mixed="-m, --method=[method]" />
+		<content type="select" default="onoff"  >
+			<option value="onoff" />
+			<option value="cycle" />
+		</content>
+		<shortdesc lang="en">Method to fence (onoff|cycle)</shortdesc>
+	</parameter>
+	<parameter name="passwd_script" unique="0" required="0">
+		<getopt mixed="-S, --password-script=[script]" />
+		<content type="string"  />
+		<shortdesc lang="en">Script to retrieve password</shortdesc>
+	</parameter>
+	<parameter name="passwd" unique="0" required="0">
+		<getopt mixed="-p, --password=[password]" />
+		<content type="string"  />
+		<shortdesc lang="en">Login password or passphrase</shortdesc>
+	</parameter>
+	<parameter name="action" unique="0" required="1">
+		<getopt mixed="-o, --action=[action]" />
+		<content type="string" default="reboot"  />
+		<shortdesc lang="en">Fencing Action</shortdesc>
+	</parameter>
+	<parameter name="login" unique="0" required="1">
+		<getopt mixed="-l, --username=[name]" />
+		<content type="string"  />
+		<shortdesc lang="en">Login Name</shortdesc>
+	</parameter>
+	<parameter name="verbose" unique="0" required="0">
+		<getopt mixed="-v, --verbose" />
+		<content type="boolean"  />
+		<shortdesc lang="en">Verbose mode</shortdesc>
+	</parameter>
+	<parameter name="debug" unique="0" required="0">
+		<getopt mixed="-D, --debug-file=[debugfile]" />
+		<content type="string"  />
+		<shortdesc lang="en">Write debug information to given file</shortdesc>
+	</parameter>
+	<parameter name="version" unique="0" required="0">
+		<getopt mixed="-V, --version" />
+		<content type="boolean"  />
+		<shortdesc lang="en">Display version information and exit</shortdesc>
+	</parameter>
+	<parameter name="help" unique="0" required="0">
 		<getopt mixed="-h, --help" />
-		<content type="boolean" />
-		<shortdesc lang="en">Print usage</shortdesc>
+		<content type="boolean"  />
+		<shortdesc lang="en">Display help and exit</shortdesc>
+	</parameter>
+	<parameter name="separator" unique="0" required="0">
+		<getopt mixed="-C, --separator=[char]" />
+		<content type="string" default=","  />
+		<shortdesc lang="en">Separator for CSV created by operation list</shortdesc>
+	</parameter>
+	<parameter name="power_wait" unique="0" required="0">
+		<getopt mixed="--power-wait=[seconds]" />
+		<content type="string" default="0"  />
+		<shortdesc lang="en">Wait X seconds after issuing ON/OFF</shortdesc>
+	</parameter>
+	<parameter name="login_timeout" unique="0" required="0">
+		<getopt mixed="--login-timeout=[seconds]" />
+		<content type="string" default="5"  />
+		<shortdesc lang="en">Wait X seconds for cmd prompt after login</shortdesc>
+	</parameter>
+	<parameter name="power_timeout" unique="0" required="0">
+		<getopt mixed="--power-timeout=[seconds]" />
+		<content type="string" default="20"  />
+		<shortdesc lang="en">Test X seconds for status change after ON/OFF</shortdesc>
+	</parameter>
+	<parameter name="delay" unique="0" required="0">
+		<getopt mixed="--delay=[seconds]" />
+		<content type="string" default="0"  />
+		<shortdesc lang="en">Wait X seconds before fencing is started</shortdesc>
+	</parameter>
+	<parameter name="shell_timeout" unique="0" required="0">
+		<getopt mixed="--shell-timeout=[seconds]" />
+		<content type="string" default="5.0"  />
+		<shortdesc lang="en">Wait X seconds for cmd prompt after issuing command</shortdesc>
+	</parameter>
+	<parameter name="retry_on" unique="0" required="0">
+		<getopt mixed="--retry-on=[attempts]" />
+		<content type="string" default="1"  />
+		<shortdesc lang="en">Count of attempts to retry power on</shortdesc>
 	</parameter>
 </parameters>
 <actions>
+	<action name="on" automatic="0"/>
 	<action name="off" />
-	<action name="on" automatic="0" />
+	<action name="reboot" />
+	<action name="status" />
 	<action name="list" />
-	<action name="metadata" />
 	<action name="monitor" />
-	<action name="status" />
-	<action name="reboot" />
+	<action name="metadata" />
 </actions>
 </resource-agent>