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

[Cluster-devel] [PATCH 6/7] COMPATIBILITY BREAK: replace udpport with ipport, make ipport dependent on ipaddress



---
 fence/agents/alom/fence_alom.py                 |    2 +-
 fence/agents/apc/fence_apc.py                   |    2 +-
 fence/agents/apc_snmp/fence_apc_snmp.py         |    2 +-
 fence/agents/bladecenter/fence_bladecenter.py   |    2 +-
 fence/agents/cisco_mds/fence_cisco_mds.py       |    2 +-
 fence/agents/cisco_ucs/fence_cisco_ucs.py       |    3 +--
 fence/agents/drac5/fence_drac5.py               |    2 +-
 fence/agents/eaton_snmp/fence_eaton_snmp.py     |    2 +-
 fence/agents/hds_cb/fence_hds_cb.py             |    2 +-
 fence/agents/hpblade/fence_hpblade.py           |    3 +--
 fence/agents/ibmblade/fence_ibmblade.py         |    2 +-
 fence/agents/ifmib/fence_ifmib.py               |    2 +-
 fence/agents/ilo/fence_ilo.py                   |    2 +-
 fence/agents/intelmodular/fence_intelmodular.py |    2 +-
 fence/agents/ipdu/fence_ipdu.py                 |    2 +-
 fence/agents/ldom/fence_ldom.py                 |    3 +--
 fence/agents/lib/fencing.py.py                  |   13 +++----------
 fence/agents/lib/fencing_snmp.py.py             |    3 +--
 fence/agents/lpar/fence_lpar.py                 |    2 +-
 fence/agents/rhevm/fence_rhevm.py               |    2 +-
 fence/agents/rsa/fence_rsa.py                   |    2 +-
 fence/agents/rsb/fence_rsb.py                   |    2 +-
 fence/agents/sanbox2/fence_sanbox2.py           |    2 +-
 fence/agents/virsh/fence_virsh.py               |    3 +--
 fence/agents/vmware_soap/fence_vmware_soap.py   |    2 +-
 fence/agents/wti/fence_wti.py                   |    2 +-
 26 files changed, 28 insertions(+), 40 deletions(-)

diff --git a/fence/agents/alom/fence_alom.py b/fence/agents/alom/fence_alom.py
index d5e08e7..ef2db3c 100644
--- a/fence/agents/alom/fence_alom.py
+++ b/fence/agents/alom/fence_alom.py
@@ -31,7 +31,7 @@ def set_power_status(conn, options):
 	time.sleep(int(options["--power-timeout"]))
 		
 def main():
-	device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure" ]
+	device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py
index 46fa0af..1d82957 100644
--- a/fence/agents/apc/fence_apc.py
+++ b/fence/agents/apc/fence_apc.py
@@ -174,7 +174,7 @@ def set_power_status(conn, options):
 	conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
 
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+	device_opt = [  "ipaddr", "login", "passwd", "cmd_prompt", "secure", \
 			"port", "switch" ]
 
 	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 859b882..f312ebe 100644
--- a/fence/agents/apc_snmp/fence_apc_snmp.py
+++ b/fence/agents/apc_snmp/fence_apc_snmp.py
@@ -158,7 +158,7 @@ def apc_snmp_define_defaults():
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+	device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \
 		       "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 49d7395..ffd3f35 100644
--- a/fence/agents/bladecenter/fence_bladecenter.py
+++ b/fence/agents/bladecenter/fence_bladecenter.py
@@ -78,7 +78,7 @@ def get_blades_list(conn, options):
 	return outlets
 
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+	device_opt = [  "ipaddr", "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 0683539..4acce4f 100644
--- a/fence/agents/cisco_mds/fence_cisco_mds.py
+++ b/fence/agents/cisco_mds/fence_cisco_mds.py
@@ -77,7 +77,7 @@ def get_outlets_status(conn, options):
 def main():
 	global PORT_OID
 
-	device_opt = [ "fabric_fencing", "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+	device_opt = [ "fabric_fencing", "ipaddr", "login", "passwd", "no_login", "no_password", \
 		       "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 53d2a52..92c29eb 100644
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -107,8 +107,7 @@ def define_new_opts():
 		"order" : 1 }
 
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "ssl", \
-			"port", "web", "suborg" ]
+	device_opt = [ "ipaddr", "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 8560c39..dbd0576 100644
--- a/fence/agents/drac5/fence_drac5.py
+++ b/fence/agents/drac5/fence_drac5.py
@@ -78,7 +78,7 @@ def define_new_opts():
 		"order" : 1 }
 
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+	device_opt = [  "ipaddr", "login", "passwd", "cmd_prompt", "secure", \
 			"drac_version", "port", "no_port" ]
 
 	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 0d42224..462d541 100644
