a65e47fb62
* [lldpmgr] add mgmt ip to lldpd conf templte, handle port description/alias config Signed-off-by: Mykola Faryma <mykolaf@mellanox.com> * fix typo * [config-engine] update test sample output lldpd.conf Signed-off-by: Mykola Faryma <mykolaf@mellanox.com> * fix the log message * fix lldpd.conf.j2
12 lines
550 B
Django/Jinja
12 lines
550 B
Django/Jinja
{% if MGMT_INTERFACE %}
|
|
{# If MGMT port alias is available, use it for port ID subtype, otherwise use port name #}
|
|
{% set mgmt_port_name = MGMT_INTERFACE.keys()[0][0] %}
|
|
{% set ipv4 = MGMT_INTERFACE.keys()[0][1].split('/')[0] %}
|
|
{% if MGMT_PORT and MGMT_PORT[mgmt_port_name] and MGMT_PORT[mgmt_port_name].alias %}
|
|
configure ports eth0 lldp portidsubtype local {{ MGMT_PORT[mgmt_port_name].alias }}
|
|
{% else %}
|
|
configure ports eth0 lldp portidsubtype local {{ mgmt_port_name }}
|
|
{% endif %}
|
|
configure system ip management pattern {{ ipv4 }}
|
|
{% endif %}
|