fence-agents: master - fencing: Some short options were not propagated, so they were removed

Marek GrĂ¡c marx at fedoraproject.org
Thu Nov 13 16:54:23 UTC 2014


Gitweb:        http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=8e1cef5a2b341763738170393fb093313b16e93f
Commit:        8e1cef5a2b341763738170393fb093313b16e93f
Parent:        62d635a45478c0888a64983243cc0770c782aac3
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Thu Nov 13 16:52:44 2014 +0100
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Thu Nov 13 16:52:44 2014 +0100

fencing: Some short options were not propagated, so they were removed

In old versions, it was required to have short getopt options (-k, -x, ...) for
each option available. This is not true for some time but these options
were defined also for options were they were not really used and long options were
the only presented.

Main reason for removing this short options from specific options was that some
of them were really overloaded.
---
 fence/agents/amt/fence_amt.py             |    2 +-
 fence/agents/cisco_ucs/fence_cisco_ucs.py |    2 +-
 fence/agents/dummy/fence_dummy.py         |    6 +++---
 fence/agents/ipmilan/fence_ipmilan.py     |    2 +-
 fence/agents/lib/fencing.py.py            |   22 +++++++++++-----------
 fence/agents/rhevm/fence_rhevm.py         |    2 +-
 fence/agents/scsi/fence_scsi.py           |   10 +++++-----
 7 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/fence/agents/amt/fence_amt.py b/fence/agents/amt/fence_amt.py
