Skip to content

Registration template macro creation

Tip

If you are unfamiliar with the Macros system, a thorough guide and descriptions of all the fields and parameters can be found in the Macros section of this documentation.

Attention

There can be only one registration macro for one model, otherwise you will get an error.

Common tab

  1. Name: Reg for C-Data FX16xx FW3
  2. Enabled: Yes
  3. Device vendor: for the purpose of this demonstration we use the vendor C-Data
  4. Device models: C-Data FD1616 (FW3), C-Data FD1608 (FW3)
Example

Parameters tab

Select a C-Data device and the ONT you want to register from the drop-downs at the top of the page.

Add a new Parameter.

  1. Property: line
  2. Property display name: Line profile
  3. Required: True
  4. Parameter type: Dropdown list from variables
  5. Value source: data.pon_profiles.line

    Sample profiles

    Info

    The profiles you may receive from your device may differ.

    If that's the case, make the required changes to your macro.

  6. Item name: ${item.name} (${item.id})

  7. Item filter: item.id != 0

Add another Parameter.

  1. Property: srv
  2. Property display name: Service profile
  3. Required: True
  4. Parameter type: Dropdown list from variables
  5. Value source: data.pon_profiles.srv

    Sample profiles

    Info

    The profiles you may receive from your device may differ.

    If that's the case, make the required changes to your macro.

  6. Item name: ${item.name} (${item.id})

  7. Item filter: item.id != 0

Template tab

Select a C-Data device and the ONT you want to register from the drop-downs at the top of the page.

Template block:

Paste the following code:

interface gpon 0/0
ont add {{iface._port}} {{free.first}} sn-auth {{ont._serial_hex}} ont-lineprofile-id {{params.line.id}} ont-srvprofile-id {{params.srv.id}}

If the macro worked, you should see a similar output in the Live result field.