[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH 2/2] fencing: Replace common options with more flexible mechanism



Before this patch we had an option do add set of device options to all fence agents.
e.g. device needs password, device needs ip address, ...

This patch makes it more flexible as we can in addition do also options which depend on parent.
e.g. if device needs password, then password script can be also used
e.g. if device needs IP address, we can force it to use either IPv4 or IPv6
---
 fence/agents/alom/fence_alom.py                 |    3 +-
 fence/agents/apc/fence_apc.py                   |    5 +--
 fence/agents/apc_snmp/fence_apc_snmp.py         |    7 +---
 fence/agents/bladecenter/fence_bladecenter.py   |    5 +--
 fence/agents/cisco_mds/fence_cisco_mds.py       |    7 +---
 fence/agents/cisco_ucs/fence_cisco_ucs.py       |    5 +--
 fence/agents/drac5/fence_drac5.py               |    5 +--
 fence/agents/eaton_snmp/fence_eaton_snmp.py     |    7 +---
 fence/agents/eps/fence_eps.py                   |    4 +-
 fence/agents/hds_cb/fence_hds_cb.py             |    5 +--
 fence/agents/hpblade/fence_hpblade.py           |    5 +--
 fence/agents/ibmblade/fence_ibmblade.py         |    7 +---
 fence/agents/ifmib/fence_ifmib.py               |    7 +---
 fence/agents/ilo/fence_ilo.py                   |    3 +-
 fence/agents/intelmodular/fence_intelmodular.py |    7 +---
 fence/agents/ipdu/fence_ipdu.py                 |    7 +---
 fence/agents/ldom/fence_ldom.py                 |    5 +--
 fence/agents/lib/fencing.py.py                  |   33 ++++++++++++++++-------
 fence/agents/lpar/fence_lpar.py                 |    5 +--
 fence/agents/rhevm/fence_rhevm.py               |    3 +-
 fence/agents/rsa/fence_rsa.py                   |    3 +-
 fence/agents/rsb/fence_rsb.py                   |    4 +--
 fence/agents/sanbox2/fence_sanbox2.py           |    3 +-
 fence/agents/virsh/fence_virsh.py               |    5 +--
 fence/agents/vmware/fence_vmware.py             |    5 +--
 fence/agents/vmware_soap/fence_vmware_soap.py   |    3 +-
 fence/agents/wti/fence_wti.py                   |    5 +--
 fence/agents/xenapi/fence_xenapi.py             |    4 +-
 28 files changed, 70 insertions(+), 97 deletions(-)

diff --git a/fence/agents/alom/fence_alom.py b/fence/agents/alom/fence_alom.py
index f1810d2..a256da4 100644
--- a/fence/agents/alom/fence_alom.py
+++ b/fence/agents/alom/fence_alom.py
@@ -31,8 +31,7 @@ def set_power_status(conn, options):
 	time.sleep(int(options["--power-timeout"]))
 		
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script", "cmd_prompt", "secure",
-			"identity_file", "test", "inet4_only", "inet6_only", "ipport" ]
+	device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", "test" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py
index e98d9ce..314c0aa 100644
--- a/fence/agents/apc/fence_apc.py
+++ b/fence/agents/apc/fence_apc.py
@@ -174,9 +174,8 @@ def set_power_status(conn, options):
 	conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script", "cmd_prompt",
