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_designs): Add support for virtual topologies constraints #3535

Merged
Merged
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 @@ -107,8 +107,10 @@ router path-selection
load-balance policy LB-PROD-AVT-POLICY-DEFAULT
!
load-balance policy LB-PROD-AVT-POLICY-VIDEO
loss-rate 42.0
!
load-balance policy LB-PROD-AVT-POLICY-VOICE
jitter 42
!
spanning-tree mode none
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,13 @@ router path-selection
path-group MPLS priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VIDEO
loss-rate 42.0
path-group LTE
path-group MPLS
path-group INET priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VOICE
jitter 42
path-group MPLS
path-group INET priority 2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,13 @@ router path-selection
path-group MPLS priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VIDEO
loss-rate 42.0
path-group LTE
path-group MPLS
path-group INET priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VOICE
jitter 42
path-group MPLS
path-group INET priority 2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ router path-selection
path-group MPLS priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VIDEO
loss-rate 42.0
path-group LTE
path-group MPLS
path-group INET priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VOICE
jitter 42
path-group MPLS
path-group INET priority 2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,13 @@ router path-selection
path-group MPLS priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VIDEO
loss-rate 42.0
path-group LTE
path-group MPLS
path-group INET priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VOICE
jitter 42
path-group MPLS
path-group INET priority 2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,12 @@ router path-selection
path-group MPLS priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VIDEO
loss-rate 42.0
path-group MPLS
path-group INET priority 2
!
load-balance policy LB-PROD-AVT-POLICY-VOICE
jitter 42
path-group MPLS
path-group INET priority 2
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ router_path_selection:
path_groups:
- name: Satellite
- name: LB-PROD-AVT-POLICY-VOICE
jitter: 42
- name: LB-PROD-AVT-POLICY-VIDEO
loss_rate: '42.0'
- name: LB-PROD-AVT-POLICY-DEFAULT
- name: LB-DEFAULT-AVT-POLICY-VIDEO
- name: LB-DEFAULT-AVT-POLICY-DEFAULT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,14 @@ router_path_selection:
- name: MPLS
- name: INET
priority: 2
jitter: 42
- name: LB-PROD-AVT-POLICY-VIDEO
path_groups:
- name: MPLS
- name: LTE
- name: INET
priority: 2
loss_rate: '42.0'
- name: LB-PROD-AVT-POLICY-DEFAULT
path_groups:
- name: INET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,14 @@ router_path_selection:
- name: MPLS
- name: INET
priority: 2
jitter: 42
- name: LB-PROD-AVT-POLICY-VIDEO
path_groups:
- name: MPLS
- name: LTE
- name: INET
priority: 2
loss_rate: '42.0'
- name: LB-PROD-AVT-POLICY-DEFAULT
path_groups:
- name: INET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,12 +278,14 @@ router_path_selection:
- name: MPLS
- name: INET
priority: 2
jitter: 42
- name: LB-PROD-AVT-POLICY-VIDEO
path_groups:
- name: MPLS
- name: LTE
- name: INET
priority: 2
loss_rate: '42.0'
- name: LB-PROD-AVT-POLICY-DEFAULT
path_groups:
- name: INET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,14 @@ router_path_selection:
- name: MPLS
- name: INET
priority: 2
jitter: 42
- name: LB-PROD-AVT-POLICY-VIDEO
path_groups:
- name: MPLS
- name: LTE
- name: INET
priority: 2
loss_rate: '42.0'
- name: LB-PROD-AVT-POLICY-DEFAULT
path_groups:
- name: INET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,13 @@ router_path_selection:
- name: MPLS
- name: INET
priority: 2
jitter: 42
- name: LB-PROD-AVT-POLICY-VIDEO
path_groups:
- name: MPLS
- name: INET
priority: 2
loss_rate: '42.0'
- name: LB-PROD-AVT-POLICY-DEFAULT
path_groups:
- name: INET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,17 @@ wan_virtual_topologies:
preference: preferred
- names: [INET]
preference: alternate
constraints:
jitter: 42
id: 2
- application_profile: VIDEO
path_groups:
- names: [MPLS, LTE]
preference: preferred
- names: [INET]
preference: alternate
constraints:
loss_rate: 42.0
id: 4
- name: DEFAULT-AVT-POLICY
default_virtual_topology:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lowest_hop_count</samp>](## "router_path_selection.load_balance_policies.[].lowest_hop_count") | Boolean | | | | Prefer paths with lowest hop-count. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jitter</samp>](## "router_path_selection.load_balance_policies.[].jitter") | Integer | | | Min: 0<br>Max: 10000 | Jitter requirement for this load balance policy in milliseconds. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latency</samp>](## "router_path_selection.load_balance_policies.[].latency") | Integer | | | Min: 0<br>Max: 10000 | One way delay requirement for this load balance policy in milliseconds. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loss_rate</samp>](## "router_path_selection.load_balance_policies.[].loss_rate") | String | | | Pattern: ^\d+(\.\d{1,2})?$ | Loss Rate requirement in percentage for this load balance policy.<br>Value between 0.00 and 100.00 % |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loss_rate</samp>](## "router_path_selection.load_balance_policies.[].loss_rate") | String | | | Pattern: ^\d+(\.\d{1,2})?$ | Loss Rate requirement in percentage for this load balance policy.<br>Value between 0.00 and 100.00. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path_groups</samp>](## "router_path_selection.load_balance_policies.[].path_groups") | List, items: Dictionary | | | | List of path-groups to use for this load balance policy. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "router_path_selection.load_balance_policies.[].path_groups.[].name") | String | Required, Unique | | | Path-group name |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;priority</samp>](## "router_path_selection.load_balance_policies.[].path_groups.[].priority") | Integer | | | Min: 1<br>Max: 65535 | Priority for this path-group.<br>The EOS default value is 1. |
Expand Down Expand Up @@ -154,7 +154,7 @@
latency: <int; 0-10000>

# Loss Rate requirement in percentage for this load balance policy.
# Value between 0.00 and 100.00 %
# Value between 0.00 and 100.00.
loss_rate: <str>

# List of path-groups to use for this load balance policy.
Expand Down

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 @@ -167,7 +167,7 @@ keys:
type: str
description: |-
Loss Rate requirement in percentage for this load balance policy.
Value between 0.00 and 100.00 %
Value between 0.00 and 100.00.
convert_types:
- int
- float
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;name</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.name") | String | | | | Optional name, if not set `CONTROL-PLANE-PROFILE` is used. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;traffic_class</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.traffic_class") | Integer | | | Min: 0<br>Max: 7 | Set traffic-class for matched traffic. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;dscp</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.dscp") | Integer | | | Min: 0<br>Max: 63 | Set DSCP for matched traffic. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;constraints</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.constraints") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jitter</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.constraints.jitter") | Integer | | | Min: 0<br>Max: 10000 | Jitter requirement for this load balance policy in milliseconds. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latency</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.constraints.latency") | Integer | | | Min: 0<br>Max: 10000 | One way delay requirement for this load balance policy in milliseconds. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loss_rate</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.constraints.loss_rate") | String | | | Pattern: ^\d+(\.\d{1,2})?$ | Loss Rate requirement in percentage for this load balance policy.<br>Value between 0.00 and 100.00. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;path_groups</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.path_groups") | List, items: Dictionary | | | Min Length: 1 | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;names</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.path_groups.[].names") | List, items: String | Required | | Min Length: 1 | List of path-group names. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "wan_virtual_topologies.control_plane_virtual_topology.path_groups.[].names.[]") | String | | | | |
Expand All @@ -27,6 +31,10 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].id") | Integer | Required | | Min: 2<br>Max: 253 | ID of the AVT in each VRFs. ID must be unique across all virtual topologies in a policy.<br>ID 1 is reserved for the default_virtual_toplogy.<br>ID 254 is reserved for the control_plane_virtual_topology. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;traffic_class</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].traffic_class") | Integer | | | Min: 0<br>Max: 7 | Set traffic-class for matched traffic. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dscp</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].dscp") | Integer | | | Min: 0<br>Max: 63 | Set DSCP for matched traffic. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constraints</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].constraints") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jitter</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].constraints.jitter") | Integer | | | Min: 0<br>Max: 10000 | Jitter requirement for this load balance policy in milliseconds. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latency</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].constraints.latency") | Integer | | | Min: 0<br>Max: 10000 | One way delay requirement for this load balance policy in milliseconds. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loss_rate</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].constraints.loss_rate") | String | | | Pattern: ^\d+(\.\d{1,2})?$ | Loss Rate requirement in percentage for this load balance policy.<br>Value between 0.00 and 100.00. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path_groups</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].path_groups") | List, items: Dictionary | | | Min Length: 1 | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;names</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].path_groups.[].names") | List, items: String | Required | | Min Length: 1 | List of path-group names. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "wan_virtual_topologies.policies.[].application_virtual_topologies.[].path_groups.[].names.[]") | String | | | | |
Expand All @@ -36,6 +44,10 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;drop_unmatched</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.drop_unmatched") | Boolean | | `False` | | When set, no `catch-all` match is configured for the policy and unmatched traffic is dropped. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;traffic_class</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.traffic_class") | Integer | | | Min: 0<br>Max: 7 | Set traffic-class for matched traffic. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dscp</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.dscp") | Integer | | | Min: 0<br>Max: 63 | Set DSCP for matched traffic. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constraints</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.constraints") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jitter</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.constraints.jitter") | Integer | | | Min: 0<br>Max: 10000 | Jitter requirement for this load balance policy in milliseconds. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;latency</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.constraints.latency") | Integer | | | Min: 0<br>Max: 10000 | One way delay requirement for this load balance policy in milliseconds. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loss_rate</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.constraints.loss_rate") | String | | | Pattern: ^\d+(\.\d{1,2})?$ | Loss Rate requirement in percentage for this load balance policy.<br>Value between 0.00 and 100.00. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path_groups</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.path_groups") | List, items: Dictionary | | | Min Length: 1 | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;names</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.path_groups.[].names") | List, items: String | Required | | Min Length: 1 | List of path-group names. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "wan_virtual_topologies.policies.[].default_virtual_topology.path_groups.[].names.[]") | String | | | | |
Expand Down Expand Up @@ -76,6 +88,17 @@

