bgpd: improve error message for neighbor not found

Problem reported due to tab completion showing all possible peers
in every vrf, but when neighbor in wrong vrf entered "no such
neighbor" is the error message.  Making it slightly more clear
with "no such neighbor in the view/vrf" to clue the user that they
may have specified the wrong vrf.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
This commit is contained in:
Don Slice 2018-05-23 08:09:59 -04:00
parent 19300af8f2
commit 88b7d2555c

View File

@ -10655,7 +10655,7 @@ static int bgp_show_neighbor(struct vty *vty, struct bgp *bgp,
if (use_json) if (use_json)
json_object_boolean_true_add(json, "bgpNoSuchNeighbor"); json_object_boolean_true_add(json, "bgpNoSuchNeighbor");
else else
vty_out(vty, "%% No such neighbor\n"); vty_out(vty, "%% No such neighbor in this view/vrf\n");
} }
if (use_json) { if (use_json) {