-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix(eos_designs): Make it possible to add custom PTP profiles (#4523)
- Loading branch information
Showing
24 changed files
with
579 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...ns_negative_unit_tests/inventory/host_vars/failure-adapter-ptp-profile-does-not-exist.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
type: l3leaf | ||
|
||
ptp_profiles: | ||
- profile: PROFILE-1 | ||
|
||
l3leaf: | ||
defaults: | ||
loopback_ipv4_pool: 10.254.1.0/27 | ||
vtep_loopback_ipv4_pool: 10.254.11.0/27 | ||
mlag_interfaces: ['Ethernet9', 'Ethernet10'] | ||
mlag_peer_ipv4_pool: 10.254.1.64/27 | ||
mlag_peer_l3_ipv4_pool: 10.254.1.96/27 | ||
ptp: | ||
enabled: true | ||
nodes: | ||
- name: failure-adapter-ptp-profile-does-not-exist | ||
id: 1 | ||
bgp_as: 65101 | ||
mgmt_ip: 192.168.0.101/24 | ||
|
||
servers: | ||
- name: INDIVIDUAL_1 | ||
adapters: | ||
- switches: [failure-adapter-ptp-profile-does-not-exist] | ||
switch_ports: [Ethernet14] | ||
ptp: | ||
enabled: true | ||
profile: THIS-PROFILE-DOES-NOT-EXIST | ||
|
||
expected_error_message: >- | ||
PTP Profile 'THIS-PROFILE-DOES-NOT-EXIST' referenced under server[INDIVIDUAL_1].adapters[0] | ||
does not exist in `ptp_profiles`. |
29 changes: 29 additions & 0 deletions
29
...gative_unit_tests/inventory/host_vars/failure-network-port-ptp-profile-does-not-exist.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
type: l3leaf | ||
|
||
# Using default value of ptp_profiles | ||
|
||
l3leaf: | ||
defaults: | ||
loopback_ipv4_pool: 10.254.1.0/27 | ||
vtep_loopback_ipv4_pool: 10.254.11.0/27 | ||
mlag_interfaces: ['Ethernet9', 'Ethernet10'] | ||
mlag_peer_ipv4_pool: 10.254.1.64/27 | ||
mlag_peer_l3_ipv4_pool: 10.254.1.96/27 | ||
ptp: | ||
enabled: true | ||
nodes: | ||
- name: failure-network-port-ptp-profile-does-not-exist | ||
id: 1 | ||
bgp_as: 65101 | ||
mgmt_ip: 192.168.0.101/24 | ||
|
||
network_ports: | ||
- switches: [failure-network-port-ptp-profile-does-not-exist] | ||
switch_ports: [Ethernet14, Ethernet15] | ||
ptp: | ||
enabled: true | ||
profile: THIS-PROFILE-DOES-NOT-EXIST | ||
|
||
expected_error_message: >- | ||
PTP Profile 'THIS-PROFILE-DOES-NOT-EXIST' referenced under network_ports[0] does not exist in `ptp_profiles`. |
31 changes: 31 additions & 0 deletions
31
...os_designs_negative_unit_tests/inventory/host_vars/failure-ptp-profile-does-not-exist.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
type: l3leaf | ||
|
||
ptp_profiles: | ||
- profile: PROFILE-1 | ||
|
||
l3leaf: | ||
defaults: | ||
loopback_ipv4_pool: 10.254.1.0/27 | ||
vtep_loopback_ipv4_pool: 10.254.11.0/27 | ||
nodes: | ||
- name: failure-ptp-profile-does-not-exist | ||
id: 1 | ||
bgp_as: 65101 | ||
mgmt_ip: 192.168.0.101/24 | ||
ptp: | ||
enabled: true | ||
# The profile is applied on uplink or l3edge | ||
profile: THIS-PROFILE-DOES-NOT-EXIST | ||
|
||
l3_edge: | ||
p2p_links: | ||
- nodes: [failure-ptp-profile-does-not-exist, not-in-fabric] | ||
interfaces: [Ethernet10, Ethernet11] | ||
ip: [192.168.0.2/31, 192.168.0.3/31] | ||
ptp: | ||
enabled: true | ||
|
||
expected_error_message: >- | ||
PTP Profile 'THIS-PROFILE-DOES-NOT-EXIST' referenced under `ptp.profile` node variables | ||
does not exist in `ptp_profiles`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
...ctions/arista/avd/molecule/eos_designs_unit_tests/intended/configs/custom-ptp-profile.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
! | ||
no enable password | ||
no aaa root | ||
! | ||
vlan internal order ascending range 1006 1199 | ||
! | ||
transceiver qsfp default-mode 4x10G | ||
! | ||
service routing protocols model multi-agent | ||
! | ||
hostname custom-ptp-profile | ||
! | ||
ptp clock-identity 00:1C:73:1e:00:0c | ||
ptp domain 127 | ||
ptp mode boundary | ||
ptp priority1 30 | ||
ptp priority2 12 | ||
ptp monitor threshold offset-from-master 250 | ||
ptp monitor threshold mean-path-delay 1500 | ||
ptp monitor sequence-id | ||
ptp monitor threshold missing-message sync 3 sequence-ids | ||
ptp monitor threshold missing-message follow-up 3 sequence-ids | ||
ptp monitor threshold missing-message delay-resp 3 sequence-ids | ||
ptp monitor threshold missing-message announce 3 sequence-ids | ||
! | ||
vlan 11 | ||
name VLAN11 | ||
! | ||
vrf instance MGMT | ||
! | ||
vrf instance VRF1 | ||
! | ||
management api http-commands | ||
protocol https | ||
no shutdown | ||
! | ||
vrf MGMT | ||
no shutdown | ||
! | ||
interface Ethernet8 | ||
description P2P_not-in-this-fabric_Ethernet8 | ||
no shutdown | ||
mtu 9214 | ||
no switchport | ||
ptp enable | ||
ptp sync-message interval -7 | ||
ptp announce interval 4 | ||
ptp transport ipv4 | ||
ptp announce timeout 3 | ||
ptp delay-req interval -6 | ||
! | ||
interface Loopback0 | ||
description ROUTER_ID | ||
no shutdown | ||
ip address 10.42.42.42/32/32 | ||
! | ||
interface Loopback1 | ||
description VXLAN_TUNNEL_SOURCE | ||
no shutdown | ||
ip address 10.42.42.42/32/32 | ||
! | ||
interface Vlan11 | ||
description VLAN11 | ||
no shutdown | ||
vrf VRF1 | ||
ip address 172.16.11.1/24 | ||
! | ||
interface Vxlan1 | ||
description custom-ptp-profile_VTEP | ||
vxlan source-interface Loopback1 | ||
vxlan udp-port 4789 | ||
vxlan vlan 11 vni 10011 | ||
vxlan vrf VRF1 vni 1 | ||
! | ||
ip routing | ||
no ip routing vrf MGMT | ||
ip routing vrf VRF1 | ||
! | ||
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
seq 10 permit 10.10.10.0/24 eq 32 | ||
seq 20 permit 10.10.10.0/24 eq 32 | ||
! | ||
route-map RM-CONN-2-BGP permit 10 | ||
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
! | ||
router bfd | ||
multihop interval 300 min-rx 300 multiplier 3 | ||
! | ||
router bgp 65042 | ||
router-id 10.42.42.42/32 | ||
maximum-paths 4 ecmp 4 | ||
update wait-install | ||
no bgp default ipv4-unicast | ||
neighbor EVPN-OVERLAY-PEERS peer group | ||
neighbor EVPN-OVERLAY-PEERS update-source Loopback0 | ||
neighbor EVPN-OVERLAY-PEERS bfd | ||
neighbor EVPN-OVERLAY-PEERS ebgp-multihop 3 | ||
neighbor EVPN-OVERLAY-PEERS send-community | ||
neighbor EVPN-OVERLAY-PEERS maximum-routes 0 | ||
neighbor IPv4-UNDERLAY-PEERS peer group | ||
neighbor IPv4-UNDERLAY-PEERS send-community | ||
neighbor IPv4-UNDERLAY-PEERS maximum-routes 12000 | ||
redistribute connected route-map RM-CONN-2-BGP | ||
! | ||
vlan 11 | ||
rd 10.42.42.42/32:10011 | ||
route-target both 10011:10011 | ||
redistribute learned | ||
! | ||
address-family evpn | ||
neighbor EVPN-OVERLAY-PEERS activate | ||
! | ||
address-family ipv4 | ||
no neighbor EVPN-OVERLAY-PEERS activate | ||
neighbor IPv4-UNDERLAY-PEERS activate | ||
! | ||
vrf VRF1 | ||
rd 10.42.42.42/32:1 | ||
route-target import evpn 1:1 | ||
route-target export evpn 1:1 | ||
router-id 10.42.42.42/32 | ||
redistribute connected | ||
! | ||
end |
Oops, something went wrong.