From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32675 invoked by alias); 28 Aug 2009 16:13:21 -0000 Received: (qmail 32582 invoked by alias); 28 Aug 2009 16:13:21 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bastion2.fedora.phx.redhat.com Subject: cluster: RHEL55 - fencing: #519670 - Support long options from command line To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/RHEL55 X-Git-Reftype: branch X-Git-Oldrev: 66767ee1c9e6d2d9f4cba0b4b5c1fd212222838d X-Git-Newrev: d4de56c4c8f6d91a98fbb80e9eed8aebc4a8edf9 From: =?utf-8?q?Marek_Gr=C3=A1c?= Message-Id: <20090828161251.08C23120285@lists.fedorahosted.org> Date: Fri, 28 Aug 2009 16:13:00 -0000 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00248.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=d4de56c4c8f6d91a98fbb80e9eed8aebc4a8edf9 Commit: d4de56c4c8f6d91a98fbb80e9eed8aebc4a8edf9 Parent: 66767ee1c9e6d2d9f4cba0b4b5c1fd212222838d Author: Marek 'marx' Grac AuthorDate: Fri Aug 28 17:28:34 2009 +0200 Committer: Marek 'marx' Grac CommitterDate: Fri Aug 28 17:28:34 2009 +0200 fencing: #519670 - Support long options from command line --- fence/agents/lib/fencing.py.py | 82 +++++++++++++++++++++++++++++----------- 1 files changed, 60 insertions(+), 22 deletions(-) diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index 809c2e2..f449037 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -39,23 +39,27 @@ SSL_PATH = "/usr/lib/fence/telnet_ssl" all_opt = { "help" : { "getopt" : "h", - "help" : "-h Display this help and exit", + "longopt" : "help", + "help" : "-h, --help Display this help and exit", "order" : 54 }, "version" : { "getopt" : "V", - "help" : "-V Output version information and exit", + "longopt" : "version", + "help" : "-V, --version Output version information and exit", "order" : 53 }, "quiet" : { "getopt" : "q", - "help" : "-q Quiet mode", + "help" : "", "order" : 50 }, "verbose" : { "getopt" : "v", - "help" : "-v Verbose mode", + "longopt" : "verbose", + "help" : "-v, --verbose Verbose mode", "order" : 51 }, "debug" : { "getopt" : "D:", - "help" : "-D Debugging to output file", + "longopt" : "debug-file", + "help" : "-D, --debug-file= Debugging to output file", "order" : 52 }, "agent" : { "getopt" : "", @@ -63,15 +67,18 @@ all_opt = { "order" : 1 }, "action" : { "getopt" : "o:", - "help" : "-o Action: status, reboot (default), off or on", + "longopt" : "action", + "help" : "-o, --action= Action: status, reboot (default), off or on", "order" : 1 }, "ipaddr" : { "getopt" : "a:", - "help" : "-a IP address or hostname of fencing device", + "longopt" : "ip", + "help" : "-a, --ip= IP address or hostname of fencing device", "order" : 1 }, "login" : { "getopt" : "l:", - "help" : "-l Login name", + "longopt" : "username", + "help" : "-l, --username= Login name", "order" : 1 }, "no_login" : { "getopt" : "", @@ -83,23 +90,28 @@ all_opt = { "order" : 1 }, "passwd" : { "getopt" : "p:", - "help" : "-p Login password or passphrase", + "longopt" : "password", + "help" : "-p, --password= Login password or passphrase", "order" : 1 }, "passwd_script" : { "getopt" : "S:", - "help" : "-S