axapi-module
v1.0.0
Published
Describe axapi-module here
Downloads
3
Readme
axapi-genie
axapi-genie is a JavaScript wrapper around A10's axapi. Genie can help you run tasks on multiple partitions in multiple devices by sequencing the asynchronous calls so you don't have to.
Installation
axapi-genie is a Node.js module available throught the npm registry. It can be installed using the npm install
command.
$ npm install --save axapi-genie
Usage
var axapi = require("axapi-genie");
// or
import DeviceScheduler from "axapi-genie";
const Genie = new DeviceSchedular(switchPartition);
DeviceSchedular
| Methods | Paramterers | | ------ | ------ | | constructor | switchPartition |
switchPartition(mgmtIP: string, partitionName: string): Object
| Params | Description | | ------ | ------ | | mgmtIP | Management IP for the device where the parition switching has to occur. | | partitionName | Name of the parition which has to be switched. |
| Returns | Description | | ------ | ------ | | response | Response object for /active-partition aXAPI endpoint. |
DeviceSchedular.enqueOperation(mgmtIP: string, partitionName: string, task: Function): Promise
enqueOperation
is a method available through DeviceSchedular
's instance to schedule a task based on the device mgmtIP
and partitionName
.
| Params | Description | | ------ | ------ | | mgmtIP | Management IP for the device where the parition switching has to occur. | | partitionName | Name of the parition which has to be switched. | | task | A function which contains a single or multiple calls to the aXAPI; returns a Promise object when called. |
All hail open source!