fence-agents: master - fence_drac5: make "port" a synonym of "module_name" for drac5

Marek Grác marx at fedoraproject.org
Fri Jul 30 16:00:41 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commitdiff;h=0e84b2e3f6ef1be68cbdb2414eb257f879f43af7
Commit:        0e84b2e3f6ef1be68cbdb2414eb257f879f43af7
Parent:        d1128ab1406df77566bc91db28d1f97f6ba101cb
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Fri Jul 30 17:58:01 2010 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Fri Jul 30 17:58:01 2010 +0200

fence_drac5: make "port" a synonym of "module_name" for drac5

Resolves: rhbz#619776
---
 fence/agents/lib/fencing.py.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 7d967de..4c5a0db 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -521,6 +521,11 @@ def process_input(avail_opt):
 			else:
 				longopt_list.append(all_opt[k]["longopt"])
 
+	## Compatibility layer
+	if avail_opt.count("module_name") == 1:
+		getopt_string += "n:"
+		longopt_list.append("plug=")
+	
 	##
 	## Read options from command line or standard input
 	#####
@@ -547,6 +552,8 @@ def process_input(avail_opt):
 		z = dict(opt)
 		if z.has_key("-T") == 1:
 			z["-o"] = "status"
+		if z.has_key("-n") == 1:
+			z["-m"] = z["-n"]
 
 		opt = z
 		##
@@ -576,6 +583,8 @@ def process_input(avail_opt):
 				name = "module_name"
 			elif name == "action" and 1 == avail_opt.count("io_fencing"):
 				name = "io_fencing"
+			elif name == "port" and 1 == avail_opt.count("drac_version"):
+				name = "module_name"
 
 			##
 			######


More information about the cluster-commits mailing list