diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:56:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:56:24 +0000 |
commit | 54de8bbe36d7d968c6367939277942518bd4e11f (patch) | |
tree | 924f8c16d9c8831679f355b88c620b9b356c9d5a /tests/topotests/nb_config | |
parent | Adding debian version 10.0.1-0.1. (diff) | |
download | frr-54de8bbe36d7d968c6367939277942518bd4e11f.tar.xz frr-54de8bbe36d7d968c6367939277942518bd4e11f.zip |
Merging upstream version 10.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/topotests/nb_config')
-rw-r--r-- | tests/topotests/nb_config/test_nb_config.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/topotests/nb_config/test_nb_config.py b/tests/topotests/nb_config/test_nb_config.py index f699a4e..9099ef1 100644 --- a/tests/topotests/nb_config/test_nb_config.py +++ b/tests/topotests/nb_config/test_nb_config.py @@ -24,9 +24,7 @@ CWD = os.path.dirname(os.path.realpath(__file__)) def tgen(request): "Setup/Teardown the environment and provide tgen argument to tests" - topodef = { - "s1": ("r1",) - } + topodef = {"s1": ("r1",)} tgen = Topogen(topodef, request.module.__name__) tgen.start_topology() @@ -46,12 +44,14 @@ def test_access_list_config_ordering(tgen): r1 = tgen.gears["r1"] - output = r1.vtysh_multicmd([ - "conf t", - "access-list test seq 1 permit host 10.0.0.1"]) + output = r1.vtysh_multicmd( + ["conf t", "access-list test seq 1 permit host 10.0.0.1"] + ) output = r1.vtysh_cmd("show ip access-list test json") got = json.loads(output) - expected = json.loads('{"ZEBRA":{"test":{"type":"Standard", "addressFamily":"IPv4", "rules":[{"sequenceNumber":1, "filterType":"permit", "address":"10.0.0.1", "mask":"0.0.0.0"}]}}}') + expected = json.loads( + '{"zebra":{"test":{"type":"Standard", "addressFamily":"IPv4", "rules":[{"sequenceNumber":1, "filterType":"permit", "address":"10.0.0.1", "mask":"0.0.0.0"}]}}}' + ) result = json_cmp(got, expected) assert result is None @@ -59,11 +59,11 @@ def test_access_list_config_ordering(tgen): # If the northbound mis-orders the create/delete then this test fails. # https://github.com/FRRouting/frr/pull/15423/commits/38b85e0c2bc555b8827dbd2cb6515b6febf548b4 # - output = r1.vtysh_multicmd([ - "conf t", - "access-list test seq 1 permit 10.0.0.0/8"]) + output = r1.vtysh_multicmd(["conf t", "access-list test seq 1 permit 10.0.0.0/8"]) output = r1.vtysh_cmd("show ip access-list test json") got = json.loads(output) - expected = json.loads('{"ZEBRA":{"test":{"type":"Zebra", "addressFamily":"IPv4", "rules":[{"sequenceNumber":1, "filterType":"permit", "prefix":"10.0.0.0/8", "exact-match":false}]}}}') + expected = json.loads( + '{"zebra":{"test":{"type":"Zebra", "addressFamily":"IPv4", "rules":[{"sequenceNumber":1, "filterType":"permit", "prefix":"10.0.0.0/8", "exact-match":false}]}}}' + ) result = json_cmp(got, expected) assert result is None |