Blame SOURCES/bz1433948-1-validate-all-action.patch

217e50
diff -uNr a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
217e50
--- a/fence/agents/lib/fencing.py.py	2017-03-20 15:01:35.821589253 +0100
217e50
+++ b/fence/agents/lib/fencing.py.py	2017-03-20 16:09:44.303299554 +0100
217e50
@@ -20,6 +20,7 @@
217e50
 __all__ = ['atexit_handler', 'check_input', 'process_input', 'all_opt', 'show_docs',
217e50
 		'fence_login', 'fence_action', 'fence_logout']
217e50
 
217e50
+EC_OK = 0
217e50
 EC_GENERIC_ERROR = 1
217e50
 EC_BAD_ARGS = 2
217e50
 EC_LOGIN_DENIED = 3
217e50
@@ -485,11 +486,12 @@
217e50
 
217e50
 	return added_opt
217e50
 
217e50
-def fail_usage(message=""):
217e50
+def fail_usage(message="", stop=True):
217e50
 	if len(message) > 0:
217e50
 		logging.error("%s\n", message)
217e50
-	logging.error("Please use '-h' for usage\n")
217e50
-	sys.exit(EC_GENERIC_ERROR)
217e50
+	if stop:
217e50
+		logging.error("Please use '-h' for usage\n")
217e50
+		sys.exit(EC_GENERIC_ERROR)
217e50
 
217e50
 def fail(error_code):
217e50
 	message = {
217e50
@@ -602,6 +604,7 @@
217e50
 	print "\t<action name=\"list-status\" />"
217e50
 	print "\t<action name=\"monitor\" />"
217e50
 	print "\t<action name=\"metadata\" />"
217e50
+	print "\t<action name=\"validate-all\" />"
217e50
 	if avail_opt.count("diag") == 1:
217e50
 		print "\t<action name=\"diag\" />"
217e50
 	print "</actions>"
217e50
@@ -707,7 +710,7 @@
217e50
 ## in each of the fencing agents. It looks for possible errors and run
217e50
 ## password script to set a correct password
217e50
 ######
217e50
-def check_input(device_opt, opt):
217e50
+def check_input(device_opt, opt, other_conditions = False):
217e50
 
217e50
 	device_opt.extend(add_dependency_options(device_opt))
217e50
 
217e50
@@ -784,7 +787,7 @@
217e50
 	## add loggint to stderr
217e50
 	logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stderr))
217e50
 
217e50
-	acceptable_actions = ["on", "off", "status", "list", "list-status", "monitor"]
217e50
+	acceptable_actions = ["on", "off", "status", "list", "list-status", "monitor", "validate-all"]
217e50
 	if 1 == device_opt.count("fabric_fencing"):
217e50
 		## Compatibility layer
217e50
 		#####
217e50
@@ -808,6 +811,12 @@
217e50
 	if options["--action"] == "disable":
217e50
 		options["--action"] = "off"
217e50
 
217e50
+	if options["--action"] == "validate-all" and not other_conditions:
217e50
+		_validate_input(options, False)
217e50
+		sys.exit(EC_OK)
217e50
+	else:
217e50
+		_validate_input(options, True)
217e50
+
217e50
 	## automatic detection and set of valid UUID from --plug
217e50
 	if not options.has_key("--username") and \
217e50
 			device_opt.count("login") and (device_opt.count("no_login") == 0):
217e50
@@ -1282,6 +1291,80 @@
217e50
 		syslog.syslog(syslog_level, msg.replace("\x00","\n"))
217e50
 		return
217e50
 
