]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Remove/change JSON attributes for `show bgp ... json` 6130/head
authorDonatas Abraitis <donatas.abraitis@gmail.com>
Wed, 1 Apr 2020 14:04:08 +0000 (17:04 +0300)
committerDonatas Abraitis <donatas.abraitis@gmail.com>
Wed, 1 Apr 2020 20:59:45 +0000 (23:59 +0300)
This is related to some attributes changes: aspath, med, localPref.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
20 files changed:
tests/topotests/bfd-bgp-cbit-topo3/r1/bgp_ipv6_routes_down.json
tests/topotests/bfd-bgp-cbit-topo3/r3/bgp_ipv6_routes_down.json
tests/topotests/bfd-topo1/r1/bgp_prefixes.json
tests/topotests/bfd-topo1/r2/bgp_prefixes.json
tests/topotests/bfd-topo1/r3/bgp_prefixes.json
tests/topotests/bfd-topo1/r4/bgp_prefixes.json
tests/topotests/bfd-vrf-topo1/r1/bgp_prefixes.json
tests/topotests/bfd-vrf-topo1/r2/bgp_prefixes.json
tests/topotests/bfd-vrf-topo1/r3/bgp_prefixes.json
tests/topotests/bfd-vrf-topo1/r4/bgp_prefixes.json
tests/topotests/bgp-path-attributes-topo1/test_bgp_path_attributes.py
tests/topotests/bgp-route-map/test_route_map_topo1.py
tests/topotests/bgp-route-map/test_route_map_topo2.py
tests/topotests/bgp_aggregate-address_route-map/test_bgp_aggregate-address_route-map.py
tests/topotests/bgp_default-route_route-map/test_bgp_default-originate_route-map.py
tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py
tests/topotests/bgp_reject_as_sets/test_bgp_reject_as_sets.py
tests/topotests/bgp_set_local-preference_add_subtract/test_bgp_set_local-preference_add_subtract.py
tests/topotests/lib/bgp.py
tests/topotests/lib/common_config.py

index 54ae57f7be58862722c1356786484ff31e862098..ac5fd040745e3b4037ebb7fc0b9006d1285a30e2 100644 (file)
@@ -14,7 +14,6 @@
                 "prefix": "2001:db8:6::",
                 "prefixLen": 64,
                 "network": "2001:db8:6::\/64",
-                "med": 0,
                 "metric": 0,
                 "weight": 0,
                 "peerId": "2001:db8:4::1",
@@ -37,7 +36,6 @@
                 "prefix": "2001:db8:7::",
                 "prefixLen": 64, "network":
                 "2001:db8:7::\/64",
-                "med": 0,
                 "metric": 0,
                 "weight": 0,
                 "peerId": "2001:db8:4::1",
@@ -60,7 +58,6 @@
                 "prefix": "2001:db8:8::",
                 "prefixLen": 64,
                 "network": "2001:db8:8::\/64",
-                "med": 0,
                 "metric": 0,
               "weight": 32768,
                 "peerId": "(unspec)",
@@ -83,7 +80,6 @@
                 "prefix": "2001:db8:9::",
                 "prefixLen": 64,
                 "network": "2001:db8:9::\/64",
-                "med": 0,
                 "metric": 0,
                 "weight": 32768,
                 "peerId": "(unspec)",
index a3bb222504f2620e948858ae12b10b009525e8ca..ab42b05e854c1a81edf7d3ad6f065a843b5ddf2d 100644 (file)
@@ -13,7 +13,6 @@
                 "prefix": "2001:db8:6::",
                 "prefixLen": 64,
                 "network": "2001:db8:6::\/64",
-                "med": 0,
                 "metric": 0,
                 "weight": 32768,
                 "peerId": "(unspec)",
@@ -36,7 +35,6 @@
                 "prefix": "2001:db8:7::",
                 "prefixLen": 64,
                 "network": "2001:db8:7::\/64",
-                "med": 0,
                 "metric": 0,
                 "weight": 32768,
                 "peerId": "(unspec)",
