Description:

This script changes the local network using a variable  context.vars.IP :

List of used variables:

VariableDescription




Add-in code:

/**
 * @param {Config} config
 * @param {Context} context
 * Do not edit this comment or parameter types. Required for code suggestions
*/
exports.main = function (config, context) {



    // Required variables:
    // IP = string

    if (context.device.type.indexOf("ISG-1000") >= 0) {
        // /Setup/TCP-IP/Network-list/
        var networkList = config.getTableByOid("1.2.7.30");
        var intranet = networkList.createNewRow();
        intranet.setByOid("1", "INTRANET");
        intranet.setByOid("2", context.vars.IP); // make sure this is set
        intranet.setByOid("3", "255.255.255.0");
        intranet.setByOid("7", "1");
        intranet.setByOid("4", "1");
        intranet.setByOid("5", "256");
        intranet.setByOid("6", "0");
        intranet.setByOid("8", "123");
        intranet.setByOid("9", "");
        networkList.addOrMerge(intranet);
    }
};

Add-in as JSON file:

local-network.json