Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Seiteneigenschaften


...

Deutsch

Beschreibung:

Dieses Skript ändert das lokale Netzwerk unter Verwendung der Variable

context.vars.IP:

...

english

Liste der verwendeten Variablen:

VariableBeschreibung




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("
7
4", "1");
        intranet.setByOid("5", "256");
        intranet.setByOid("6", "0");

        intranet.setByOid("8", "123");
        intranet.setByOid("
4
9", "");
        networkList.addOrMerge(intranet);
    }
};

Add-in als JSON-Datei:

View file
namelocal-network.json
height150


Englisch

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("
5
1", "
256");
INTRANET");
        intranet.setByOid("2", context.vars.IP); // make sure this is set
        intranet.setByOid("
6
3", "255.255.255.0");

        intranet.setByOid("7", "1");
        intranet.setByOid("
8
4", "1");
        intranet.setByOid("5", "
123
256");

        intranet.setByOid("6", "0");
        intranet.setByOid("
9
8", "123");

        intranet.setByOid("9", "");
        networkList.addOrMerge(intranet);

   
}

};

Add-in as JSON file:

View file
namelocal-network.json
height150