--- a/fence/agents/eaton_snmp/fence_eaton_snmp.py
+++ b/fence/agents/eaton_snmp/fence_eaton_snmp.py
@@ -197,7 +197,7 @@ def get_outlets_status(conn, options):
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+	device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \
 		       "port", "snmp_version", "community" ]
 
 	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 c0dd70c..ed7d678 100755
--- a/fence/agents/hds_cb/fence_hds_cb.py
+++ b/fence/agents/hds_cb/fence_hds_cb.py
@@ -107,7 +107,7 @@ def get_blades_list(conn, options):
 	return outlets
 
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
+	device_opt = [  "ipaddr", "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 a029d05..7d08e6a 100644
--- a/fence/agents/hpblade/fence_hpblade.py
+++ b/fence/agents/hpblade/fence_hpblade.py
@@ -57,8 +57,7 @@ def get_blades_list(conn, options):
 	return outlets
 
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
-			"port", "missing_as_off" ]
+	device_opt = [ "ipaddr", "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 3516617..1787ae2 100644
--- a/fence/agents/ibmblade/fence_ibmblade.py
+++ b/fence/agents/ibmblade/fence_ibmblade.py
@@ -50,7 +50,7 @@ def get_outlets_status(conn, _):
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+	device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \
 		       "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 055d6d6..2184a85 100644
--- a/fence/agents/ifmib/fence_ifmib.py
+++ b/fence/agents/ifmib/fence_ifmib.py
@@ -95,7 +95,7 @@ def get_outlets_status(conn, options):
 
 # Main agent method
 def main():
-	device_opt = [ "fabric_fencing", "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+	device_opt = [ "fabric_fencing", "ipaddr", "login", "passwd", "no_login", "no_password", \
 		       "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 82e1c63..fc664cc 100644
--- a/fence/agents/ilo/fence_ilo.py
+++ b/fence/agents/ilo/fence_ilo.py
@@ -62,7 +62,7 @@ def define_new_opts():
 		"order" : 1 }
 
 def main():
-	device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "ribcl" ]
+	device_opt = [ "ipaddr", "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 4a0f6f4..192d2e3 100644
--- a/fence/agents/intelmodular/fence_intelmodular.py
+++ b/fence/agents/intelmodular/fence_intelmodular.py
@@ -61,7 +61,7 @@ def get_outlets_status(conn, options):
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password",
+	device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password",
 		       "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 edf4775..7f08656 100644
--- a/fence/agents/ipdu/fence_ipdu.py
+++ b/fence/agents/ipdu/fence_ipdu.py
@@ -125,7 +125,7 @@ def get_outlets_status(conn, options):
 
 # Main agent method
 def main():
-	device_opt = [ "ipaddr", "udpport", "login", "passwd", "no_login", "no_password", \
+	device_opt = [ "ipaddr", "login", "passwd", "no_login", "no_password", \
 		       "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 08a1508..722bfda 100644
--- a/fence/agents/ldom/fence_ldom.py
+++ b/fence/agents/ldom/fence_ldom.py
@@ -69,8 +69,7 @@ def set_power_status(conn, options):
 	conn.log_expect(options, COMMAND_PROMPT_REG, int(options["--power-timeout"]))
 		
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
-			"port" ]
+	device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", "port" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index d2ca645..c13652f 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -101,9 +101,9 @@ all_opt = {
 	"ipport" : {
 		"getopt" : "u:",
 		"longopt" : "ipport",
-		"help" : "-u, --ipport=<port>            TCP port to use",
+		"help" : "-u, --ipport=<port>            TCP/UDP port to use",
 		"required" : "0",
-		"shortdesc" : "TCP port to use for connection with device",
+		"shortdesc" : "TCP/UDP port to use for connection with device",
 		"order" : 1 },		
 	"login" : {
 		"getopt" : "l:",
@@ -280,13 +280,6 @@ all_opt = {
 		"required" : "0",
 		"shortdesc" : "Forces agent to use IPv6 addresses only",
 		"order" : 1 },
-	"udpport" : {
-		"getopt" : "u:",
-		"longopt" : "udpport",
-		"help" : "-u, --udpport                  UDP/TCP port to use",
-		"required" : "0",
-		"shortdesc" : "UDP/TCP port to use for connection with device",
-		"order" : 1},
 	"separator" : {
 		"getopt" : "C:",
 		"longopt" : "separator",
@@ -371,7 +364,7 @@ DEPENDENCY_OPT = {
 			"power_timeout", "shell_timeout", "login_timeout", "power_wait", "retry_on", "delay" ],
 		"passwd" : [ "passwd_script" ],
 		"secure" : [ "identity_file", "ssh_options" ],
-		"ipaddr" : [ "inet4_only", "inet6_only" ],
+		"ipaddr" : [ "ipport", "inet4_only", "inet6_only" ],
 		"port" : [ "separator" ],
 		"community" : [ "snmp_auth_prot", "snmp_sec_level", "snmp_priv_prot", \
 			"snmp_priv_passwd", "snmp_priv_passwd_script" ]
diff --git a/fence/agents/lib/fencing_snmp.py.py b/fence/agents/lib/fencing_snmp.py.py
index 89f8ece..ad549c6 100644
--- a/fence/agents/lib/fencing_snmp.py.py
+++ b/fence/agents/lib/fencing_snmp.py.py
@@ -14,7 +14,6 @@ BUILD_DATE = ""
 
 # Fix for RHBZ#527844
 def snmp_define_defaults ():
-	all_opt["udpport"]["default"] = "161"
 	all_opt["ipport"]["default"] = "161"
 
 class FencingSnmp:
@@ -82,7 +81,7 @@ class FencingSnmp:
 			force_ipvx = "udp:"
 
 		cmd += " '%s%s%s'"% (force_ipvx, self.quote_for_run(self.options["--ip"]),
-				self.options.has_key("--udpport") and self.quote_for_run(":" + str (self.options["--udpport"])) or "")
+				self.options.has_key("--ipport") and self.quote_for_run(":" + str (self.options["--ipport"])) or "")
 		return cmd
 
 	def run_command(self, command, additional_timemout=0):
diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py
index 55b8294..bf658f0 100644
--- a/fence/agents/lpar/fence_lpar.py
+++ b/fence/agents/lpar/fence_lpar.py
@@ -117,7 +117,7 @@ def define_new_opts():
 		"order" : 1 }
 
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt", \
+	device_opt = [  "ipaddr", "login", "passwd", "secure", "cmd_prompt", \
 	                "port", "managed", "hmc_version" ]
 
 	atexit.register(atexit_handler)
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index cb61df5..f4c490f 100644
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -101,7 +101,7 @@ def send_command(opt, command, method = "GET"):
 	return result
 
 def main():
-	device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "web", "port" ]
+	device_opt = [ "ipaddr", "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 898c6c2..117dd67 100644
--- a/fence/agents/rsa/fence_rsa.py
+++ b/fence/agents/rsa/fence_rsa.py
@@ -34,7 +34,7 @@ def set_power_status(conn, options):
 	conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
 
 def main():
-	device_opt = [ "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure" ]
+	device_opt = [ "ipaddr", "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 61066ee..5ce3087 100755
--- a/fence/agents/rsb/fence_rsb.py
+++ b/fence/agents/rsb/fence_rsb.py
@@ -37,7 +37,7 @@ def set_power_status(conn, options):
 	conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
 
 def main():
-	device_opt = [ "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt" ]
+	device_opt = [ "ipaddr", "login", "passwd", "secure", "cmd_prompt" ]
 
 	atexit.register(atexit_handler)
 
diff --git a/fence/agents/sanbox2/fence_sanbox2.py b/fence/agents/sanbox2/fence_sanbox2.py
index 94353fe..5221d49 100644
--- a/fence/agents/sanbox2/fence_sanbox2.py
+++ b/fence/agents/sanbox2/fence_sanbox2.py
@@ -100,7 +100,7 @@ def get_list_devices(conn, options):
 	return outlets
 
 def main():
-	device_opt = [ "fabric_fencing", "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "port" ]
+	device_opt = [ "fabric_fencing", "ipaddr", "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 a2577f4..1a38940 100644
--- a/fence/agents/virsh/fence_virsh.py
+++ b/fence/agents/virsh/fence_virsh.py
@@ -59,8 +59,7 @@ def set_power_status(conn, options):
 	time.sleep(1)
 
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "cmd_prompt", "secure", \
-			"port", "sudo" ]
+	device_opt = [ "ipaddr", "login", "passwd", "cmd_prompt", "secure", "port", "sudo" ]
 
 	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 2572464..16ce5b2 100644
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
@@ -156,7 +156,7 @@ def set_power_status(conn, options):
 		conn.service.PowerOffVM_Task(mo_machine)	
 
 def main():
-	device_opt = [ "ipaddr", "ipport", "login", "passwd", "ssl", "port", "uuid" ]
+	device_opt = [ "ipaddr", "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 b3d022f..b315061 100644
--- a/fence/agents/wti/fence_wti.py
+++ b/fence/agents/wti/fence_wti.py
@@ -82,7 +82,7 @@ def set_power_status(conn, options):
 	conn.log_expect(options, options["--command-prompt"], int(options["--power-timeout"]))
 
 def main():
-	device_opt = [  "ipaddr", "ipport", "login", "passwd", "no_login", "no_password", \
+	device_opt = [  "ipaddr", "login", "passwd", "no_login", "no_password", \
 			"cmd_prompt", "secure", "port" ]
 
 	atexit.register(atexit_handler)
-- 
1.7.7.6


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