fence-agents: master - COMPATIBILITY BREAK: fence_rsb replace -n / telnet_port with standard --ipport / ipport

Marek GrĂ¡c marx at fedoraproject.org
Mon Feb 4 15:25:14 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=dbc406ad1c5a2f981c04cd6b6d7ebc02aab1eaf5
Commit:        dbc406ad1c5a2f981c04cd6b6d7ebc02aab1eaf5
Parent:        ae6ad01adfba06b7d573e674ba71363fac48abe2
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Sun Nov 25 14:18:07 2012 +0100
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Mon Feb 4 16:06:15 2013 +0100

COMPATIBILITY BREAK: fence_rsb replace -n / telnet_port with standard --ipport / ipport

telnet_port has same functionality as ipport and -n is usually used for port number/UUID
---
 fence/agents/rsb/fence_rsb.py |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/fence/agents/rsb/fence_rsb.py b/fence/agents/rsb/fence_rsb.py
index a701156..61066ee 100755
--- a/fence/agents/rsb/fence_rsb.py
+++ b/fence/agents/rsb/fence_rsb.py
@@ -37,27 +37,18 @@ def set_power_status(conn, options):
 	conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
 
 def main():
-	device_opt = [ "ipaddr", "ipport", "telnet_port", "login", "passwd", "secure", "cmd_prompt" ]
+	device_opt = [ "ipaddr", "ipport", "login", "passwd", "secure", "cmd_prompt" ]
 
 	atexit.register(atexit_handler)
-	all_opt["telnet_port"] = {
-		"getopt" : "n:",
-                "longopt" : "telnet_port",
-                "help" : "-n                             TCP port to use (deprecated, use -u)",
-                "required" : "0",
-                "shortdesc" : "TCP port to use for connection with device (default is 3172 for telnet)",
-                "order" : 1
-	}
+
 	all_opt["cmd_prompt"]["default"] = "to quit:"
 
 	opt = process_input(device_opt)
-	# option -n for backward compatibility (-n is normally port no)
-	if 1 == opt.has_key("--telnet_port"):
-		opt["--port"] = opt["--telnet_port"]
 
 	# set default port for telnet only
 	if 0 == opt.has_key("--ssh") and 0 == opt.has_key("--ipport"):
 		opt["--ipport"] = "3172"
+
 	options = check_input(device_opt, opt)
 
 	docs = { }


More information about the cluster-commits mailing list