217e50
+# stop = True/False : exit fence agent when problem is encountered
217e50
+def _validate_input(options, stop = True):
217e50
+	device_opt = options["device_opt"]
217e50
+	valid_input = True
217e50
+
217e50
+	if "--username" not in options and \
217e50
+			device_opt.count("login") and (device_opt.count("no_login") == 0):
217e50
+		valid_input = False
217e50
+		fail_usage("Failed: You have to set login name", stop)
217e50
+
217e50
+	if device_opt.count("ipaddr") and "--ip" not in options and "--managed" not in options and "--target" not in options:
217e50
+		valid_input = False
217e50
+		fail_usage("Failed: You have to enter fence address", stop)
217e50
+
217e50
+	if device_opt.count("no_password") == 0:
217e50
+		if 0 == device_opt.count("identity_file"):
217e50
+			if not ("--password" in options or "--password-script" in options):
217e50
+				valid_input = False
217e50
+				fail_usage("Failed: You have to enter password or password script", stop)
217e50
+		else:
217e50
+			if not ("--password" in options or \
217e50
+					"--password-script" in options or "--identity-file" in options):
217e50
+				valid_input = False
217e50
+				fail_usage("Failed: You have to enter password, password script or identity file", stop)
217e50
+
217e50
+	if "--ssh" not in options and "--identity-file" in options:
217e50
+		valid_input = False
217e50
+		fail_usage("Failed: You have to use identity file together with ssh connection (-x)", stop)
217e50
+
217e50
+	if "--identity-file" in options and not os.path.isfile(options["--identity-file"]):
217e50
+		valid_input = False
217e50
+		fail_usage("Failed: Identity file " + options["--identity-file"] + " does not exist", stop)
217e50
+
217e50
+	if (0 == ["list", "list-status", "monitor"].count(options["--action"])) and \
217e50
+		"--plug" not in options and device_opt.count("port") and \
217e50
+		device_opt.count("no_port") == 0 and not device_opt.count("port_as_ip"):
217e50
+		valid_input = False
217e50
+		fail_usage("Failed: You have to enter plug number or machine identification", stop)
217e50
+
217e50
+	if "--plug" in options and len(options["--plug"].split(",")) > 1 and \
217e50
+			"--method" in options and options["--method"] == "cycle":
217e50
+		valid_input = False
217e50
+		fail_usage("Failed: Cannot use --method cycle for more than 1 plug", stop)
217e50
+
217e50
+	for failed_opt in _get_opts_with_invalid_choices(options):
217e50
+		valid_input = False
217e50
+		fail_usage("Failed: You have to enter a valid choice for %s from the valid values: %s" % \
217e50
+			("--" + all_opt[failed_opt]["longopt"], str(all_opt[failed_opt]["choices"])), stop)
217e50
+
217e50
+	for failed_opt in _get_opts_with_invalid_types(options):
217e50
+		valid_input = False
217e50
+		if all_opt[failed_opt]["type"] == "second":
217e50
+			fail_usage("Failed: The value you have entered for %s is not a valid time in seconds" % \
217e50
+				("--" + all_opt[failed_opt]["longopt"]), stop)
217e50
+		else:
217e50
+			fail_usage("Failed: The value you have entered for %s is not a valid %s" % \
217e50
+				("--" + all_opt[failed_opt]["longopt"], all_opt[failed_opt]["type"]), stop)
217e50
+
217e50
+	return valid_input
217e50
+
217e50
+def _get_opts_with_invalid_choices(options):
217e50
+	options_failed = []
217e50
+	device_opt = options["device_opt"]
217e50
+
217e50
+	for opt in device_opt:
217e50
+		if "choices" in all_opt[opt]:
217e50
+			longopt = "--" + all_opt[opt]["longopt"]
217e50
+			possible_values_upper = [y.upper() for y in all_opt[opt]["choices"]]
217e50
+			if longopt in options:
217e50
+				options[longopt] = options[longopt].upper()
217e50
+				if not options["--" + all_opt[opt]["longopt"]] in possible_values_upper:
217e50
+					options_failed.append(opt)
217e50
+	return options_failed
217e50
+
217e50
 def _get_opts_with_invalid_types(options):
217e50
 	options_failed = []
217e50
 	device_opt = options["device_opt"]
