Versionen im Vergleich

Schlüssel

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


Seiteneigenschaften
Deutsch

Um zu verstehen, wie die LMC Add-Ins funktionieren, müssen wir uns ansehen, welche Elemente auf die Konfiguration eines Geräts angewendet werden.

Im Folgenden wird der Prozess beschrieben, in dem die Konfiguration verändert werden kann: 

  1. die Die ursprüngliche (oder Standard-) Konfiguration, die Konfiguration - sichtbar in der Detail-Konfiguration eines Gerätes - kann durch One-Time Add-Ins verändert wirdwerden.
  2. Die Software-Defined-Konfiguration (die SD-WAN, SD-LAN, SD-WLAN, SD-Security Konfiguration
  3. die Konfiguration wird durch Global/Network Add-Ins unter Verwendung des ooid-Ansatzes geändert, sichtbar in der Vorschau
  4. die Skriptzeilen werden auf dem Gerät ausgeführt
  5. ) - auch Smart-Konfiguration genannt - kann per Global oder Netzwerk Oid Add-in Skripte angepasst werden. Diese Änderungen sind in der Vorschau in der Detail-Konfiguration sichtbar.
  6. ScriptLine Skripte werden nach dem Rollout der Konfiguration auf dem Gerät ausgeführt und sind gegebenenfalls nicht in der LMC sichtbar.

Das Ergebnis der Schritte 1. und 2. wird als Konfiguration Das Ergebnis von 1-4 wird als Konfigurationsdaten an das Gerät gesendet. Die Skripte aus Schritt 43. werden auf dem Gerät mit dem Rollout als zusätzliche Aktion an das Gerät gesendet und auf diesem ausgeführt, nachdem die Konfigurationsdaten aus den Schritten 1. und 2. übernommen wurden.

Wie oben gezeigt, gibt es zwei Möglichkeiten, die Konfiguration eines Geräets mit Add-ins anzupassen.

  1. Per Object Id (Oid): Diese ändern die Konfigurationsdaten, die durch die vorherigen Konfigurationskonzepte bereitgestellt werden.
  2. Per ScriptLines: Diese werden an das Gerät selbst gesendet und dort ausgeführt.
  3. Per API-Methode: Senden von Anfragen an die UF-API für Konfigurationsänderungen für Unified Firewalls.
Operating Systemconfig.[...]ByOid(...)config.addScriptLine(...)ufAPI.Method
LCOS✅*
LCOS-SX✅*
LCOS-LX
LCOS-FX

* gerätespezifische Terminalsyntax


Object Id (Oid)

Jeder Konfigurationswert bzw. jede Tabelle wird durch eine maschinenlesbare Object Id, kurz oid, angegeben.

Die oid ist eine Folge von Zahlen, die durch Punkte getrennt sind (das folgende Beispiel bezeichnet die Cron-Tabelle im LCOS):

1.2.11.20

Um die Konfigurationsdaten zu ändern, können Sie entweder einzelne Werte (Skalare) oder Tabellen/Zeilen abrufen/einstellen.


Skalen

Skalen sind Einzelwerte in der Konfiguration.

Codeblock
languagejs
themeEclipse
exports.main = function (config, context) {
    var value = config.getScalarByOid("1.2.3.4.5.1");

    config.setScalarByOid("1.2.3.4.5.2", "test");
};


Tabellen

Tabellen können eine feste oder eine dynamische Anzahl von Zeilen haben.

Codeblock
languagejs
themeEclipse
exports.main = function (config, context) {
    var table = config.getTableByOid("1.2.3.4.5.3");
    var rows = table.getRows(); // array of rows

    var row = table.createNewRow(); //create a new empty row
    table.addOrMerge(row); // add/merge this row into table
};


Skript-Zeile

Um ein Skript auf dem Gerät auszuführen, nachdem die Konfiguration angewandt wurde, müssen Sie die Syntax addScriptLine verwenden:

Codeblock
languagejs
themeEclipse
exports.main = function (config, context) {
    config.addScriptLine("cd /2/3/4/5/2");
    config.addScriptLine("set 1 test");
};

Das Skript-Zeilen-Beispiel setzt den selben Wert wie das Skalen-Beispiel oben. Die erste Zahl wird weggelassen, ebenso wie der . (Punkt), der in / (Slash) übersetzt wird. In diesem Fall sehen wir die Werte nicht in der Detail-Konfiguration in der LMC bei der Vorschau, sondern in der Vorschau des Skripts, das auf dem Gerät ausgeführt werden soll.

Im Gegensatz zum Setzen von Werten über oid, können wir auch die menschenlesbare Notation verwenden, z.B. config.addScriptLine("cd /Setup/WAN/DSL-Broadband-Peers").


Englisch

To understand of how the LMC Add-Insins work, we need to consider which elements are applied to the configuration of a device.

The following is the process in which the configuration can be modified:

  1. the initial The existing (or default) configuration, configuration - visible in the detail configuration of a device - may be modified by One-Timetime Add-Insins or manual user changes.
  2. The Software Defined (the SD-WAN,SD-LAN,SD-WLAN, SD-Security configuration
  3. the configuration is modified by Global/Network Add-Ins using the ooid-approach, visible in the preview
  4. ) configuration - also called Smart configuration - may be modified by global or network Add-ins using OIDs.
    Those changes are visible via show preview in the detail configuration.
  5. The ScriptLines the script lines are executed on the device after the configuration roll out and may not be visible in the LMC.

The result of steps 1 -4 and 2 is sent as configruation configuration data to the device. The scripts from step 4. are 3 are sent as extra actions with a configuration roll out and will be executed on the device after the combined configuration data from step 1and 2 has been applied to the device.

As shown above, we have two ways of manipulating the configuration of a device with Add-ins.

  1. via Object Id (Oid): this modifies the configuration data provided by the previous config concepts.
  2. via ScriptLines: this is sent to and executed on the device itself.
  3. via API Method: send requests to the UF-API for configuration changes for Unified Firewalls.
Operating Systemconfig.[...]ByOid(...)config.addScriptLine(...)ufAPI.Method
LCOS✅*
LCOS-SX✅*
LCOS-LX
LCOS-FX

* device specific terminal syntax


Object Id (Oid)

Each configuration value or table is specified by a machine readable Object Id, short oid.
The oid is a sequence of numbers separated by dots (the following example denotes the LCOS cron-table):

1.2.11.20

To modify the configuration data you can either get/set single values (scalars) or tables/rows.


Scalars

Scalars are single values in the configuration.

Codeblock
languagejs
themeEclipse
exports.main = function (config, context) {
    var value = config.getScalarByOid("1.2.3.4.5.1");

    config.setScalarByOid("1.2.3.4.5.2", "test");
};


Tables

Tables can have a fixed or a dynamic number of rows.

Codeblock
languagejs
themeEclipse
exports.main = function (config, context) {
    var table = config.getTableByOid("1.2.3.4.5.3");
    var rows = table.getRows(); // array of rows

    var row = table.createNewRow(); //create a new empty row
    table.addOrMerge(row); // add/merge this row into table
};


Script-Line

To execute a script on the device after applying the configuration you need to use the addScriptLine syntax:

Codeblock
languagejs
themeEclipse
exports.main = function (config, context) {
    config.addScriptLine("cd /2/3/4/5/2");
    config.addScriptLine("set 1 test");
};

The scriptline example sets the same value as the scalar example above. The first number is ommitted as well as the . (full stop) which is translated to / (slash). In this case we will not see the values in the Detail configuration in the LMC when previewing the configuration, but in the preview of the script that will be executed on the device.

In contrast to setting of values via oid, we can also use the human readable notation, e.g. config.addScriptLine("cd /Setup/WAN/DSL-Broadband-Peers").

Seiteneigenschaften