diff options
author | Tuetuopay <tuetuopay@me.com> | 2019-03-06 19:15:10 +0100 |
---|---|---|
committer | Tuetuopay <tuetuopay@me.com> | 2019-03-19 11:56:25 +0100 |
commit | 530db8dc0398fabe8a88a2c614e14a1f3ccc1ba4 (patch) | |
tree | 08202409fabec39e2fd51c621118e1f462e51976 /zebra/zebra_vty.c | |
parent | zebra: Store the EVPN VRF in the default VRF (diff) | |
download | frr-530db8dc0398fabe8a88a2c614e14a1f3ccc1ba4.tar.xz frr-530db8dc0398fabe8a88a2c614e14a1f3ccc1ba4.zip |
bgpd, zebra: Scope EVPN commands to EVPN VRF
If the EVPN VRF is not the default one (i.e. with advertise-all-vni),
this allows showing its information with `show bgp l2evpn evpn ...`
commands. They do not require adding `vrf VRFNAME` since we only
support a single EVPN VRF. The same is true for zebra-specific commands
(e.g. `show evpn ...`).
Configuration commands are not restricted to the default VRF but to
the EVPN one, that is to the one bearing `advertise-all-vni`.
Signed-off-by: Tuetuopay <tuetuopay@me.com>
Sponsored-by: Scaleway
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r-- | zebra/zebra_vty.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index 537820f7e..b88a05afa 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1797,7 +1797,7 @@ DEFUN (show_evpn_vni, struct zebra_vrf *zvrf; bool uj = use_json(argc, argv); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_vnis(vty, zvrf, uj); return CMD_SUCCESS; } @@ -1813,7 +1813,7 @@ DEFUN (show_evpn_vni_detail, show_evpn_vni_detail_cmd, struct zebra_vrf *zvrf; bool uj = use_json(argc, argv); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_vnis_detail(vty, zvrf, uj); return CMD_SUCCESS; } @@ -1832,7 +1832,7 @@ DEFUN (show_evpn_vni_vni, bool uj = use_json(argc, argv); vni = strtoul(argv[3]->arg, NULL, 10); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_vni(vty, zvrf, vni, uj); return CMD_SUCCESS; } @@ -1976,7 +1976,7 @@ DEFUN (show_evpn_mac_vni, bool uj = use_json(argc, argv); vni = strtoul(argv[4]->arg, NULL, 10); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_macs_vni(vty, zvrf, vni, uj); return CMD_SUCCESS; } @@ -1994,7 +1994,7 @@ DEFUN (show_evpn_mac_vni_all, struct zebra_vrf *zvrf; bool uj = use_json(argc, argv); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_macs_all_vni(vty, zvrf, false, uj); return CMD_SUCCESS; } @@ -2012,7 +2012,7 @@ DEFUN (show_evpn_mac_vni_all_detail, show_evpn_mac_vni_all_detail_cmd, struct zebra_vrf *zvrf; bool uj = use_json(argc, argv); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_macs_all_vni_detail(vty, zvrf, false, uj); return CMD_SUCCESS; } @@ -2038,7 +2038,7 @@ DEFUN (show_evpn_mac_vni_all_vtep, vty_out(vty, "%% Malformed VTEP IP address\n"); return CMD_WARNING; } - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_macs_all_vni_vtep(vty, zvrf, vtep_ip, uj); return CMD_SUCCESS; @@ -2068,7 +2068,7 @@ DEFUN (show_evpn_mac_vni_mac, vty_out(vty, "%% Malformed MAC address"); return CMD_WARNING; } - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_specific_mac_vni(vty, zvrf, vni, &mac, uj); return CMD_SUCCESS; } @@ -2097,7 +2097,7 @@ DEFUN (show_evpn_mac_vni_vtep, return CMD_WARNING; } - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_macs_vni_vtep(vty, zvrf, vni, vtep_ip, uj); return CMD_SUCCESS; } @@ -2116,7 +2116,7 @@ DEFPY (show_evpn_mac_vni_all_dad, struct zebra_vrf *zvrf; bool uj = use_json(argc, argv); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_macs_all_vni(vty, zvrf, true, uj); return CMD_SUCCESS; } @@ -2138,7 +2138,7 @@ DEFPY (show_evpn_mac_vni_dad, bool uj = use_json(argc, argv); vni = strtoul(argv[4]->arg, NULL, 10); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_macs_vni_dad(vty, zvrf, vni, uj); @@ -2161,7 +2161,7 @@ DEFPY (show_evpn_neigh_vni_dad, bool uj = use_json(argc, argv); vni = strtoul(argv[4]->arg, NULL, 10); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_neigh_vni_dad(vty, zvrf, vni, uj); return CMD_SUCCESS; } @@ -2180,7 +2180,7 @@ DEFPY (show_evpn_neigh_vni_all_dad, struct zebra_vrf *zvrf; bool uj = use_json(argc, argv); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_neigh_all_vni(vty, zvrf, true, uj); return CMD_SUCCESS; } @@ -2201,7 +2201,7 @@ DEFUN (show_evpn_neigh_vni, bool uj = use_json(argc, argv); vni = strtoul(argv[4]->arg, NULL, 10); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_neigh_vni(vty, zvrf, vni, uj); return CMD_SUCCESS; } @@ -2219,7 +2219,7 @@ DEFUN (show_evpn_neigh_vni_all, struct zebra_vrf *zvrf; bool uj = use_json(argc, argv); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_neigh_all_vni(vty, zvrf, false, uj); return CMD_SUCCESS; } @@ -2236,7 +2236,7 @@ DEFUN (show_evpn_neigh_vni_all_detail, show_evpn_neigh_vni_all_detail_cmd, struct zebra_vrf *zvrf; bool uj = use_json(argc, argv); - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_neigh_all_vni_detail(vty, zvrf, false, uj); return CMD_SUCCESS; } @@ -2264,7 +2264,7 @@ DEFUN (show_evpn_neigh_vni_neigh, vty_out(vty, "%% Malformed Neighbor address\n"); return CMD_WARNING; } - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_specific_neigh_vni(vty, zvrf, vni, &ip, uj); return CMD_SUCCESS; } @@ -2293,7 +2293,7 @@ DEFUN (show_evpn_neigh_vni_vtep, return CMD_WARNING; } - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); zebra_vxlan_print_neigh_vni_vtep(vty, zvrf, vni, vtep_ip, uj); return CMD_SUCCESS; } @@ -2358,7 +2358,7 @@ DEFPY (clear_evpn_dup_addr, struct ethaddr mac_addr; int ret = CMD_SUCCESS; - zvrf = vrf_info_lookup(VRF_DEFAULT); + zvrf = zebra_vrf_get_evpn(); if (vni_val) { vni = strtoul(vni_val, NULL, 10); |