May be in a later release we can add functionality to specify the output format. We need to find a way to print a JSON in a tabular format.

Thanks

On Wed, May 20, 2015 at 7:52 PM, Chamila De Alwis <chamilad@wso2.com> wrote:
Why not give an option to decide output format?


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Wed, May 20, 2015 at 6:37 PM, Pubudu Gunatilaka <pubudug@wso2.com> wrote:
+1 for the proposed format. 

On Wed, May 20, 2015 at 6:21 PM, Rajkumar Rajaratnam <rajkumarr@wso2.com> wrote:
+1 for JSON format. Table format is very complex for cartridges.

Thanks.

On Wed, May 20, 2015 at 6:12 PM, Anuruddha Liyanarachchi <anuruddhal@wso2.com> wrote:
Hi, 

If we display data in tabular format we need tables as follow. 

Foreach IaaS: 
Table 1 : Properties
Table 2 : Network Interfaces
Table 3 : Floating Networks

Foreach persistence
Table 1 : Volumes
 
All the following fields also required to display. Therefore I think displaying the data in JSON format is better.
WDYT ?




On Wed, May 20, 2015 at 3:09 PM, Gayan Gunarathne <gayang@wso2.com> wrote:
IMO current display is suitable with the CLI as it is console application.We can add the missing data to the table accordingly.
Also it is better to maintain the same format across all the CLI functionally.

Thanks,
Gayan


On Wed, May 20, 2015 at 1:33 PM, Anuruddha Liyanarachchi <anuruddhal@wso2.com> wrote:
Hi Devs,

In the CLI, "describe-cartridge" displays data in following format which doesn't show the network-interfaces or properties defined in the cartridge.


-------------------------------------
Cartridge Information:
-------------------------------------
Type: php
Category: framework
Name: php
Description: php Cartridge
Version: 7
Multi-Tenant: false
Hostname: php.stratos.org
-------------------------------------
IaaS Providers:
-------------------------------------
+-----------+------------------------------------------------+
| Type      | Image ID                                       |
+-----------+------------------------------------------------+
| mock      | RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e |
+-----------+------------------------------------------------+
| openstack | RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e |
+-----------+------------------------------------------------+
-------------------------------------

 Instead of displaying the data like below shall we print the details in JSON format so that users are able to view more information. WDYT ?

{
  • "type":"php",
  • "category":"framework",
  • "provider":"apache",
  • "displayName":"php",
  • "description":"php Cartridge",
  • "version":"7",
  • "multiTenant":false,
  • "loadBalancingIPType":"private",
  • "portMapping":[
    1. {
      • "protocol":"http",
      • "port":80,
      • "proxyPort":8280
      },
    2. {
      • "protocol":"tcp",
      • "port":22,
      • "proxyPort":8222
      }
    ],
  • "iaasProvider":[
    1. {
      • "type":"mock",
      • "imageId":"RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
      • "property":[
        1. {
          • "name":"instanceType",
          • "value":"RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
          },
        2. {
          • "name":"keyPair",
          • "value":"reka"
          },
        3. {
          • "name":"securityGroups",
          • "value":"default"
          }
        ]
        ,
      • "networkInterfaces":[
        1. {
          • "networkUuid":"b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
          }
        ]
      },
    2. {
      • "type":"openstack",
      • "imageId":"RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
      • "property":[
        1. {
          • "name":"instanceType",
          • "value":"RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
          },
        2. {
          • "name":"keyPair",
          • "value":"reka"
          },
        3. {
          • "name":"securityGroups",
          • "value":"default"
          }
        ]
        ,
      • "networkInterfaces":[
        1. {
          • "networkUuid":"b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
          }
        ]
      }
    ]
}
--
Thanks and Regards,
Anuruddha Lanka Liyanarachchi
Software Engineer - WSO2
Mobile : +94 (0) 712762611
Tel      : +94 112 145 345



--

Gayan Gunarathne
Technical Lead
WSO2 Inc. (http://wso2.com)
email  : gayang@wso2.com  | mobile : +94 766819985
 




--
Thanks and Regards,
Anuruddha Lanka Liyanarachchi
Software Engineer - WSO2
Mobile : +94 (0) 712762611
Tel      : +94 112 145 345



--
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2

Mobile : +94777568639



--
Pubudu Gunatilaka
Software Engineer
WSO2, Inc.: http://wso2.com
lean.enterprise.middleware
mobile:  +94 77 4078049




--
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos