[ 
https://issues.apache.org/jira/browse/DISPATCH-1186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16978957#comment-16978957
 ] 

ASF GitHub Bot commented on DISPATCH-1186:
------------------------------------------

ganeshmurthy commented on pull request #623: DISPATCH-1186: Add option to get 
CSV formatting for qdstat tables
URL: https://github.com/apache/qpid-dispatch/pull/623#discussion_r348887033
 
 

 ##########
 File path: tests/system_tests_qdstat.py
 ##########
 @@ -73,25 +73,54 @@ def test_general(self):
         self.assertTrue("Mode                             standalone" in out)
         self.assertEqual(out.count("QDR.A"), 2)
 
+    def test_general_csv(self):
+        out = self.run_qdstat(['--general', '--csv'], r'(?s)Router 
Statistics.*Mode","Standalone')
+        self.assertTrue("Connections","1" in out)
+        self.assertTrue("Nodes","0" in out)
+        self.assertTrue("Auto Links","0" in out)
+        self.assertTrue("Link Routes","0" in out)
+        self.assertTrue("Router Id","QDR.A" in out)
+        self.assertTrue("Mode","standalone" in out)
+        self.assertEqual(out.count("QDR.A"), 2)
+
     def test_connections(self):
         self.run_qdstat(['--connections'], r'host.*container.*role')
         outs = self.run_qdstat(['--connections'], 'no-auth')
         outs = self.run_qdstat(['--connections'], 'QDR.A')
 
+    def test_connections_csv(self):
+        self.run_qdstat(['--connections', "--csv"], r'host.*container.*role')
+        outs = self.run_qdstat(['--connections'], 'no-auth')
+        outs = self.run_qdstat(['--connections'], 'QDR.A')
+
     def test_links(self):
         self.run_qdstat(['--links'], r'QDR.A')
         out = self.run_qdstat(['--links'], r'endpoint.*out.*local.*temp.')
         parts = out.split("\n")
         self.assertEqual(len(parts), 9)
 
+    def test_links_csv(self):
+        self.run_qdstat(['--links', "--csv"], r'QDR.A')
+        out = self.run_qdstat(['--links'], r'endpoint.*out.*local.*temp.')
+        parts = out.split("\n")
+        self.assertEqual(len(parts), 9)
+
     def test_links_with_limit(self):
         out = self.run_qdstat(['--links', '--limit=1'])
         parts = out.split("\n")
         self.assertEqual(len(parts), 8)
 
+    def test_links_with_limit_csv(self):
+        out = self.run_qdstat(['--links', '--limit=1', "--csv"])
+        parts = out.split("\n")
+        self.assertEqual(len(parts), 7)
+
     def test_nodes(self):
         self.run_qdstat(['--nodes'], r'No Router List')
 
+    def test_nodes_csv(self):
 
 Review comment:
   can we please add tests that test the csv output of --all-routers and 
--all-entities ?
 
----------------------------------------------------------------
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]


> qdstat to include csv output format
> -----------------------------------
>
>                 Key: DISPATCH-1186
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1186
>             Project: Qpid Dispatch
>          Issue Type: Improvement
>          Components: Management Agent
>    Affects Versions: 1.4.1
>            Reporter: Charles E. Rolke
>            Assignee: Ken Giusti
>            Priority: Major
>
> qdstat text output is difficult to manage after a cut and paste. For 
> instance, _qdstat -l_  shows some rows where the columns are blank. This 
> makes it difficult to reconstruct the original display given just the body 
> text. See _qdstat -l_ example in 
> [https://raw.githubusercontent.com/apache/qpid-dispatch/master/docs/books/user-guide/monitoring-using-qdstat.adoc]
> Even having a two-word column title "conn id" adds confusion.
> With a CSV format and quoted strings this table could be communicated through 
> email, chat, or Jira with authority. Readers would not have to guess about 
> which data goes in which columns.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to