Rename BGP's "peer-id" to "peer-router-id" and "peer-ip" to "peer-id"

This commit is contained in:
Donald Sharp 2015-05-19 18:29:19 -07:00
parent 2a3fa5d7c4
commit 1c36cb2e22
2 changed files with 5 additions and 5 deletions

View File

@ -7074,9 +7074,9 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
if (json_paths) if (json_paths)
{ {
json_object_object_add(json_path, "peer-ip", json_string);
json_string = json_object_new_string(inet_ntoa(bgp->router_id));
json_object_object_add(json_path, "peer-id", json_string); json_object_object_add(json_path, "peer-id", json_string);
json_string = json_object_new_string(inet_ntoa(bgp->router_id));
json_object_object_add(json_path, "peer-router-id", json_string);
} }
else else
{ {
@ -7114,7 +7114,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
if (json_paths) if (json_paths)
{ {
json_string = json_object_new_string(sockunion2str (&binfo->peer->su, buf, SU_ADDRSTRLEN)); json_string = json_object_new_string(sockunion2str (&binfo->peer->su, buf, SU_ADDRSTRLEN));
json_object_object_add(json_path, "peer-ip", json_string); json_object_object_add(json_path, "peer-id", json_string);
if (binfo->peer->hostname) if (binfo->peer->hostname)
{ {
json_string = json_object_new_string(binfo->peer->hostname); json_string = json_object_new_string(binfo->peer->hostname);
@ -7164,7 +7164,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p,
if (json_paths) if (json_paths)
{ {
json_string = json_object_new_string(inet_ntop (AF_INET, &binfo->peer->remote_id, buf1, BUFSIZ)); json_string = json_object_new_string(inet_ntop (AF_INET, &binfo->peer->remote_id, buf1, BUFSIZ));
json_object_object_add(json_path, "peer-id", json_string); json_object_object_add(json_path, "peer-router-id", json_string);
} }
} }

View File

@ -8591,7 +8591,7 @@ bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
json_object_object_add(json_peer, "dynamic-peer", json_boolean_true); json_object_object_add(json_peer, "dynamic-peer", json_boolean_true);
json_string = json_object_new_string(peer->host); json_string = json_object_new_string(peer->host);
json_object_object_add(json_peer, "ip", json_string); json_object_object_add(json_peer, "peer-id", json_string);
if (peer->hostname) if (peer->hostname)
{ {