index 4b2cc1ad621f42aeeb355042a2c440d436a1722e..1262f5e984904f923c9ad1cc94781d710252a8dd 100644 (file)
@@ -2,7 +2,7 @@
   "routes": {
     "10.254.254.2/32": [
       {
-        "aspath": "102",
+        "path": "102",
         "prefix": "10.254.254.2",
         "valid": true,
         "peerId": "192.168.0.2",
@@ -18,7 +18,7 @@
     ],
     "10.254.254.3/32": [
       {
-        "aspath": "102 103",
+        "path": "102 103",
         "prefix": "10.254.254.3",
         "valid": true,
         "peerId": "192.168.0.2",
@@ -34,7 +34,7 @@
     ],
     "10.254.254.4/32": [
       {
-        "aspath": "102 104",
+        "path": "102 104",
         "prefix": "10.254.254.4",
         "valid": true,
         "peerId": "192.168.0.2",
index 39f3c0a83590a2a7f66857b46506ecc79da2fd84..0d47c0fc30f6e1b6e50d75b5301dcf639ce5e2b2 100644 (file)
@@ -2,7 +2,7 @@
   "routes": {
     "10.254.254.1/32": [
       {
-        "aspath": "101",
+        "path": "101",
         "prefix": "10.254.254.1",
         "valid": true,
         "peerId": "192.168.0.1",
@@ -18,7 +18,7 @@
     ],
     "10.254.254.3/32": [
       {
-        "aspath": "103",
+        "path": "103",
         "prefix": "10.254.254.3",
         "valid": true,
         "peerId": "192.168.1.1",
@@ -34,7 +34,7 @@
     ],
     "10.254.254.4/32": [
       {
-        "aspath": "104",
+        "path": "104",
         "prefix": "10.254.254.4",
         "valid": true,
         "peerId": "192.168.2.1",
index c92d4e052a33cc2b55688dce96582fdc5143f89c..36fca17bbf6e26f39a23ca63bdf81d7c72889722 100644 (file)
@@ -2,7 +2,7 @@
   "routes": {
     "10.254.254.1/32": [
       {
-        "aspath": "102 101",
+        "path": "102 101",
         "prefix": "10.254.254.1",
         "valid": true,
         "peerId": "192.168.1.2",
@@ -18,7 +18,7 @@
     ],
     "10.254.254.2/32": [
       {
-        "aspath": "102",
+        "path": "102",
         "prefix": "10.254.254.2",
         "valid": true,
         "peerId": "192.168.1.2",
@@ -34,7 +34,7 @@
     ],
     "10.254.254.4/32": [
       {
-        "aspath": "102 104",
+        "path": "102 104",
         "prefix": "10.254.254.4",
         "valid": true,
         "peerId": "192.168.1.2",
index cc8510dd613797c059e49d9f106e6c53f64f9d6f..efe7d47b1af412e0dadb63a363bcc00e614c245c 100644 (file)
@@ -2,7 +2,7 @@
   "routes": {
     "10.254.254.1/32": [
       {
-        "aspath": "102 101",
+        "path": "102 101",
         "prefix": "10.254.254.1",
         "valid": true,
         "peerId": "192.168.2.2",
@@ -18,7 +18,7 @@
     ],
     "10.254.254.2/32": [
       {
-        "aspath": "102",
+        "path": "102",
         "prefix": "10.254.254.2",
         "valid": true,
         "peerId": "192.168.2.2",
@@ -34,7 +34,7 @@
     ],
     "10.254.254.3/32": [
       {
-        "aspath": "102 103",
+        "path": "102 103",
         "prefix": "10.254.254.3",
         "valid": true,
         "peerId": "192.168.2.2",
index 4b2cc1ad621f42aeeb355042a2c440d436a1722e..1262f5e984904f923c9ad1cc94781d710252a8dd 100644 (file)
@@ -2,7 +2,7 @@
   "routes": {
     "10.254.254.2/32": [
       {
-        "aspath": "102",
+        "path": "102",
         "prefix": "10.254.254.2",
         "valid": true,
         "peerId": "192.168.0.2",
@@ -18,7 +18,7 @@
     ],
     "10.254.254.3/32": [
       {
-        "aspath": "102 103",
+        "path": "102 103",
         "prefix": "10.254.254.3",
         "valid": true,
         "peerId": "192.168.0.2",
@@ -34,7 +34,7 @@
     ],
     "10.254.254.4/32": [
       {
-        "aspath": "102 104",
+        "path": "102 104",
         "prefix": "10.254.254.4",
         "valid": true,
         "peerId": "192.168.0.2",
index 39f3c0a83590a2a7f66857b46506ecc79da2fd84..0d47c0fc30f6e1b6e50d75b5301dcf639ce5e2b2 100644 (file)
@@ -2,7 +2,7 @@
   "routes": {
     "10.254.254.1/32": [
       {
-        "aspath": "101",
+        "path": "101",
         "prefix": "10.254.254.1",
         "valid": true,
         "peerId": "192.168.0.1",
@@ -18,7 +18,7 @@
     ],
     "10.254.254.3/32": [
       {
-        "aspath": "103",
+        "path": "103",
         "prefix": "10.254.254.3",
         "valid": true,
         "peerId": "192.168.1.1",
@@ -34,7 +34,7 @@
     ],
     "10.254.254.4/32": [
       {
-        "aspath": "104",
+        "path": "104",
         "prefix": "10.254.254.4",
         "valid": true,
         "peerId": "192.168.2.1",
index c92d4e052a33cc2b55688dce96582fdc5143f89c..36fca17bbf6e26f39a23ca63bdf81d7c72889722 100644 (file)
@@ -2,7 +2,7 @@
   "routes": {
     "10.254.254.1/32": [
       {
-        "aspath": "102 101",
+        "path": "102 101",
         "prefix": "10.254.254.1",
         "valid": true,
         "peerId": "192.168.1.2",
@@ -18,7 +18,7 @@
     ],
     "10.254.254.2/32": [
       {
-        "aspath": "102",
+        "path": "102",
         "prefix": "10.254.254.2",
         "valid": true,
         "peerId": "192.168.1.2",
@@ -34,7 +34,7 @@
     ],
     "10.254.254.4/32": [
       {
-        "aspath": "102 104",
+        "path": "102 104",
         "prefix": "10.254.254.4",
         "valid": true,
         "peerId": "192.168.1.2",
index cc8510dd613797c059e49d9f106e6c53f64f9d6f..efe7d47b1af412e0dadb63a363bcc00e614c245c 100644 (file)
@@ -2,7 +2,7 @@
   "routes": {
     "10.254.254.1/32": [
       {
-        "aspath": "102 101",
+        "path": "102 101",
         "prefix": "10.254.254.1",
         "valid": true,
         "peerId": "192.168.2.2",
@@ -18,7 +18,7 @@
     ],
     "10.254.254.2/32": [
       {
-        "aspath": "102",
+        "path": "102",
         "prefix": "10.254.254.2",
         "valid": true,
         "peerId": "192.168.2.2",
@@ -34,7 +34,7 @@
     ],
     "10.254.254.3/32": [
       {
-        "aspath": "102 103",
+        "path": "102 103",
         "prefix": "10.254.254.3",
         "valid": true,
         "peerId": "192.168.2.2",
index 3b2d9c25d7473a05eb3e2ebe18277ef1642677cb..1cd2c4417f21164e59b05816f23bc8abc0102461 100755 (executable)
@@ -430,7 +430,7 @@ def test_aspath_attribute(request):
 
     # Verifying best path
     dut = "r1"
-    attribute = "aspath"
+    attribute = "path"
     for addr_type in ADDR_TYPES:
         result = verify_best_path_as_per_bgp_attribute(tgen, addr_type, dut,
                                                    {"r7": input_dict["r7"]},
@@ -479,7 +479,7 @@ def test_aspath_attribute(request):
                         }
                     },
                     "set": {
-                        "aspath": {
+                        "path": {
                             "as_num": "111 222",
                             "as_action": "prepend"
                         }
@@ -493,7 +493,7 @@ def test_aspath_attribute(request):
                         }
                     },
                     "set": {
-                        "aspath": {
+                        "path": {
                             "as_num": "111 222",
                             "as_action": "prepend"
                         }
@@ -553,7 +553,7 @@ def test_aspath_attribute(request):
 
     # Verifying best path
     dut = "r1"
-    attribute = "aspath"
+    attribute = "path"
     for addr_type in ADDR_TYPES:
         result = verify_best_path_as_per_bgp_attribute(tgen, addr_type, dut,
                                                    {"r7": input_dict["r7"]},
@@ -714,7 +714,7 @@ def test_localpref_attribute(request):
                         }
                     },
                     "set": {
-                        "localpref": 1111
+                        "locPrf": 1111
                     }
                 },
                 {
@@ -726,7 +726,7 @@ def test_localpref_attribute(request):
                         }
                     },
                     "set": {
-                        "localpref": 1111
+                        "locPrf": 1111
                     }
                 }]
             }
@@ -783,7 +783,7 @@ def test_localpref_attribute(request):
 
     # Verifying best path
     dut = "r1"
-    attribute = "localpref"
+    attribute = "locPrf"
     for addr_type in ADDR_TYPES:
         result = verify_best_path_as_per_bgp_attribute(tgen, addr_type, dut,
                                                    {"r7": input_dict["r7"]},
@@ -804,7 +804,7 @@ def test_localpref_attribute(request):
                         }
                     },
                     "set": {
-                        "localpref": 50
+                        "locPrf": 50
                     }
                 },
                 {
@@ -816,7 +816,7 @@ def test_localpref_attribute(request):
                         }
                     },
                     "set": {
-                        "localpref": 50
+                        "locPrf": 50
                     }
                 }]
             }
@@ -828,7 +828,7 @@ def test_localpref_attribute(request):
 
     # Verifying best path
     dut = "r1"
-    attribute = "localpref"
+    attribute = "locPrf"
     for addr_type in ADDR_TYPES:
         result = verify_best_path_as_per_bgp_attribute(tgen, addr_type, dut,
                                                    {"r7": input_dict["r7"]},
@@ -1437,7 +1437,7 @@ def test_med_attribute(request):
                         }
                     },
                     "set": {
-                        "med": 100
+                        "metric": 100
                     }
                 },
                 {
@@ -1449,7 +1449,7 @@ def test_med_attribute(request):
                         }
                     },
                     "set": {
-                        "med": 100
+                        "metric": 100
                     }
                 }]
             }
@@ -1465,7 +1465,7 @@ def test_med_attribute(request):
                         }
                     },
                     "set": {
-                        "med": 10
+                        "metric": 10
                     }
                 },
                 {
@@ -1477,7 +1477,7 @@ def test_med_attribute(request):
                         }
                     },
                     "set": {
-                        "med": 10
+                        "metric": 10
                     }
                 }]
             }
@@ -1593,7 +1593,7 @@ def test_med_attribute(request):
 
     # Verifying best path
     dut = "r1"
-    attribute = "med"
+    attribute = "metric"
     for addr_type in ADDR_TYPES:
         result = verify_best_path_as_per_bgp_attribute(tgen, addr_type, dut,
                                                    input_dict, attribute)
@@ -1613,7 +1613,7 @@ def test_med_attribute(request):
                         }
                     },
                     "set": {
-                        "med": 200
+                        "metric": 200
                     }
                 },
                 {
@@ -1625,7 +1625,7 @@ def test_med_attribute(request):
                         }
                     },
                     "set": {
-                        "med": 200
+                        "metric": 200
                     }
                 }]
             }
@@ -1638,7 +1638,7 @@ def test_med_attribute(request):
 
     # Verifying best path
     dut = "r1"
-    attribute = "med"
+    attribute = "metric"
     for addr_type in ADDR_TYPES:
         result = verify_best_path_as_per_bgp_attribute(tgen, addr_type, dut,
                                                    input_dict, attribute)
index 22dd3a638034b436ac6c0713495bc90325530361..c854e5a4442653a4a26aa7204038b38b4e1e6cc9 100755 (executable)
@@ -763,7 +763,7 @@ def test_route_map_multiple_seq_different_match_set_clause_p0(request):
                                 }
                             },
                             "set": {
-                                "aspath": {
+                                "path": {
                                     "as_num": 500
                                 }
                             }
@@ -777,7 +777,7 @@ def test_route_map_multiple_seq_different_match_set_clause_p0(request):
                                 }
                             },
                             "set": {
-                                "localpref": 150,
+                                "locPrf": 150,
                             }
                         },
                         {
@@ -789,7 +789,7 @@ def test_route_map_multiple_seq_different_match_set_clause_p0(request):
                                 }
                             },
                             "set": {
-                                "med": 50
+                                "metric": 50
                             }
                         }
                 ]
@@ -878,7 +878,7 @@ def test_route_map_multiple_seq_different_match_set_clause_p0(request):
                 "route_maps": {
                     "rmap_match_pf_list1": [{
                         "set": {
-                            "med": 50,
+                            "metric": 50,
                         }
                     }],
                 }
@@ -972,8 +972,8 @@ def test_route_map_set_only_no_match_p0(request):
                         {
                             "action": "permit",
                             "set": {
-                                "med": 50,
-                                "localpref": 150,
+                                "metric": 50,
+                                "locPrf": 150,
                                 "weight": 4000
                             }
                         }
@@ -1059,7 +1059,7 @@ def test_route_map_set_only_no_match_p0(request):
                         {
                             "action": "permit",
                             "set": {
-                                "med": 50,
+                                "metric": 50,
                             }
                         }
                     ]
@@ -1176,8 +1176,8 @@ def test_route_map_match_only_no_set_p0(request):
                         "rmap_match_pf_1_{}".format(addr_type): [{
                                 "action": "permit",
                                 "set": {
-                                    "med": 50,
-                                    "localpref": 150,
+                                    "metric": 50,
+                                    "locPrf": 150,
                                 }
                             }
                         ]
index f2398c33ff8160e768ad8061b3922647d6e3fdcb..609cea5f929617c214321043d5b9e82dec50603d 100755 (executable)
@@ -288,7 +288,7 @@ def test_rmap_match_prefix_list_permit_in_and_outbound_prefixes_p0():
                             }
                         },
                         "set": {
-                            "localpref": 150,
+                            "locPrf": 150,
                             "weight": 100
                         }
                     },
