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?

On Wed, Jan 27, 2016 at 10:19 AM, Susinda Perera <[email protected]> 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?
>
> Thanks
> Susinda
>
>
>
> On Tue, Jan 26, 2016 at 8:32 PM, Dulitha Wijewantha <[email protected]>
> 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       [email protected] <[email protected]>*
>> *  ~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
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to