My responses inline.

On Wed, Jan 27, 2016 at 2:16 PM, Chanaka Fernando <chana...@wso2.com> wrote:

> Hi Dulitha,
>
> AFAIU, we can use this tool to write our synapse configurations in a way
> that we write a code in a scripting language. This tool will convert the
> script into a synapse configuration. In that perspective, this is like
> another DSL, but here we need to build the synapse configuration ans use
> them rather than directly deploying these into the server. Is that the use
> case or something else?
>

​There are couple of other uses with the script. One is to create the
artifact.xml which is used by the dev studio. Also the CAR project POM can
also be genereted using the script. ​



>
> On Wed, Jan 27, 2016 at 10:19 AM, Susinda Perera <susi...@wso2.com> wrote:
>
>> Hi Dulitha
>>
>> Can you also share the spreadsheet which has the sample configs? Also i
>> think it would be good if we can read configs from local file. Can we use
>> this script to implement something like 'Import endpoint from
>> File/spreadsheet' ? Is that the use case here?
>>
>
I'll attach the script that does the spreadsheet to this. But that feature
is isolated from the w-python itself. I created it to provide a generation
interface. ​



>
>> Thanks
>> Susinda
>>
>>
>>
>> On Tue, Jan 26, 2016 at 8:32 PM, Dulitha Wijewantha <duli...@wso2.com>
>> wrote:
>>
>>> Hi guys,
>>> I wrote a bunch of script tools that can be used to easily work with ESB
>>> artifacts. For example - if we want to generate Endpoint definitions based
>>> of a Google Spreadsheet we can use the w-python lib[1].
>>>
>>> Below is how a http endpoint definition can be generated.
>>>
>>> generator = wpy.ArtifactGenerator()
>>> data = {
>>>             'name' : "id",
>>>             'type' : "http",
>>>             'http' : True,
>>>             'http_props': {
>>>                 'uri': "/.id",
>>>                 'method': "HEAD GET"
>>>             }
>>>         }
>>> artifact = generator.generateEndpoint(data)
>>>
>>>
>>> There is also another interesting feature I built for this. Below
>>> snippet can be used to generate the artifact.xml based on a configuration
>>> directory. This will be useful when the directory needs to be open from Dev
>>> Studio. I also added the feature to generate the car POM based off the
>>> directory.
>>> data = {
>>> 'parentGroupId' : "com.example.esb",
>>> 'parentArtifactId' : "gateway",
>>> 'parentVersion' : "1.0.0",
>>> 'groupId' : "com.example.esb",
>>> 'artifactId' : "gateway-car",
>>> 'version' : "1.0.0",
>>> 'name' : "gateway-car",
>>> 'description' : "gateway-car",
>>> 'serverRole' : "EnterpriseServiceBus",
>>> 'resourceVersion' : "1.0.0",
>>> 'resourceFileType' : "xml"
>>> }
>>> directory = "configs"
>>> artifactTu = generator.generateArtifact(data, directory)
>>> artifact = artifactTu
>>> artifact.setName("artifact")
>>> artifact.setType("POM")
>>> generator.hold(artifact)
>>>
>>> [1] - https://github.com/dulichan/wpython
>>>
>>>
>>> Cheers~
>>>
>>> --
>>> Dulitha Wijewantha (Chan)
>>> Software Engineer - Mobile Development
>>> WSO2 Inc
>>> Lean.Enterprise.Middleware
>>>  * ~Email       duli...@wso2.com <duli...@wso2mobile.com>*
>>> *  ~Mobile     +94712112165 <%2B94712112165>*
>>> *  ~Website   dulitha.me <http://dulitha.me>*
>>> *  ~Twitter     @dulitharw <https://twitter.com/dulitharw>*
>>>   *~Github     @dulichan <https://github.com/dulichan>*
>>>   *~SO     @chan <http://stackoverflow.com/users/813471/chan>*
>>>
>>
>>
>>
>> --
>> *Susinda Perera*
>> Software Engineer
>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL)
>> Mobile:(+94)716049075
>> Blog: susinda.blogspot.com
>> WSO2 Inc. http://wso2.com/
>> Tel : 94 11 214 5345 Fax :94 11 2145300
>>
>>
>
>
> --
> Thank you and Best Regards,
> Chanaka Fernando
> Senior Technical Lead
> WSO2, Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 773337238
> Blog : http://soatutorials.blogspot.com
> LinkedIn:http://www.linkedin.com/pub/chanaka-fernando/19/a20/5b0
> Twitter:https://twitter.com/chanakaudaya
>
>
>
>
>


-- 
Dulitha Wijewantha (Chan)
Software Engineer - Mobile Development
WSO2 Inc
Lean.Enterprise.Middleware
 * ~Email       duli...@wso2.com <duli...@wso2mobile.com>*
*  ~Mobile     +94712112165*
*  ~Website   dulitha.me <http://dulitha.me>*
*  ~Twitter     @dulitharw <https://twitter.com/dulitharw>*
  *~Github     @dulichan <https://github.com/dulichan>*
  *~SO     @chan <http://stackoverflow.com/users/813471/chan>*
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to