-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldpmgr] add mgmt ip to lldpd conf template, handle port description…
…/alias changes (#2396) * [lldpmgr] add mgmt ip to lldpd conf templte, handle port description/alias config Signed-off-by: Mykola Faryma <[email protected]> * fix typo * [config-engine] update test sample output lldpd.conf Signed-off-by: Mykola Faryma <[email protected]> * fix the log message * fix lldpd.conf.j2
- Loading branch information
Showing
3 changed files
with
26 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{% 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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
configure ports eth0 lldp portidsubtype local eth0 | ||
configure system ip management pattern 10.0.0.100 | ||
|