N2SVCD Configuration - LuaApp
LUA Application Configuration
The N2SVCD LUA Application is a multi-purpose logic execution application which can execute LUA scripts chunks. It is primarily used by the N-Squared "PI Plus" licenced software solution.
A LUA script performs a sequence of operations, using the various protocols provided by the N2SVCD helper applications (e.g. database operations, FOX requests to NCC VWS nodes, etc.)
The LuaApp provides the raw LUA script execution functionality. It executes LUA scripts on behalf of other applications. To create useful provisioning commands, you will probably also require:
- The PIPlusApp to provide an MML/SOAP/JSON interface and load LUA scripts from disk.
- The separate
n2pippackage which contains a library of useful high-level script functions.
A sample configuration for the LUA App is:
<?xml version="1.0" encoding="utf-8"?>
<n2svcd>
...
<applications>
...
<application name="LUA" module="LuaApp">
<include>
<lib>../apps/lua/lib</lib>
</include>
<parameters>
<parameter name="lua_lib_path" value="../lua/lib/?.lua"/>
<parameter name="default_pi_app_name" value="PI"/>
<parameter name="default_fox_app_name" value="FOX"/>
<parameter name="default_db_app_name_smf" value="DB-SMF"/>
</parameters>
</application>
...
</application>
...
</n2svcd>
The application element attributes for a LUA Application instance are:
Attribute
Type
Description
name
String
[Required] A unique name for this application instance.
module
String
[Required]
LuaApp
include.lib
String
[Required]
../apps/lua/lib
parameters
Array
Array of
name = value Parameters for this Application instance.
.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.
(Default = No Library Path).
.default_pi_app_name
String
Name of a PI Application instance for
sending Oracle OCNCC PI requests from LUA scripts.
(Default = PI functionality is not avilable within LUA Scripts).
.default_fox_app_name
String
Name of a FOX Application instance for
sending Oracle OCNCC FOX requests from LUA scripts.
(Default = FOX functionality is not avilable within LUA Scripts).
.default_osd_app_name
String
Name of a OSD Application
instance for sending Oracle OCNCC OSD requests from LUA scripts.
(Default = OSD functionality is not avilable within LUA Scripts).
.default_db_app_name_smf
String
Name of a DB Application instance for
Oracle OCNCC SMF DB interaction from LUA scripts.
(Default = SMF DB is not avilable within LUA Scripts).