mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 13:21:22 +00:00
topotests: update test cases about srv6 locator deletion
Before this PR, in case of get locator chunk zapi from zclient, zebra precreated a down state locator and set the chunk ownership. After this PR, this is no longer done, and chunks are no longer automatically generated. In this commit, we will make a test update to check the corresponding detailed behavior. Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
This commit is contained in:
parent
d79ff732cd
commit
e08c56634c
@ -1,6 +1,2 @@
|
||||
[
|
||||
{
|
||||
"name": "loc3",
|
||||
"chunks": []
|
||||
}
|
||||
]
|
||||
|
@ -1,8 +1,2 @@
|
||||
[
|
||||
{
|
||||
"name": "loc3",
|
||||
"chunks": [
|
||||
"2001:db8:3:3::/64"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
2
tests/topotests/srv6_locator/expected_chunks6.json
Normal file
2
tests/topotests/srv6_locator/expected_chunks6.json
Normal file
@ -0,0 +1,2 @@
|
||||
[
|
||||
]
|
@ -23,11 +23,13 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name":"loc3",
|
||||
"statusUp":false,
|
||||
"chunks":[
|
||||
"name": "loc3",
|
||||
"prefix": "2001:db8:3:3::/64",
|
||||
"statusUp": true,
|
||||
"chunks": [
|
||||
{
|
||||
"proto":"sharp"
|
||||
"prefix": "2001:db8:3:3::/64",
|
||||
"proto": "system"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,16 +1,5 @@
|
||||
{
|
||||
"locators":[
|
||||
{
|
||||
"name": "loc1",
|
||||
"prefix": "2001:db8:1:1::/64",
|
||||
"statusUp": true,
|
||||
"chunks": [
|
||||
{
|
||||
"prefix": "2001:db8:1:1::/64",
|
||||
"proto": "system"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "loc2",
|
||||
"prefix": "2001:db8:2:2::/64",
|
||||
@ -29,7 +18,7 @@
|
||||
"chunks":[
|
||||
{
|
||||
"prefix": "2001:db8:3:3::/64",
|
||||
"proto": "sharp"
|
||||
"proto": "system"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
5
tests/topotests/srv6_locator/expected_locators6.json
Normal file
5
tests/topotests/srv6_locator/expected_locators6.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"locators":[
|
||||
]
|
||||
}
|
||||
|
@ -102,6 +102,10 @@ def test_srv6():
|
||||
success, result = topotest.run_and_expect(func, None, count=5, wait=0.5)
|
||||
assert result is None, "Failed"
|
||||
|
||||
# FOR DEVELOPER:
|
||||
# If you want to stop some specific line and start interactive shell,
|
||||
# please use tgen.mininet_cli() to start it.
|
||||
|
||||
logger.info("Test1 for Locator Configuration")
|
||||
check_srv6_locator(router, "expected_locators1.json")
|
||||
check_sharpd_chunk(router, "expected_chunks1.json")
|
||||
@ -116,12 +120,7 @@ def test_srv6():
|
||||
check_srv6_locator(router, "expected_locators3.json")
|
||||
check_sharpd_chunk(router, "expected_chunks3.json")
|
||||
|
||||
logger.info("Test4 get chunk for non-exist locator by zclient")
|
||||
router.vtysh_cmd("sharp srv6-manager get-locator-chunk loc3")
|
||||
check_srv6_locator(router, "expected_locators4.json")
|
||||
check_sharpd_chunk(router, "expected_chunks4.json")
|
||||
|
||||
logger.info("Test5 Test for Zclient. after locator loc3 was configured")
|
||||
logger.info("Test4 additional locator loc3")
|
||||
router.vtysh_cmd(
|
||||
"""
|
||||
configure terminal
|
||||
@ -132,9 +131,33 @@ def test_srv6():
|
||||
prefix 2001:db8:3:3::/64
|
||||
"""
|
||||
)
|
||||
check_srv6_locator(router, "expected_locators4.json")
|
||||
check_sharpd_chunk(router, "expected_chunks4.json")
|
||||
|
||||
logger.info("Test5 delete locator and chunk is released automatically")
|
||||
router.vtysh_cmd(
|
||||
"""
|
||||
configure terminal
|
||||
segment-routing
|
||||
srv6
|
||||
locators
|
||||
no locator loc1
|
||||
"""
|
||||
)
|
||||
check_srv6_locator(router, "expected_locators5.json")
|
||||
check_sharpd_chunk(router, "expected_chunks5.json")
|
||||
|
||||
logger.info("Test6 delete srv6 all configuration")
|
||||
router.vtysh_cmd(
|
||||
"""
|
||||
configure terminal
|
||||
segment-routing
|
||||
no srv6
|
||||
"""
|
||||
)
|
||||
check_srv6_locator(router, "expected_locators6.json")
|
||||
check_sharpd_chunk(router, "expected_chunks6.json")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
args = ["-s"] + sys.argv[1:]
|
||||
|
Loading…
Reference in New Issue
Block a user