@@ -302,7 +302,7 @@ def test_rmap_match_prefix_list_permit_in_and_outbound_prefixes_p0():
                             }
                         },
                         "set": {
-                            "med": 50
+                            "metric": 50
                         }
                     },
                     ]
@@ -506,7 +506,7 @@ def test_modify_set_match_clauses_in_rmap_p0():
                         }
                     },
                     "set": {
-                        "localpref": 150,
+                        "locPrf": 150,
                     }
                 }],
                 "rmap_match_pf_2_{}".format(addr_type): [{
@@ -518,7 +518,7 @@ def test_modify_set_match_clauses_in_rmap_p0():
                         }
                     },
                     "set": {
-                        "med": 50
+                        "metric": 50
                     }
                 }]
             }
@@ -658,7 +658,7 @@ def test_modify_set_match_clauses_in_rmap_p0():
                     }
                 },
                 "set": {
-                    "localpref": 1000,
+                    "locPrf": 1000,
                 }
             }],
             "rmap_match_pf_2_{}".format(addr_type): [{
@@ -670,7 +670,7 @@ def test_modify_set_match_clauses_in_rmap_p0():
                     }
                 },
                 "set": {
-                    "med": 2000
+                    "metric": 2000
                 }
             }]
         }
@@ -844,7 +844,7 @@ def test_modify_prefix_list_referenced_by_rmap_p0():
                         }
                     },
                     "set": {
-                        "localpref": 150,
+                        "locPrf": 150,
                         "weight": 100
                     }
                 }],
