From 43c13777b2bc7790853ae0ff61acd31246b2cf48 Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Thu, 13 Feb 2025 12:15:12 +0100 Subject: [PATCH] tests: Add test case to verify the programming of SRv6 uA SIDs This commit adds a test case to ensure staticd correctly programs SRv6 uA SIDs in the RIB. Signed-off-by: Carmine Scarpitta --- .../static_srv6_sids/expected_srv6_sids.json | 35 +++++++++++++++++++ .../expected_srv6_sids_sid_delete_1.json | 35 +++++++++++++++++++ .../expected_srv6_sids_sid_delete_2.json | 35 +++++++++++++++++++ tests/topotests/static_srv6_sids/r1/frr.conf | 1 + 4 files changed, 106 insertions(+) diff --git a/tests/topotests/static_srv6_sids/expected_srv6_sids.json b/tests/topotests/static_srv6_sids/expected_srv6_sids.json index de78878445..1796c870a6 100644 --- a/tests/topotests/static_srv6_sids/expected_srv6_sids.json +++ b/tests/topotests/static_srv6_sids/expected_srv6_sids.json @@ -162,5 +162,40 @@ } ] } + ], + "fcbb:bbbb:1:fe40::/64": [ + { + "prefix": "fcbb:bbbb:1:fe40::/64", + "prefixLen": 64, + "protocol": "static", + "vrfId": 0, + "vrfName": "default", + "selected": true, + "destSelected": true, + "distance": 1, + "metric": 0, + "installed": true, + "table": 254, + "internalStatus": 16, + "internalFlags": 9, + "internalNextHopNum": 1, + "internalNextHopActiveNum": 1, + "nexthops": [ + { + "flags": 3, + "fib": true, + "directlyConnected": true, + "interfaceName": "sr0", + "active": true, + "weight": 1, + "seg6local": { + "action": "End.X" + }, + "seg6localContext": { + "nh6": "2001::2" + } + } + ] + } ] } \ No newline at end of file diff --git a/tests/topotests/static_srv6_sids/expected_srv6_sids_sid_delete_1.json b/tests/topotests/static_srv6_sids/expected_srv6_sids_sid_delete_1.json index dd0850fb3c..bd1f4bf87a 100644 --- a/tests/topotests/static_srv6_sids/expected_srv6_sids_sid_delete_1.json +++ b/tests/topotests/static_srv6_sids/expected_srv6_sids_sid_delete_1.json @@ -121,5 +121,40 @@ } ] } + ], + "fcbb:bbbb:1:fe40::/64": [ + { + "prefix": "fcbb:bbbb:1:fe40::/64", + "prefixLen": 64, + "protocol": "static", + "vrfId": 0, + "vrfName": "default", + "selected": true, + "destSelected": true, + "distance": 1, + "metric": 0, + "installed": true, + "table": 254, + "internalStatus": 16, + "internalFlags": 9, + "internalNextHopNum": 1, + "internalNextHopActiveNum": 1, + "nexthops": [ + { + "flags": 3, + "fib": true, + "directlyConnected": true, + "interfaceName": "sr0", + "active": true, + "weight": 1, + "seg6local": { + "action": "End.X" + }, + "seg6localContext": { + "nh6": "2001::2" + } + } + ] + } ] } \ No newline at end of file diff --git a/tests/topotests/static_srv6_sids/expected_srv6_sids_sid_delete_2.json b/tests/topotests/static_srv6_sids/expected_srv6_sids_sid_delete_2.json index 4051c01425..2bd40cdb5c 100644 --- a/tests/topotests/static_srv6_sids/expected_srv6_sids_sid_delete_2.json +++ b/tests/topotests/static_srv6_sids/expected_srv6_sids_sid_delete_2.json @@ -80,5 +80,40 @@ } ] } + ], + "fcbb:bbbb:1:fe40::/64": [ + { + "prefix": "fcbb:bbbb:1:fe40::/64", + "prefixLen": 64, + "protocol": "static", + "vrfId": 0, + "vrfName": "default", + "selected": true, + "destSelected": true, + "distance": 1, + "metric": 0, + "installed": true, + "table": 254, + "internalStatus": 16, + "internalFlags": 9, + "internalNextHopNum": 1, + "internalNextHopActiveNum": 1, + "nexthops": [ + { + "flags": 3, + "fib": true, + "directlyConnected": true, + "interfaceName": "sr0", + "active": true, + "weight": 1, + "seg6local": { + "action": "End.X" + }, + "seg6localContext": { + "nh6": "2001::2" + } + } + ] + } ] } \ No newline at end of file diff --git a/tests/topotests/static_srv6_sids/r1/frr.conf b/tests/topotests/static_srv6_sids/r1/frr.conf index b4904d9ac2..ce8fb88165 100644 --- a/tests/topotests/static_srv6_sids/r1/frr.conf +++ b/tests/topotests/static_srv6_sids/r1/frr.conf @@ -12,6 +12,7 @@ segment-routing sid fcbb:bbbb:1:fe10::/64 locator MAIN behavior uDT4 vrf Vrf10 sid fcbb:bbbb:1:fe20::/64 locator MAIN behavior uDT6 vrf Vrf20 sid fcbb:bbbb:1:fe30::/64 locator MAIN behavior uDT46 vrf Vrf30 + sid fcbb:bbbb:1:fe40::/64 locator MAIN behavior uA interface sr0 nexthop 2001::2 ! ! ! \ No newline at end of file -- 2.39.5