-			"secure", "port", "identity_file", "switch", "test", "separator",
-			"inet4_only", "inet6_only", "ipport" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+			"port", "switch", "test" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/apc_snmp/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py
index 8a97ae4..2ca7c1c 100644
--- a/fence/agents/apc_snmp/fence_apc_snmp.py
+++ b/fence/agents/apc_snmp/fence_apc_snmp.py
@@ -158,11 +158,8 @@ def apc_snmp_define_defaults():
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "login", "passwd", "passwd_script",
-		       "test", "port", "separator", "no_login", "no_password",
-		       "snmp_version", "community", "snmp_auth_prot", "snmp_sec_level",
-		       "snmp_priv_prot", "snmp_priv_passwd", "snmp_priv_passwd_script",
-		       "udpport", "inet4_only", "inet6_only" ]
+	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+		       "test", "port", "snmp_version", "community" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/bladecenter/fence_bladecenter.py b/fence/agents/bladecenter/fence_bladecenter.py
index 2a0caf9..49d7395 100644
--- a/fence/agents/bladecenter/fence_bladecenter.py
+++ b/fence/agents/bladecenter/fence_bladecenter.py
@@ -78,9 +78,8 @@ def get_blades_list(conn, options):
 	return outlets
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"cmd_prompt", "secure", "port", "identity_file", "separator",
-			"inet4_only", "inet6_only", "ipport", "missing_as_off" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+			"port", "missing_as_off" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/cisco_mds/fence_cisco_mds.py b/fence/agents/cisco_mds/fence_cisco_mds.py
index cb45d73..650f450 100644
--- a/fence/agents/cisco_mds/fence_cisco_mds.py
+++ b/fence/agents/cisco_mds/fence_cisco_mds.py
@@ -77,11 +77,8 @@ def get_outlets_status(conn, options):
 def main():
 	global PORT_OID
 
-	device_opt = [ "fabric_fencing", "ipaddr", "login", "passwd", "passwd_script",
-		       "test", "port", "separator", "no_login", "no_password",
-		       "snmp_version", "community", "snmp_auth_prot", "snmp_sec_level",
-		       "snmp_priv_prot", "snmp_priv_passwd", "snmp_priv_passwd_script",
-		       "udpport", "inet4_only", "inet6_only" ]
+	device_opt = [ "fabric_fencing", "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+		       "test", "port", "snmp_version", "community" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index 2a81c68..335c5e7 100644
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -97,9 +97,8 @@ def send_command(opt, command, timeout):
 	return result
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"ssl", "inet4_only", "inet6_only", "ipport", "port", 
-			"web", "separator", "suborg" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "ssl", \
+			"port", "web", "suborg" ]
 
 	atexit.register(atexit_handler)
 	
diff --git a/fence/agents/drac5/fence_drac5.py b/fence/agents/drac5/fence_drac5.py
index 47d8db7..cb67179 100644
--- a/fence/agents/drac5/fence_drac5.py
+++ b/fence/agents/drac5/fence_drac5.py
@@ -69,9 +69,8 @@ def get_list_devices(conn, options):
 	return outlets
 	
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"cmd_prompt", "secure", "identity_file", "drac_version", "module_name",
-			"separator", "inet4_only", "inet6_only", "ipport" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+			"drac_version", "module_name" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/eaton_snmp/fence_eaton_snmp.py b/fence/agents/eaton_snmp/fence_eaton_snmp.py
index 2c5017b..e8bdad9 100644
--- a/fence/agents/eaton_snmp/fence_eaton_snmp.py
+++ b/fence/agents/eaton_snmp/fence_eaton_snmp.py
@@ -197,11 +197,8 @@ def get_outlets_status(conn, options):
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "login", "passwd", "passwd_script",
-		       "test", "port", "separator", "no_login", "no_password",
-		       "snmp_version", "community", "snmp_auth_prot", "snmp_sec_level",
-		       "snmp_priv_prot", "snmp_priv_passwd", "snmp_priv_passwd_script",
-		       "udpport", "inet4_only", "inet6_only" ]
+	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+		       "test", "port", "snmp_version", "community" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/eps/fence_eps.py b/fence/agents/eps/fence_eps.py
index e1b8696..59fb36b 100644
--- a/fence/agents/eps/fence_eps.py
+++ b/fence/agents/eps/fence_eps.py
@@ -98,8 +98,8 @@ def eps_define_new_opts():
 
 # Starting point of fence agent
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script", "test",
-			"port", "hidden_page", "no_login", "no_password", "separator" ]
+	device_opt = [  "ipaddr", "login", "passwd", "no_login", "no_password", \
+			"port", "hidden_page", "test" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/hds_cb/fence_hds_cb.py b/fence/agents/hds_cb/fence_hds_cb.py
index ab44e2f..c0dd70c 100755
--- a/fence/agents/hds_cb/fence_hds_cb.py
+++ b/fence/agents/hds_cb/fence_hds_cb.py
@@ -107,9 +107,8 @@ def get_blades_list(conn, options):
 	return outlets
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script", "cmd_prompt",
-			"secure", "port", "identity_file", "separator", "inet4_only",
-			"inet6_only", "ipport", "missing_as_off" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+			"port", "missing_as_off" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/hpblade/fence_hpblade.py b/fence/agents/hpblade/fence_hpblade.py
index 6cea46a..a029d05 100644
--- a/fence/agents/hpblade/fence_hpblade.py
+++ b/fence/agents/hpblade/fence_hpblade.py
@@ -57,9 +57,8 @@ def get_blades_list(conn, options):
 	return outlets
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"cmd_prompt", "secure", "port", "identity_file", "separator",
-			"inet4_only", "inet6_only", "ipport", "missing_as_off" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+			"port", "missing_as_off" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/ibmblade/fence_ibmblade.py b/fence/agents/ibmblade/fence_ibmblade.py
index 759bfc4..720c691 100644
--- a/fence/agents/ibmblade/fence_ibmblade.py
+++ b/fence/agents/ibmblade/fence_ibmblade.py
@@ -50,11 +50,8 @@ def get_outlets_status(conn, _):
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "login", "passwd", "passwd_script",
-		       "test", "port", "separator", "no_login", "no_password",
-		       "snmp_version", "community", "snmp_auth_prot", "snmp_sec_level",
-		       "snmp_priv_prot", "snmp_priv_passwd", "snmp_priv_passwd_script",
-		       "udpport", "inet4_only", "inet6_only" ]
+	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+		       "test", "port", "snmp_version", "community" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/ifmib/fence_ifmib.py b/fence/agents/ifmib/fence_ifmib.py
index 9a17257..ac3ccd3 100644
--- a/fence/agents/ifmib/fence_ifmib.py
+++ b/fence/agents/ifmib/fence_ifmib.py
@@ -95,11 +95,8 @@ def get_outlets_status(conn, options):
 
 # Main agent method
 def main():
