stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manula Chathurika Thantriwatte <manu...@wso2.com>
Subject Re: Service Group Definition JSON Format
Date Fri, 07 Nov 2014 15:20:31 GMT
Hi Isuru,

No, Still it didn't solve the issue.

@Udara, Currently we get Partitions, Deployment Polices etc... as JSON
array. I have done the test with Service Definition Group as JSON array and
it works successful with the deserialization. IMHO is having JSON array for
the Service Group Definition is good for consistency. But change this in
the current movement might get some issues. WDYT ?

Thanks !


On Fri, Nov 7, 2014 at 8:34 PM, Udara Liyanage <udara@wso2.com> wrote:

> Hi Manula,
>
> Why should we add [] brackets if there is only one ServiceGroup?
>
> On Fri, Nov 7, 2014 at 8:28 PM, Isuru Haththotuwa <isuruh@apache.org>
> wrote:
>
>> Hi Manula,
>>
>> Sorry if I'm missing something, but isn't this solved by the workaround
>> Udara has mentioned in the mail thread [1] ?
>>
>> [1]. Json response shows arrays as string when there are single value
>>
>> On Fri, Nov 7, 2014 at 8:10 PM, Manula Chathurika Thantriwatte <
>> manulac@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> Currently we get the service group definition using the GET curl command
>>> as follows.
>>>
>>> {
>>>    "serviceGroup":{
>>>       "cartridges":[
>>>          "tomcat"
>>>       ],
>>>       "dependencies":{
>>>          "startupOrders":[
>>>             "group.group1,cartridge.tomcat"
>>>          ],
>>>          "terminationBehaviour":"terminate-dependents"
>>>       },
>>>       "name":"group3",
>>>       "subGroups":[
>>>          "group1"
>>>       ]
>>>    }
>>> }
>>>
>>> But when we used describe partitions and describe deployment policy
>>> commands in CLI we get the output as the JSON array. IMO is above service
>>> group definition should also be follow the same structure like follows.
>>>
>>> {
>>>    "serviceGroup":[{
>>>       "cartridges":[
>>>          "tomcat"
>>>       ],
>>>       "dependencies":{
>>>          "startupOrders":[
>>>             "group.group1,cartridge.tomcat"
>>>          ],
>>>          "terminationBehaviour":"terminate-dependents"
>>>       },
>>>       "name":"group3",
>>>       "subGroups":[
>>>          "group1"
>>>       ]
>>>    }
>>>  ]
>>> }
>>>
>>> Any thoughts of this ? Because according to the first JSON format I'm
>>> unable to deserialized the JSON using the ServiceGroupDefinition bean class.
>>>
>>> Thanks !
>>>
>>> --
>>> Regards,
>>> Manula Chathurika Thantriwatte
>>> Software Engineer
>>> WSO2 Inc. : http://wso2.com
>>> lean . enterprise . middleware
>>>
>>> email : manulac@wso2.com / manula@apache.org
>>> phone : +94 772492511
>>> blog : http://manulachathurika.blogspot.com/
>>>
>>> --
>>> <http://manulachathurika.blogspot.com/>
>>> <http://manulachathurika.blogspot.com/>
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> <http://manulachathurika.blogspot.com/>
>>> +94 716 358 048 <http://manulachathurika.blogspot.com/>*
>>> <http://wso2.com/>*
>>>
>>>
>>> * <http://wso2.com/>*
>>>
>>>
>>>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Mime
View raw message