Skip to content

Commit

Permalink
topotests: bgp_evpn_rt5, rework test
Browse files Browse the repository at this point in the history
Rework the test file by adding test methods.
Add a convergence test that checks for the incoming BGP prefixes.

Signed-off-by: Philippe Guibert <[email protected]>
  • Loading branch information
pguibert6WIND committed Nov 25, 2024
1 parent 28b45fd commit 199d795
Show file tree
Hide file tree
Showing 3 changed files with 407 additions and 65 deletions.
131 changes: 131 additions & 0 deletions tests/topotests/bgp_evpn_rt5/r1/bgp_l2vpn_evpn_routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"bgpLocalRouterId":"192.168.100.21",
"defaultLocPrf":100,
"localAS":65000,
"192.168.101.41:2":{
"rd":"192.168.101.41:2",
"[5]:[0]:[32]:[192.168.101.41]":{
"prefix":"[5]:[0]:[32]:[192.168.101.41]",
"prefixLen":352,
"paths":[
{
"valid":true,
"bestpath":true,
"selectionReason":"First path received",
"pathFrom":"internal",
"routeType":5,
"ethTag":0,
"ipLen":32,
"ip":"192.168.101.41",
"metric":0,
"locPrf":100,
"weight":0,
"peerId":"192.168.100.41",
"path":"",
"origin":"IGP",
"nexthops":[
{
"ip":"192.168.100.41",
"hostname":"r2",
"afi":"ipv4",
"used":true
}
]
}
]
},
"[5]:[0]:[128]:[fd00::2]":{
"prefix":"[5]:[0]:[128]:[fd00::2]",
"prefixLen":352,
"paths":[
{
"valid":true,
"bestpath":true,
"selectionReason":"First path received",
"pathFrom":"internal",
"routeType":5,
"ethTag":0,
"ipLen":128,
"ip":"fd00::2",
"metric":0,
"locPrf":100,
"weight":0,
"peerId":"192.168.100.41",
"path":"",
"origin":"IGP",
"nexthops":[
{
"ip":"192.168.100.41",
"hostname":"r2",
"afi":"ipv4",
"used":true
}
]
}
]
}
},
"192.168.102.21:2":{
"rd":"192.168.102.21:2",
"[5]:[0]:[32]:[192.168.102.21]":{
"prefix":"[5]:[0]:[32]:[192.168.102.21]",
"prefixLen":352,
"paths":[
{
"valid":true,
"bestpath":true,
"selectionReason":"First path received",
"pathFrom":"external",
"routeType":5,
"ethTag":0,
"ipLen":32,
"ip":"192.168.102.21",
"metric":0,
"weight":32768,
"peerId":"(unspec)",
"path":"",
"origin":"IGP",
"nexthops":[
{
"ip":"192.168.100.21",
"hostname":"r1",
"afi":"ipv4",
"used":true
}
]
}
]
},
"[5]:[0]:[128]:[fd00::1]":{
"prefix":"[5]:[0]:[128]:[fd00::1]",
"prefixLen":352,
"paths":[
{
"valid":true,
"bestpath":true,
"selectionReason":"First path received",
"pathFrom":"external",
"routeType":5,
"ethTag":0,
"ipLen":128,
"ip":"fd00::1",
"metric":0,
"weight":32768,
"peerId":"(unspec)",
"path":"",
"origin":"IGP",
"nexthops":[
{
"ip":"192.168.100.21",
"hostname":"r1",
"afi":"ipv4",
"used":true
}
]
}
]
}
},
"numPrefix":4,
"totalPrefix":4
}
131 changes: 131 additions & 0 deletions tests/topotests/bgp_evpn_rt5/r2/bgp_l2vpn_evpn_routes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"bgpLocalRouterId":"192.168.100.41",
"defaultLocPrf":100,
"localAS":65000,
"192.168.101.41:2":{
"rd":"192.168.101.41:2",
"[5]:[0]:[32]:[192.168.101.41]":{
"prefix":"[5]:[0]:[32]:[192.168.101.41]",
"prefixLen":352,
"paths":[
{
"valid":true,
"bestpath":true,
"selectionReason":"First path received",
"pathFrom":"external",
"routeType":5,
"ethTag":0,
"ipLen":32,
"ip":"192.168.101.41",
"metric":0,
"weight":32768,
"peerId":"(unspec)",
"path":"",
"origin":"IGP",
"nexthops":[
{
"ip":"192.168.100.41",
"hostname":"r2",
"afi":"ipv4",
"used":true
}
]
}
]
},
"[5]:[0]:[128]:[fd00::2]":{
"prefix":"[5]:[0]:[128]:[fd00::2]",
"prefixLen":352,
"paths":[
{
"valid":true,
"bestpath":true,
"selectionReason":"First path received",
"pathFrom":"external",
"routeType":5,
"ethTag":0,
"ipLen":128,
"ip":"fd00::2",
"metric":0,
"weight":32768,
"peerId":"(unspec)",
"path":"",
"origin":"IGP",
"nexthops":[
{
"ip":"192.168.100.41",
"hostname":"r2",
"afi":"ipv4",
"used":true
}
]
}
]
}
},
"192.168.102.21:2":{
"rd":"192.168.102.21:2",
"[5]:[0]:[32]:[192.168.102.21]":{
"prefix":"[5]:[0]:[32]:[192.168.102.21]",
"prefixLen":352,
"paths":[
{
"valid":true,
"bestpath":true,
"selectionReason":"First path received",
"pathFrom":"internal",
"routeType":5,
"ethTag":0,
"ipLen":32,
"ip":"192.168.102.21",
"metric":0,
"locPrf":100,
"weight":0,
"peerId":"192.168.100.21",
"path":"",
"origin":"IGP",
"nexthops":[
{
"ip":"192.168.100.21",
"hostname":"r1",
"afi":"ipv4",
"used":true
}
]
}
]
},
"[5]:[0]:[128]:[fd00::1]":{
"prefix":"[5]:[0]:[128]:[fd00::1]",
"prefixLen":352,
"paths":[
{
"valid":true,
"bestpath":true,
"selectionReason":"First path received",
"pathFrom":"internal",
"routeType":5,
"ethTag":0,
"ipLen":128,
"ip":"fd00::1",
"metric":0,
"locPrf":100,
"weight":0,
"peerId":"192.168.100.21",
"path":"",
"origin":"IGP",
"nexthops":[
{
"ip":"192.168.100.21",
"hostname":"r1",
"afi":"ipv4",
"used":true
}
]
}
]
}
},
"numPrefix":4,
"totalPrefix":4
}
Loading

0 comments on commit 199d795

Please sign in to comment.