Skip to content

Commit

Permalink
Feat(eos_designs): Add uplink_interface_speed option for `default_i…
Browse files Browse the repository at this point in the history
…nterfaces` (#4828)

Co-authored-by: Laxmikant Chintakindi <[email protected]>
Co-authored-by: Shivani-gslab <[email protected]>
Co-authored-by: Guillaume Mulocher <[email protected]>
  • Loading branch information
4 people authored Jan 3, 2025
1 parent 817eeb8 commit 2b7b580
Show file tree
Hide file tree
Showing 18 changed files with 44 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,27 +100,31 @@ interface Ethernet18
description P2P_LINK_TO_MLAG-OSPF-L3LEAF1A_Ethernet1
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.6/31
!
interface Ethernet19
description P2P_LINK_TO_MH-LEAF1A_Ethernet1
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.0/31
!
interface Ethernet20
description P2P_LINK_TO_MH-LEAF1B_Ethernet1
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.2/31
!
interface Ethernet21
description P2P_LINK_TO_MH-LEAF2A_Ethernet1
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.4/31
!
Expand Down Expand Up @@ -192,6 +196,7 @@ interface Ethernet220
description P2P_LINK_TO_MLAG-OSPF-L3LEAF1B_Ethernet1
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.8/31
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ interface Ethernet1
description P2P_LINK_TO_DC1-SPINE1_Ethernet19
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.1/31
link tracking group LT_GROUP1 upstream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ interface Ethernet1
description P2P_LINK_TO_DC1-SPINE1_Ethernet20
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.3/31
link tracking group LT_GROUP1 upstream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ interface Ethernet1
description P2P_LINK_TO_DC1-SPINE1_Ethernet21
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.5/31
link tracking group Eth-conn-to-router upstream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ interface Ethernet1
description P2P_LINK_TO_DC1-SPINE1_Ethernet18
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.7/31
ip ospf network point-to-point
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ interface Ethernet1
description P2P_LINK_TO_DC1-SPINE1_Ethernet220
no shutdown
mtu 1500
speed forced 40gfull
no switchport
ip address 10.10.101.9/31
ip ospf network point-to-point
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ ethernet_interfaces:
- name: Ethernet18
description: P2P_LINK_TO_MLAG-OSPF-L3LEAF1A_Ethernet1
shutdown: false
speed: forced 40gfull
mtu: 1500
ip_address: 10.10.101.6/31
peer: MLAG-OSPF-L3LEAF1A
Expand All @@ -104,6 +105,7 @@ ethernet_interfaces:
- name: Ethernet19
description: P2P_LINK_TO_MH-LEAF1A_Ethernet1
shutdown: false
speed: forced 40gfull
mtu: 1500
ip_address: 10.10.101.0/31
peer: MH-LEAF1A
Expand All @@ -114,6 +116,7 @@ ethernet_interfaces:
- name: Ethernet20
description: P2P_LINK_TO_MH-LEAF1B_Ethernet1
shutdown: false
speed: forced 40gfull
mtu: 1500
ip_address: 10.10.101.2/31
peer: MH-LEAF1B
Expand All @@ -124,6 +127,7 @@ ethernet_interfaces:
- name: Ethernet21
description: P2P_LINK_TO_MH-LEAF2A_Ethernet1
shutdown: false
speed: forced 40gfull
mtu: 1500
ip_address: 10.10.101.4/31
peer: MH-LEAF2A
Expand Down Expand Up @@ -222,6 +226,7 @@ ethernet_interfaces:
- name: Ethernet220
description: P2P_LINK_TO_MLAG-OSPF-L3LEAF1B_Ethernet1
shutdown: false
speed: forced 40gfull
mtu: 1500
ip_address: 10.10.101.8/31
peer: MLAG-OSPF-L3LEAF1B
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ethernet_interfaces:
- name: Ethernet1
description: P2P_LINK_TO_DC1-SPINE1_Ethernet19
shutdown: false
speed: forced 40gfull
mtu: 1500
link_tracking_groups:
- name: LT_GROUP1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ethernet_interfaces:
- name: Ethernet1
description: P2P_LINK_TO_DC1-SPINE1_Ethernet20
shutdown: false
speed: forced 40gfull
mtu: 1500
link_tracking_groups:
- name: LT_GROUP1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ethernet_interfaces:
- name: Ethernet1
description: P2P_LINK_TO_DC1-SPINE1_Ethernet21
shutdown: false
speed: forced 40gfull
mtu: 1500
link_tracking_groups:
- name: Eth-conn-to-router
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ethernet_interfaces:
- name: Ethernet1
description: P2P_LINK_TO_DC1-SPINE1_Ethernet18
shutdown: false
speed: forced 40gfull
mtu: 1500
ip_address: 10.10.101.7/31
ospf_network_point_to_point: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ethernet_interfaces:
- name: Ethernet1
description: P2P_LINK_TO_DC1-SPINE1_Ethernet220
shutdown: false
speed: forced 40gfull
mtu: 1500
ip_address: 10.10.101.9/31
ospf_network_point_to_point: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,48 +91,56 @@ default_interfaces:
uplink_interfaces: [ Ethernet49-54/1 ]
mlag_interfaces: [ Ethernet55-56/1 ]
downlink_interfaces: [ Ethernet1-32/1 ]
uplink_interface_speed: forced 40gfull

- types: [ spine ]
platforms: [ "7[58]00R3", 7500R ]
uplink_interfaces: [ Ethernet1/31-34/1 ]
mlag_interfaces: [ Ethernet1/35-36/1 ]
downlink_interfaces: [ Ethernet1/1-30/1 ]
uplink_interface_speed: forced 40gfull

- types: [ spine, l3leaf ]
platforms: [ "7050[SC]X3" ]
uplink_interfaces: [ Ethernet49-52/1 ]
mlag_interfaces: [ Ethernet53-54/1 ]
downlink_interfaces: [ Ethernet1-30/1 ]
uplink_interface_speed: forced 40gfull

- types: [ l3leaf, spine ]
platforms: [ VEOS, vEOS, vEOS.*, VEOS.* ]
uplink_interfaces: [ Ethernet27-34 ]
mlag_interfaces: [ Ethernet35-36 ]
downlink_interfaces: [ Ethernet1-26 ]
uplink_interface_speed: forced 40gfull

- types: [ l3leaf ]
platforms: [ default ]
uplink_interfaces: [ Ethernet49-52/1 ]
mlag_interfaces: [ Ethernet53-54/1 ]
downlink_interfaces: [ Ethernet1-30/1 ]
uplink_interface_speed: forced 40gfull

- types: [ l3leaf ]
platforms: [ 7280R, 7280R2, my_custom_platform ]
uplink_interfaces: [ Ethernet49-56/1 ]
mlag_interfaces: [ Ethernet57-58/1 ]
downlink_interfaces: [ Ethernet1-30/1 ]
uplink_interface_speed: forced 40gfull

- types: [ l3leaf ]
platforms: [ 7368.* ]
uplink_interfaces: [ Ethernet1/9-14/1 ]
mlag_interfaces: [ Ethernet1/15-16/1 ]
downlink_interfaces: [ Ethernet1/1-8/1 ]
uplink_interface_speed: forced 40gfull

- types: [ l3leaf ]
platforms: [ 7300X3 ]
uplink_interfaces: [ Ethernet1/27-30/1 ]
mlag_interfaces: [ Ethernet1/31-32/1 ]
downlink_interfaces: [ Ethernet1/1-26/1 ]
uplink_interface_speed: forced 40gfull

# Custom platform with Management42 as the management interface
custom_platform_settings:
Expand Down

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

5 changes: 5 additions & 0 deletions python-avd/pyavd/_eos_designs/schema/__init__.py

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

3 changes: 3 additions & 0 deletions python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml

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 @@ -48,3 +48,6 @@ keys:
items:
type: str
description: Interface range or interface.
uplink_interface_speed:
type: str
description: Set point-to-Point uplink interface speed.
3 changes: 1 addition & 2 deletions python-avd/pyavd/_eos_designs/shared_utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ def fabric_name(self: SharedUtils) -> str:

@cached_property
def uplink_interface_speed(self: SharedUtils) -> str | None:
# Keeping since we will need it when adding speed support under default interfaces.
return self.node_config.uplink_interface_speed
return default(self.node_config.uplink_interface_speed, self.default_interfaces.uplink_interface_speed)

@cached_property
def uplink_switch_interface_speed(self: SharedUtils) -> str | None:
Expand Down

0 comments on commit 2b7b580

Please sign in to comment.