]> git.proxmox.com Git - mirror_frr.git/blobdiff - tests/topotests/bgp_path_attribute_discard/test_bgp_path_attribute_discard.py
tests: update tests using 'show bgp json detail'
[mirror_frr.git] / tests / topotests / bgp_path_attribute_discard / test_bgp_path_attribute_discard.py
index 4badf64c37c099b8d83ce1a35097a6db4009904c..ff8d8ed26591e20e1d0980ea57da308100a7e57d 100644 (file)
@@ -81,24 +81,28 @@ def test_bgp_path_attribute_discard():
         output = json.loads(r1.vtysh_cmd("show bgp ipv4 unicast json detail"))
         expected = {
             "routes": {
-                "192.168.100.101/32": [
-                    {
-                        "valid": True,
-                        "atomicAggregate": True,
-                        "community": {
-                            "string": "65001:101",
-                        },
-                    }
-                ],
-                "192.168.100.102/32": [
-                    {
-                        "valid": True,
-                        "originatorId": "10.0.0.2",
-                        "community": {
-                            "string": "65001:102",
-                        },
-                    }
-                ],
+                "192.168.100.101/32": {
+                    "paths": [
+                        {
+                            "valid": True,
+                            "atomicAggregate": True,
+                            "community": {
+                                "string": "65001:101",
+                            },
+                        }
+                    ],
+                },
+                "192.168.100.102/32": {
+                    "paths": [
+                        {
+                            "valid": True,
+                            "originatorId": "10.0.0.2",
+                            "community": {
+                                "string": "65001:102",
+                            },
+                        }
+                    ],
+                },
             }
         }
         return topotest.json_cmp(output, expected)
@@ -120,20 +124,24 @@ def test_bgp_path_attribute_discard():
         output = json.loads(r1.vtysh_cmd("show bgp ipv4 unicast json detail"))
         expected = {
             "routes": {
-                "192.168.100.101/32": [
-                    {
-                        "valid": True,
-                        "atomicAggregate": None,
-                        "community": None,
-                    }
-                ],
-                "192.168.100.102/32": [
-                    {
-                        "valid": True,
-                        "originatorId": None,
-                        "community": None,
-                    }
-                ],
+                "192.168.100.101/32": {
+                    "paths": [
+                        {
+                            "valid": True,
+                            "atomicAggregate": None,
+                            "community": None,
+                        }
+                    ],
+                },
+                "192.168.100.102/32": {
+                    "paths": [
+                        {
+                            "valid": True,
+                            "originatorId": None,
+                            "community": None,
+                        }
+                    ],
+                },
             }
         }
         return topotest.json_cmp(output, expected)