@@ -857,7 +857,7 @@ def test_modify_prefix_list_referenced_by_rmap_p0():
                         }
                     },
                     "set": {
-                        "med": 50
+                        "metric": 50
                     }
                 }]
             }
@@ -1093,7 +1093,7 @@ def test_remove_prefix_list_referenced_by_rmap_p0():
                         }
                     },
                     "set": {
-                        "localpref": 150,
+                        "locPrf": 150,
                     }
                 }],
                 "rmap_match_pf_2_{}".format(addr_type): [{
@@ -1105,7 +1105,7 @@ def test_remove_prefix_list_referenced_by_rmap_p0():
                     }
                     },
                     "set": {
-                        "med": 50
+                        "metric": 50
                     }
                 }]
             }
@@ -1639,7 +1639,7 @@ def test_multiple_match_statement_in_route_map_logical_ORed_p0():
                         }
                     },
                     "set": {
-                        "localpref": 150
+                        "locPrf": 150
                     }
                 }]
             }
@@ -1664,7 +1664,7 @@ def test_multiple_match_statement_in_route_map_logical_ORed_p0():
                     }
                     },
                     "set": {
-                        "localpref": 200
+                        "locPrf": 200
                     }
                 }]
             }
@@ -1894,7 +1894,7 @@ def test_multiple_match_statement_in_route_map_logical_ANDed_p1():
                         }
                         },
                         "set": {
-                            "localpref": 150,
+                            "locPrf": 150,
                         }
                     }]
                 }
