Skip to content

AutoPower is a project to automaticate the creation of IBM Datapower Gateway Multi-Protocol gateways

Notifications You must be signed in to change notification settings

cmardonespino/AutoPower

Repository files navigation

AutoPower

What is this?

AutoPower is a project to automate the creation of IBM Datapower Gateway Multi-Protocol gateways.
A Multi-Protocol Gateway is a middleware that exposes a backend (web service, database stored procedure, queues, etc.) through a frontend (tipically a RESTful or SOAP web service).
For now Autopower supports DB stored procedure as backend.

TODO Support other backends

How to

Requirements

To run AutoPower, you need to follow the following steps:

  • Clone this repository
  • Follow this instructions
  • Finally, in the root of the project, run:
gradle clean test

How it works?

AutoPower connects to a database using JDBC and extracts metadata of all stored procedures of one catalog and schema. Then, AutoPower create a template XML with the stored procedure data and inject in a folder for default of a Multi-Protocol Gateway. Finally, the folder generated is compresssed and are ready to import in DataPower Hardware.

Detailed steps

Autopower generates one file: procedures.json which contains a list of all stored procedures. Each stored procedure has a name and parameters. Parameters are grouped as: In, Out, InOut, Result and Unknown.

[
    {
        "name": "dm_cryptographic_provider_algorithms;0",
        "Result": [
            {
                "columnName": "@TABLE_RETURN_VALUE",
                "dataType": null,
                "typeName": "table"
            }
        ],
        "In": [
            {
                "columnName": "@ProviderId",
                "dataType": "INTEGER",
                "typeName": "int"
            }
        ]
    },
...

To generate procedures.json file, AutoPower work on a file created for us :

  • typeNames.json. This was created starting a extension of IBM DataPower called sql-execute for the mapping from SQL type names (according to IBM DataPower) to engine specific data types.
  • columnTypes.json. This was created to map out the stored procedure with the values of default to replace their for understandable names.

This you can found in MetaDBBuilder.groovy file.

To generate a template XML file, AutoPower use Hogan to inject stored procedures metadata in a DataPower object template. This you can found in RenderBuilder.groovy file.

TODO

What is next?

  • Add support for Sybase
  • Complementary README.md

About

AutoPower is a project to automaticate the creation of IBM Datapower Gateway Multi-Protocol gateways

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published