-
Notifications
You must be signed in to change notification settings - Fork 212
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 l3_edge.l3_interfaces support #3426
Merged
gmuloc
merged 6 commits into
aristanetworks:devel
from
gmuloc:simple-l3-edge-l3-interfaces
Dec 19, 2023
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d01cf51
Feat(eos_designs): Add l3_edge.l3_interfaces support
gmuloc a81a82f
Refactor: Cut BGP and ipv6 for now
gmuloc 5a53d17
Refactor: Address PR comments
gmuloc 73438b8
Refactor: Use strip empty
gmuloc 7d133d2
Refactor: Handle empty description
gmuloc e691c4b
Refactor: Address PR comment for description
gmuloc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
...ons/arista/avd/molecule/eos_designs_unit_tests/intended/configs/l3_edge_l3_interfaces.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,80 @@ | ||
!RANCID-CONTENT-TYPE: arista | ||
! | ||
vlan internal order ascending range 1006 1199 | ||
! | ||
transceiver qsfp default-mode 4x10G | ||
! | ||
service routing protocols model multi-agent | ||
! | ||
hostname l3_edge_l3_interfaces | ||
! | ||
spanning-tree mode none | ||
! | ||
no enable password | ||
no aaa root | ||
! | ||
vrf instance MGMT | ||
! | ||
interface Ethernet1 | ||
description peer1 eth1 | ||
no shutdown | ||
no switchport | ||
ip address 192.168.1.2/31 | ||
service-policy type qos input TEST_POLICY | ||
service-profile TEST-QOS-PROFILE | ||
! TEST RAW_EOS_CLI | ||
|
||
! | ||
interface Ethernet2/2 | ||
description peer2 | ||
no shutdown | ||
no switchport | ||
ip address dhcp | ||
dhcp client accept default-route | ||
! | ||
interface Ethernet42 | ||
description This is a custom description | ||
shutdown | ||
no switchport | ||
ip address dhcp | ||
! | ||
interface Ethernet43 | ||
shutdown | ||
no switchport | ||
ip address 192.168.42.42/24 | ||
! | ||
interface Loopback0 | ||
description EVPN_Overlay_Peering | ||
no shutdown | ||
ip address 1.2.3.1/32 | ||
! | ||
ip routing | ||
no ip routing vrf MGMT | ||
! | ||
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
seq 10 permit 1.2.3.4/24 eq 32 | ||
! | ||
route-map RM-CONN-2-BGP permit 10 | ||
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
! | ||
router bgp 65000 | ||
router-id 1.2.3.1 | ||
maximum-paths 4 ecmp 4 | ||
update wait-install | ||
no bgp default ipv4-unicast | ||
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 | ||
! | ||
address-family ipv4 | ||
neighbor IPv4-UNDERLAY-PEERS activate | ||
! | ||
management api http-commands | ||
protocol https | ||
no shutdown | ||
! | ||
vrf MGMT | ||
no shutdown | ||
! | ||
end |
94 changes: 94 additions & 0 deletions
94
...avd/molecule/eos_designs_unit_tests/intended/structured_configs/l3_edge_l3_interfaces.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,94 @@ | ||
hostname: l3_edge_l3_interfaces | ||
is_deployed: true | ||
router_bgp: | ||
as: '65000' | ||
router_id: 1.2.3.1 | ||
bgp: | ||
default: | ||
ipv4_unicast: false | ||
maximum_paths: | ||
paths: 4 | ||
ecmp: 4 | ||
updates: | ||
wait_install: true | ||
peer_groups: | ||
- name: IPv4-UNDERLAY-PEERS | ||
type: ipv4 | ||
maximum_routes: 12000 | ||
send_community: all | ||
address_family_ipv4: | ||
peer_groups: | ||
- name: IPv4-UNDERLAY-PEERS | ||
activate: true | ||
redistribute_routes: | ||
- source_protocol: connected | ||
route_map: RM-CONN-2-BGP | ||
service_routing_protocols_model: multi-agent | ||
ip_routing: true | ||
vlan_internal_order: | ||
allocation: ascending | ||
range: | ||
beginning: 1006 | ||
ending: 1199 | ||
spanning_tree: | ||
mode: none | ||
vrfs: | ||
- name: MGMT | ||
ip_routing: false | ||
management_api_http: | ||
enable_vrfs: | ||
- name: MGMT | ||
enable_https: true | ||
loopback_interfaces: | ||
- name: Loopback0 | ||
description: EVPN_Overlay_Peering | ||
shutdown: false | ||
ip_address: 1.2.3.1/32 | ||
prefix_lists: | ||
- name: PL-LOOPBACKS-EVPN-OVERLAY | ||
sequence_numbers: | ||
- sequence: 10 | ||
action: permit 1.2.3.4/24 eq 32 | ||
route_maps: | ||
- name: RM-CONN-2-BGP | ||
sequence_numbers: | ||
- sequence: 10 | ||
type: permit | ||
match: | ||
- ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY | ||
ethernet_interfaces: | ||
- name: Ethernet1 | ||
peer_type: l3_interface | ||
peer: peer1 | ||
peer_interface: eth1 | ||
ip_address: 192.168.1.2/31 | ||
shutdown: false | ||
type: routed | ||
description: peer1 eth1 | ||
service_profile: TEST-QOS-PROFILE | ||
eos_cli: '! TEST RAW_EOS_CLI | ||
|
||
' | ||
service_policy: | ||
qos: | ||
input: TEST_POLICY | ||
- name: Ethernet2/2 | ||
peer_type: l3_interface | ||
peer: peer2 | ||
ip_address: dhcp | ||
shutdown: false | ||
type: routed | ||
description: peer2 | ||
dhcp_client_accept_default_route: true | ||
- name: Ethernet42 | ||
peer_type: l3_interface | ||
peer: peer3 | ||
ip_address: dhcp | ||
shutdown: true | ||
type: routed | ||
description: This is a custom description | ||
- name: Ethernet43 | ||
peer_type: l3_interface | ||
ip_address: 192.168.42.42/24 | ||
shutdown: true | ||
type: routed |
46 changes: 46 additions & 0 deletions
46
.../arista/avd/molecule/eos_designs_unit_tests/inventory/host_vars/l3_edge_l3_interfaces.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,46 @@ | ||
type: spine | ||
spine: | ||
nodes: | ||
- name: l3_edge_l3_interfaces | ||
id: 1 | ||
evpn_role: "none" | ||
loopback_ipv4_pool: 1.2.3.4/24 | ||
bgp_as: 65000 | ||
|
||
l3_edge: | ||
l3_interfaces_profiles: | ||
- profile: profile1 | ||
speed: "forced 10000full" | ||
qos_profile: TEST-QOS-PROFILE | ||
structured_config: | ||
service_policy: | ||
qos: | ||
input: TEST_POLICY | ||
raw_eos_cli: | | ||
! TEST RAW_EOS_CLI | ||
l3_interfaces: | ||
# Settings set via profile | ||
- node: l3_edge_l3_interfaces | ||
peer: peer1 | ||
peer_interface: eth1 | ||
interface: Ethernet1 | ||
ip: 192.168.1.2/31 | ||
profile: profile1 | ||
# DHCP default route | ||
- node: l3_edge_l3_interfaces | ||
peer: peer2 | ||
interface: Ethernet2/2 | ||
ip: dhcp | ||
dhcp_client_accept_default_route: True | ||
# custom descriptipon | ||
- node: l3_edge_l3_interfaces | ||
peer: peer3 | ||
interface: Ethernet42 | ||
enabled: False | ||
description: This is a custom description | ||
ip: dhcp | ||
# empty description | ||
- node: l3_edge_l3_interfaces | ||
interface: Ethernet43 | ||
enabled: False | ||
ip: 192.168.42.42/24 |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we automatically build the description with an underscore i.e
peer1_eth1