kgiusti commented on a change in pull request #586: DISPATCH-1411 - Added UTC
datetime and router id to all options of qd…
URL: https://github.com/apache/qpid-dispatch/pull/586#discussion_r335039861
##########
File path: tools/qdstat.in
##########
@@ -687,49 +756,59 @@ class BusManager(Node):
return has_nodes, all_nodes
- def show_entity(self, main):
- if main == 'l': self.displayRouterLinks()
- elif main == 'n': self.displayRouterNodes()
- elif main == 'a': self.displayAddresses()
- elif main == 'm': self.displayMemory()
- elif main == 'g': self.displayGeneral()
- elif main == 'e': self.displayEdges()
- elif main == 'c': self.displayConnections()
- elif main == 'autolinks': self.displayAutolinks()
- elif main == 'linkroutes': self.displayLinkRoutes()
+ def show_entity(self, main, show_date_id=True):
+ if main == 'l': self.displayRouterLinks(show_date_id)
+ elif main == 'n': self.displayRouterNodes(show_date_id)
+ elif main == 'a': self.displayAddresses(show_date_id)
+ elif main == 'm': self.displayMemory(show_date_id)
+ elif main == 'g': self.displayGeneral(show_date_id)
+ elif main == 'e': self.displayEdges(show_date_id)
+ elif main == 'c': self.displayConnections(show_date_id)
+ elif main == 'autolinks': self.displayAutolinks(show_date_id)
+ elif main == 'linkroutes': self.displayLinkRoutes(show_date_id)
elif main == 'log': self.displayLog()
def all_routers_entities(self):
has_nodes, nodes = self.has_nodes()
+
if has_nodes:
for node in nodes:
+ # We already have more than one node, just print the
+ # router id here instead of asking the router for it.
super(BusManager, self).set_client(node[6:])
parts = node.split("/")
- print ("Router ", parts[3])
- self.show_all()
+ print (str(datetime.utcnow()) + " UTC")
+ print(parts[3])
+ print ("")
+
+ # print the router id before printing all the details about
+ # the router
+ self.show_all(False)
+ print("")
print("")
else:
self.show_all()
def displayMain(self, identitys, opts):
main = opts.show
if opts.all_routers and main:
- print (str(datetime.now()))
+ print (str(datetime.utcnow()) + " UTC")
has_nodes, nodes = self.has_nodes()
if has_nodes:
+ # We already have more than one node, just print the
+ # router id here instead of asking the router for it.
for node in nodes:
super(BusManager, self).set_client(node[6:])
parts = node.split("/")
- print ("Router ", parts[3])
- self.show_entity(main)
+ print (parts[3])
Review comment:
and here too
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]