Macros list
A list of predefined Macros variables that can be used as templates for substituting attributes in the Preset configuration.
While creating or editing Preset or Action, it is possible to click on a macros field with the left mouse button to add it to the Code field while editing Preset in the Preset or Action form.
Below is a macro variables description along with examples to help you understand how it works.

View macros info
Clicking on the view icon opposite a specific Macros opens a modal window with Macros details. The following fields are available:
Name - Macros title
Example - an example value
Description - Description of Macros.

You can Close the Macros view modal window after review.
Macros variables description
onu.serial_number
The macros substitute the ONU serial number. Example:
ZTEGC1282BD3
onu.port_interface
The number of the port on which the ONU is located is substituted. Example:
gpon-olt_1/2/16
onu.qinq_free_vlan
Finds a free q-in-q vlan and substitutes its number.
vlan-smart-qinq ingress-port gpon-olt_1/12/5 cvlan 1074 to 1314 svlan 150
Example for the rule above:
1075
onu.onu_interface
Substitutes the name of the ONU interface. Example:
gpon-onu_1/2/16:2
onu_number
Finds a free ONU number on the port and substitute it. For example, there is a configured port
interface gpon-olt_1/5/3
no shutdown
linktrap disable
onu 1 type universal sn ZTEGC041AF2B
onu 1 profile line 1000mb remote standart
onu 3 type universal sn ZTEGC6961A2E
onu 3 profile line 1000mb remote standart
onu 4 type universal sn ZTEGC0F4D2C9
onu 4 profile line 1000mb remote standart
There is no ONU with the number 2. EasyPON will determine that the number 2 is free and substitutes it in the configuration.
2
onu_type.value
Substitutes the type selected by the user during registration. Example:
ZTE-F660-WIFI
onu.mac_address
Substitutes the Mac address of the ONU. Example:
00005e0053af
onu.mac_address | split:"."
0000.5e00.53af
onu.mac_address | split:":"
00:00:5e:00:53:af
onu.mac_address | split:"-"
00-00-5e-00-53-af
input_params.field_name
Request the user to input a value that will be inserted into the ONU configuration code before its registration. For example:
property description {{input_params.name}}
During registration, the user will be requested for the name, which will be placed while applying the onu.name
configuration.
Last updated