summaryrefslogtreecommitdiff
path: root/qpid/extras/qmf/src/py/qmf/console.py
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-02-13 23:50:18 +0000
committerAlan Conway <aconway@apache.org>2012-02-13 23:50:18 +0000
commit057a0635e081848ba59964c4a8e0923e521b7fe6 (patch)
treecdad9578140d5dbdb2e90525e2ba9cc870ca50b6 /qpid/extras/qmf/src/py/qmf/console.py
parentcf61dbf9b313f9bd69b392eae8fd8d27d4e609a2 (diff)
downloadqpid-python-057a0635e081848ba59964c4a8e0923e521b7fe6.tar.gz
Merge branch 'qpid-3603-4-rebase' into qpid-3603-5qpid-3603-5
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3603-5@1243748 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/extras/qmf/src/py/qmf/console.py')
-rw-r--r--qpid/extras/qmf/src/py/qmf/console.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/qpid/extras/qmf/src/py/qmf/console.py b/qpid/extras/qmf/src/py/qmf/console.py
index 0d72dc7609..ef7deb1d68 100644
--- a/qpid/extras/qmf/src/py/qmf/console.py
+++ b/qpid/extras/qmf/src/py/qmf/console.py
@@ -640,7 +640,7 @@ class Session:
return "QMF Console Session Manager (brokers: %d)" % len(self.brokers)
- def addBroker(self, target="localhost", timeout=None, mechanisms=None):
+ def addBroker(self, target="localhost", timeout=None, mechanisms=None, **connectArgs):
""" Connect to a Qpid broker. Returns an object of type Broker.
Will raise an exception if the session is not managing the connection and
the connection setup to the broker fails.
@@ -650,7 +650,7 @@ class Session:
else:
url = BrokerURL(target)
broker = Broker(self, url.host, url.port, mechanisms, url.authName, url.authPass,
- ssl = url.scheme == URL.AMQPS, connTimeout=timeout)
+ ssl = url.scheme == URL.AMQPS, connTimeout=timeout, **connectArgs)
self.brokers.append(broker)
return broker
@@ -2240,7 +2240,8 @@ class Broker(Thread):
self.typecode = typecode
self.data = data
- def __init__(self, session, host, port, authMechs, authUser, authPass, ssl=False, connTimeout=None):
+ def __init__(self, session, host, port, authMechs, authUser, authPass,
+ ssl=False, connTimeout=None, **connectArgs):
""" Create a broker proxy and setup a connection to the broker. Will raise
an exception if the connection fails and the session is not configured to
retry connection setup (manageConnections = False).
@@ -2274,7 +2275,7 @@ class Broker(Thread):
self.amqpSessionId = "%s.%d.%d" % (platform.uname()[1], os.getpid(), Broker.nextSeq)
Broker.nextSeq += 1
self.last_age_check = time()
-
+ self.connectArgs = connectArgs
# thread control
self.setDaemon(True)
self.setName("Thread for broker: %s:%d" % (host, port))
@@ -2426,7 +2427,8 @@ class Broker(Thread):
else:
connSock = sock
self.conn = Connection(connSock, username=self.authUser, password=self.authPass,
- mechanism = self.mechanisms, host=self.host, service="qpidd")
+ mechanism = self.mechanisms, host=self.host, service="qpidd",
+ **self.connectArgs)
def aborted():
raise Timeout("Waiting for connection to be established with broker")
oldAborted = self.conn.aborted