From 36ecdb3e4c3dec1c69174c12e73e18f575e2b6f2 Mon Sep 17 00:00:00 2001 From: Nischal Sheth Date: Tue, 28 Feb 2017 10:25:41 -0800 Subject: [PATCH] Add neighbor info to instance config introspect Change-Id: I3d32a76c94090cce678730e7f53e14e011d2952a Closes-Bug: 1668728 --- src/bgp/bgp_peer.sandesh | 1 + src/bgp/bgp_show_config.cc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/bgp/bgp_peer.sandesh b/src/bgp/bgp_peer.sandesh index f6c3e2a7cbe..dadda600d38 100644 --- a/src/bgp/bgp_peer.sandesh +++ b/src/bgp/bgp_peer.sandesh @@ -550,6 +550,7 @@ struct ShowBgpInstanceConfig { 4: list export_target; 10: bool has_pnf; 9: string last_change_at; + 15: list neighbors; 5: list service_chain_infos; 6: list static_routes; 11: list aggregate_routes; diff --git a/src/bgp/bgp_show_config.cc b/src/bgp/bgp_show_config.cc index 259be40558b..f7553685808 100644 --- a/src/bgp/bgp_show_config.cc +++ b/src/bgp/bgp_show_config.cc @@ -39,6 +39,10 @@ static void FillBgpInstanceConfigInfo(ShowBgpInstanceConfig *sbic, sbic->set_has_pnf(instance->has_pnf()); sbic->set_last_change_at(UTCUsecToString(instance->last_change_at())); + vector neighbors( + instance->neighbor_list().begin(), instance->neighbor_list().end()); + sbic->set_neighbors(neighbors); + vector sbscc_list; BOOST_FOREACH(const ServiceChainConfig &sc_config, instance->service_chain_list()) {