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

Marek GrĂ¡c marx at fedoraproject.org
Thu Aug 2 13:08:20 UTC 2012


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=6f4c98c3111de5ce20f7b3205aef2f1dcde454bd
Commit:        6f4c98c3111de5ce20f7b3205aef2f1dcde454bd
Parent:        cd73f094f7c163aca57a1dc9d5138fb468846835
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Thu Aug 2 15:05:54 2012 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Thu Aug 2 15:05: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.
---
 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