-	device_opt = [ "fabric_fencing", "ipaddr", "login", "passwd", "passwd_script",
-		       "test", "port", "separator", "no_login", "no_password",
-		       "snmp_version", "community", "snmp_auth_prot", "snmp_sec_level",
-		       "snmp_priv_prot", "snmp_priv_passwd", "snmp_priv_passwd_script",
-		       "udpport", "inet4_only", "inet6_only" ]
+	device_opt = [ "fabric_fencing", "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+		       "test", "port", "snmp_version", "community" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/ilo/fence_ilo.py b/fence/agents/ilo/fence_ilo.py
index c85a063..3fdf3c7 100644
--- a/fence/agents/ilo/fence_ilo.py
+++ b/fence/agents/ilo/fence_ilo.py
@@ -53,8 +53,7 @@ def set_power_status(conn, options):
 	return
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"ssl", "ribcl", "inet4_only", "inet6_only", "ipport" ]
+	device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "ribcl" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/intelmodular/fence_intelmodular.py b/fence/agents/intelmodular/fence_intelmodular.py
index a590ced..99bf6c2 100644
--- a/fence/agents/intelmodular/fence_intelmodular.py
+++ b/fence/agents/intelmodular/fence_intelmodular.py
@@ -61,11 +61,8 @@ def get_outlets_status(conn, options):
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "login", "passwd", "passwd_script",
-		       "test", "port", "separator", "no_login", "no_password",
-		       "snmp_version", "community", "snmp_auth_prot", "snmp_sec_level",
-		       "snmp_priv_prot", "snmp_priv_passwd", "snmp_priv_passwd_script",
-		       "udpport", "inet4_only", "inet6_only" ]
+	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password",
+		       "test", "port", "snmp_version", "community" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/ipdu/fence_ipdu.py b/fence/agents/ipdu/fence_ipdu.py
index 6c93b53..d133832 100644
--- a/fence/agents/ipdu/fence_ipdu.py
+++ b/fence/agents/ipdu/fence_ipdu.py
@@ -125,11 +125,8 @@ def get_outlets_status(conn, options):
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "login", "passwd", "passwd_script",
-		       "test", "port", "separator", "no_login", "no_password",
-		       "snmp_version", "community", "snmp_auth_prot", "snmp_sec_level",
-		       "snmp_priv_prot", "snmp_priv_passwd", "snmp_priv_passwd_script",
-		       "udpport", "inet4_only", "inet6_only" ]
+	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+		       "test", "port", "snmp_version", "community" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/ldom/fence_ldom.py b/fence/agents/ldom/fence_ldom.py
index 0f41d75..eabdaf4 100644
--- a/fence/agents/ldom/fence_ldom.py
+++ b/fence/agents/ldom/fence_ldom.py
@@ -69,9 +69,8 @@ def set_power_status(conn, options):
 	conn.log_expect(options, COMMAND_PROMPT_REG, int(options["--power-timeout"]))
 		
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"secure",  "identity_file", "test" , "port", "cmd_prompt",
-			"separator", "inet4_only", "inet6_only", "ipport" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+			"port", "test" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 775bb4f..9affaa8 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -401,8 +401,17 @@ all_opt = {
 		"order" : 205}
 }
 
