You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2013/10/09 00:47:32 UTC
svn commit: r1530456 - /qpid/trunk/qpid/extras/dispatch/tools/src/py/qdstat
Author: tross
Date: Tue Oct 8 22:47:32 2013
New Revision: 1530456
URL: http://svn.apache.org/r1530456
Log:
QPID-5213 - Added -n option to qdstat to display router-node information.
Modified:
qpid/trunk/qpid/extras/dispatch/tools/src/py/qdstat
Modified: qpid/trunk/qpid/extras/dispatch/tools/src/py/qdstat
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/dispatch/tools/src/py/qdstat?rev=1530456&r1=1530455&r2=1530456&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/dispatch/tools/src/py/qdstat (original)
+++ qpid/trunk/qpid/extras/dispatch/tools/src/py/qdstat Tue Oct 8 22:47:32 2013
@@ -164,6 +164,48 @@ class BusManager:
dispRows = rows
disp.formattedTable(title, heads, dispRows)
+ def displayRouterNodes(self):
+ disp = Display(prefix=" ")
+ heads = []
+ heads.append(Header("class"))
+ heads.append(Header("address"))
+ heads.append(Header("rindex"))
+ heads.append(Header("next-hop"))
+ heads.append(Header("link"))
+ rows = []
+
+ request = Message()
+ response = Message()
+
+ request.address = self.address
+ request.reply_to = self.reply
+ request.correlation_id = 1
+ request.properties = {u'operation':u'GET', u'type':u'org.apache.qpid.dispatch.router.node'}
+
+ self.M.put(request)
+ self.M.send()
+
+ self.M.recv()
+ self.M.get(response)
+
+ for node in response.body:
+ row = []
+ row.append(self._addr_class(node['addr']))
+ row.append(self._addr_text(node['addr']))
+ row.append(node['index'])
+ if node['next-hop'] != None:
+ row.append(node['next-hop'])
+ else:
+ row.append('-')
+ if node['router-link'] != None:
+ row.append(node['router-link'])
+ else:
+ row.append('-')
+ rows.append(row)
+ title = "Router Nodes"
+ dispRows = rows
+ disp.formattedTable(title, heads, dispRows)
+
def displayAddresses(self):
disp = Display(prefix=" ")
heads = []
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org