Skip to content

Commit

Permalink
tests: Add zebra rib import-table tests
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
  • Loading branch information
nabahr committed Oct 29, 2024
1 parent a539e39 commit 45daed7
Show file tree
Hide file tree
Showing 10 changed files with 2,166 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/topotests/zebra_rib/r1/frr-import.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
!
hostname r1
password zebra
log file /tmp/r1-frr.log
!
interface r1-eth0
ip address 10.0.0.1/24
!
interface r1-eth1
ip address 10.10.0.1/24
!
ip route 10.1.0.0/24 10.0.0.2 table 10
ip route 10.2.0.0/24 10.0.0.2 table 10
ip route 10.3.0.0/24 10.10.0.2 table 10
ip route 10.4.0.0/24 10.10.0.2 table 10
!
ip forwarding
!
126 changes: 126 additions & 0 deletions tests/topotests/zebra_rib/r1/import_init_mrib_table.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"10.0.0.0/24": [
{
"prefix": "10.0.0.0/24",
"prefixLen": 24,
"protocol": "connected",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1,
"nexthopGroupId": 3,
"installedNexthopGroupId": 3,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceName": "r1-eth0",
"active": true,
"weight": 1
}
]
}
],
"10.0.0.1/32": [
{
"prefix": "10.0.0.1/32",
"prefixLen": 32,
"protocol": "local",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1,
"nexthopGroupId": 3,
"installedNexthopGroupId": 3,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceName": "r1-eth0",
"active": true,
"weight": 1
}
]
}
],
"10.10.0.0/24": [
{
"prefix": "10.10.0.0/24",
"prefixLen": 24,
"protocol": "connected",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1,
"nexthopGroupId": 4,
"installedNexthopGroupId": 4,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceName": "r1-eth1",
"active": true,
"weight": 1
}
]
}
],
"10.10.0.1/32": [
{
"prefix": "10.10.0.1/32",
"prefixLen": 32,
"protocol": "local",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1,
"nexthopGroupId": 4,
"installedNexthopGroupId": 4,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceName": "r1-eth1",
"active": true,
"weight": 1
}
]
}
]
}
126 changes: 126 additions & 0 deletions tests/topotests/zebra_rib/r1/import_init_table.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"10.0.0.0/24": [
{
"prefix": "10.0.0.0/24",
"prefixLen": 24,
"protocol": "connected",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1,
"nexthopGroupId": 3,
"installedNexthopGroupId": 3,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceName": "r1-eth0",
"active": true,
"weight": 1
}
]
}
],
"10.0.0.1/32": [
{
"prefix": "10.0.0.1/32",
"prefixLen": 32,
"protocol": "local",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1,
"nexthopGroupId": 3,
"installedNexthopGroupId": 3,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceName": "r1-eth0",
"active": true,
"weight": 1
}
]
}
],
"10.10.0.0/24": [
{
"prefix": "10.10.0.0/24",
"prefixLen": 24,
"protocol": "connected",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1,
"nexthopGroupId": 4,
"installedNexthopGroupId": 4,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceName": "r1-eth1",
"active": true,
"weight": 1
}
]
}
],
"10.10.0.1/32": [
{
"prefix": "10.10.0.1/32",
"prefixLen": 32,
"protocol": "local",
"vrfId": 0,
"vrfName": "default",
"selected": true,
"destSelected": true,
"distance": 0,
"metric": 0,
"installed": true,
"table": 254,
"internalStatus": 16,
"internalFlags": 8,
"internalNextHopNum": 1,
"internalNextHopActiveNum": 1,
"nexthopGroupId": 4,
"installedNexthopGroupId": 4,
"nexthops": [
{
"flags": 3,
"fib": true,
"directlyConnected": true,
"interfaceName": "r1-eth1",
"active": true,
"weight": 1
}
]
}
]
}
Loading

0 comments on commit 45daed7

Please sign in to comment.