N2SVCD Configuration - PIPlusApp

PI Plus Application Configuration

The N2SVCD PI Plus Application is the primary controller application used within the N-Squared "PI Plus" licenced software solution. The PI Plus application accepts requests from external clients, in one of the following protocols:

Each request will trigger execution of a script written in the popular LUA embedded scripting language. The PI Plus loads the script, and requests the LuaApp to perform the actual script execution.

Note that while the PI Plus Application provides the base protocol support for handling inbound requests, the actual LUA scripts and high-level API libraries used by provisioning commands are delived by the separate n2pip software package.

A sample PIPlusApp configuration entry is as follows:

<?xml version="1.0" encoding="utf-8"?>
<n2svcd>
  ...
  <applications>
    ...
    <application name="LUA" module="PIPlusApp">
      <include>
        <lib>../apps/lua/lib</lib>
      </include>
      <parameters>
        <parameter name="lua_script_dir" value="../../n2pip/lua/commands"/>
        <parameter name="lua_lib_path" value="../../n2pip/lua/lib/?.lua"/>
        <parameter name="rpc_type" value="mml,soap"/>
        <parameter name="mml_synstamp" value="1"/>
        <parameter name="mml_host" value="0.0.0.0"/>
        <parameter name="mml_port" value="4998"/>
        <parameter name="soap_host" value="0.0.0.0"/>
        <parameter name="soap_port" value="3999"/>
        <parameter name="default_lua_app_name" value="LUA"/>
      </parameters>
    </application>
    ...
  </application>
  ...
</n2svcd>

The application element attributes for a Tester Application instance are:

Attribute Type Description
name String [Required] A unique name for this application instance.
module String [Required] PIPlusApp
include.lib String [Required] ../apps/piplus/lib
parameters Array Array of name = value Parameters for this Application instance.
.lua_script_dir String The directory containing the LUA scripts available for execution.
Scripts must have the filename <command-name>.lua.
Special characters in the command name (e.g. =) will be replaced with underscores.
[Required]
.lua_lib_path String Additional paths to search when loading LUA libraries with the require statement.
This has the same rules as the LUA_PATH environment variable, e.g. must use ?.lua.
Multiple paths may be separated with a ; semicolon. This path will be added to the
LUA library path configured for the LuaApp.
(Default = No Library Path).
.rpc_type String Comma-separated list of enabled RPC client protocols: json, mml, soap.
[Required]
.mml_synstamp Integer Should the LUA MML server add SYNSTAMP parameters to MML responses, 0 = No, 1 = Yes.
Relevant only when rpc_type includes mml.
(Default = 0).
.mml_host String IPv4 Host Name or A.B.C.D IPv4 Address on which to listen for MML requests.
Relevant only when rpc_type includes mml.
(Default = 0.0.0.0).
.mml_port Integer IPv4 Port Number on which to listen for MML requests.
Relevant only when rpc_type includes mml.
(Default = 4999).
.soap_host String IPv4 Host Name or A.B.C.D IPv4 Address on which to listen for SOAP requests.
Relevant only when rpc_type includes soap.
(Default = 0.0.0.0).
.soap_port Integer IPv4 Port Number on which to listen for SOAP requests.
Relevant only when rpc_type includes soap.
(Default = 3999).
.json_host String IPv4 Host Name or A.B.C.D IPv4 Address on which to listen for JSON-RPC requests.
Relevant only when rpc_type includes json.
(Default = 0.0.0.0).
.json_port Integer IPv4 Port Number on which to listen for JSON-RPC requests.
Relevant only when rpc_type includes json.
(Default = 7007).
.default_lua_app_name String Name of a LUA Application instance to perform the LUA script execution.
[Required]
.trace_file_messages Integer Set to 1 to enable logging of all PI+ requests and response values to trace files.
(Default = 0).
.trace_file_dir String Directory in which PI+ trace files will be written.
(Default = /var/log/n2svcd).

Request/Response (MML & SOAP)

The MML and SOAP server is designed to be byte-for-byte compatible with the MML and SOAP interfaces provided by the Oracle NCC Provisioning Interface (PI) server. This allows the PI Plus to use the LUA Application as a compatible upgrade/replacement component for advanced NCC provisioning functions when the NCC PI behavior does not match requirements.

Request/Response (JSON-RPC)

The JSON RPC interface is provided as an alternative LUA Script Execution mechanism. The supported JSON-RPC methods are: