Beschreibung:Dieses Skript zeigt, wie man mit Listen von Werten in Variablen umgeht. Liste der verwendeten Variablen:Add-in Code:
exports.main = function (config, context) {
var serials = context.vars.REMOTE_SERIALS.split(",");
var names = context.vars.REMOTE_NAMES.split(",");
serials.forEach(function (serial, index) {
var ikeKeysTable = config.getTableByOid("1.2.19.5.3");
var ikeKeysTableRow = ikeKeysTable.createNewRow();
ikeKeysTableRow.setByOids({
1: names[index],
6: "9",
7: "VPN3",
5: "9",
2: "serialNumber=" + serial,
3: "",
4: ""
});
ikeKeysTable.addOrMerge(ikeKeysTableRow);
});
};
|
---|
Addin Add-in als JSON-Datei: View file |
---|
name | variable_as_list.json |
---|
height | 150 |
---|
|
|