-COMMON_OPT = [ "help", "debug", "verbose", "quiet", "version", "action", "agent", 
-		"power_timeout", "shell_timeout", "login_timeout", "power_wait", "retry_on", "delay" ]
+# options which are added automatically if 'key' is encountered ("default" is always added)
+DEPENDENCY_OPT = {
+		"default" : [ "help", "debug", "verbose", "quiet", "version", "action", "agent", \
+			"power_timeout", "shell_timeout", "login_timeout", "power_wait", "retry_on", "delay" ],
+		"passwd" : [ "passwd_script" ],
+		"secure" : [ "identity_file" ],
+		"ipaddr" : [ "inet4_only", "inet6_only" ],
+		"port" : [ "separator" ],
+		"community" : [ "snmp_auth_prot", "snmp_sec_level", "snmp_priv_prot", \
+			"snmp_priv_passwd", "snmp_priv_passwd_script" ]
+	}
 
 class fspawn(pexpect.spawn):
 	def __init__(self, options, command):
@@ -427,6 +436,15 @@ def atexit_handler():
 		sys.stderr.write("%s failed to close standard output\n"%(sys.argv[0]))
 		sys.exit(EC_GENERIC_ERROR)
 
+def add_dependency_options(options):
+	## Add options which are available for every fence agent
+	added_opt = [] 
+	for x in options + ["default"]:
+		if DEPENDENCY_OPT.has_key(x):
+			added_opt.extend([y for y in DEPENDENCY_OPT[x] if options.count(y) == 0])
+	return added_opt
+
+
 def version(command, release, build_date, copyright_notice):
 	print command, " ", release, " ", build_date
 	if len(copyright_notice) > 0:
@@ -527,10 +545,7 @@ def metadata(avail_opt, options, docs):
 	print "</resource-agent>"
 
 def process_input(avail_opt):
-	##
-	## Add options which are available for every fence agent
-	#####
-	avail_opt.extend(COMMON_OPT)
+	avail_opt.extend(add_dependency_options(avail_opt))
 
 	##
 	## Set standard environment
@@ -641,10 +656,8 @@ def process_input(avail_opt):
 ## password script to set a correct password
 ######
 def check_input(device_opt, opt):
-	##
-	## Add options which are available for every fence agent
-	#####
-	device_opt.extend([x for x in COMMON_OPT if device_opt.count(x) == 0])
+
+	device_opt.extend(add_dependency_options(device_opt))
 	
 	options = dict(opt)
 	options["device_opt"] = device_opt
diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py
index 252a659..5cedc24 100644
--- a/fence/agents/lpar/fence_lpar.py
+++ b/fence/agents/lpar/fence_lpar.py
@@ -100,9 +100,8 @@ def get_lpar_list(conn, options):
 	return outlets
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script", "secure",
-	                "identity_file", "partition", "managed", "hmc_version", "cmd_prompt",
-			"separator", "inet4_only", "inet6_only", "ipport" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt", \
+	                "partition", "managed", "hmc_version" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index fb97d51..0d4de57 100644
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -101,8 +101,7 @@ def send_command(opt, command, method = "GET"):
 	return result
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script", "ssl", 
-			"inet4_only", "inet6_only", "ipport", "port", "web", "separator" ]
+	device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "web", "port" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py
index 578e34d..14ec88f 100644
--- a/fence/agents/rsa/fence_rsa.py
+++ b/fence/agents/rsa/fence_rsa.py
@@ -34,8 +34,7 @@ def set_power_status(conn, options):
 	conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"cmd_prompt", "secure", "identity_file", "ipport" ]
