6754635010
Jinja2 templates rendered using Python 3 interpreter, are required to conform with Python 3 new semantics. singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
13 lines
637 B
Django/Jinja
13 lines
637 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()|list)[0][0] %}
|
|
{% set ipv4 = (MGMT_INTERFACE.keys()|list)[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 %}
|
|
configure system hostname {{ DEVICE_METADATA['localhost']['hostname'] }}
|