10 #include "bgp/bgp_peer_internal_types.h"
26 return get_address() < rhs.get_address();
34 sevt->set_name(table->
name());
54 bool summary, uint32_t page_limit, uint32_t iter_limit,
55 const string &start_instance,
const string &search_string,
56 vector<ShowEvpnTable> *sevt_list,
string *next_instance) {
57 regex search_expr(search_string);
61 for (uint32_t iter_count = 0; it != rim->
name_cend(); ++it, ++iter_count) {
68 (search_string !=
"deleted" || !table->
IsDeleted())) {
73 sevt_list->push_back(sevt);
74 if (sevt_list->size() >= page_limit)
76 if (iter_count >= iter_limit)
86 bool done = sevt_list->size() >= page_limit;
87 *next_instance = it->second->name();
96 ShowEvpnTableResp, ShowEvpnTable>::CallbackCommon(
100 string next_instance;
104 if (!next_instance.empty())
105 SaveContextToData(next_instance, done, data);
114 ShowEvpnTableResp, ShowEvpnTable>::FillShowList(
115 ShowEvpnTableResp *resp,
const vector<ShowEvpnTable> &show_list) {
116 resp->set_tables(show_list);
123 bool BgpShowHandler<ShowEvpnTableSummaryReq, ShowEvpnTableSummaryReqIterate,
124 ShowEvpnTableSummaryResp, ShowEvpnTable>::CallbackCommon(
128 string next_instance;
132 if (!next_instance.empty())
133 SaveContextToData(next_instance, done, data);
141 void BgpShowHandler<ShowEvpnTableSummaryReq, ShowEvpnTableSummaryReqIterate,
142 ShowEvpnTableSummaryResp, ShowEvpnTable>::FillShowList(
143 ShowEvpnTableSummaryResp *resp,
const vector<ShowEvpnTable> &show_list) {
144 resp->set_tables(show_list);
152 void ShowEvpnTableReq::HandleRequest()
const {
160 ShowEvpnTableReqIterate,
162 ShowEvpnTable>::Callback, _1, _2, _3, _4, _5);
165 ShowEvpnTableReqIterate,
167 ShowEvpnTable>::CreateData;
169 ps.stages_.push_back(s1);
178 void ShowEvpnTableReqIterate::HandleRequest()
const {
186 ShowEvpnTableReqIterate,
188 ShowEvpnTable>::CallbackIterate, _1, _2, _3, _4, _5);
191 ShowEvpnTableReqIterate,
193 ShowEvpnTable>::CreateData;
195 ps.stages_.push_back(s1);
206 void ShowEvpnTableSummaryReq::HandleRequest()
const {
213 ShowEvpnTableSummaryReq,
214 ShowEvpnTableSummaryReqIterate,
215 ShowEvpnTableSummaryResp,
216 ShowEvpnTable>::Callback, _1, _2, _3, _4, _5);
218 ShowEvpnTableSummaryReq,
219 ShowEvpnTableSummaryReqIterate,
220 ShowEvpnTableSummaryResp,
221 ShowEvpnTable>::CreateData;
223 ps.stages_.push_back(s1);
234 void ShowEvpnTableSummaryReqIterate::HandleRequest()
const {
241 ShowEvpnTableSummaryReq,
242 ShowEvpnTableSummaryReqIterate,
243 ShowEvpnTableSummaryResp,
244 ShowEvpnTable>::CallbackIterate, _1, _2, _3, _4, _5);
246 ShowEvpnTableSummaryReq,
247 ShowEvpnTableSummaryReqIterate,
248 ShowEvpnTableSummaryResp,
249 ShowEvpnTable>::CreateData;
251 ps.stages_.push_back(s1);
static bool FillEvpnTableInfoList(const BgpSandeshContext *bsc, bool summary, uint32_t page_limit, uint32_t iter_limit, const string &start_instance, const string &search_string, vector< ShowEvpnTable > *sevt_list, string *next_instance)
static void FillEvpnTableInfo(ShowEvpnTable *sevt, const BgpSandeshContext *bsc, const EvpnTable *table, bool summary)
RoutingInstanceMgr * routing_instance_mgr()
LifetimeActor * deleter()
const std::string & name() const
void FillShowInfo(ShowEvpnTable *sevt) const
Fill information for introspect command. Note that all IM routes are always in partition 0.
uint64_t im_route_count() const
EvpnManager * GetEvpnManager()
uint64_t unique_mac_route_count() const
uint64_t ip_route_count() const
uint64_t mac_route_count() const
virtual bool IsVpnTable() const
const uint64_t delete_time_stamp_usecs() const
const_name_iterator name_cend()
const_name_iterator name_clower_bound(const std::string &name)
RoutingInstanceList::const_iterator const_name_iterator
BgpTable * GetTable(Address::Family fmly)
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
int GetTaskId(const std::string &name)
static TaskScheduler * GetInstance()
static bool regex_search(const std::string &input, const regex ®ex)
static bool regex_match(const std::string &input, const regex ®ex)
uint32_t iter_limit() const
uint32_t page_limit() const
std::string search_string
std::vector< ShowT > show_list
std::vector< int > instances_
static std::string UTCUsecToString(uint64_t tstamp)
bool operator<(const WaterMarkInfo &lhs, const WaterMarkInfo &rhs)