summaryrefslogtreecommitdiff
path: root/qpid/python/commands/qpid-config
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2008-04-22 18:15:48 +0000
committerRafael H. Schloming <rhs@apache.org>2008-04-22 18:15:48 +0000
commit303807136b7ff8f8c7ed0e2884ac858fbe8dc95f (patch)
treeff71cf4f3ab8c497d6ae6ab33daa18912e178ab5 /qpid/python/commands/qpid-config
parent6b4af6b24c0e29007c28998d4d7d19383c0ae702 (diff)
downloadqpid-python-303807136b7ff8f8c7ed0e2884ac858fbe8dc95f.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@650604 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/commands/qpid-config')
-rwxr-xr-xqpid/python/commands/qpid-config17
1 files changed, 8 insertions, 9 deletions
diff --git a/qpid/python/commands/qpid-config b/qpid/python/commands/qpid-config
index b93e74c4d2..20b08933a4 100755
--- a/qpid/python/commands/qpid-config
+++ b/qpid/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)