-
Notifications
You must be signed in to change notification settings - Fork 539
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
PY Test script for EVPN L3 VxLAN #1330
Conversation
self.setup_db(dvs) | ||
tunnel_name = 'tunnel_2' | ||
map_name = 'map_1000_100' | ||
vrf_map_name = 'evpn_map_1000_Vrf-RED' |
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.
Do we have a test case for default VRF for L3VPN or is this Test only for Type5 routes?
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.
This test case is only for Type5 routes (non default VRF).
tests/test_evpn_l3_vxlan.py
Outdated
create_vxlan_vrf_tunnel_map(dvs, 'Vrf-RED', '1000') | ||
print "\tPass" | ||
|
||
#vlanlist = ['100', '101', '102'] |
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.
If not required please remove the unwanted code.
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.
ok. Will do.
print "\tPass" | ||
|
||
print "\tTesting Tunnel VRF VNI Map Entry" | ||
vxlan_obj.check_vxlan_tunnel_vrf_map_entry(dvs, tunnel_name, 'Vrf-RED', '1000') |
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.
Please have the VRF Name defined in a variable and use it everywhere. So that, it might not needed to be changed, in lot of places, if we use a different VRF other than Vrf-RED.
And the same goes with VLAN as well.
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.
ok. Will do.
create_vrf_routes_ecmp(dvs, "80.80.1.0/24", 'Vrf-RED', ecmp_nexthop_attr) | ||
|
||
nh_count = 2 | ||
ecmp_nhid_list = vxlan_obj.check_vrf_routes_ecmp(dvs, "80.80.1.0/24", 'Vrf-RED', tunnel_name, nh_count) |
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.
This is an ECMP case for the overlay routes right? Is there a way to check both underlay and overlay ecmp paths?
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.
Yes this is Overlay route with ECMP Tunnel nexthop test case.
Routes can have either all overlay nexthop or all underlay nexthops.
Mix of both overlay and underlay nexthop is currently not supported.
vxlan_obj.check_vrf_routes(dvs, "80.80.1.0/24", 'Vrf-RED', '7.7.7.7', tunnel_name, "00:11:11:11:11:11", '1000') | ||
print "\tPass" | ||
|
||
ecmp_nexthop_attr = [ |
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.
It has been defined earlier at line 1378. Why are we redefining it again here ?
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.
ok. Will update the test case.
check_deleted_object(self.adb, vxlan_obj.ASIC_NEXT_HOP, ecmp_nhid_list[0]) | ||
check_deleted_object(self.adb, vxlan_obj.ASIC_NEXT_HOP, ecmp_nhid_list[1]) | ||
|
||
vxlan_obj.check_vrf_routes_ecmp_nexthop_grp_del(dvs, 2) |
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.
Where is the ecmp group created first?
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.
Line 1386. As part of create_vrf_routes_ecmp()
("nexthop", "7.7.7.7,8.8.8.8"), | ||
("ifname", "Vlan100,Vlan100"), | ||
("vni_label", "1000,1000"), | ||
("router_mac", "00:11:11:11:11:11,00:22:22:22:22:22"), |
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.
How do we verify the local router_mac? ie., local routes getting advertised with local router_mac? Can we test with local static routes?
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.
I did not get the query. Please elaborate.
This is EVPN route over tunnel test case. Static route with tunnel nexthop is currently not supported.
print "\tPass" | ||
|
||
print "\tTest VRF IPv4 Route with ECMP Tunnel Nexthop [7.7.7.7 , 8.8.8.8] Udpate" | ||
ecmp_nexthop_attr = [ |
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.
If we can reuse the earlier declaration of "ecmp_nexthop_attr " . Please use it.
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.
ok. Will do.
tests/test_evpn_l3_vxlan.py
Outdated
vxlan_obj.remove_vrf(dvs, "Vrf-RED") | ||
remove_vlan_member(dvs, "100", "Ethernet24") | ||
remove_vlan(dvs, "100") | ||
print "\tPass\n" |
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.
Please add cases for local static route prefixes for both ipv4 & ipv6, if they are supported.
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.
Static route with Tunnel nexthop is currently not supported. And out of scope of this PR.
retest vs please |
retest this please |
retest this please |
@tapashdas , could you please take a look at the evpn test failures. Please confirm if any fix is required in code |
What I did
Added PY Test script for EVPN L3 VxLAN.
Added following test cases.
Testing Create and Delete SIP Tunnel and VRF VNI Map entries
Testing Create and Delete DIP Tunnel on adding and removing prefix route
Testing IPv4 Route and Overlay Nexthop Add and Delete
Testing IPv4 Route and Overlay Nexthop Update
Test VRF IPv4 Route with ECMP Tunnel Nexthop Add and Delete
Test VRF IPv4 Route with Tunnel Nexthop update from non-ECMP to ECMP
Test VRF IPv4 Route with Tunnel Nexthop update from ECMP to non-ECMP
Testing IPv6 Route and Overlay Nexthop Add and Delete
Testing IPv6 Route and Overlay Nexthop Update
Test VRF IPv6 Route with ECMP Tunnel Nexthop Add and delete
Test VRF IPv6 Route with Tunnel Nexthop update from non-ECMP to ECMP
Test VRF IPv6 Route with Tunnel Nexthop update from ECMP to non-ECMP
Test DIP and SIP Tunnel Deletion
Why I did it
For code changes in PR 1267 (#1267).
And corresponding HLD PR 437 (sonic-net/SONiC#437)
How I verified it
Merge all EVPN PRs are execute the PY Test Script.
Details if related