diff options
| author | Rafael H. Schloming <rhs@apache.org> | 2008-04-22 18:15:48 +0000 |
|---|---|---|
| committer | Rafael H. Schloming <rhs@apache.org> | 2008-04-22 18:15:48 +0000 |
| commit | 59a27bf59a6858ddc43ca94137ac98e7dc074bee (patch) | |
| tree | 78a84f80a3ce1a5d494bcc8417fdc2e9becf8687 /python/commands/qpid-config | |
| parent | e06aa805cfe24b8edf619a6a535883f94589ac35 (diff) | |
| download | qpid-python-59a27bf59a6858ddc43ca94137ac98e7dc074bee.tar.gz | |
QPID-948: patch from Ted Ross for updated management utilities to 0-10 final
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@650604 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/commands/qpid-config')
| -rwxr-xr-x | python/commands/qpid-config | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/python/commands/qpid-config b/python/commands/qpid-config index b93e74c4d2..20b08933a4 100755 --- a/python/commands/qpid-config +++ b/python/commands/qpid-config @@ -19,7 +19,7 @@ # under the License. # -import os +import os, uuid import getopt import sys import socket @@ -27,10 +27,11 @@ import qpid from threading import Condition from qpid.management import managementClient from qpid.peer import Closed -from qpid.client import Client +from qpid.connection import Connection +from qpid.util import connect from time import sleep -_defspecpath = "/usr/share/amqp/amqp.0-10-preview.xml" +_defspecpath = "/usr/share/amqp/amqp.0-10.xml" _specpath = _defspecpath _recursive = False _host = "localhost" @@ -95,13 +96,11 @@ class BrokerManager: def ConnectToBroker (self): try: - self.spec = qpid.spec.load (_specpath) - self.client = Client (self.broker.host, self.broker.port, self.spec) - self.client.start (response='\x00' + "guest" + '\x00' + "guest", - mechanism="PLAIN") - self.channel = self.client.channel (1) + self.spec = qpid.spec.load (_specpath) + self.conn = Connection (connect (self.broker.host, self.broker.port), self.spec) + self.conn.start () self.mclient = managementClient (self.spec) - self.mchannel = self.mclient.addChannel (self.channel) + self.mchannel = self.mclient.addChannel (self.conn.session(str(uuid.uuid4()))) except socket.error, e: print "Socket Error:", e sys.exit (1) |
