You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2019/07/15 18:12:02 UTC

[GitHub] [qpid-dispatch] ChugR commented on a change in pull request #527: DISPATCH-1374 - Added qdstat options --all-routers and --all-entities

ChugR commented on a change in pull request #527: DISPATCH-1374 - Added qdstat options --all-routers and --all-entities
URL: https://github.com/apache/qpid-dispatch/pull/527#discussion_r303567508
 
 

 ##########
 File path: tools/qdstat.in
 ##########
 @@ -57,23 +58,31 @@ def parse_args(argv):
     parser.add_option("-m", "--memory", help="Show Router Memory Stats",    action="store_const", const="m",   dest="show")
     parser.add_option("--autolinks", help="Show Auto Links",                action="store_const", const="autolinks",  dest="show")
     parser.add_option("--linkroutes", help="Show Link Routes",              action="store_const", const="linkroutes", dest="show")
+
+    parser.add_option("--all-routers", help="Show entities for all routers in network. Can also be used in combination with other options",  action="store_const", const="all_routers",  dest="all_routers")
+    parser.add_option("--all-entities", help="Show all router entities. Can be combined with --all-routers option", action="store_const", const="all_entities", dest="all_entities")
+
     parser.add_option("-v", "--verbose", help="Show maximum detail",        action="store_true", dest="verbose")
     parser.add_option("--log", help="Show recent log entries", action="store_const", const="log", dest="show")
 
     # This limit can be used to limit the number of output rows and
     # can be used in conjunction with options
     # like -c, -l, -a, --autolinks, --linkroutes and --log.
     # By default, the limit is not set, which means the limit is unlimited.
-
     parser.add_option("--limit", help="Limit number of output rows", type="int", default=None)
 
     opts, args = parser.parse_args(args=argv)
 
-    if not opts.show:
-        parser.error("You must specify one of these options: -g, -c, -l, -n, -a, -m, -h, --autolinks, --linkroutes, or --log.")
+    if opts.router and opts.all_routers:
+        parser.error("--all-routers cannot be combined with single router option -r " + opts.router)
 
-    return opts, args
+    if opts.all_entities and opts.show:
+           parser.error("--all-entities cannot be combined with specific entity option -" + opts.show)
+
+    if not opts.all_routers and not opts.all_entities and not opts.show:
+        parser.error("You must specify one of these options: -g, -c, -l, -n, -a, -m, -h, --autolinks, --linkroutes, --all-routers, --all-entities or --log.")
 
 Review comment:
   The new --all-entities switch would make a great default in the event of no other option. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org