diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2024-02-22 15:53:45 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-08-21 10:17:47 -0400 | 
| commit | b62de7de2e8bb2ee8181ddfc2daf47f99aaf8e11 (patch) | |
| tree | 8a30fc998f87cc94e8cbe167c71b996ac30f10ca | |
| parent | db87ab3d861a2da9720317762b6990b2295e7afd (diff) | |
zebra, tests: Connected and Local routes should have a weight of 1
All routes received by zebra from upper level protocols have a weight
of 1.  Let's just make everything extremely consistent in our code.
Lot's of tests needed to be fixed up to make this work.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
50 files changed, 478 insertions, 300 deletions
diff --git a/tests/topotests/all_protocol_startup/r1/ip_nht.ref b/tests/topotests/all_protocol_startup/r1/ip_nht.ref index a2f3d3b0db..3592f29b54 100644 --- a/tests/topotests/all_protocol_startup/r1/ip_nht.ref +++ b/tests/topotests/all_protocol_startup/r1/ip_nht.ref @@ -55,19 +55,19 @@ VRF default:   Client list: pbr(fd XX)  192.168.0.2   resolved via connected - is directly connected, r1-eth0 (vrf default) + is directly connected, r1-eth0 (vrf default), weight 1   Client list: static(fd XX)  192.168.0.4   resolved via connected - is directly connected, r1-eth0 (vrf default) + is directly connected, r1-eth0 (vrf default), weight 1   Client list: static(fd XX)  192.168.7.10   resolved via connected - is directly connected, r1-eth7 (vrf default) + is directly connected, r1-eth7 (vrf default), weight 1   Client list: bgp(fd XX)  192.168.7.20(Connected)   resolved via connected - is directly connected, r1-eth7 (vrf default) + is directly connected, r1-eth7 (vrf default), weight 1   Client list: bgp(fd XX)  192.168.161.4   unresolved diff --git a/tests/topotests/all_protocol_startup/r1/ipv4_routes.ref b/tests/topotests/all_protocol_startup/r1/ipv4_routes.ref index a4a4aba3d1..33c44780b4 100644 --- a/tests/topotests/all_protocol_startup/r1/ipv4_routes.ref +++ b/tests/topotests/all_protocol_startup/r1/ipv4_routes.ref @@ -1,23 +1,23 @@ -C>* 192.168.0.0/24 is directly connected, r1-eth0, XX:XX:XX -C>* 192.168.1.0/26 is directly connected, r1-eth1, XX:XX:XX -C>* 192.168.2.0/26 is directly connected, r1-eth2, XX:XX:XX -C>* 192.168.3.0/26 is directly connected, r1-eth3, XX:XX:XX -C>* 192.168.4.0/26 is directly connected, r1-eth4, XX:XX:XX -C>* 192.168.5.0/26 is directly connected, r1-eth5, XX:XX:XX -C>* 192.168.6.0/26 is directly connected, r1-eth6, XX:XX:XX -C>* 192.168.7.0/26 is directly connected, r1-eth7, XX:XX:XX -C>* 192.168.8.0/26 is directly connected, r1-eth8, XX:XX:XX -C>* 192.168.9.0/26 is directly connected, r1-eth9, XX:XX:XX -L>* 192.168.0.1/32 is directly connected, r1-eth0, XX:XX:XX -L>* 192.168.1.1/32 is directly connected, r1-eth1, XX:XX:XX -L>* 192.168.2.1/32 is directly connected, r1-eth2, XX:XX:XX -L>* 192.168.3.1/32 is directly connected, r1-eth3, XX:XX:XX -L>* 192.168.4.1/32 is directly connected, r1-eth4, XX:XX:XX -L>* 192.168.5.1/32 is directly connected, r1-eth5, XX:XX:XX -L>* 192.168.6.1/32 is directly connected, r1-eth6, XX:XX:XX -L>* 192.168.7.1/32 is directly connected, r1-eth7, XX:XX:XX -L>* 192.168.8.1/32 is directly connected, r1-eth8, XX:XX:XX -L>* 192.168.9.1/32 is directly connected, r1-eth9, XX:XX:XX +C>* 192.168.0.0/24 is directly connected, r1-eth0, weight 1, XX:XX:XX +C>* 192.168.1.0/26 is directly connected, r1-eth1, weight 1, XX:XX:XX +C>* 192.168.2.0/26 is directly connected, r1-eth2, weight 1, XX:XX:XX +C>* 192.168.3.0/26 is directly connected, r1-eth3, weight 1, XX:XX:XX +C>* 192.168.4.0/26 is directly connected, r1-eth4, weight 1, XX:XX:XX +C>* 192.168.5.0/26 is directly connected, r1-eth5, weight 1, XX:XX:XX +C>* 192.168.6.0/26 is directly connected, r1-eth6, weight 1, XX:XX:XX +C>* 192.168.7.0/26 is directly connected, r1-eth7, weight 1, XX:XX:XX +C>* 192.168.8.0/26 is directly connected, r1-eth8, weight 1, XX:XX:XX +C>* 192.168.9.0/26 is directly connected, r1-eth9, weight 1, XX:XX:XX +L>* 192.168.0.1/32 is directly connected, r1-eth0, weight 1, XX:XX:XX +L>* 192.168.1.1/32 is directly connected, r1-eth1, weight 1, XX:XX:XX +L>* 192.168.2.1/32 is directly connected, r1-eth2, weight 1, XX:XX:XX +L>* 192.168.3.1/32 is directly connected, r1-eth3, weight 1, XX:XX:XX +L>* 192.168.4.1/32 is directly connected, r1-eth4, weight 1, XX:XX:XX +L>* 192.168.5.1/32 is directly connected, r1-eth5, weight 1, XX:XX:XX +L>* 192.168.6.1/32 is directly connected, r1-eth6, weight 1, XX:XX:XX +L>* 192.168.7.1/32 is directly connected, r1-eth7, weight 1, XX:XX:XX +L>* 192.168.8.1/32 is directly connected, r1-eth8, weight 1, XX:XX:XX +L>* 192.168.9.1/32 is directly connected, r1-eth9, weight 1, XX:XX:XX  O   192.168.0.0/24 [110/10] is directly connected, r1-eth0, weight 1, XX:XX:XX  O   192.168.3.0/26 [110/10] is directly connected, r1-eth3, weight 1, XX:XX:XX  S>* 1.1.1.1/32 [1/0] is directly connected, r1-eth1, weight 1, XX:XX:XX diff --git a/tests/topotests/all_protocol_startup/r1/ipv6_nht.ref b/tests/topotests/all_protocol_startup/r1/ipv6_nht.ref index 100a36a8d6..7b71761185 100644 --- a/tests/topotests/all_protocol_startup/r1/ipv6_nht.ref +++ b/tests/topotests/all_protocol_startup/r1/ipv6_nht.ref @@ -2,14 +2,14 @@ VRF default:   Resolve via default: on  fc00::2   resolved via connected - is directly connected, r1-eth0 (vrf default) + is directly connected, r1-eth0 (vrf default), weight 1   Client list: static(fd XX)  fc00:0:0:8::1000   resolved via connected - is directly connected, r1-eth8 (vrf default) + is directly connected, r1-eth8 (vrf default), weight 1   Client list: bgp(fd XX)  fc00:0:0:8::2000(Connected)   resolved via connected - is directly connected, r1-eth8 (vrf default) + is directly connected, r1-eth8 (vrf default), weight 1   Client list: bgp(fd XX) diff --git a/tests/topotests/all_protocol_startup/r1/ipv6_routes.ref b/tests/topotests/all_protocol_startup/r1/ipv6_routes.ref index a25b53aa21..f5c1d6d7d2 100644 --- a/tests/topotests/all_protocol_startup/r1/ipv6_routes.ref +++ b/tests/topotests/all_protocol_startup/r1/ipv6_routes.ref @@ -1,34 +1,34 @@ -C>* fc00:0:0:1::/64 is directly connected, r1-eth1, XX:XX:XX -C>* fc00:0:0:2::/64 is directly connected, r1-eth2, XX:XX:XX -C>* fc00:0:0:3::/64 is directly connected, r1-eth3, XX:XX:XX -C>* fc00:0:0:4::/64 is directly connected, r1-eth4, XX:XX:XX -C>* fc00:0:0:5::/64 is directly connected, r1-eth5, XX:XX:XX -C>* fc00:0:0:6::/64 is directly connected, r1-eth6, XX:XX:XX -C>* fc00:0:0:7::/64 is directly connected, r1-eth7, XX:XX:XX -C>* fc00:0:0:8::/64 is directly connected, r1-eth8, XX:XX:XX -C>* fc00:0:0:9::/64 is directly connected, r1-eth9, XX:XX:XX -C>* fc00::/64 is directly connected, r1-eth0, XX:XX:XX -C>* fe80::/64 is directly connected, lo, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth0, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth1, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth2, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth3, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth4, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth5, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth6, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth7, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth8, XX:XX:XX -C * fe80::/64 is directly connected, r1-eth9, XX:XX:XX -L>* fc00:0:0:1::1/128 is directly connected, r1-eth1, XX:XX:XX -L>* fc00:0:0:2::1/128 is directly connected, r1-eth2, XX:XX:XX -L>* fc00:0:0:3::1/128 is directly connected, r1-eth3, XX:XX:XX -L>* fc00:0:0:4::1/128 is directly connected, r1-eth4, XX:XX:XX -L>* fc00:0:0:5::1/128 is directly connected, r1-eth5, XX:XX:XX -L>* fc00:0:0:6::1/128 is directly connected, r1-eth6, XX:XX:XX -L>* fc00:0:0:7::1/128 is directly connected, r1-eth7, XX:XX:XX -L>* fc00:0:0:8::1/128 is directly connected, r1-eth8, XX:XX:XX -L>* fc00:0:0:9::1/128 is directly connected, r1-eth9, XX:XX:XX -L>* fc00::1/128 is directly connected, r1-eth0, XX:XX:XX +C>* fc00:0:0:1::/64 is directly connected, r1-eth1, weight 1, XX:XX:XX +C>* fc00:0:0:2::/64 is directly connected, r1-eth2, weight 1, XX:XX:XX +C>* fc00:0:0:3::/64 is directly connected, r1-eth3, weight 1, XX:XX:XX +C>* fc00:0:0:4::/64 is directly connected, r1-eth4, weight 1, XX:XX:XX +C>* fc00:0:0:5::/64 is directly connected, r1-eth5, weight 1, XX:XX:XX +C>* fc00:0:0:6::/64 is directly connected, r1-eth6, weight 1, XX:XX:XX +C>* fc00:0:0:7::/64 is directly connected, r1-eth7, weight 1, XX:XX:XX +C>* fc00:0:0:8::/64 is directly connected, r1-eth8, weight 1, XX:XX:XX +C>* fc00:0:0:9::/64 is directly connected, r1-eth9, weight 1, XX:XX:XX +C>* fc00::/64 is directly connected, r1-eth0, weight 1, XX:XX:XX +C>* fe80::/64 is directly connected, lo, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth0, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth1, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth2, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth3, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth4, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth5, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth6, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth7, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth8, weight 1, XX:XX:XX +C * fe80::/64 is directly connected, r1-eth9, weight 1, XX:XX:XX +L>* fc00:0:0:1::1/128 is directly connected, r1-eth1, weight 1, XX:XX:XX +L>* fc00:0:0:2::1/128 is directly connected, r1-eth2, weight 1, XX:XX:XX +L>* fc00:0:0:3::1/128 is directly connected, r1-eth3, weight 1, XX:XX:XX +L>* fc00:0:0:4::1/128 is directly connected, r1-eth4, weight 1, XX:XX:XX +L>* fc00:0:0:5::1/128 is directly connected, r1-eth5, weight 1, XX:XX:XX +L>* fc00:0:0:6::1/128 is directly connected, r1-eth6, weight 1, XX:XX:XX +L>* fc00:0:0:7::1/128 is directly connected, r1-eth7, weight 1, XX:XX:XX +L>* fc00:0:0:8::1/128 is directly connected, r1-eth8, weight 1, XX:XX:XX +L>* fc00:0:0:9::1/128 is directly connected, r1-eth9, weight 1, XX:XX:XX +L>* fc00::1/128 is directly connected, r1-eth0, weight 1, XX:XX:XX  O   fc00:0:0:4::/64 [110/10] is directly connected, r1-eth4, weight 1, XX:XX:XX  S>* 4:5::6:10/128 [1/0] via fc00::2, r1-eth0, weight 1, XX:XX:XX  S>* 4:5::6:11/128 [1/0] via fc00::2, r1-eth0, weight 1, XX:XX:XX diff --git a/tests/topotests/bgp_features/r1/ip_route.json b/tests/topotests/bgp_features/r1/ip_route.json index 34c58033ad..3f95e27078 100644 --- a/tests/topotests/bgp_features/r1/ip_route.json +++ b/tests/topotests/bgp_features/r1/ip_route.json @@ -29,7 +29,7 @@        "metric":0,        "nexthops":[          { -          "flags":1, +          "flags":3,            "directlyConnected":true,            "interfaceName":"lo",            "active":true, @@ -109,7 +109,7 @@        "table":254,        "nexthops":[          { -          "flags":1, +          "flags":3,            "directlyConnected":true,            "interfaceName":"r1-eth1",            "active":true, @@ -175,7 +175,7 @@        "metric":10,        "nexthops":[          { -          "flags":1, +          "flags":3,            "directlyConnected":true,            "interfaceName":"r1-eth2",            "active":true, @@ -210,7 +210,7 @@        "metric":10,        "nexthops":[          { -          "flags":1, +          "flags":3,            "directlyConnected":true,            "interfaceName":"r1-eth0",            "active":true, diff --git a/tests/topotests/bgp_features/r1/ip_route_norib.json b/tests/topotests/bgp_features/r1/ip_route_norib.json index f6536d1e9f..b8e0fc2883 100644 --- a/tests/topotests/bgp_features/r1/ip_route_norib.json +++ b/tests/topotests/bgp_features/r1/ip_route_norib.json @@ -7,7 +7,7 @@        "metric":0,        "nexthops":[          { -          "flags":1, +          "flags":3,            "directlyConnected":true,            "interfaceName":"lo",            "active":true, @@ -86,7 +86,7 @@        "metric":10,        "nexthops":[          { -          "flags":1, +          "flags":3,            "directlyConnected":true,            "interfaceName":"r1-eth1",            "active":true, @@ -152,7 +152,7 @@        "metric":10,        "nexthops":[          { -          "flags":1, +          "flags":3,            "directlyConnected":true,            "interfaceName":"r1-eth2",            "active":true, @@ -187,7 +187,7 @@        "metric":10,        "nexthops":[          { -          "flags":1, +          "flags":3,            "directlyConnected":true,            "interfaceName":"r1-eth0",            "active":true, diff --git a/tests/topotests/bgp_link_bw_ip/r1/ip-route-1.json b/tests/topotests/bgp_link_bw_ip/r1/ip-route-1.json index bb50bc96d9..5773d86065 100644 --- a/tests/topotests/bgp_link_bw_ip/r1/ip-route-1.json +++ b/tests/topotests/bgp_link_bw_ip/r1/ip-route-1.json @@ -7,12 +7,12 @@          {            "fib":true,            "ip":"11.1.1.6", -          "weight":85 +          "weight":84          },          {            "fib":true,            "ip":"11.1.1.2", -          "weight":255 +          "weight":254          }        ]      } diff --git a/tests/topotests/bgp_link_bw_ip/r1/ip-route-2.json b/tests/topotests/bgp_link_bw_ip/r1/ip-route-2.json index 57726ce46c..a65eb8f591 100644 --- a/tests/topotests/bgp_link_bw_ip/r1/ip-route-2.json +++ b/tests/topotests/bgp_link_bw_ip/r1/ip-route-2.json @@ -12,7 +12,7 @@          {            "fib":true,            "ip":"11.1.1.2", -          "weight":255 +          "weight":254          }        ]      } diff --git a/tests/topotests/bgp_link_bw_ip/r1/ip-route-3.json b/tests/topotests/bgp_link_bw_ip/r1/ip-route-3.json index f2368dfdc5..a1546f57ec 100644 --- a/tests/topotests/bgp_link_bw_ip/r1/ip-route-3.json +++ b/tests/topotests/bgp_link_bw_ip/r1/ip-route-3.json @@ -12,7 +12,7 @@          {            "fib":true,            "ip":"11.1.1.2", -          "weight":255 +          "weight":254          }        ]      } diff --git a/tests/topotests/bgp_link_bw_ip/r1/ip-route-6.json b/tests/topotests/bgp_link_bw_ip/r1/ip-route-6.json index 7b4da2a8d0..0444d2d6cb 100644 --- a/tests/topotests/bgp_link_bw_ip/r1/ip-route-6.json +++ b/tests/topotests/bgp_link_bw_ip/r1/ip-route-6.json @@ -7,7 +7,7 @@          {            "fib":true,            "ip":"11.1.1.2", -          "weight":255 +          "weight":254          }        ]      } diff --git a/tests/topotests/bgp_link_bw_ip/r1/ip-route-7.json b/tests/topotests/bgp_link_bw_ip/r1/ip-route-7.json index 3062d1cf8b..dd84a0f373 100644 --- a/tests/topotests/bgp_link_bw_ip/r1/ip-route-7.json +++ b/tests/topotests/bgp_link_bw_ip/r1/ip-route-7.json @@ -7,7 +7,7 @@          {            "fib":true,            "ip":"11.1.1.2", -          "weight":255 +          "weight":254          }        ]      } diff --git a/tests/topotests/bgp_link_bw_ip/r1/ip-route-8.json b/tests/topotests/bgp_link_bw_ip/r1/ip-route-8.json index 662b7f716c..63b7a6b508 100644 --- a/tests/topotests/bgp_link_bw_ip/r1/ip-route-8.json +++ b/tests/topotests/bgp_link_bw_ip/r1/ip-route-8.json @@ -12,7 +12,7 @@          {            "fib":true,            "ip":"11.1.1.2", -          "weight":255 +          "weight":254          }        ]      } diff --git a/tests/topotests/bgp_link_bw_ip/r1/ip-route-9.json b/tests/topotests/bgp_link_bw_ip/r1/ip-route-9.json index d9b5a8992d..edd764a80a 100644 --- a/tests/topotests/bgp_link_bw_ip/r1/ip-route-9.json +++ b/tests/topotests/bgp_link_bw_ip/r1/ip-route-9.json @@ -12,7 +12,7 @@          {            "fib":true,            "ip":"11.1.1.2", -          "weight":255 +          "weight":254          }        ]      } diff --git a/tests/topotests/bgp_link_bw_ip/r2/ip-route-2.json b/tests/topotests/bgp_link_bw_ip/r2/ip-route-2.json index 53be1171f6..05928b1167 100644 --- a/tests/topotests/bgp_link_bw_ip/r2/ip-route-2.json +++ b/tests/topotests/bgp_link_bw_ip/r2/ip-route-2.json @@ -12,7 +12,7 @@          {            "fib":true,            "ip":"11.1.2.2", -          "weight":255 +          "weight":254          }        ]      } diff --git a/tests/topotests/bgp_weighted_ecmp_recursive/test_bgp_weighted_ecmp_recursive.py b/tests/topotests/bgp_weighted_ecmp_recursive/test_bgp_weighted_ecmp_recursive.py index 7a6d068e56..5dc917bd1a 100644 --- a/tests/topotests/bgp_weighted_ecmp_recursive/test_bgp_weighted_ecmp_recursive.py +++ b/tests/topotests/bgp_weighted_ecmp_recursive/test_bgp_weighted_ecmp_recursive.py @@ -71,25 +71,25 @@ def test_bgp_weighted_ecmp_recursive():                              "ip": "192.168.24.4",                              "active": True,                              "recursive": True, -                            "weight": 204, +                            "weight": 203,                          },                          {                              "ip": "192.168.12.2",                              "active": True,                              "resolver": True, -                            "weight": 204, +                            "weight": 203,                          },                          {                              "ip": "192.168.35.5",                              "active": True,                              "recursive": True, -                            "weight": 255, +                            "weight": 254,                          },                          {                              "ip": "192.168.13.3",                              "active": True,                              "resolver": True, -                            "weight": 255, +                            "weight": 254,                          },                      ],                  } diff --git a/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-default.json b/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-default.json index 435d7336fc..948f4e6c23 100644 --- a/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-default.json +++ b/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-default.json @@ -38,7 +38,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight":1                              }                            ]                          } @@ -66,7 +67,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -94,7 +96,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -122,7 +125,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -245,7 +249,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -271,7 +276,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -297,7 +303,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -323,7 +330,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -360,7 +368,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -388,7 +397,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight":1                              }                            ]                          } @@ -416,7 +426,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -444,7 +455,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -479,7 +491,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -505,7 +518,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -531,7 +545,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -557,7 +572,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -573,4 +589,3 @@      ]    }  } - diff --git a/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-nokey.json b/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-nokey.json index 1a1f6480fa..30daecf16e 100644 --- a/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-nokey.json +++ b/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-nokey.json @@ -38,7 +38,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight":1                              }                            ]                          } @@ -66,7 +67,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight":1                              }                            ]                          } @@ -94,7 +96,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight":1                              }                            ]                          } @@ -122,7 +125,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -245,7 +249,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight":1                              }                            ]                          } @@ -271,7 +276,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight":1                              }                            ]                          } @@ -297,7 +303,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -323,7 +330,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -360,7 +368,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -388,7 +397,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -416,7 +426,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -444,7 +455,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -479,7 +491,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -505,7 +518,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -531,7 +545,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -557,7 +572,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -607,7 +623,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -635,7 +652,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -663,7 +681,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -691,7 +710,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -814,7 +834,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -840,7 +861,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -866,7 +888,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -892,7 +915,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -929,7 +953,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -957,7 +982,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -985,7 +1011,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -1013,7 +1040,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -1048,7 +1076,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -1074,7 +1103,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -1100,7 +1130,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } @@ -1126,7 +1157,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +				"fib": [null], +				"weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-zebra-ribs.json b/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-zebra-ribs.json index 2e2b8ec7ad..b1124bd7bb 100644 --- a/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-zebra-ribs.json +++ b/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-zebra-ribs.json @@ -34,7 +34,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -62,7 +63,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -90,7 +92,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -118,7 +121,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -241,7 +245,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -267,7 +272,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -293,7 +299,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -319,7 +326,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -356,7 +364,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -384,7 +393,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -412,7 +422,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -440,7 +451,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -475,7 +487,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -501,7 +514,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -527,7 +541,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -553,7 +568,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-zebra.json b/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-zebra.json index 2e2b8ec7ad..70c8798b31 100644 --- a/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-zebra.json +++ b/tests/topotests/mgmt_oper/oper-results/result-lib-vrf-zebra.json @@ -34,7 +34,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -62,7 +63,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -90,7 +92,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -118,7 +121,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -241,7 +245,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -267,7 +272,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -293,7 +299,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -319,7 +326,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -356,7 +364,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -384,7 +393,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -412,7 +422,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -440,7 +451,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -475,7 +487,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -501,7 +514,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -527,7 +541,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -553,7 +568,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/oper-results/result-lib.json b/tests/topotests/mgmt_oper/oper-results/result-lib.json index 1a1f6480fa..0b2a9fa427 100644 --- a/tests/topotests/mgmt_oper/oper-results/result-lib.json +++ b/tests/topotests/mgmt_oper/oper-results/result-lib.json @@ -38,7 +38,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight":1                              }                            ]                          } @@ -66,7 +67,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -94,7 +96,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -122,7 +125,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight":1                              }                            ]                          } @@ -245,7 +249,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -271,7 +276,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -297,7 +303,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -323,7 +330,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -360,7 +368,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -388,7 +397,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -416,7 +426,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -444,7 +455,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -479,7 +491,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -505,7 +518,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -531,7 +545,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight":1                              }                            ]                          } @@ -557,7 +572,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -607,7 +623,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -635,7 +652,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -663,7 +681,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -691,7 +710,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -814,7 +834,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -840,7 +861,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -866,7 +888,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -892,7 +915,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -929,7 +953,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -957,7 +982,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -985,7 +1011,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -1013,7 +1040,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -1048,7 +1076,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -1074,7 +1103,8 @@                                "gateway": "",                                "interface": "r1-eth2",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -1100,7 +1130,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -1126,7 +1157,8 @@                                "gateway": "",                                "interface": "r1-eth3",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/oper-results/result-ribs-rib-ipv4-unicast.json b/tests/topotests/mgmt_oper/oper-results/result-ribs-rib-ipv4-unicast.json index 956d3a8922..769c1f73a5 100644 --- a/tests/topotests/mgmt_oper/oper-results/result-ribs-rib-ipv4-unicast.json +++ b/tests/topotests/mgmt_oper/oper-results/result-ribs-rib-ipv4-unicast.json @@ -34,7 +34,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -62,7 +63,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -90,7 +92,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -118,7 +121,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/oper-results/result-ribs-rib-nokeys.json b/tests/topotests/mgmt_oper/oper-results/result-ribs-rib-nokeys.json index 2e2b8ec7ad..c740f592f7 100644 --- a/tests/topotests/mgmt_oper/oper-results/result-ribs-rib-nokeys.json +++ b/tests/topotests/mgmt_oper/oper-results/result-ribs-rib-nokeys.json @@ -34,7 +34,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -62,7 +63,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -90,7 +92,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -118,7 +121,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -241,7 +245,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -267,7 +272,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -293,7 +299,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -319,7 +326,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -356,7 +364,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -384,7 +393,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -412,7 +422,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -440,7 +451,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -475,7 +487,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -501,7 +514,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight": 1                              }                            ]                          } @@ -527,7 +541,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } @@ -553,7 +568,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +			      "weight":1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/oper.py b/tests/topotests/mgmt_oper/oper.py index 934093aeee..9fc504569d 100644 --- a/tests/topotests/mgmt_oper/oper.py +++ b/tests/topotests/mgmt_oper/oper.py @@ -92,6 +92,7 @@ def _do_oper_test(tgen, qr):          logging.error(              "Error decoding json exp result: %s\noutput:\n%s", error, expected          ) +        logging.warning("FILE: {}".format(qr[1]))          raise      if dd_json_cmp: @@ -112,7 +113,9 @@ def _do_oper_test(tgen, qr):                  "--------GOT----------\n%s\n-------END-GOT--------",                  json.dumps(ojson, indent=4),              ) - +            logging.warning("----diff---\n{}".format(cmpout)) +            logging.warning("Command: {}".format(qcmd.format(qr[0], qr[2] if len(qr) > 2 else ""))) +            logging.warning("File: {}".format(qr[1]))      assert cmpout is None diff --git a/tests/topotests/mgmt_oper/simple-results/result-intf-state-mtu.json b/tests/topotests/mgmt_oper/simple-results/result-intf-state-mtu.json index 60359716d7..018ed99f40 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-intf-state-mtu.json +++ b/tests/topotests/mgmt_oper/simple-results/result-intf-state-mtu.json @@ -10,3 +10,4 @@      ]    }  } + diff --git a/tests/topotests/mgmt_oper/simple-results/result-intf-state.json b/tests/topotests/mgmt_oper/simple-results/result-intf-state.json index 981df024cd..35669fd571 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-intf-state.json +++ b/tests/topotests/mgmt_oper/simple-results/result-intf-state.json @@ -15,3 +15,4 @@      ]    }  } + diff --git a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-default.json b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-default.json index cea4bf5a6b..f85b163bd6 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-default.json +++ b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-default.json @@ -38,7 +38,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -66,7 +67,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -130,7 +132,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -156,7 +159,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-nokey.json b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-nokey.json index 75414ca045..e2cfec9724 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-nokey.json +++ b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-nokey.json @@ -38,7 +38,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -66,7 +67,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -130,7 +132,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -156,7 +159,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -224,7 +228,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -252,7 +257,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -287,7 +293,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -313,7 +320,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-red.json b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-red.json index 05382316a3..3567f35a34 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-red.json +++ b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-red.json @@ -38,7 +38,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -66,7 +67,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -101,7 +103,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -127,7 +130,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-zebra-ribs.json b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-zebra-ribs.json index 4f40820bb6..d9ca58d25d 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-zebra-ribs.json +++ b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-zebra-ribs.json @@ -34,7 +34,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -62,7 +63,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -126,7 +128,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -152,7 +155,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-zebra.json b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-zebra.json index 4f40820bb6..d9ca58d25d 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-zebra.json +++ b/tests/topotests/mgmt_oper/simple-results/result-lib-vrf-zebra.json @@ -34,7 +34,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -62,7 +63,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -126,7 +128,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -152,7 +155,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/simple-results/result-lib.json b/tests/topotests/mgmt_oper/simple-results/result-lib.json index 75414ca045..e2cfec9724 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-lib.json +++ b/tests/topotests/mgmt_oper/simple-results/result-lib.json @@ -38,7 +38,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -66,7 +67,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -130,7 +132,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -156,7 +159,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -224,7 +228,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -252,7 +257,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -287,7 +293,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -313,7 +320,8 @@                                "gateway": "",                                "interface": "r1-eth1",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-ipv4-unicast.json b/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-ipv4-unicast.json index 7ce60c3bdb..11766ce9c1 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-ipv4-unicast.json +++ b/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-ipv4-unicast.json @@ -34,7 +34,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -62,7 +63,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-nokeys.json b/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-nokeys.json index 4f40820bb6..d9ca58d25d 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-nokeys.json +++ b/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-nokeys.json @@ -34,7 +34,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -62,7 +63,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -126,7 +128,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -152,7 +155,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-route-nokey.json b/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-route-nokey.json index 7ce60c3bdb..11766ce9c1 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-route-nokey.json +++ b/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-route-nokey.json @@ -34,7 +34,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } @@ -62,7 +63,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight": 1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-route-prefix.json b/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-route-prefix.json index 833d418f9a..ef4a4ab131 100644 --- a/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-route-prefix.json +++ b/tests/topotests/mgmt_oper/simple-results/result-ribs-rib-route-prefix.json @@ -31,7 +31,8 @@                                "gateway": "",                                "interface": "r1-eth0",                                "active": [null], -                              "fib": [null] +                              "fib": [null], +                              "weight":1                              }                            ]                          } diff --git a/tests/topotests/mgmt_oper/test_simple.py b/tests/topotests/mgmt_oper/test_simple.py index 3b115f6238..2b3d6ff6a5 100644 --- a/tests/topotests/mgmt_oper/test_simple.py +++ b/tests/topotests/mgmt_oper/test_simple.py @@ -181,7 +181,7 @@ vtysh -c 'show mgmt get-data /frr-vrf:lib'      > ${resdir}/result-lib.json  vtysh -c 'show mgmt get-data /frr-vrf:lib/vrf'  > ${resdir}/result-lib-vrf-nokey.json  vtysh -c 'show mgmt get-data /frr-vrf:lib/vrf[name="default"]'  > ${resdir}/result-lib-vrf-default.json  vtysh -c 'show mgmt get-data /frr-vrf:lib/vrf[name="red"]'      > ${resdir}/result-lib-vrf-red.json -vtysh -c 'show mgmt get-data /frr-vrf:lib/vrf[name="default"]/frr-zebra:zebra'          > ${resdir}/result-lib-vrf-zebra.json +vtysh -c 'show mgmt get-data /frr-vrf:lib/vrf[name="default"]/frr-zebra:zebra'          > ${resdir}/result-lib-vrf-ebra.json  vtysh -c 'show mgmt get-data /frr-vrf:lib/vrf[name="default"]/frr-zebra:zebra/ribs'     > ${resdir}/result-lib-vrf-zebra-ribs.json  vtysh -c 'show mgmt get-data /frr-vrf:lib/vrf[name="default"]/frr-zebra:zebra/ribs/rib' > ${resdir}/result-ribs-rib-nokeys.json  vtysh -c 'show mgmt get-data /frr-vrf:lib/vrf[name="default"]/frr-zebra:zebra/ribs/rib[afi-safi-name="frr-routing:ipv4-unicast"][table-id="254"]' > ${resdir}/result-ribs-rib-ipv4-unicast.json diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-default.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-default.txt index 248375dc6c..797bced7b8 100644 --- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-default.txt +++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-default.txt @@ -1,11 +1,11 @@  O   10.0.1.0/24 [110/10] is directly connected, r1-eth0, weight 1, XX:XX:XX -C>* 10.0.1.0/24 is directly connected, r1-eth0, XX:XX:XX -L>* 10.0.1.1/32 is directly connected, r1-eth0, XX:XX:XX +C>* 10.0.1.0/24 is directly connected, r1-eth0, weight 1, XX:XX:XX +L>* 10.0.1.1/32 is directly connected, r1-eth0, weight 1, XX:XX:XX  O>* 10.0.2.0/24 [110/20] via 10.0.20.2, r1-eth1, weight 1, XX:XX:XX  B>* 10.0.3.0/24 [20/20] via 10.0.30.3, r1-eth2 (vrf neno), weight 1, XX:XX:XX  O>* 10.0.4.0/24 [110/20] via 10.0.20.2, r1-eth1, weight 1, XX:XX:XX  O   10.0.20.0/24 [110/10] is directly connected, r1-eth1, weight 1, XX:XX:XX -C>* 10.0.20.0/24 is directly connected, r1-eth1, XX:XX:XX -L>* 10.0.20.1/32 is directly connected, r1-eth1, XX:XX:XX +C>* 10.0.20.0/24 is directly connected, r1-eth1, weight 1, XX:XX:XX +L>* 10.0.20.1/32 is directly connected, r1-eth1, weight 1, XX:XX:XX  B>* 10.0.30.0/24 [20/0] is directly connected, neno (vrf neno), weight 1, XX:XX:XX  O>* 10.0.40.0/24 [110/20] via 10.0.20.2, r1-eth1, weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-neno.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-neno.txt index 6e1335243b..1dc574f360 100644 --- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-neno.txt +++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r1/zebra-vrf-neno.txt @@ -2,6 +2,6 @@ VRF neno:  O>* 10.0.3.0/24 [110/20] via 10.0.30.3, r1-eth2, weight 1, XX:XX:XX  B>* 10.0.4.0/24 [20/20] via 10.0.20.2, r1-eth1 (vrf default), weight 1, XX:XX:XX  O   10.0.30.0/24 [110/10] is directly connected, r1-eth2, weight 1, XX:XX:XX -C>* 10.0.30.0/24 is directly connected, r1-eth2, XX:XX:XX -L>* 10.0.30.1/32 is directly connected, r1-eth2, XX:XX:XX +C>* 10.0.30.0/24 is directly connected, r1-eth2, weight 1, XX:XX:XX +L>* 10.0.30.1/32 is directly connected, r1-eth2, weight 1, XX:XX:XX  B>* 10.0.40.0/24 [20/20] via 10.0.20.2, r1-eth1 (vrf default), weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-default.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-default.txt index d7d31434c6..b5e81bc0e9 100644 --- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-default.txt +++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-default.txt @@ -1,12 +1,12 @@  S>* 0.0.0.0/0 [1/0] via 10.0.20.1, r2-eth1, weight 1, XX:XX:XX  O>* 10.0.1.0/24 [110/20] via 10.0.20.1, r2-eth1, weight 1, XX:XX:XX  O   10.0.2.0/24 [110/10] is directly connected, r2-eth0, weight 1, XX:XX:XX -C>* 10.0.2.0/24 is directly connected, r2-eth0, XX:XX:XX -L>* 10.0.2.2/32 is directly connected, r2-eth0, XX:XX:XX +C>* 10.0.2.0/24 is directly connected, r2-eth0, weight 1, XX:XX:XX +L>* 10.0.2.2/32 is directly connected, r2-eth0, weight 1, XX:XX:XX  O>* 10.0.3.0/24 [110/20] via 10.0.20.1, r2-eth1, weight 1, XX:XX:XX  B>* 10.0.4.0/24 [20/20] via 10.0.40.4, r2-eth2 (vrf ray), weight 1, XX:XX:XX  O   10.0.20.0/24 [110/10] is directly connected, r2-eth1, weight 1, XX:XX:XX -C>* 10.0.20.0/24 is directly connected, r2-eth1, XX:XX:XX -L>* 10.0.20.2/32 is directly connected, r2-eth1, XX:XX:XX +C>* 10.0.20.0/24 is directly connected, r2-eth1, weight 1, XX:XX:XX +L>* 10.0.20.2/32 is directly connected, r2-eth1, weight 1, XX:XX:XX  O>* 10.0.30.0/24 [110/20] via 10.0.20.1, r2-eth1, weight 1, XX:XX:XX  B>* 10.0.40.0/24 [20/0] is directly connected, ray (vrf ray), weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-ray.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-ray.txt index 1495c88936..c403496ff6 100644 --- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-ray.txt +++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r2/zebra-vrf-ray.txt @@ -6,5 +6,5 @@ O>* 10.0.4.0/24 [110/20] via 10.0.40.4, r2-eth2, weight 1, XX:XX:XX  B   10.0.20.0/24 [20/0] is directly connected, r2-eth1 (vrf default) inactive, weight 1, XX:XX:XX  B>* 10.0.30.0/24 [20/20] via 10.0.20.1, r2-eth1 (vrf default), weight 1, XX:XX:XX  O   10.0.40.0/24 [110/10] is directly connected, r2-eth2, weight 1, XX:XX:XX -C>* 10.0.40.0/24 is directly connected, r2-eth2, XX:XX:XX -L>* 10.0.40.2/32 is directly connected, r2-eth2, XX:XX:XX +C>* 10.0.40.0/24 is directly connected, r2-eth2, weight 1, XX:XX:XX +L>* 10.0.40.2/32 is directly connected, r2-eth2, weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r3/zebra-vrf-default.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r3/zebra-vrf-default.txt index b1701fe177..db4e268cb0 100644 --- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r3/zebra-vrf-default.txt +++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r3/zebra-vrf-default.txt @@ -1,10 +1,10 @@  O   10.0.3.0/24 [110/10] is directly connected, r3-eth0, weight 1, XX:XX:XX -C>* 10.0.3.0/24 is directly connected, r3-eth0, XX:XX:XX -L>* 10.0.3.3/32 is directly connected, r3-eth0, XX:XX:XX +C>* 10.0.3.0/24 is directly connected, r3-eth0, weight 1, XX:XX:XX +L>* 10.0.3.3/32 is directly connected, r3-eth0, weight 1, XX:XX:XX  O>* 10.0.4.0/24 [110/20] via 10.0.30.1, r3-eth1, weight 1, XX:XX:XX  O   10.0.30.0/24 [110/10] is directly connected, r3-eth1, weight 1, XX:XX:XX -C>* 10.0.30.0/24 is directly connected, r3-eth1, XX:XX:XX -L>* 10.0.30.3/32 is directly connected, r3-eth1, XX:XX:XX +C>* 10.0.30.0/24 is directly connected, r3-eth1, weight 1, XX:XX:XX +L>* 10.0.30.3/32 is directly connected, r3-eth1, weight 1, XX:XX:XX  O>* 10.0.40.0/24 [110/20] via 10.0.30.1, r3-eth1, weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r4/zebra-vrf-default.txt b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r4/zebra-vrf-default.txt index 3723a8a8cb..4865708578 100644 --- a/tests/topotests/ospf_multi_vrf_bgp_route_leak/r4/zebra-vrf-default.txt +++ b/tests/topotests/ospf_multi_vrf_bgp_route_leak/r4/zebra-vrf-default.txt @@ -1,9 +1,9 @@  O>* 10.0.3.0/24 [110/20] via 10.0.40.2, r4-eth1, weight 1, XX:XX:XX  O   10.0.4.0/24 [110/10] is directly connected, r4-eth0, weight 1, XX:XX:XX -C>* 10.0.4.0/24 is directly connected, r4-eth0, XX:XX:XX -L>* 10.0.4.4/32 is directly connected, r4-eth0, XX:XX:XX +C>* 10.0.4.0/24 is directly connected, r4-eth0, weight 1, XX:XX:XX +L>* 10.0.4.4/32 is directly connected, r4-eth0, weight 1, XX:XX:XX  O>* 10.0.30.0/24 [110/20] via 10.0.40.2, r4-eth1, weight 1, XX:XX:XX  O   10.0.40.0/24 [110/10] is directly connected, r4-eth1, weight 1, XX:XX:XX -C>* 10.0.40.0/24 is directly connected, r4-eth1, XX:XX:XX -L>* 10.0.40.4/32 is directly connected, r4-eth1, XX:XX:XX +C>* 10.0.40.0/24 is directly connected, r4-eth1, weight 1, XX:XX:XX +L>* 10.0.40.4/32 is directly connected, r4-eth1, weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_netns_vrf/r1/zebraroute.txt b/tests/topotests/ospf_netns_vrf/r1/zebraroute.txt index bf874ac762..68fd30d4cc 100644 --- a/tests/topotests/ospf_netns_vrf/r1/zebraroute.txt +++ b/tests/topotests/ospf_netns_vrf/r1/zebraroute.txt @@ -1,10 +1,10 @@  VRF r1-ospf-cust1:  O   10.0.1.0/24 [110/10] is directly connected, r1-eth0, weight 1, XX:XX:XX -C>* 10.0.1.0/24 is directly connected, r1-eth0, XX:XX:XX -L>* 10.0.1.1/32 is directly connected, r1-eth0, XX:XX:XX +C>* 10.0.1.0/24 is directly connected, r1-eth0, weight 1, XX:XX:XX +L>* 10.0.1.1/32 is directly connected, r1-eth0, weight 1, XX:XX:XX  O>* 10.0.2.0/24 [110/20] via 10.0.3.3, r1-eth1, weight 1, XX:XX:XX  O   10.0.3.0/24 [110/10] is directly connected, r1-eth1, weight 1, XX:XX:XX -C>* 10.0.3.0/24 is directly connected, r1-eth1, XX:XX:XX -L>* 10.0.3.2/32 is directly connected, r1-eth1, XX:XX:XX +C>* 10.0.3.0/24 is directly connected, r1-eth1, weight 1, XX:XX:XX +L>* 10.0.3.2/32 is directly connected, r1-eth1, weight 1, XX:XX:XX  O>* 10.0.10.0/24 [110/20] via 10.0.3.1, r1-eth1, weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_netns_vrf/r1/zebraroutedown.txt b/tests/topotests/ospf_netns_vrf/r1/zebraroutedown.txt index e515205307..f0bce905b1 100644 --- a/tests/topotests/ospf_netns_vrf/r1/zebraroutedown.txt +++ b/tests/topotests/ospf_netns_vrf/r1/zebraroutedown.txt @@ -1,9 +1,9 @@  VRF r1-ospf-cust1:  O   10.0.1.0/24 [110/10] is directly connected, r1-eth0, weight 1, XX:XX:XX -C>* 10.0.1.0/24 is directly connected, r1-eth0, XX:XX:XX -L>* 10.0.1.1/32 is directly connected, r1-eth0, XX:XX:XX +C>* 10.0.1.0/24 is directly connected, r1-eth0, weight 1, XX:XX:XX +L>* 10.0.1.1/32 is directly connected, r1-eth0, weight 1, XX:XX:XX  O>* 10.0.2.0/24 [110/20] via 10.0.3.3, r1-eth1, weight 1, XX:XX:XX  O   10.0.3.0/24 [110/10] is directly connected, r1-eth1, weight 1, XX:XX:XX -C>* 10.0.3.0/24 is directly connected, r1-eth1, XX:XX:XX -L>* 10.0.3.2/32 is directly connected, r1-eth1, XX:XX:XX +C>* 10.0.3.0/24 is directly connected, r1-eth1, weight 1, XX:XX:XX +L>* 10.0.3.2/32 is directly connected, r1-eth1, weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_netns_vrf/r2/zebraroute.txt b/tests/topotests/ospf_netns_vrf/r2/zebraroute.txt index 3763ef8006..098eceb28b 100644 --- a/tests/topotests/ospf_netns_vrf/r2/zebraroute.txt +++ b/tests/topotests/ospf_netns_vrf/r2/zebraroute.txt @@ -1,10 +1,10 @@  VRF r2-ospf-cust1:  O>* 10.0.1.0/24 [110/20] via 10.0.3.2, r2-eth1, weight 1, XX:XX:XX  O   10.0.2.0/24 [110/10] is directly connected, r2-eth0, weight 1, XX:XX:XX -C>* 10.0.2.0/24 is directly connected, r2-eth0, XX:XX:XX -L>* 10.0.2.1/32 is directly connected, r2-eth0, XX:XX:XX +C>* 10.0.2.0/24 is directly connected, r2-eth0, weight 1, XX:XX:XX +L>* 10.0.2.1/32 is directly connected, r2-eth0, weight 1, XX:XX:XX  O   10.0.3.0/24 [110/10] is directly connected, r2-eth1, weight 1, XX:XX:XX -C>* 10.0.3.0/24 is directly connected, r2-eth1, XX:XX:XX -L>* 10.0.3.3/32 is directly connected, r2-eth1, XX:XX:XX +C>* 10.0.3.0/24 is directly connected, r2-eth1, weight 1, XX:XX:XX +L>* 10.0.3.3/32 is directly connected, r2-eth1, weight 1, XX:XX:XX  O>* 10.0.10.0/24 [110/20] via 10.0.3.1, r2-eth1, weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_netns_vrf/r2/zebraroutedown.txt b/tests/topotests/ospf_netns_vrf/r2/zebraroutedown.txt index f6eaba6e1d..a9300f8dfa 100644 --- a/tests/topotests/ospf_netns_vrf/r2/zebraroutedown.txt +++ b/tests/topotests/ospf_netns_vrf/r2/zebraroutedown.txt @@ -1,9 +1,9 @@  VRF r2-ospf-cust1:  O>* 10.0.1.0/24 [110/20] via 10.0.3.2, r2-eth1, weight 1, XX:XX:XX  O   10.0.2.0/24 [110/10] is directly connected, r2-eth0, weight 1, XX:XX:XX -C>* 10.0.2.0/24 is directly connected, r2-eth0, XX:XX:XX -L>* 10.0.2.1/32 is directly connected, r2-eth0, XX:XX:XX +C>* 10.0.2.0/24 is directly connected, r2-eth0, weight 1, XX:XX:XX +L>* 10.0.2.1/32 is directly connected, r2-eth0, weight 1, XX:XX:XX  O   10.0.3.0/24 [110/10] is directly connected, r2-eth1, weight 1, XX:XX:XX -C>* 10.0.3.0/24 is directly connected, r2-eth1, XX:XX:XX -L>* 10.0.3.3/32 is directly connected, r2-eth1, XX:XX:XX +C>* 10.0.3.0/24 is directly connected, r2-eth1, weight 1, XX:XX:XX +L>* 10.0.3.3/32 is directly connected, r2-eth1, weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_netns_vrf/r3/zebraroute.txt b/tests/topotests/ospf_netns_vrf/r3/zebraroute.txt index 5eb92efd20..f58beb81a7 100644 --- a/tests/topotests/ospf_netns_vrf/r3/zebraroute.txt +++ b/tests/topotests/ospf_netns_vrf/r3/zebraroute.txt @@ -2,9 +2,9 @@ VRF r3-ospf-cust1:  O>* 10.0.1.0/24 [110/20] via 10.0.3.2, r3-eth0, weight 1, XX:XX:XX  O>* 10.0.2.0/24 [110/20] via 10.0.3.3, r3-eth0, weight 1, XX:XX:XX  O   10.0.3.0/24 [110/10] is directly connected, r3-eth0, weight 1, XX:XX:XX -C>* 10.0.3.0/24 is directly connected, r3-eth0, XX:XX:XX -L>* 10.0.3.1/32 is directly connected, r3-eth0, XX:XX:XX +C>* 10.0.3.0/24 is directly connected, r3-eth0, weight 1, XX:XX:XX +L>* 10.0.3.1/32 is directly connected, r3-eth0, weight 1, XX:XX:XX  O   10.0.10.0/24 [110/10] is directly connected, r3-eth1, weight 1, XX:XX:XX -C>* 10.0.10.0/24 is directly connected, r3-eth1, XX:XX:XX -L>* 10.0.10.1/32 is directly connected, r3-eth1, XX:XX:XX +C>* 10.0.10.0/24 is directly connected, r3-eth1, weight 1, XX:XX:XX +L>* 10.0.10.1/32 is directly connected, r3-eth1, weight 1, XX:XX:XX diff --git a/tests/topotests/ospf_netns_vrf/r3/zebraroutedown.txt b/tests/topotests/ospf_netns_vrf/r3/zebraroutedown.txt index 26cc19660a..cfedf8fcb4 100644 --- a/tests/topotests/ospf_netns_vrf/r3/zebraroutedown.txt +++ b/tests/topotests/ospf_netns_vrf/r3/zebraroutedown.txt @@ -1,5 +1,5 @@  VRF r3-ospf-cust1:  O   10.0.10.0/24 [110/10] is directly connected, r3-eth1, weight 1, XX:XX:XX -C>* 10.0.10.0/24 is directly connected, r3-eth1, XX:XX:XX -L>* 10.0.10.1/32 is directly connected, r3-eth1, XX:XX:XX +C>* 10.0.10.0/24 is directly connected, r3-eth1, weight 1, XX:XX:XX +L>* 10.0.10.1/32 is directly connected, r3-eth1, weight 1, XX:XX:XX diff --git a/zebra/connected.c b/zebra/connected.c index 404f892f6e..974a1c17a2 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -185,6 +185,7 @@ void connected_up(struct interface *ifp, struct connected *ifc)  		.type = NEXTHOP_TYPE_IFINDEX,  		.ifindex = ifp->ifindex,  		.vrf_id = ifp->vrf->vrf_id, +		.weight = 1,  	};  	struct zebra_vrf *zvrf;  	uint32_t metric; diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 768090badb..c22145be69 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -506,7 +506,7 @@ parse_nexthop_unicast(ns_id_t ns_id, struct rtmsg *rtm, struct rtattr **tb,  		      void *gate, afi_t afi, vrf_id_t vrf_id)  {  	struct interface *ifp = NULL; -	struct nexthop nh = {0}; +	struct nexthop nh = {.weight = 1};  	mpls_label_t labels[MPLS_MAX_LABELS] = {0};  	int num_labels = 0;  	enum seg6local_action_t seg6l_act = ZEBRA_SEG6_LOCAL_ACTION_UNSPEC; @@ -3210,7 +3210,7 @@ static struct nexthop netlink_nexthop_process_nh(struct rtattr **tb,  						 struct interface **ifp,  						 ns_id_t ns_id)  { -	struct nexthop nh = {}; +	struct nexthop nh = {.weight = 1};  	void *gate = NULL;  	enum nexthop_types_t type = 0;  	int if_index = 0; @@ -3357,7 +3357,7 @@ int netlink_nexthop_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)  	vrf_id_t vrf_id = VRF_DEFAULT;  	struct interface *ifp = NULL;  	struct nhmsg *nhm = NULL; -	struct nexthop nh = {}; +	struct nexthop nh = {.weight = 1};  	struct nh_grp grp[MULTIPATH_NUM] = {};  	/* Count of nexthops in group array */  	uint8_t grp_count = 0;  | 
