Seiteneigenschaften |
---|
...
Konfigurations-Variablen
Allgemein
...
Fügt einen String zu einer Ausgabe hinzu.
Skalar
...
Tabelle
...
Zeile
...
Ausschließen/Einbeziehen
...
Kontext-Variablen
Kontext-Variablen sind schreibgeschützt.
DSC
...
Netzwerk
...
Gerät
...
Standort
...
Config Variables
General
Type | Method | Description |
---|---|---|
void | config.resetConfigToDefault() | Revert all changes to the default configuration. |
void | config.addScriptLine(line: string) | Adds the line to the script that is executed on the device. |
void | config.infoLog(msg: string) | Prints the message into the device log within the LMC with log level info . |
void | config.infoLog(key: string, msg: string) | Prints the message into the devicelog with the log key within the LMC with log level info . |
void | config.warnLog(msg: string) | Prints the message into the device log within the LMC with log level warn . |
void | config.abort(msg: string) | Aborts config building, and log the message into the device log within the LMC with log level error . |
OutputStream | config.createOutputStream() | Creates a new standard output stream for strings. (Only supported for OneTimeScripts) |
OutputStream | config.createOutputStream(key: string) | Creates a new output stream for strings. (Only supported for OneTimeScripts) |
void | OutputStream.addLine(key: string) | Adds a string to the output stream. |
Scalar
Type | Method | Description |
---|---|---|
string | config.getScalarByOid(oid) | Returns the value of the given scalar via oid. |
string | config.getScalarByAlias(alias) | Returns the value of the given scalar via alias. |
string | config.setScalarByOid(oid, value) | Sets scalar value (returns old value) |
string | config.setScalarByAlias(alias, value) | Sets scalar value (returns old value) |
string | config.resetScalarToDefaultByOid(oid); | Reset the given scalar via oid to the default configuration value. |
string | config.resetScalarToDefaultByAlias(alias); | Reset the given scalar via alias to the default configuration value. |
Table
Type | Method | Description |
---|---|---|
Table | config.getTableByOid(oid: string); | Get the Table object via oid. |
Table | config.getTableByAlias(alias: string); | Get the Table object via alias. |
List<Row> | table.getRows(); | Get all rows of the Table object. |
Row | table.getRowBySingleIndex(indexValue: string); | Get a row index, if it has only one index. |
List<Row> | table.getRowsByOid(oid: string, value: string); | Get rows matching the value value in the column oid. |
List<Row> | table.getRowsByAlias(alias:string, value:string); | Get rows matching the value valuein the column alias. |
List<Row> | table.getRowsByOids(Map<oid, value>); | Get all rows matching all search criteria. |
List<Row> | table.getRowsByAliases(Map<alias, value>); | Get all rows matching all search criteria, using aliases. |
Row | table.getFirstRowByOid(oid, value); | Return first matching row via oid. |
Row | table.getFirstRowByAlias(alias, value); | Return first matching row via alias |
Row | table.getFirstRowByOids(Map<oid, value>); | Get first matching row matching via oid. |
Row | table.getFirstRowByAliases(Map<alias, value>); | Get first matching row matchign via aliases |
Row | table.createNewRow(); | Create a new empty row. |
Row | table.addOrMerge(row) | If the index matches a row the row is updated, otherwise the row is added. |
boolean | table.resetToDefault(); | Reset the table to the default configuration. |
Row
Type | Method | Description |
---|---|---|
string | row.getByOid(oid); | Get value via oid. |
string | row.getByAlias(alias); | Get value via alias. |
string | row.setByOid(oid, value); | Set value via oid. |
string | row.setByAlias(oid, value); | Set value via alias. |
void | row.setByOids(Map<oid, value>); | Set multiple values via oid. |
void | row.setByAliases(Map<alias, value>); | Set multiple values via aliases. |
Row | row.addByOid(oid, value); | Like setByOid but returns the row for fluent API usage. |
Row | row.addByAlias(alias, value); | Like setByAlias but returns the row for fluent API usage. |
boolean | row.delete(); | Delete the row from the table. |
Exclude/Include
Type | Method | Description |
---|---|---|
void | config.excludeByOid(oid: string) | Do not write element(s) that match oid filter to the device, e.g. config.excludeByOid("1.2.9.13"); |
void | config.excludeByOids(oids: List<string>) | Do not write element(s) that match oid filter to the device, e.g. config.excludeByOids(["1.2.9.17", "1.2.9.18", "1.2.11.*"]); |
void | config.includeByOid(oid: string) | Only write the element(s) matching the oid filter to the device |
void | config.includeByOids(oids: List<string>) | Only write the element(s) matching the oid filter to the device (Note: the include calls do not stack!) |
Context Variables
Context variables are read only.
DSC
Type | Method | Description |
---|---|---|
boolean | context.dsc.existsScalarByOid(oid) | Checks whether the given scalar exists by oid. |
boolean | context.dsc.existsScalarByAlias(alias) | Checks whether the given scalar exists by alias. |
boolean | context.dsc.existsTableByOid(oid) | Checks whether the given Table exists via oid. |
boolean | context.dsc.existsTableByAlias(alias) | Checks whether the given Table exists via alias. |
Network
Type | Method | Description |
---|---|---|
<SsidObj>[] | context.network.ssids | Map of SSID objects indexed by its name (usage see next lines). |
string[] | context.network.ssids[<SSID>].ifcNumber | List with interface numbers for SSID. |
string[] | context.network.ssids[<SSID>].ifcName | List with interface names for SSID. |
string | context.network.ssids[<SSID>].radiusName | Radius name for SSID. |
string | context.network.ssids[<SSID>].name | The SSID (always same as ) |
string | context.network.name | Network name |
string | context.network.configName | Network configuration name |
string | context.network.configNameLong | Long network configuration name |
string | context.network.ifcNumber | Network interface number |
string | context.network.tag | Network Vlan Id |
string | context.network.vpnGateway | Central Site Gateway address |
string[] | context.network.vpnConnections | List of peer ident names for vpn connetions |
<Variables> | context.network.vpnSiteVars[<SubnetGroupConfigName> or <PeerIdent>] | User variables for vpn location |
string | context.network.vpnCredentials[<SubnetGroupConfigName> or <PeerIdent>].remote.identity | VPN remote identity for site |
string | context.network.vpnCredentials[<SubnetGroupConfigName> or <PeerIdent>].remote.psk | VPN remote psk for site |
string | context.network.vpnCredentials[<SubnetGroupConfigName> or <PeerIdent>].local.identity | VPN local identity for site |
string | context.network.vpnCredentials[<SubnetGroupConfigName> or <PeerIdent>].local.psk | VPN local psk for site |
string | context.network.vpnRemoteData[peerName].subnetMask | VPN remote subnetmask for site |
string | context.network.vpnRemoteData[peerName].subnetId | VPN remote subnet ID for site |
boolean | context.network.isCentralGateway | true if vpn & gateway & central-site |
boolean | context.network.isBranchGateway | true if vpn & gateway & not central-site |
number | context.network.gatewayNumber | gateway number |
<DevRolObj> | context.network.deviceRoles | return device roles object (usage see next 2 lines) |
boolean | context.network.deviceRoles.contains(role string) | Check if device has role gateway with GW, access point with AP or switch with SW |
string[] | context.network.deviceRoles.list() | Get list of device roles, e.g. {"GW", "AP", "SW"} |
Device
Type | Method | Description |
---|---|---|
boolean | context.device.isGateway | true if device is gateway |
boolean | context.device.isAccesspoint | true if device is accesspoint |
boolean | context.device.isSwitch | true if device is switch |
number | context.device.firmwareVersion | Firmware version without build number as double value |
number | context.device.firmwareVersionWithBuild | Firmware version with build number as double value |
string | context.device.firmwareVersionString | Firmware version as string |
Object | context.device.firmwareVersionObject | Firmware version as object: {major: number, minor: number, patch: number} |
string | context.device.type | Device type string |
<Features> | context.device.features | Feature object (usage see next line) |
boolean | context.device.features.supports(int) | Checks whether a feature with given ID is supported, e.g. 43 for feature LAN bridge |
string | context.device.macAddress | MAC Address for LAN interface. (Added April 2022. Requires device reboot before use.) |
string | context.device.serialNumber | Serial number of the device (Added April 2022. Requires device reboot before use.) |
Location
Type | Method | Description |
---|---|---|
string | context.location.configName | Location configuration name |
string | context.location.subnetId | Network ID at location, for example 192.168.1.0 |
string | context.location.subnetMask | Subnet mask |
string | context.location.gatewayIp | Routing IP address to Central Site, if device Role is Gateway, else null |
string[] | context.location.gatewayIps | Returns IP addresses of all location gateways. |
...