CA UIM - Node.js Probe Utility interface.
This package has been designed to replace
nodeuim
.
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i @uim/pu
# or
$ yarn add @uim/pu
const { pu, PDS_VOID } = require("@uim/pu");
async function main() {
const nimSoft = pu({
login: "adminitrator",
password: "NimSoft!01",
path: "/opt/nimsoft/bin/pu"
});
const response = await nimSoft("getrobots", [PDS_VOID, PDS_VOID]);
console.log(JSON.stringify(response, null, 4));
}
main().catch(console.error);
Constant variable equal to ''
. Use this when you want to enter empty Probe Utility argument (if not entered, the call will timeout).
Instanciate/Create a new ProbeUtility gateway.
Available options are:
interface PUOptions {
login: string;
password: string;
path: string;
debug?: boolean;
timeout?: number;
}
Send a new request to Probe Utility. fullAddr can be callback name or the full NimSoft ADDR, ex:
hub/getrobots
domain/hub/robot/hub/getrobots
NimAddr is a class implementation to build NimSoft Addr.
const { NimAddr } = require("@uim/pu");
const DEFAULT_ADDR = new NimAddr("domain/hub/robotname");
const test = new NimAddr("controller/get_info", DEFAULT_ADDR);
console.log(test.toString()); // domain/hub/robotname/controller
console.log(test.callback); // get_info
The implementation support /
and .
seperator. Example:
const DEFAULT_ADDR = new NimAddr("domain.hub.robotname");
MIT