Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add interface traffic engineering and TE ad…
Browse files Browse the repository at this point in the history
…min group for ethernet/port-channel (#4754)
  • Loading branch information
emilarista authored Dec 17, 2024
1 parent 4e963f2 commit 4fb884c
Show file tree
Hide file tree
Showing 14 changed files with 348 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3629,6 +3629,8 @@ interface Dps1
| Ethernet66 | Multiple VRIDs and tracking | - | 192.0.2.2/25 | default | - | False | - | - |
| Ethernet80 | LAG Member | 17 | *192.0.2.3/31 | **default | **- | **- | **- | **- |
| Ethernet81/2 | LAG Member LACP fallback LLDP ZTP VLAN | 112 | *dhcp | **default | **- | **- | **- | **- |
| Ethernet81/3 | Traffic Engineering Interface | - | 100.64.127.0/31 | default | - | False | - | - |
| Ethernet81/4 | Traffic Engineering Interface | - | 100.64.127.0/31 | default | - | False | - | - |

*Inherited from Port-Channel Interface

Expand Down Expand Up @@ -3785,6 +3787,12 @@ interface Dps1
| Ethernet5 | 127 |
| Ethernet6 | disabled |

#### Traffic Engineering

| Interface | Enabled | Administrative Groups |
| --------- | ------- | --------------------- |
| Ethernet81/3 | True | 3,15-29,testgrp |

#### Ethernet Interfaces Device Configuration

```eos
Expand Down Expand Up @@ -4755,6 +4763,21 @@ interface Ethernet81/2
lldp tlv transmit ztp vlan 112
spanning-tree portfast
!
interface Ethernet81/3
description Traffic Engineering Interface
no shutdown
no switchport
ip address 100.64.127.0/31
traffic-engineering
traffic-engineering administrative-group 3,15-29,testgrp
!
interface Ethernet81/4
description Traffic Engineering Interface
no shutdown
no switchport
ip address 100.64.127.0/31
traffic-engineering administrative-group 4,7-100,testgrp
!
interface Ethernet81/10
description isis_port_channel_member
channel-group 110 mode active
Expand Down Expand Up @@ -4941,6 +4964,8 @@ interface Ethernet84
| Port-Channel112 | LACP fallback individual | - | dhcp | default | - | - | - | - |
| Port-Channel113 | interface_with_mpls_enabled | - | 172.31.128.9/31 | default | - | - | - | - |
| Port-Channel114 | interface_with_mpls_disabled | - | 172.31.128.10/31 | default | - | - | - | - |
| Port-Channel136 | Test_te_admin_groups | - | 100.64.127.2/31 | default | - | - | - | - |
| Port-Channel137 | Traffic Engineering Interface | - | 100.64.127.4/31 | default | - | - | - | - |

##### IP NAT: Source Static

Expand Down Expand Up @@ -4984,6 +5009,12 @@ interface Ethernet84
| Port-Channel100 | EVPN_UNDERLAY | - | - | - | - | - | Level-1: md5<br>Level-2: text |
| Port-Channel110 | ISIS_TEST | True | 99 | point-to-point | level-2 | True | - |

#### Traffic Engineering

| Interface | Enabled | Administrative Groups |
| --------- | ------- | --------------------- |
| Port-Channel136 | True | 7 |

#### Port-Channel Interfaces Device Configuration

```eos
Expand Down Expand Up @@ -5586,6 +5617,19 @@ interface Port-Channel135
switchport tap encapsulation gre protocol 0x2 feature header length 3 strip
switchport tap encapsulation gre protocol 0x3 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre protocol 0x10 strip
!
interface Port-Channel136
description Test_te_admin_groups
no switchport
ip address 100.64.127.2/31
traffic-engineering
traffic-engineering administrative-group 7
!
interface Port-Channel137
description Traffic Engineering Interface
no switchport
ip address 100.64.127.4/31
traffic-engineering administrative-group 4,7-100,testgrp
```

### Loopback Interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2216,6 +2216,19 @@ interface Port-Channel135
switchport tap encapsulation gre protocol 0x3 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre protocol 0x10 strip
!
interface Port-Channel136
description Test_te_admin_groups
no switchport
ip address 100.64.127.2/31
traffic-engineering
traffic-engineering administrative-group 7
!
interface Port-Channel137
description Traffic Engineering Interface
no switchport
ip address 100.64.127.4/31
traffic-engineering administrative-group 4,7-100,testgrp
!
interface Dps1
description Test DPS Interface
shutdown
Expand Down Expand Up @@ -3192,6 +3205,21 @@ interface Ethernet81/2
lldp tlv transmit ztp vlan 112
spanning-tree portfast
!
interface Ethernet81/3
description Traffic Engineering Interface
no shutdown
no switchport
ip address 100.64.127.0/31
traffic-engineering
traffic-engineering administrative-group 3,15-29,testgrp
!
interface Ethernet81/4
description Traffic Engineering Interface
no shutdown
no switchport
ip address 100.64.127.0/31
traffic-engineering administrative-group 4,7-100,testgrp
!
interface Ethernet81/10
description isis_port_channel_member
channel-group 110 mode active
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,32 @@ ethernet_interfaces:
lldp:
ztp_vlan: 112

- name: Ethernet81/3
description: Traffic Engineering Interface
shutdown: false
switchport:
enabled: false
ip_address: 100.64.127.0/31
traffic_engineering:
enabled: true
administrative_groups:
- 3
- 15-29
- testgrp

- name: Ethernet81/4
description: Traffic Engineering Interface
shutdown: false
switchport:
enabled: false
ip_address: 100.64.127.0/31
traffic_engineering:
enabled: false
administrative_groups:
- 4
- 7-100
- testgrp

- name: Ethernet82
description: Switchport_tap_tool
switchport:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1046,3 +1046,25 @@ port_channel_interfaces:
feature_header_length: 2
re_encapsulation_ethernet_header: true
strip: true

- name: Port-Channel136
description: Test_te_admin_groups
switchport:
enabled: false
ip_address: 100.64.127.2/31
traffic_engineering:
enabled: true
administrative_groups:
- 7

- name: Port-Channel137
description: Traffic Engineering Interface
switchport:
enabled: false
ip_address: 100.64.127.4/31
traffic_engineering:
enabled: false
administrative_groups:
- 4
- 7-100
- testgrp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,24 @@
| {{ sync_e_interface.name }} | {{ sync_e_interface.sync_e.priority | arista.avd.default('127') }} |
{% endfor %}
{% endif %}
{% set te_interfaces = [] %}
{% for ethernet_interface in ethernet_interfaces | arista.avd.natural_sort('name') %}
{% if ethernet_interface.traffic_engineering.enabled is arista.avd.defined(true) %}
{% do te_interfaces.append(ethernet_interface) %}
{% endif %}
{% endfor %}
{% if te_interfaces | length > 0 %}

#### Traffic Engineering

| Interface | Enabled | Administrative Groups |
| --------- | ------- | --------------------- |
{% for te_interface in te_interfaces %}
{% set admin_groups = te_interface.traffic_engineering.administrative_groups | arista.avd.default (["-"]) | join(",") %}
{% set te_enabled = te_interface.traffic_engineering.enabled | arista.avd.default ("-") %}
| {{ te_interface.name }} | {{ te_enabled }} | {{ admin_groups }} |
{% endfor %}
{% endif %}

#### Ethernet Interfaces Device Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,24 @@
| {{ port_channel_interface.name }} | {{ isis_instance }} | {{ isis_bfd }} | {{ isis_metric }} | {{ mode }} | {{ isis_circuit_type }} | {{ isis_hello_padding }} | {{ isis_authentication_mode }} |
{% endfor %}
{% endif %}
{% set port_channel_te_interfaces = [] %}
{% for port_channel_interface in port_channel_interfaces | arista.avd.natural_sort('name') %}
{% if port_channel_interface.traffic_engineering.enabled is arista.avd.defined(true) %}
{% do port_channel_te_interfaces.append(port_channel_interface) %}
{% endif %}
{% endfor %}
{% if port_channel_te_interfaces | length > 0 %}

#### Traffic Engineering

| Interface | Enabled | Administrative Groups |
| --------- | ------- | --------------------- |
{% for po_te_interface in port_channel_te_interfaces %}
{% set admin_groups = po_te_interface.traffic_engineering.administrative_groups | arista.avd.default(["-"]) | join(",") %}
{% set te_enabled = po_te_interface.traffic_engineering.enabled | arista.avd.default("-") %}
| {{ po_te_interface.name }} | {{ te_enabled }} | {{ admin_groups }} |
{% endfor %}
{% endif %}

#### Port-Channel Interfaces Device Configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,12 @@ interface {{ ethernet_interface.name }}
switchport tool dzgre preserve
{% endif %}
{% endif %}
{% if ethernet_interface.traffic_engineering.enabled is arista.avd.defined(true) %}
traffic-engineering
{% endif %}
{% if ethernet_interface.traffic_engineering.administrative_groups is arista.avd.defined %}
traffic-engineering administrative-group {{ ethernet_interface.traffic_engineering.administrative_groups | join(",") }}
{% endif %}
{% for link_tracking_group in ethernet_interface.link_tracking_groups | arista.avd.natural_sort %}
{% if link_tracking_group.name is arista.avd.defined and link_tracking_group.direction is arista.avd.defined %}
link tracking group {{ link_tracking_group.name }} {{ link_tracking_group.direction }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,12 @@ interface {{ port_channel_interface.name }}
switchport tool dot1q remove outer {{ port_channel_interface.switchport.tool.dot1q_remove_outer_vlan_tag }}
{% endif %}
{% endif %}
{% if port_channel_interface.traffic_engineering.enabled is arista.avd.defined(true) %}
traffic-engineering
{% endif %}
{% if port_channel_interface.traffic_engineering.administrative_groups is arista.avd.defined %}
traffic-engineering administrative-group {{ port_channel_interface.traffic_engineering.administrative_groups | join(",") }}
{% endif %}
{% for link_tracking_group in port_channel_interface.link_tracking_groups | arista.avd.natural_sort('name') %}
{% if link_tracking_group.name is arista.avd.defined and link_tracking_group.direction is arista.avd.defined %}
link tracking group {{ link_tracking_group.name }} {{ link_tracking_group.direction }}
Expand Down
Loading

0 comments on commit 4fb884c

Please sign in to comment.