@@ -1919,7 +1919,7 @@ def test_multiple_match_statement_in_route_map_logical_ANDed_p1():
                         }
                         },
                         "set": {
-                            "localpref": 150,
+                            "locPrf": 150,
                         }
                     }]
                 }
@@ -2043,7 +2043,7 @@ def test_add_remove_rmap_to_specific_neighbor_p0():
                     }
                     },
                     "set": {
-                        "localpref": 150,
+                        "locPrf": 150,
                     }
                 }]
             }
@@ -2234,7 +2234,7 @@ def test_clear_bgp_and_flap_interface_to_verify_rmap_properties_p0():
                     }
                     },
                     "set": {
-                        "localpref": 150,
+                        "locPrf": 150,
                         "weight": 100
                     }
                 }]
@@ -2578,7 +2578,7 @@ def test_set_localpref_weight_to_ebgp_and_med_to_ibgp_peers_p0():
                                 }
                             },
                                 "set": {
-                                    "med": 50
+                                    "metric": 50
                                 }
                             }],
                     "rmap_match_pf_2_{}".format(addr_type): [{
@@ -2589,7 +2589,7 @@ def test_set_localpref_weight_to_ebgp_and_med_to_ibgp_peers_p0():
                                             addr_type)
                                     }},
                                     "set": {
-                                        "localpref": 150
+                                        "locPrf": 150
                                     }
                                 }],
                             "rmap_match_pf_3_{}".format(addr_type): [{
@@ -2841,9 +2841,9 @@ def test_multiple_set_on_single_sequence_in_rmap_p0():
                     }
                 },
                     "set": {
-                        "localpref": 150,
+                        "locPrf": 150,
                         "weight": 100,
-                        "med": 50
+                        "metric": 50
                     }
                 }]
             }
