Author: justi9
Date: 2008-04-21 15:20:40 -0400 (Mon, 21 Apr 2008)
New Revision: 1949
Modified:
mgmt/basil/python/basil/__init__.py
Log:
Make basil work with recent management api changes
Modified: mgmt/basil/python/basil/__init__.py
===================================================================
--- mgmt/basil/python/basil/__init__.py 2008-04-21 18:51:38 UTC (rev 1948)
+++ mgmt/basil/python/basil/__init__.py 2008-04-21 19:20:40 UTC (rev 1949)
@@ -198,26 +198,24 @@
self.port = port
self.context_id = "%s:%i" % (self.host, self.port)
- self.client = managementClient(self.model.spec,
- None,
- self.model.on_config,
- self.model.on_metric,
- self.model.on_callback)
- self.client.schemaListener(self.model.on_schema)
+ self.client = qpid.client.Client(host, port, self.model.spec)
+ self.mclient = managementClient(self.model.spec,
+ None,
+ self.model.on_config,
+ self.model.on_metric,
+ self.model.on_callback)
+ self.mclient.schemaListener(self.model.on_schema)
+
self.chan = None
self.model.connections[self.context_id] = self
def open(self):
- client = qpid.client.Client(self.host, self.port, self.model.spec)
- client.start({})
- chan = client.channel(1)
+ self.client.start({})
+ self.chan = self.mclient.addChannel \
+ (self.client.channel(1), self.context_id)
- self.chan = managementChannel \
- (chan, self.client.topicCb, self.client.replyCb, self.context_id)
-
- self.client.addChannel(self.chan)
-
def close(self):
- self.client.removeChannel(self.chan)
+ self.mclient.removeChannel(self.chan)
+ #self.client.stop()
Show replies by date