2018-03-20 13:25:31 -05:00
|
|
|
{% if MGMT_INTERFACE %}
|
2019-01-15 13:27:46 -06:00
|
|
|
{# If MGMT port alias is available, use it for port ID subtype, otherwise use port name #}
|
2020-09-28 22:21:46 -05:00
|
|
|
{% set mgmt_port_name = (MGMT_INTERFACE.keys()|list)[0][0] %}
|
|
|
|
{% set ipv4 = (MGMT_INTERFACE.keys()|list)[0][1].split('/')[0] %}
|
2019-01-15 13:27:46 -06:00
|
|
|
{% 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 %}
|
2019-01-30 03:05:36 -06:00
|
|
|
configure system ip management pattern {{ ipv4 }}
|
2018-03-20 13:25:31 -05:00
|
|
|
{% endif %}
|
2019-02-12 03:40:51 -06:00
|
|
|
configure system hostname {{ DEVICE_METADATA['localhost']['hostname'] }}
|
2020-10-26 12:38:09 -05:00
|
|
|
{# pause lldpd operations until all interfaces are well configured, resume command will run in lldpmgrd #}
|
|
|
|
pause
|