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*
*  ~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
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to