# Set DSCP for matched traffic.
dscp: <int; 0-63>
constraints:

# Jitter requirement for this load balance policy in milliseconds.
jitter: <int; 0-10000>

# One way delay requirement for this load balance policy in milliseconds.
latency: <int; 0-10000>

# Loss Rate requirement in percentage for this load balance policy.
# Value between 0.00 and 100.00.
loss_rate: <str>
path_groups: # >=1 items

# List of path-group names.
Expand Down Expand Up @@ -136,6 +159,17 @@

# Set DSCP for matched traffic.
dscp: <int; 0-63>
constraints:

# Jitter requirement for this load balance policy in milliseconds.
jitter: <int; 0-10000>

# One way delay requirement for this load balance policy in milliseconds.
latency: <int; 0-10000>

# Loss Rate requirement in percentage for this load balance policy.
# Value between 0.00 and 100.00.
loss_rate: <str>
path_groups: # >=1 items

# List of path-group names.
Expand Down Expand Up @@ -164,6 +198,17 @@

# Set DSCP for matched traffic.
dscp: <int; 0-63>
constraints:

# Jitter requirement for this load balance policy in milliseconds.
jitter: <int; 0-10000>

# One way delay requirement for this load balance policy in milliseconds.
latency: <int; 0-10000>

# Loss Rate requirement in percentage for this load balance policy.
# Value between 0.00 and 100.00.
loss_rate: <str>
path_groups: # >=1 items

# List of path-group names.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def _generate_wan_load_balance_policy(self, name: str, input_dict: dict, context
* implement also the jitter / ...
"""
wan_local_path_group_names = [path_group["name"] for path_group in self.shared_utils.wan_local_path_groups]
wan_load_balance_policy = {"name": name, "path_groups": []}
wan_load_balance_policy = {"name": name, "path_groups": [], **get(input_dict, "constraints", default={})}

# An entry is composed of a list of path-groups in `names` and a `priority`
policy_entries = get(input_dict, "path_groups", [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def _filtered_tenants(self) -> list[dict]:
"ipv6_static_routes": [],
"static_routes": [],
"loopbacks": [],
"additional_route_targets": [],
ClausHolbechArista marked this conversation as resolved.
Show resolved Hide resolved
}
],
"l2vlans": [],
Expand Down
Loading