ol create module

Create an empty Module

A module contains one or multiple assets generated from a single data source.  

The output of the ol create module command is a metadata file - module.json - which contains the module configuration profile: It specifies the data source connector as given by the command's connector option and the data source connection properties. 

The file is listing the connector's unique connection properties. For example, the cics-cobol connector has a uri-map property, and the SAP connector has a router property. The connection properties are grouped on module.json in a default connection profile. You can manually create additional connection profiles.

Each module is dedicated to one data source and consequently has one connector. The following is an example of module.json with the cics-cobol connector and a default connection profile.

{
  "id": "020c6522-1ee5-49de-8722-aba917bc5c87",
  "moduleName": "cics1",
  "connectorName": "mf-cics-cobol",
  "connectorVersion": "1.36.0",
  "profiles": {
    "$default": {
      "baseUrl": "http://192.86.32.238",
      "port" : "12345",
      "uriMap" : "prod/latest",
      "codePage" : "CP037",
    }
  },
  "type": "mainFrameRpc",
  "dtVersion": "1.36.0"
}

The module.json file is located inside the parent module folder. The command creates this folder and gives it the name provided as an argument to the command. The module folder is the root folder for the module assets, and commands that add or modify the module contents are executed from within it.

Retrieving Connectors from Solution Center

After you run ol create module with a specified connector, OL-CLI will check if you have the connector installed on your local station. If you do not, OL-CLI will automatically download the connector from the OL Hub solution center. 

You can find which connectors are installed on your computer by running ol list connectors. If you want to know which connectors are available for download from the OL Hub Solution Center, execute ol list connectors -r.  

Syntax

ol create module MODULE_NAME [OPTIONS]

Arguments

MODULE_NAME

The module name

Options

--connector (required)

The connector name and version. If the connector version is omitted, the connector version defaults to the last version.

Examples

Creating a module

> ol create module demo_module --connector cics-cobol
$ ol create module demo_module --connector cics-cobol

With connector version

> ol create module demo_module --connector cics-cobol:1.0.1
$ ol create module demo_module --connector cics-cobol:1.0.1