217e50
diff -uNr a/tests/data/metadata/fence_alom.xml b/tests/data/metadata/fence_alom.xml
217e50
--- a/tests/data/metadata/fence_alom.xml	2017-03-20 15:01:35.822589244 +0100
217e50
+++ b/tests/data/metadata/fence_alom.xml	2017-03-20 16:11:03.193530549 +0100
217e50
@@ -133,5 +133,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_amt.xml b/tests/data/metadata/fence_amt.xml
217e50
--- a/tests/data/metadata/fence_amt.xml	2017-03-20 15:01:35.822589244 +0100
217e50
+++ b/tests/data/metadata/fence_amt.xml	2017-03-20 16:11:03.193530549 +0100
217e50
@@ -136,5 +136,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_apc_snmp.xml b/tests/data/metadata/fence_apc_snmp.xml
217e50
--- a/tests/data/metadata/fence_apc_snmp.xml	2017-03-20 15:01:35.822589244 +0100
217e50
+++ b/tests/data/metadata/fence_apc_snmp.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -162,5 +162,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_apc.xml b/tests/data/metadata/fence_apc.xml
217e50
--- a/tests/data/metadata/fence_apc.xml	2017-03-20 15:01:35.822589244 +0100
217e50
+++ b/tests/data/metadata/fence_apc.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -138,5 +138,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_bladecenter.xml b/tests/data/metadata/fence_bladecenter.xml
217e50
--- a/tests/data/metadata/fence_bladecenter.xml	2017-03-20 15:01:35.822589244 +0100
217e50
+++ b/tests/data/metadata/fence_bladecenter.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -138,5 +138,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_brocade.xml b/tests/data/metadata/fence_brocade.xml
217e50
--- a/tests/data/metadata/fence_brocade.xml	2017-03-20 15:01:35.822589244 +0100
217e50
+++ b/tests/data/metadata/fence_brocade.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -132,5 +132,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_cisco_mds.xml b/tests/data/metadata/fence_cisco_mds.xml
217e50
--- a/tests/data/metadata/fence_cisco_mds.xml	2017-03-20 15:01:35.823589234 +0100
217e50
+++ b/tests/data/metadata/fence_cisco_mds.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -161,5 +161,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_cisco_ucs.xml b/tests/data/metadata/fence_cisco_ucs.xml
217e50
--- a/tests/data/metadata/fence_cisco_ucs.xml	2017-03-20 15:01:35.823589234 +0100
217e50
+++ b/tests/data/metadata/fence_cisco_ucs.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -143,5 +143,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml
217e50
--- a/tests/data/metadata/fence_compute.xml	2017-03-20 15:01:35.823589234 +0100
217e50
+++ b/tests/data/metadata/fence_compute.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -137,5 +137,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_docker.xml b/tests/data/metadata/fence_docker.xml
217e50
--- a/tests/data/metadata/fence_docker.xml	2017-03-20 15:01:35.823589234 +0100
217e50
+++ b/tests/data/metadata/fence_docker.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -136,5 +136,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_drac5.xml b/tests/data/metadata/fence_drac5.xml
217e50
--- a/tests/data/metadata/fence_drac5.xml	2017-03-20 15:01:35.823589234 +0100
217e50
+++ b/tests/data/metadata/fence_drac5.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -142,5 +142,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_drac.xml b/tests/data/metadata/fence_drac.xml
217e50
--- a/tests/data/metadata/fence_drac.xml	2017-03-20 15:01:35.823589234 +0100
217e50
+++ b/tests/data/metadata/fence_drac.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -118,5 +118,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_dummy.xml b/tests/data/metadata/fence_dummy.xml
217e50
--- a/tests/data/metadata/fence_dummy.xml	2017-03-20 15:01:35.823589234 +0100
217e50
+++ b/tests/data/metadata/fence_dummy.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -83,5 +83,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_eaton_snmp.xml b/tests/data/metadata/fence_eaton_snmp.xml
217e50
--- a/tests/data/metadata/fence_eaton_snmp.xml	2017-03-20 15:01:35.823589234 +0100
217e50
+++ b/tests/data/metadata/fence_eaton_snmp.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -162,5 +162,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_emerson.xml b/tests/data/metadata/fence_emerson.xml
217e50
--- a/tests/data/metadata/fence_emerson.xml	2017-03-20 15:01:35.824589224 +0100
217e50
+++ b/tests/data/metadata/fence_emerson.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -162,5 +162,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_eps.xml b/tests/data/metadata/fence_eps.xml
217e50
--- a/tests/data/metadata/fence_eps.xml	2017-03-20 15:01:35.824589224 +0100
217e50
+++ b/tests/data/metadata/fence_eps.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -120,5 +120,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_hds_cb.xml b/tests/data/metadata/fence_hds_cb.xml
217e50
--- a/tests/data/metadata/fence_hds_cb.xml	2017-03-20 15:01:35.824589224 +0100
217e50
+++ b/tests/data/metadata/fence_hds_cb.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -138,5 +138,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_hpblade.xml b/tests/data/metadata/fence_hpblade.xml
217e50
--- a/tests/data/metadata/fence_hpblade.xml	2017-03-20 15:01:35.824589224 +0100
217e50
+++ b/tests/data/metadata/fence_hpblade.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -138,5 +138,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ibmblade.xml b/tests/data/metadata/fence_ibmblade.xml
217e50
--- a/tests/data/metadata/fence_ibmblade.xml	2017-03-20 15:01:35.824589224 +0100
217e50
+++ b/tests/data/metadata/fence_ibmblade.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -162,5 +162,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_idrac.xml b/tests/data/metadata/fence_idrac.xml
217e50
--- a/tests/data/metadata/fence_idrac.xml	2017-03-20 15:01:35.824589224 +0100
217e50
+++ b/tests/data/metadata/fence_idrac.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -173,6 +173,7 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 	<action name="diag" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ifmib.xml b/tests/data/metadata/fence_ifmib.xml
217e50
--- a/tests/data/metadata/fence_ifmib.xml	2017-03-20 15:01:35.824589224 +0100
217e50
+++ b/tests/data/metadata/fence_ifmib.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -163,5 +163,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ilo2.xml b/tests/data/metadata/fence_ilo2.xml
217e50
--- a/tests/data/metadata/fence_ilo2.xml	2017-03-20 15:01:35.824589224 +0100
217e50
+++ b/tests/data/metadata/fence_ilo2.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -144,5 +144,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ilo3_ssh.xml b/tests/data/metadata/fence_ilo3_ssh.xml
217e50
--- a/tests/data/metadata/fence_ilo3_ssh.xml	2017-03-20 15:01:35.824589224 +0100
217e50
+++ b/tests/data/metadata/fence_ilo3_ssh.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -143,5 +143,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ilo3.xml b/tests/data/metadata/fence_ilo3.xml
217e50
--- a/tests/data/metadata/fence_ilo3.xml	2017-03-20 15:01:35.825589214 +0100
217e50
+++ b/tests/data/metadata/fence_ilo3.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -173,6 +173,7 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 	<action name="diag" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ilo4_ssh.xml b/tests/data/metadata/fence_ilo4_ssh.xml
217e50
--- a/tests/data/metadata/fence_ilo4_ssh.xml	2017-03-20 15:01:35.825589214 +0100
217e50
+++ b/tests/data/metadata/fence_ilo4_ssh.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -143,5 +143,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ilo4.xml b/tests/data/metadata/fence_ilo4.xml
217e50
--- a/tests/data/metadata/fence_ilo4.xml	2017-03-20 15:01:35.825589214 +0100
217e50
+++ b/tests/data/metadata/fence_ilo4.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -173,6 +173,7 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 	<action name="diag" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ilo_moonshot.xml b/tests/data/metadata/fence_ilo_moonshot.xml
217e50
--- a/tests/data/metadata/fence_ilo_moonshot.xml	2017-03-20 15:01:35.825589214 +0100
217e50
+++ b/tests/data/metadata/fence_ilo_moonshot.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -133,5 +133,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ilo_mp.xml b/tests/data/metadata/fence_ilo_mp.xml
217e50
--- a/tests/data/metadata/fence_ilo_mp.xml	2017-03-20 15:01:35.825589214 +0100
217e50
+++ b/tests/data/metadata/fence_ilo_mp.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -133,5 +133,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ilo_ssh.xml b/tests/data/metadata/fence_ilo_ssh.xml
217e50
--- a/tests/data/metadata/fence_ilo_ssh.xml	2017-03-20 15:01:35.825589214 +0100
217e50
+++ b/tests/data/metadata/fence_ilo_ssh.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -143,5 +143,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ilo.xml b/tests/data/metadata/fence_ilo.xml
217e50
--- a/tests/data/metadata/fence_ilo.xml	2017-03-20 15:01:35.825589214 +0100
217e50
+++ b/tests/data/metadata/fence_ilo.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -144,5 +144,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_imm.xml b/tests/data/metadata/fence_imm.xml
217e50
--- a/tests/data/metadata/fence_imm.xml	2017-03-20 15:01:35.825589214 +0100
217e50
+++ b/tests/data/metadata/fence_imm.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -173,6 +173,7 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 	<action name="diag" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_intelmodular.xml b/tests/data/metadata/fence_intelmodular.xml
217e50
--- a/tests/data/metadata/fence_intelmodular.xml	2017-03-20 15:01:35.825589214 +0100
217e50
+++ b/tests/data/metadata/fence_intelmodular.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -164,5 +164,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ipdu.xml b/tests/data/metadata/fence_ipdu.xml
217e50
--- a/tests/data/metadata/fence_ipdu.xml	2017-03-20 15:01:35.826589205 +0100
217e50
+++ b/tests/data/metadata/fence_ipdu.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -162,5 +162,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ipmilan.xml b/tests/data/metadata/fence_ipmilan.xml
217e50
--- a/tests/data/metadata/fence_ipmilan.xml	2017-03-20 15:01:35.826589205 +0100
217e50
+++ b/tests/data/metadata/fence_ipmilan.xml	2017-03-20 16:11:03.194530540 +0100
217e50
@@ -173,6 +173,7 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 	<action name="diag" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ldom.xml b/tests/data/metadata/fence_ldom.xml
217e50
--- a/tests/data/metadata/fence_ldom.xml	2017-03-20 15:01:35.826589205 +0100
217e50
+++ b/tests/data/metadata/fence_ldom.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -135,5 +135,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_lpar.xml b/tests/data/metadata/fence_lpar.xml
217e50
--- a/tests/data/metadata/fence_lpar.xml	2017-03-20 15:01:35.826589205 +0100
217e50
+++ b/tests/data/metadata/fence_lpar.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -147,5 +147,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_mpath.xml b/tests/data/metadata/fence_mpath.xml
217e50
--- a/tests/data/metadata/fence_mpath.xml	2017-03-20 15:01:35.826589205 +0100
217e50
+++ b/tests/data/metadata/fence_mpath.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -91,5 +91,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_netio.xml b/tests/data/metadata/fence_netio.xml
217e50
--- a/tests/data/metadata/fence_netio.xml	2017-03-20 15:01:35.826589205 +0100
217e50
+++ b/tests/data/metadata/fence_netio.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -113,5 +113,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_ovh.xml b/tests/data/metadata/fence_ovh.xml
217e50
--- a/tests/data/metadata/fence_ovh.xml	2017-03-20 15:01:35.826589205 +0100
217e50
+++ b/tests/data/metadata/fence_ovh.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -97,5 +97,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_pve.xml b/tests/data/metadata/fence_pve.xml
217e50
--- a/tests/data/metadata/fence_pve.xml	2017-03-20 15:01:35.826589205 +0100
217e50
+++ b/tests/data/metadata/fence_pve.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -118,5 +118,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_raritan.xml b/tests/data/metadata/fence_raritan.xml
217e50
--- a/tests/data/metadata/fence_raritan.xml	2017-03-20 15:01:35.826589205 +0100
217e50
+++ b/tests/data/metadata/fence_raritan.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -113,5 +113,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_rhevm.xml b/tests/data/metadata/fence_rhevm.xml
217e50
--- a/tests/data/metadata/fence_rhevm.xml	2017-03-20 15:01:35.827589195 +0100
217e50
+++ b/tests/data/metadata/fence_rhevm.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -142,5 +142,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_rsa.xml b/tests/data/metadata/fence_rsa.xml
217e50
--- a/tests/data/metadata/fence_rsa.xml	2017-03-20 15:01:35.827589195 +0100
217e50
+++ b/tests/data/metadata/fence_rsa.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -133,5 +133,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_rsb.xml b/tests/data/metadata/fence_rsb.xml
217e50
--- a/tests/data/metadata/fence_rsb.xml	2017-03-20 15:01:35.827589195 +0100
217e50
+++ b/tests/data/metadata/fence_rsb.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -133,5 +133,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_sanbox2.xml b/tests/data/metadata/fence_sanbox2.xml
217e50
--- a/tests/data/metadata/fence_sanbox2.xml	2017-03-20 15:01:35.827589195 +0100
217e50
+++ b/tests/data/metadata/fence_sanbox2.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -117,5 +117,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_sbd.xml b/tests/data/metadata/fence_sbd.xml
217e50
--- a/tests/data/metadata/fence_sbd.xml	2017-03-20 15:01:35.827589195 +0100
217e50
+++ b/tests/data/metadata/fence_sbd.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -95,5 +95,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml
217e50
--- a/tests/data/metadata/fence_scsi.xml	2017-03-20 15:01:35.827589195 +0100
217e50
+++ b/tests/data/metadata/fence_scsi.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -109,5 +109,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_virsh.xml b/tests/data/metadata/fence_virsh.xml
217e50
--- a/tests/data/metadata/fence_virsh.xml	2017-03-20 15:01:35.827589195 +0100
217e50
+++ b/tests/data/metadata/fence_virsh.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -145,5 +145,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_vmware_soap.xml b/tests/data/metadata/fence_vmware_soap.xml
217e50
--- a/tests/data/metadata/fence_vmware_soap.xml	2017-03-20 15:01:35.827589195 +0100
217e50
+++ b/tests/data/metadata/fence_vmware_soap.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -135,5 +135,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_wti.xml b/tests/data/metadata/fence_wti.xml
217e50
--- a/tests/data/metadata/fence_wti.xml	2017-03-20 15:01:35.828589185 +0100
217e50
+++ b/tests/data/metadata/fence_wti.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -133,5 +133,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_xenapi.xml b/tests/data/metadata/fence_xenapi.xml
217e50
--- a/tests/data/metadata/fence_xenapi.xml	2017-03-20 15:01:35.828589185 +0100
217e50
+++ b/tests/data/metadata/fence_xenapi.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -98,5 +98,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>
217e50
diff -uNr a/tests/data/metadata/fence_zvmip.xml b/tests/data/metadata/fence_zvmip.xml
217e50
--- a/tests/data/metadata/fence_zvmip.xml	2017-03-20 15:01:35.828589185 +0100
217e50
+++ b/tests/data/metadata/fence_zvmip.xml	2017-03-20 16:11:03.195530530 +0100
217e50
@@ -140,5 +140,6 @@
217e50
 	<action name="list-status" />
217e50
 	<action name="monitor" />
217e50
 	<action name="metadata" />
217e50
+	<action name="validate-all" />
217e50
 </actions>
217e50
 </resource-agent>