Skip to content

Commit 4e6845d

Browse files
Feat(eos_designs): Expose local interface name to Context for interface_descriptions templates (#6717)
1 parent b05c835 commit 4e6845d

37 files changed

Lines changed: 131 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ description_prefix }}_{{ peer }}_{{ peer_interface }}_{{ adapter_description }}
1+
{{ description_prefix }}_{{ interface }}_{{ peer }}_{{ peer_interface }}_{{ adapter_description }}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% if peer_interface is arista.avd.defined %}
22
{{ peer }}-{{ peer_interface }}
33
{% else %}
4-
{{ description_prefix }}_{{ peer }}_{{ adapter_description }}_{{ adapter_port_channel_description }}_{{ adapter_port_channel_id }}
4+
{{ description_prefix }}_{{ interface }}_{{ peer }}_{{ adapter_description }}_{{ adapter_port_channel_description }}_{{ adapter_port_channel_id }}
55
{% endif %}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ description_prefix }}_EVPN_Overlay_Peering_{{ type | upper }}
1+
{{ description_prefix }}_{{ interface }}_EVPN_Overlay_Peering_{{ type | upper }}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ description_prefix }}_VTEP_VXLAN_Tunnel_Source_{{ type | upper }}
1+
{{ description_prefix }}_{{ interface }}_VTEP_VXLAN_Tunnel_Source_{{ type | upper }}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ description_prefix }}_MLAG_PEER_{{ mlag_peer }}_Eth{{ mlag_interfaces[0] | regex_findall("\d") | join }}_Eth{{ mlag_interfaces[1] | regex_findall("\d") | join }}_Po{{ mlag_port_channel_id }}
1+
{{ description_prefix }}_{{ interface }}_MLAG_PEER_{{ mlag_peer }}_Eth{{ mlag_interfaces[0] | regex_findall("\d") | join }}_Eth{{ mlag_interfaces[1] | regex_findall("\d") | join }}_Po{{ mlag_port_channel_id }}

ansible_collections/arista/avd/extensions/molecule/ansible_only/custom_templates/interface_descriptions/underlay/ethernet-interfaces.j2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
{{ link.main_interface_wan_carrier }}
44
{%- endif -%}
55
{%- if link.type is arista.avd.defined('underlay_p2p') -%}
6-
{{ description_prefix }}_P2P_LINK_TO_{{ link.peer | upper }}_{{ link.peer_interface }}
6+
{{ description_prefix }}_{{ link.interface }}_P2P_LINK_TO_{{ link.peer | upper }}_{{ link.peer_interface }}
77
{%- elif link.type is arista.avd.defined('underlay_l2') -%}
8-
{{ description_prefix }}_{{ link.peer | upper }}_{{ link.peer_interface }}
8+
{{ description_prefix }}_{{ link.interface }}_{{ link.peer | upper }}_{{ link.peer_interface }}
99
{%- elif link.type is arista.avd.defined('l3_edge') -%}
10-
{{ description_prefix }}_L3_EDGE_{{ link.peer | upper }}_{{ link.peer_interface }}
10+
{{ description_prefix }}_{{ link.interface }}_L3_EDGE_{{ link.peer | upper }}_{{ link.peer_interface }}
1111
{%- elif link.type is arista.avd.defined('core_interfaces') -%}
12-
{{ description_prefix }}_CORE_INTERFACES_{{ link.peer | upper }}_{{ link.peer_interface }}
12+
{{ description_prefix }}_{{ link.interface }}_CORE_INTERFACES_{{ link.peer | upper }}_{{ link.peer_interface }}
1313
{%- endif -%}

ansible_collections/arista/avd/extensions/molecule/ansible_only/custom_templates/interface_descriptions/underlay/port-channel-interfaces.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ custom_template_description_{{ link.wan_carrier }}
33
{% elif link.main_interface_wan_carrier is arista.avd.defined %}
44
custom_template_description_{{ link.main_interface_wan_carrier }}
55
{% else %}
6-
{{ description_prefix }}_{{ link.peer | upper }}_Po{{ link.channel_group_id }}_To_Po{{ link.peer_channel_group_id }}_{{ link.channel_description }}
6+
{{ description_prefix }}_{{ link.interface }}_{{ link.peer | upper }}_Po{{ link.channel_group_id }}_To_Po{{ link.peer_channel_group_id }}_{{ link.channel_description }}
77
{% endif %}

ansible_collections/arista/avd/extensions/molecule/ansible_only/intended/configs/custom-templates-l2leaf1a.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ management api http-commands
2626
no shutdown
2727
!
2828
interface Port-Channel1
29-
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1A_Po1_To_Po5_
29+
description TEST_CUSTOM_PREFIX_Port-Channel1_CUSTOM-TEMPLATES-L3LEAF1A_Po1_To_Po5_
3030
no shutdown
3131
switchport trunk allowed vlan none
3232
switchport mode trunk
@@ -41,12 +41,12 @@ interface Port-Channel3
4141
switchport
4242
!
4343
interface Ethernet1
44-
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1A_Ethernet5
44+
description TEST_CUSTOM_PREFIX_Ethernet1_CUSTOM-TEMPLATES-L3LEAF1A_Ethernet5
4545
no shutdown
4646
channel-group 1 mode active
4747
!
4848
interface Ethernet2
49-
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1B_Ethernet5
49+
description TEST_CUSTOM_PREFIX_Ethernet2_CUSTOM-TEMPLATES-L3LEAF1B_Ethernet5
5050
no shutdown
5151
channel-group 1 mode active
5252
!

ansible_collections/arista/avd/extensions/molecule/ansible_only/intended/configs/custom-templates-l2leaf1b.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ management api http-commands
2626
no shutdown
2727
!
2828
interface Port-Channel1
29-
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1A_Po1_To_Po5_
29+
description TEST_CUSTOM_PREFIX_Port-Channel1_CUSTOM-TEMPLATES-L3LEAF1A_Po1_To_Po5_
3030
no shutdown
3131
switchport trunk allowed vlan none
3232
switchport mode trunk
@@ -41,12 +41,12 @@ interface Port-Channel3
4141
switchport
4242
!
4343
interface Ethernet1
44-
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1A_Ethernet6
44+
description TEST_CUSTOM_PREFIX_Ethernet1_CUSTOM-TEMPLATES-L3LEAF1A_Ethernet6
4545
no shutdown
4646
channel-group 1 mode active
4747
!
4848
interface Ethernet2
49-
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L3LEAF1B_Ethernet6
49+
description TEST_CUSTOM_PREFIX_Ethernet2_CUSTOM-TEMPLATES-L3LEAF1B_Ethernet6
5050
no shutdown
5151
channel-group 1 mode active
5252
!

ansible_collections/arista/avd/extensions/molecule/ansible_only/intended/configs/custom-templates-l3leaf1a.cfg

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@ management api http-commands
3939
no shutdown
4040
!
4141
interface Port-Channel3
42-
description TEST_CUSTOM_PREFIX_MLAG_PEER_custom-templates-l3leaf1b_Eth3_Eth4_Po3
42+
description TEST_CUSTOM_PREFIX_Port-Channel3_MLAG_PEER_custom-templates-l3leaf1b_Eth3_Eth4_Po3
4343
no shutdown
4444
switchport mode trunk
4545
switchport trunk group MLAG
4646
switchport
4747
!
4848
interface Port-Channel5
49-
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L2LEAF1A_Po5_To_Po1_
49+
description TEST_CUSTOM_PREFIX_Port-Channel5_CUSTOM-TEMPLATES-L2LEAF1A_Po5_To_Po1_
5050
no shutdown
5151
switchport trunk allowed vlan none
5252
switchport mode trunk
5353
switchport
5454
mlag 5
5555
!
5656
interface Ethernet1
57-
description TEST_CUSTOM_PREFIX_P2P_LINK_TO_CUSTOM-TEMPLATES-SPINE1_Ethernet1
57+
description TEST_CUSTOM_PREFIX_Ethernet1_P2P_LINK_TO_CUSTOM-TEMPLATES-SPINE1_Ethernet1
5858
no shutdown
5959
mtu 9214
6060
no switchport
@@ -71,34 +71,34 @@ interface Ethernet4
7171
channel-group 3 mode active
7272
!
7373
interface Ethernet5
74-
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L2LEAF1A_Ethernet1
74+
description TEST_CUSTOM_PREFIX_Ethernet5_CUSTOM-TEMPLATES-L2LEAF1A_Ethernet1
7575
no shutdown
7676
channel-group 5 mode active
7777
!
7878
interface Ethernet6
79-
description TEST_CUSTOM_PREFIX_CUSTOM-TEMPLATES-L2LEAF1B_Ethernet1
79+
description TEST_CUSTOM_PREFIX_Ethernet6_CUSTOM-TEMPLATES-L2LEAF1B_Ethernet1
8080
no shutdown
8181
channel-group 5 mode active
8282
!
8383
interface Ethernet7
84-
description TEST_CUSTOM_PREFIX_L3_EDGE_RTR-1_Ethernet1
84+
description TEST_CUSTOM_PREFIX_Ethernet7_L3_EDGE_RTR-1_Ethernet1
8585
no shutdown
8686
mtu 9214
8787
no switchport
8888
!
8989
interface Ethernet8
90-
description TEST_CUSTOM_PREFIX_CORE_INTERFACES_RTR-1_Ethernet2
90+
description TEST_CUSTOM_PREFIX_Ethernet8_CORE_INTERFACES_RTR-1_Ethernet2
9191
no shutdown
9292
mtu 9214
9393
no switchport
9494
!
9595
interface Loopback0
96-
description TEST_CUSTOM_PREFIX_EVPN_Overlay_Peering_L3LEAF
96+
description TEST_CUSTOM_PREFIX_Loopback0_EVPN_Overlay_Peering_L3LEAF
9797
no shutdown
9898
ip address 192.168.255.21/32
9999
!
100100
interface Loopback1
101-
description TEST_CUSTOM_PREFIX_VTEP_VXLAN_Tunnel_Source_L3LEAF
101+
description TEST_CUSTOM_PREFIX_Loopback1_VTEP_VXLAN_Tunnel_Source_L3LEAF
102102
no shutdown
103103
ip address 192.168.254.21/32
104104
!

0 commit comments

Comments
 (0)