@@ -2985,7 +2985,7 @@ def test_route_maps_with_continue_clause_p0():
                         }
                         },
                         "set": {
-                            "localpref": 150
+                            "locPrf": 150
                         },
                         "continue": "30"
                     },
@@ -2998,7 +2998,7 @@ def test_route_maps_with_continue_clause_p0():
                         }
                         },
                         "set": {
-                            "med": 200
+                            "metric": 200
                         }
                     },
                     {
@@ -3010,7 +3010,7 @@ def test_route_maps_with_continue_clause_p0():
                         }
                         },
                         "set": {
-                            "med": 100
+                            "metric": 100
                         }
                     }
                 ]
@@ -3167,7 +3167,7 @@ def test_route_maps_with_goto_clause_p0():
                         }
                         },
                         "set": {
-                            "med": 100
+                            "metric": 100
                         }
                     },
                     {
@@ -3179,7 +3179,7 @@ def test_route_maps_with_goto_clause_p0():
                         }
                         },
                         "set": {
-                            "med": 200
+                            "metric": 200
                         }
                     }
                 ]
@@ -3325,7 +3325,7 @@ def test_route_maps_with_call_clause_p0():
                     }
                     },
                     "set": {
-                        "localpref": 150
+                        "locPrf": 150
                     },
                     "call": "rmap_match_pf_2_{}".format(addr_type)
                 }],