+	device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/rsb/fence_rsb.py b/fence/agents/rsb/fence_rsb.py
index 87ed53a..45a0c06 100755
--- a/fence/agents/rsb/fence_rsb.py
+++ b/fence/agents/rsb/fence_rsb.py
@@ -37,9 +37,7 @@ def set_power_status(conn, options):
 	conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"secure", "identity_file", "separator", "cmd_prompt",
-			"inet4_only", "inet6_only", "ipport", "telnet_port" ]
+	device_opt = [ "ipaddr", "ipport", "telnet_port", "login", "passwd", "secure", "cmd_prompt" ]
 
 	atexit.register(atexit_handler)
 	all_opt["telnet_port"] = {
diff --git a/fence/agents/sanbox2/fence_sanbox2.py b/fence/agents/sanbox2/fence_sanbox2.py
index ccbfd8e..94353fe 100644
--- a/fence/agents/sanbox2/fence_sanbox2.py
+++ b/fence/agents/sanbox2/fence_sanbox2.py
@@ -100,8 +100,7 @@ def get_list_devices(conn, options):
 	return outlets
 
 def main():
-	device_opt = [  "fabric_fencing", "ipaddr", "login", "passwd", "passwd_script",
-			"cmd_prompt", "port", "ipport", "separator" ]
+	device_opt = [ "fabric_fencing", "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "port" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/virsh/fence_virsh.py b/fence/agents/virsh/fence_virsh.py
index 113de8f..2e1474a 100644
--- a/fence/agents/virsh/fence_virsh.py
+++ b/fence/agents/virsh/fence_virsh.py
@@ -59,9 +59,8 @@ def set_power_status(conn, options):
 	time.sleep(1)
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script", "cmd_prompt",
-			"secure", "identity_file", "test", "port", "separator",
-			"inet4_only", "inet6_only", "ipport", "sudo" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+			"test", "port", "sudo" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/vmware/fence_vmware.py b/fence/agents/vmware/fence_vmware.py
index 8524480..b92b409 100644
--- a/fence/agents/vmware/fence_vmware.py
+++ b/fence/agents/vmware/fence_vmware.py
@@ -280,9 +280,8 @@ def vmware_check_vmware_type(options):
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "login", "passwd", "passwd_script",
-		       "test", "port", "separator", "exec", "vmware_type",
-		       "vmware_datacenter", "secure", "identity_file" ]
+	device_opt = [ "ipaddr", "login", "passwd", "secure",
+		       "test", "exec", "vmware_type", "vmware_datacenter"]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py
index 4ef03f0..9eef969 100644
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
@@ -156,8 +156,7 @@ def set_power_status(conn, options):
 		conn.service.PowerOffVM_Task(mo_machine)	
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"ssl", "port", "uuid", "separator", "ipport" ]
+	device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "port", "uuid" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py
index 063352e..76c0f26 100644
--- a/fence/agents/wti/fence_wti.py
+++ b/fence/agents/wti/fence_wti.py
@@ -82,9 +82,8 @@ def set_power_status(conn, options):
 	conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
 
 def main():
-	device_opt = [  "ipaddr", "login", "passwd", "passwd_script",
-			"cmd_prompt", "secure", "identity_file", "port", "no_login", "no_password",
-			"test", "separator", "inet4_only", "inet6_only", "ipport" ]
+	device_opt = [  "ipaddr", "ipport", "login", "passwd", "no_login", "no_password", \
+			"cmd_prompt", "secure", "port", "test" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/xenapi/fence_xenapi.py b/fence/agents/xenapi/fence_xenapi.py
index 599f7a5..51ebf52 100644
--- a/fence/agents/xenapi/fence_xenapi.py
+++ b/fence/agents/xenapi/fence_xenapi.py
@@ -200,8 +200,8 @@ def return_vm_reference(session, options):
 
 def main():
 
-	device_opt = [	"login", "passwd", "passwd_script", "port", "test", "separator",
-			"no_login", "no_password", "session_url", "uuid" ]
+	device_opt = [	"login", "passwd", "port", "no_login", "no_password", "session_url",
+			"test", "uuid" ]
 
 	atexit.register(atexit_handler)
 
-- 
1.7.7.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]