summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Ross <jross@apache.org>2012-11-01 23:56:33 +0000
committerJustin Ross <jross@apache.org>2012-11-01 23:56:33 +0000
commit91401ba847f10596d145373636d2f29570fe8190 (patch)
tree86cc8e4d762797e29dc6a8607dd68bf76aac6e5e
parentea8c082d9790e01ecbd63e63637aea10b0cc7938 (diff)
downloadqpid-python-91401ba847f10596d145373636d2f29570fe8190.tar.gz
QPID-4410: Restore compatibility with pre-0.18 qpid-config command line options; this is a patch from Ernie Allen
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1404836 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-xqpid/tools/src/py/qpid-config9
1 files changed, 5 insertions, 4 deletions
diff --git a/qpid/tools/src/py/qpid-config b/qpid/tools/src/py/qpid-config
index df43b7ea4e..e46b311552 100755
--- a/qpid/tools/src/py/qpid-config
+++ b/qpid/tools/src/py/qpid-config
@@ -18,10 +18,8 @@
# specific language governing permissions and limitations
# under the License.
#
-import pdb
-
import os
-from optparse import OptionParser, OptionGroup, IndentedHelpFormatter
+from optparse import OptionParser, OptionGroup, IndentedHelpFormatter, SUPPRESS_HELP
import sys
import locale
@@ -49,7 +47,7 @@ description = """
Examples:
$ qpid-config add queue q
-$ qpid-config add exchange direct d -a localhost:5672
+$ qpid-config add exchange direct d -b localhost:5672
$ qpid-config exchanges -b 10.1.1.7:10000
$ qpid-config queues -b guest/guest@broker-host:10000
@@ -175,6 +173,7 @@ def OptionsAndArguments(argv):
group1.add_option("-t", "--timeout", action="store", type="int", default=10, metavar="<secs>", help="Maximum time to wait for broker connection (in seconds)")
group1.add_option("-r", "--recursive", action="store_true", help="Show bindings in queue or exchange list")
group1.add_option("-b", "--broker", action="store", type="string", default="localhost:5672", metavar="<address>", help="Address of qpidd broker with syntax: [username/password@] hostname | ip-address [:<port>]")
+ group1.add_option("-a", "--broker-addr", action="store", type="string", default="localhost:5672", metavar="<address>", help=SUPPRESS_HELP)
group1.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.")
group1.add_option("--ssl-certificate", action="store", type="string", metavar="<cert>", help="Client SSL certificate (PEM Format)")
group1.add_option("--ssl-key", action="store", type="string", metavar="<key>", help="Client SSL private key (PEM Format)")
@@ -245,6 +244,8 @@ def OptionsAndArguments(argv):
config._recursive = True
if opts.broker:
config._host = opts.broker
+ if opts.broker_addr:
+ config._host = opts.broker_addr
if opts.timeout is not None:
config._connTimeout = opts.timeout
if config._connTimeout == 0: