Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_cli_config_gen): Added support for metric bandwitdh per interface under router path-selection #4830

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10829,6 +10829,15 @@ router segment-security
| ----------------- | --------- |
| 200 | ingress |

#### Interfaces Metric Bandwidth

| Interface name | Transmit Bandwidth (Mbps) | Receive Bandwidth (Mbps) |
| -------------- | ------------------------- | ------------------------ |
| Ethernet1 | - | 100 |
| Ethernet2 | - | - |
| Ethernet3 | 200 | - |
| Port-Channel4 | 200 | 100 |

#### Path Groups

##### Path Group PG-1
Expand Down Expand Up @@ -10947,6 +10956,18 @@ router path-selection
peer dynamic source stun
tcp mss ceiling ipv4 200 ingress
!
interface Ethernet1
metric bandwidth receive 100 Mbps
!
interface Ethernet2
!
interface Ethernet3
metric bandwidth transmit 200 Mbps
!
interface Port-Channel4
metric bandwidth transmit 200 Mbps
metric bandwidth receive 100 Mbps
!
path-group PG-1 id 666
keepalive interval 200 milliseconds failure-threshold 3 intervals
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,18 @@ router path-selection
peer dynamic source stun
tcp mss ceiling ipv4 200 ingress
!
interface Ethernet1
metric bandwidth receive 100 Mbps
!
interface Ethernet2
!
interface Ethernet3
metric bandwidth transmit 200 Mbps
!
interface Port-Channel4
metric bandwidth transmit 200 Mbps
metric bandwidth receive 100 Mbps
!
path-group PG-1 id 666
keepalive interval 200 milliseconds failure-threshold 3 intervals
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,15 @@ router_path_selection:
- name: VRF-3
tcp_mss_ceiling:
ipv4_segment_size: 200
interfaces:
- name: Ethernet2
- name: Port-Channel4
metric_bandwidth:
receive: 100
transmit: 200
- name: Ethernet3
metric_bandwidth:
transmit: 200
- name: Ethernet1
metric_bandwidth:
receive: 100

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 @@ -23,6 +23,16 @@
| ----------------- | --------- |
| {{ router_path_selection.tcp_mss_ceiling.ipv4_segment_size }} | {{ router_path_selection.tcp_mss_ceiling.direction | arista.avd.default("ingress") }} |
{% endif %}
{% if router_path_selection.interfaces is arista.avd.defined %}

#### Interfaces Metric Bandwidth

| Interface name | Transmit Bandwidth (Mbps) | Receive Bandwidth (Mbps) |
| -------------- | ------------------------- | ------------------------ |
{% for interface_data in router_path_selection.interfaces | arista.avd.natural_sort('name') %}
| {{ interface_data.name }} | {{ interface_data.metric_bandwidth.transmit | arista.avd.default("-") }} | {{ interface_data.metric_bandwidth.receive | arista.avd.default("-") }} |
{% endfor %}
{% endif %}
{% if router_path_selection.path_groups is arista.avd.defined %}

#### Path Groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ router path-selection
{% endif %}
{{ tcp_mss_ceiling_cli }} {{ router_path_selection.tcp_mss_ceiling.direction | arista.avd.default("ingress") }}
{% endif %}
{% for interface_data in router_path_selection.interfaces | arista.avd.natural_sort('name') %}
!
interface {{ interface_data.name }}
{% if interface_data.metric_bandwidth.transmit is arista.avd.defined %}
metric bandwidth transmit {{ interface_data.metric_bandwidth.transmit }} Mbps
{% endif %}
{% if interface_data.metric_bandwidth.receive is arista.avd.defined %}
metric bandwidth receive {{ interface_data.metric_bandwidth.receive }} Mbps
{% endif %}
{% endfor %}
{# path group #}
{% for path_group in router_path_selection.path_groups | arista.avd.natural_sort('name') %}
{% set path_group_def = "path-group " ~ path_group.name %}
Expand Down
75 changes: 75 additions & 0 deletions python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py

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 @@ -256,3 +256,28 @@ keys:
description: |-
Enforce on packets through DPS tunnel for a specific direction.
Only 'ingress' direction is supported.
interfaces:
type: list
primary_key: name
items:
type: dict
keys:
name:
type: str
metric_bandwidth:
type: dict
keys:
receive:
description: Maximum receive bandwidth in Mbps.
type: int
min: 1
max: 4294967295
convert_types:
- str
transmit:
description: Maximum transmit bandwidth in Mbps.
type: int
min: 1
max: 4294967295
convert_types:
- str
Loading