index d1c2b03..763a2ff 100644
--- a/fence/agents/amt/fence_amt.py
+++ b/fence/agents/amt/fence_amt.py
@@ -77,7 +77,7 @@ def define_new_opts():
 		"order" : 1
 	}
 	all_opt["amttool_path"] = {
-		"getopt" : "i:",
+		"getopt" : ":",
 		"longopt" : "amttool-path",
 		"help" : "--amttool-path=[path]          Path to amttool binary",
 		"required" : "0",
diff --git a/fence/agents/cisco_ucs/fence_cisco_ucs.py b/fence/agents/cisco_ucs/fence_cisco_ucs.py
index f411433..191f1b1 100644
--- a/fence/agents/cisco_ucs/fence_cisco_ucs.py
+++ b/fence/agents/cisco_ucs/fence_cisco_ucs.py
@@ -109,7 +109,7 @@ def send_command(opt, command, timeout):
 
 def define_new_opts():
 	all_opt["suborg"] = {
-		"getopt" : "s:",
+		"getopt" : ":",
 		"longopt" : "suborg",
 		"help" : "--suborg=[path]                Additional path needed to access suborganization",
 		"required" : "0",
diff --git a/fence/agents/dummy/fence_dummy.py b/fence/agents/dummy/fence_dummy.py
index 9c4c5f1..7f95b8f 100644
--- a/fence/agents/dummy/fence_dummy.py
+++ b/fence/agents/dummy/fence_dummy.py
@@ -83,7 +83,7 @@ def main():
 	atexit.register(atexit_handler)
 
 	all_opt["status_file"] = {
-		"getopt" : "s:",
+		"getopt" : ":",
 		"longopt" : "status-file",
 		"help":"--status-file=[file]           Name of file that holds current status",
 		"required" : "0",
@@ -93,7 +93,7 @@ def main():
 		}
 
 	all_opt["random_sleep_range"] = {
-		"getopt" : "r:",
+		"getopt" : ":",
 		"longopt" : "random_sleep_range",
 		"help":"--random_sleep_range=[seconds] Issue a sleep between 1 and [seconds]",
 		"required" : "0",
@@ -102,7 +102,7 @@ def main():
 		}
 
 	all_opt["type"] = {
-		"getopt" : "t:",
+		"getopt" : ":",
 		"longopt" : "type",
 		"help":"--type=[type]                  Possible types are: file and fail",
 		"required" : "0",
diff --git a/fence/agents/ipmilan/fence_ipmilan.py b/fence/agents/ipmilan/fence_ipmilan.py
index eaff7b7..f63f90f 100644
--- a/fence/agents/ipmilan/fence_ipmilan.py
+++ b/fence/agents/ipmilan/fence_ipmilan.py
@@ -111,7 +111,7 @@ def define_new_opts():
 		"order": 1
 	}
 	all_opt["ipmitool_path"] = {
-		"getopt" : "i:",
+		"getopt" : ":",
 		"longopt" : "ipmitool-path",
 		"help" : "--ipmitool-path=[path]         Path to ipmitool binary",
 		"required" : "0",
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index a6a3403..098f19e 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -66,7 +66,7 @@ all_opt = {
 		"shortdesc" : "Write debug information to given file",
 		"order" : 52},
 	"delay" : {
-		"getopt" : "f:",
+		"getopt" : ":",
 		"longopt" : "delay",
 		"help" : "--delay=[seconds]              Wait X seconds before fencing is started",
 		"required" : "0",
@@ -166,7 +166,7 @@ all_opt = {
 		"required" : "0",
 		"order" : 1},
 	"ssh_options" : {
-		"getopt" : "X:",
+		"getopt" : ":",
 		"longopt" : "ssh-options",
 		"help" : "--ssh-options=[options]	  SSH options to use",
 		"shortdesc" : "SSH options to use",
@@ -180,14 +180,14 @@ all_opt = {
 		"shortdesc" : "SSL connection",
 		"order" : 1},
 	"ssl_insecure" : {
-		"getopt" : "9",
+		"getopt" : "",
 		"longopt" : "ssl-insecure",
 		"help" : "--ssl-insecure                 Use ssl connection without verifying certificate",
 		"required" : "0",
 		"shortdesc" : "SSL connection without verifying fence device's certificate",
 		"order" : 1},
 	"ssl_secure" : {
-		"getopt" : "9",
+		"getopt" : "",
 		"longopt" : "ssl-secure",
 		"help" : "--ssl-secure                   Use ssl connection with verifying certificate",
 		"required" : "0",
@@ -317,7 +317,7 @@ all_opt = {
 		"shortdesc" : "Separator for CSV created by operation list",
 		"order" : 100},
 	"login_timeout" : {
-		"getopt" : "y:",
+		"getopt" : ":",
 		"longopt" : "login-timeout",
 		"help" : "--login-timeout=[seconds]      Wait X seconds for cmd prompt after login",
 		"default" : "5",
@@ -325,7 +325,7 @@ all_opt = {
 		"shortdesc" : "Wait X seconds for cmd prompt after login",
 		"order" : 200},
 	"shell_timeout" : {
-		"getopt" : "Y:",
+		"getopt" : ":",
 		"longopt" : "shell-timeout",
 		"help" : "--shell-timeout=[seconds]      Wait X seconds for cmd prompt after issuing command",
 		"default" : "3",
@@ -333,7 +333,7 @@ all_opt = {
 		"shortdesc" : "Wait X seconds for cmd prompt after issuing command",
 		"order" : 200},
 	"power_timeout" : {
-		"getopt" : "g:",
+		"getopt" : ":",
 		"longopt" : "power-timeout",
 		"help" : "--power-timeout=[seconds]      Test X seconds for status change after ON/OFF",
 		"default" : "20",
@@ -341,7 +341,7 @@ all_opt = {
 		"shortdesc" : "Test X seconds for status change after ON/OFF",
 		"order" : 200},
 	"power_wait" : {
-		"getopt" : "G:",
+		"getopt" : ":",
 		"longopt" : "power-wait",
 		"help" : "--power-wait=[seconds]         Wait X seconds after issuing ON/OFF",
 		"default" : "0",
@@ -349,14 +349,14 @@ all_opt = {
 		"shortdesc" : "Wait X seconds after issuing ON/OFF",
 		"order" : 200},
 	"missing_as_off" : {
-		"getopt" : "M",
+		"getopt" : "",
 		"longopt" : "missing-as-off",
 		"help" : "--missing-as-off               Missing port returns OFF instead of failure",
 		"required" : "0",
 		"shortdesc" : "Missing port returns OFF instead of failure",
 		"order" : 200},
 	"retry_on" : {
-		"getopt" : "F:",
+		"getopt" : ":",
 		"longopt" : "retry-on",
 		"help" : "--retry-on=[attempts]          Count of attempts to retry power on",
 		"default" : "1",
@@ -371,7 +371,7 @@ all_opt = {
 		"shortdesc" : "The URL of the XenServer host.",
 		"order" : 1},
 	"sudo" : {
-		"getopt" : "d",
+		"getopt" : "",
 		"longopt" : "use-sudo",
 		"help" : "--use-sudo                     Use sudo (without password) when calling 3rd party software",
 		"required" : "0",
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index e47f58e..427bed5 100644
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -129,7 +129,7 @@ def send_command(opt, command, method="GET"):
 
 def define_new_opts():
 	all_opt["use_cookies"] = {
-		"getopt" : "s",
+		"getopt" : "",
 		"longopt" : "use-cookies",
 		"help" : "--use-cookies                  Reuse cookies for authentication",
 		"required" : "0",
diff --git a/fence/agents/scsi/fence_scsi.py b/fence/agents/scsi/fence_scsi.py
index 72f9d90..9bc5236 100644
--- a/fence/agents/scsi/fence_scsi.py
+++ b/fence/agents/scsi/fence_scsi.py
@@ -290,7 +290,7 @@ be removed from the device(s).",
 		"order": 1
 	}
 	all_opt["logfile"] = {
-		"getopt" : "f:",
+		"getopt" : ":",
 		"longopt" : "logfile",
 		"help" : "-f, --logfile                  Log output (stdout and stderr) to file",
 		"required" : "0",
@@ -298,7 +298,7 @@ be removed from the device(s).",
 		"order": 5
 	}
 	all_opt["corosync-cmap_path"] = {
-		"getopt" : "Z:",
+		"getopt" : ":",
 		"longopt" : "corosync-cmap-path",
 		"help" : "--corosync-cmap-path=[path]    Path to corosync-cmapctl binary",
 		"required" : "0",
@@ -307,7 +307,7 @@ be removed from the device(s).",
 		"order": 200
 	}
 	all_opt["sg_persist_path"] = {
-		"getopt" : "X:",
+		"getopt" : ":",
 		"longopt" : "sg_persist-path",
 		"help" : "--sg_persist-path=[path]       Path to sg_persist binary",
 		"required" : "0",
@@ -316,7 +316,7 @@ be removed from the device(s).",
 		"order": 200
 	}
 	all_opt["sg_turs_path"] = {
-		"getopt" : "I:",
+		"getopt" : ":",
 		"longopt" : "sg_turs-path",
 		"help" : "--sg_turs-path=[path]          Path to sg_turs binary",
 		"required" : "0",
@@ -325,7 +325,7 @@ be removed from the device(s).",
 		"order": 200
 	}
 	all_opt["vgs_path"] = {
-		"getopt" : "J:",
+		"getopt" : ":",
 		"longopt" : "vgs-path",
 		"help" : "--vgs-path=[path]              Path to vgs binary",
 		"required" : "0",


More information about the cluster-commits mailing list