@@ -3337,7 +3337,7 @@ def test_route_maps_with_call_clause_p0():
                     }
                     },
                     "set": {
-                        "med": 200
+                        "metric": 200
                     }
                 }]
             }
@@ -3486,7 +3486,7 @@ def test_create_rmap_match_prefix_list_to_deny_in_and_outbound_prefixes_p0():
                     }
                     },
                     "set": {
-                        "localpref": 150,
+                        "locPrf": 150,
                     }
                 }],
                 "rmap_match_pf_2_{}".format(addr_type): [{
@@ -3497,7 +3497,7 @@ def test_create_rmap_match_prefix_list_to_deny_in_and_outbound_prefixes_p0():
                     }
                     },
                     "set": {
-                        "med": 50
+                        "metric": 50
                     }
                 }]
             }
index d6753e9b2360f2ededafe691d5f4c1ef2fc76475..053f9288103ca0ab3cf5a0ca603a8c68fb7c740f 100644 (file)
@@ -110,7 +110,7 @@ def test_bgp_maximum_prefix_invalid():
         expected = {
             'paths': [
                 {
-                    'med': 123
+                    'metric': 123
                 }
             ]
         }
index 992ee85ab1dc6401c4655176d9108a8f6c514a67..04a04cce37776557491306d6898daeb765b4765f 100644 (file)
@@ -110,7 +110,7 @@ def test_bgp_default_originate_route_map():
         expected = {
             'paths': [
                 {
-                    'med': 123
+                    'metric': 123
                 }
             ]
         }
index 83ec1e784dc31594ef7ca1c97453d6d78490284d..fcea958a93f2be96ca1d86d07084824263ca0bd4 100755 (executable)
@@ -598,7 +598,7 @@ def config_for_as_path(tgen, topo, tc_name):
                             "community_list": {"id": "ANY"}
                         },
                         "set": {
-                            "aspath": {
+                            "path": {
                                 "as_num": "4000000",
                                 "as_action": "prepend"
                             }
index f307edc6782251a854d3b077c7b6c8d3ac8a05a8..d95adc185dbcf2abca38deb69c1e255fb969ca7b 100644 (file)
@@ -130,13 +130,13 @@ def test_bgp_reject_as_sets():
         expected = {
             'advertisedRoutes': {
                 '172.16.0.0/16': {
-                    'asPath': ''
+                    'path': ''
                 },
                 '192.168.254.0/30': {
-                    'asPath': '65003'
+                    'path': '65003'
                 },
                 '192.168.255.0/30': {
-                    'asPath': '65001'
+                    'path': '65001'
                 }
             },
             'totalPrefixCounter': 3
index 09e195e22d69d53efcba2a5e046c6c9ed529c2d7..387cb0b42fc1e5fa1e9951d4e42c9fdf91b4775f 100644 (file)
@@ -113,7 +113,7 @@ def test_bgp_set_local_preference():
         expected = {
             'paths': [
                 {
-                    'localpref': 50,
+                    'locPrf': 50,
                     'nexthops': [
                         {
                             'ip': '192.168.255.3'
@@ -121,7 +121,7 @@ def test_bgp_set_local_preference():
                     ]
                 },
                 {
-                    'localpref': 150,
+                    'locPrf': 150,
                     'nexthops': [
                         {
                             'ip': '192.168.255.2'
index 997b72d691406a371bad40412463c1225fe76b2f..15f970ba7530544180384f88b2316a180df53e15 100644 (file)
@@ -1256,7 +1256,7 @@ def verify_bgp_attributes(tgen, addr_type, dut, static_routes, rmap_name,
                         }
                     },
                     "set": {
-                        "localpref": 150,
+                        "locPrf": 150,
                         "weight": 100
                     }
                 }],
@@ -1269,7 +1269,7 @@ def verify_bgp_attributes(tgen, addr_type, dut, static_routes, rmap_name,
                         }
                     },
                     "set": {
-                        "med": 50
+                        "metric": 50
                     }
                 }]
             }
@@ -1406,7 +1406,7 @@ def verify_best_path_as_per_bgp_attribute(tgen, addr_type, router, input_dict,
             }
         }
     }
