fence-agents: RHEL6 - fence_eaton_snmp: Fix default power-wait option value, remove support for -n switch:port

Fabio M. Di Nitto fabbione at fedoraproject.org
Wed Aug 15 06:05:54 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=cc918817ee3d03e3f0524164893038f1701e4d14
Commit:        cc918817ee3d03e3f0524164893038f1701e4d14
Parent:        9a31eed921b0c5fa00e052ba7ae69b553158ac04
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Thu Aug 2 15:05:54 2012 +0200
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Wed Aug 15 08:04:54 2012 +0200

fence_eaton_snmp: Fix default power-wait option value, remove support for -n switch:port

This patch fixes default power-wait value to two seconds and removes support for notation
-n switch:port which is obsolete and is being removed from last fence agents.

Resolves: rhbz#752449

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 fence/agents/eaton_snmp/fence_eaton_snmp.py |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/fence/agents/eaton_snmp/fence_eaton_snmp.py b/fence/agents/eaton_snmp/fence_eaton_snmp.py
index e24cc13..4b02fc4 100644
--- a/fence/agents/eaton_snmp/fence_eaton_snmp.py
+++ b/fence/agents/eaton_snmp/fence_eaton_snmp.py
@@ -215,18 +215,10 @@ def main():
 	snmp_define_defaults ()
 	eaton_snmp_define_defaults()
 
+	all_opt["switch"]["default"] = 1
+	all_opt["power_wait"]["default"] = 2
 	options=check_input(device_opt,process_input(device_opt))
 
-	## Support for -n [switch]:[plug] notation that was used before
-	if ((options.has_key("-n")) and (-1 != options["-n"].find(":"))):
-		(switch, plug) = options["-n"].split(":", 1)
-		if ((switch.isdigit()) and (plug.isdigit())):
-		        options["-s"] = switch
-			options["-n"] = plug
-
-	if (not (options.has_key("-s"))):
-		options["-s"]="1"
-
 	# Plug indexing start from zero on ePDU Managed, so we substract '1' from
 	# the user's given plug number.
 	# For Switched ePDU, we will add this back again later.


More information about the cluster-commits mailing list