stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imesh Gunaratne <im...@apache.org>
Subject Re: Describe cartridges in CLI
Date Wed, 20 May 2015 15:40:30 GMT
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 ?
>>>>
>>>>
>>>>    - type
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-type>
>>>>    - provider
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-provider1>
>>>>    - category
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-category>
>>>>    - host
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-host>
>>>>    - displayName
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-displayName>
>>>>    - description
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-description>
>>>>    - version
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-version>
>>>>    - multiTenant
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-multiTenant>
>>>>    - deployment
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-deployment1>
>>>>       -
>>>>
>>>>       baseDir
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-baseDir>
>>>>       -
>>>>
>>>>       dir
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition>
>>>>       - portMapping
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-portMapping1>
>>>>       - protocol
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-protocol>
>>>>       - port
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-port>
>>>>       - proxyPort
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-proxyPort>
>>>>    - iaasProvider
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-iaasProvider1>
>>>>       - type
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-type>
>>>>       - name
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-name>
>>>>       - className
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-className>
>>>>       - imageId
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-imageId>
>>>>       - provider
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-provider2>
>>>>       - identity
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-identity>
>>>>       - credential
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-credential>
>>>>       - property
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-property2>
>>>>       - networkInterfaces
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-networkInterfaces1>
>>>>          -
>>>>
>>>>          networkUuid
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-networkUuid>
>>>>          -
>>>>
>>>>          fixedIp
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-fixedIp>
>>>>          -
>>>>
>>>>          portUuid
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-portUuid>
>>>>          -
>>>>
>>>>          floatingNetworks
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-floatingNetworks1>
>>>>          -
>>>>
>>>>             name
>>>>             <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-name2>
>>>>             -
>>>>
>>>>             networkUuid
>>>>             <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-networkUuid2>
>>>>             -
>>>>
>>>>             floatingIP
>>>>             <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-floatingIP>
>>>>             - persistence
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-persistence1>
>>>>       -
>>>>
>>>>       isRequired
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-isRequired>
>>>>       - volumes
>>>>       <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-volumes1>
>>>>          -
>>>>
>>>>          id
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-id>
>>>>          -
>>>>
>>>>          size
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-size>
>>>>          -
>>>>
>>>>          device
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-device>
>>>>          -
>>>>
>>>>          removeOnTermination
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-removeOnTermination>
>>>>          -
>>>>
>>>>          mappingPath
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-mappingPath>
>>>>          -
>>>>
>>>>          snapshotId
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-snapshotId>
>>>>          -
>>>>
>>>>          volumeId
>>>>          <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition>
>>>>          - loadBalancingIPType
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-loadBalancingIPType>
>>>>    - metadataKeys
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-metadataKeys>
>>>>    - property
>>>>    <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Cartridge+Resource+Definition#id-4.1.0CartridgeResourceDefinition-property>
>>>>       - name
>>>>       - value
>>>>
>>>>
>>>>
>>>>
>>>> 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",
>>>>>>>
>>>>>>>
>>>>>>>    - "host":"php.stratos.org",
>>>>>>>
>>>>>>>
>>>>>>>    - "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
>>>>>> a <thilinad@wso2.com>nuruddhal@wso2.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> 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
>>>> a <thilinad@wso2.com>nuruddhal@wso2.com
>>>>
>>>
>>>
>>>
>>> --
>>> Rajkumar Rajaratnam
>>> Committer & PMC Member, Apache Stratos
>>> Software Engineer, WSO2
>>>
>>> Mobile : +94777568639
>>> Blog : rajkumarr.com
>>>
>>
>>
>>
>> --
>>
>> *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

Mime
View raw message