-    attribute = "localpref"
+    attribute = "locPrf"
     result = verify_best_path_as_per_bgp_attribute(tgen, "ipv4", dut, \
                          input_dict,  attribute)
     Returns
@@ -1443,14 +1443,14 @@ def verify_best_path_as_per_bgp_attribute(tgen, addr_type, router, input_dict,
                 attribute_dict[next_hop_ip] = route_attribute[attribute]
 
             # AS_PATH attribute
-            if attribute == "aspath":
+            if attribute == "path":
                 # Find next_hop for the route have minimum as_path
                 _next_hop = min(attribute_dict, key=lambda x: len(set(
                     attribute_dict[x])))
                 compare = "SHORTEST"
 
             # LOCAL_PREF attribute
-            elif attribute == "localpref":
+            elif attribute == "locPrf":
                 # Find next_hop for the route have highest local preference
                 _next_hop = max(attribute_dict, key=(lambda k:
                                                      attribute_dict[k]))
@@ -1473,7 +1473,7 @@ def verify_best_path_as_per_bgp_attribute(tgen, addr_type, router, input_dict,
                 compare = ""
 
             # MED  attribute
-            elif attribute == "med":
+            elif attribute == "metric":
                 # Find next_hop for the route have LOWEST MED
                 _next_hop = min(attribute_dict, key=(lambda k:
                                                      attribute_dict[k]))
@@ -1548,7 +1548,7 @@ def verify_best_path_as_per_admin_distance(tgen, addr_type, router, input_dict,
                               {"network": "200.50.2.0/32", \
                  "admin_distance": 60, "next_hop": "10.0.0.18"}]
         }}
-    attribute = "localpref"
+    attribute = "locPrf"
     result = verify_best_path_as_per_admin_distance(tgen, "ipv4", dut, \
                         input_dict, attribute):
     Returns
index fc7581b1f292decb7681fc61c79dd987570a3ffe..8a9d2d64c99cd1651967c01c6caa0794f4de38cb 100644 (file)
@@ -1101,9 +1101,9 @@ def create_route_maps(tgen, input_dict, build=False):
                             "tag": "tag_id"
                         },
                         "set": {
-                            "localpref": 150,
-                            "med": 30,
-                            "aspath": {
+                            "locPrf": 150,
+                            "metric": 30,
+                            "path": {
                                 "num": 20000,
                                 "action": "prepend",
                             },
@@ -1199,10 +1199,10 @@ def create_route_maps(tgen, input_dict, build=False):
                         set_data = rmap_dict["set"]
                         ipv4_data = set_data.setdefault("ipv4", {})
                         ipv6_data = set_data.setdefault("ipv6", {})
-                        local_preference = set_data.setdefault("localpref",
+                        local_preference = set_data.setdefault("locPrf",
                                                                None)
-                        metric = set_data.setdefault("med", None)
-                        as_path = set_data.setdefault("aspath", {})
+                        metric = set_data.setdefault("metric", None)
+                        as_path = set_data.setdefault("path", {})
                         weight = set_data.setdefault("weight", None)
                         community = set_data.setdefault("community", {})
                         large_community = set_data.setdefault(