Skip to content

Refactor(eos_designs): Improve /metadata/cv_pathfinder.py and improve pytest coverage #5310

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

Draft
wants to merge 4 commits into
base: devel
Choose a base branch
from
Draft
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
@@ -0,0 +1,111 @@
---
type: wan_router
wan_mode: cv-pathfinder
underlay_routing_protocol: none

bgp_as: 65000

bgp_peer_groups:
wan_overlay_peers:
password: "htm4AZe9mIQOO1uiMuGgYQ=="
listen_range_prefixes:
- 192.168.255.0/24

cv_pathfinder_regions:
- name: AVD_Land_West
id: 42
description: AVD Region
sites:
- name: Site404
id: 404
location: Atlantis
- name: Site405
id: 405
location: El Dorado
- name: Site422
id: 422
location: Somewhere
- name: Site423
id: 423
location: Somewhere-warm
- name: Site12
id: 12
location: 12 Downing Street, London
- name: AVD_Land_East
id: 43
description: AVD Region
sites:
- name: Site511
id: 511
location: Miami

wan_ipsec_profiles:
control_plane:
ike_policy_name: AUTOVPN-IKE
sa_policy_name: AUTOVPN-SA
profile_name: AUTOVPN
shared_key: ABCDEF1234567890

default_node_types:
- node_type: wan_router
match_hostnames:
- "autovpn-edge.*"

wan_router:
defaults:
loopback_ipv4_pool: 192.168.30.0/24
vtep_loopback_ipv4_pool: 192.168.255.0/24
nodes:
- name: missing_cv_pathfinder_path_group_with_preferred
id: 1
wan_role: server
data_plane_cpu_allocation_max: 1
l3_interfaces:
- name: Ethernet1
wan_carrier: Comcast
wan_circuit_id: 666
ip_address: 10.1.1.1/24

wan_path_groups:
- name: MPLS
ipsec:
static_peers: false
dynamic_peers: false
id: 100
default_preference: 2
- name: INET
id: 101
default_preference: 3
- name: LTE
id: 102
default_preference: 4

wan_carriers:
- name: Comcast
path_group: INET
trusted: true
- name: ATT
path_group: INET
trusted: true

tenants:
- name: TenantA
vrfs:
- name: default
vrf_id: 1
- name: PROD
vrf_id: 42
- name: IT
vrf_id: 100

wan_virtual_topologies:
vrfs:
- name: PROD
wan_vni: 42
- name: IT
wan_vni: 100

expected_error_message: >-
At least one path-group must be configured with preference '1' or 'preferred' for load-balance policy LB-DEFAULT-POLICY-DEFAULT'
to use CloudVision integration. If this is an auto-generated policy, ensure that at least one default_preference for a non
excluded path-group is set to 'preferred' (or unset as this is the default).
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
type: wan_router
wan_mode: cv-pathfinder
underlay_routing_protocol: none

bgp_as: 65000

bgp_peer_groups:
wan_overlay_peers:
password: "htm4AZe9mIQOO1uiMuGgYQ=="
listen_range_prefixes:
- 192.168.255.0/24

wan_ipsec_profiles:
control_plane:
ike_policy_name: AUTOVPN-IKE
sa_policy_name: AUTOVPN-SA
profile_name: AUTOVPN
shared_key: ABCDEF1234567890

default_node_types:
- node_type: wan_router
match_hostnames:
- "autovpn-edge.*"

wan_router:
defaults:
loopback_ipv4_pool: 192.168.30.0/24
vtep_loopback_ipv4_pool: 192.168.255.0/24
nodes:
- name: missing_cv_pathfinder_regions
id: 1
wan_role: server
data_plane_cpu_allocation_max: 1
l3_interfaces:
- name: Ethernet1
wan_carrier: Comcast
wan_circuit_id: 666
ip_address: 10.1.1.1/24

wan_path_groups:
- name: MPLS
ipsec:
static_peers: false
dynamic_peers: false
id: 100
- name: INET
id: 101
- name: LTE
id: 102

wan_carriers:
- name: Comcast
path_group: INET
trusted: true
- name: ATT
path_group: INET
trusted: true

tenants:
- name: TenantA
vrfs:
- name: default
vrf_id: 1
- name: PROD
vrf_id: 42
- name: IT
vrf_id: 100

wan_virtual_topologies:
vrfs:
- name: PROD
wan_vni: 42
- name: IT
wan_vni: 100

expected_error_message: >-
'cv_pathfinder_regions' key must be set when 'wan_mode' is 'cv-pathfinder'.
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ all:
missing-default-virtual-topology-path-group:
missing-peer-ip-l3-interface:
missing-mgmt-ip-cvx-servers:
missing_cv_pathfinder_regions:
missing_cv_pathfinder_path_group_with_preferred:
wan-router-l3-interfaces-unsupported-rxtx-for-subinterface:
wan-router-policy-unmatched:
ntp-settings-server-vrf-missing-mgmt-ip:
Expand Down
Loading