9 #include "bgp/bgp_peer_internal_types.h"
25 return get_address() < rhs.get_address();
33 sevt->set_name(table->
name());
53 bool summary, uint32_t page_limit, uint32_t iter_limit,
54 const string &start_instance,
const string &search_string,
55 vector<ShowEvpnTable> *sevt_list,
string *next_instance) {
56 regex search_expr(search_string);
60 for (uint32_t iter_count = 0; it != rim->
name_cend(); ++it, ++iter_count) {
67 (search_string !=
"deleted" || !table->
IsDeleted())) {
72 sevt_list->push_back(sevt);
73 if (sevt_list->size() >= page_limit)
75 if (iter_count >= iter_limit)
85 bool done = sevt_list->size() >= page_limit;
86 *next_instance = it->second->name();
95 ShowEvpnTableResp, ShowEvpnTable>::CallbackCommon(
103 if (!next_instance.empty())
104 SaveContextToData(next_instance, done, data);
113 ShowEvpnTableResp, ShowEvpnTable>::FillShowList(
114 ShowEvpnTableResp *resp,
const vector<ShowEvpnTable> &show_list) {
115 resp->set_tables(show_list);
122 bool BgpShowHandler<ShowEvpnTableSummaryReq, ShowEvpnTableSummaryReqIterate,
123 ShowEvpnTableSummaryResp, ShowEvpnTable>::CallbackCommon(
127 string next_instance;
131 if (!next_instance.empty())
132 SaveContextToData(next_instance, done, data);
140 void BgpShowHandler<ShowEvpnTableSummaryReq, ShowEvpnTableSummaryReqIterate,
141 ShowEvpnTableSummaryResp, ShowEvpnTable>::FillShowList(
142 ShowEvpnTableSummaryResp *resp,
const vector<ShowEvpnTable> &show_list) {
143 resp->set_tables(show_list);
151 void ShowEvpnTableReq::HandleRequest()
const {
159 ShowEvpnTableReqIterate,
161 ShowEvpnTable>::Callback, _1, _2, _3, _4, _5);
164 ShowEvpnTableReqIterate,
166 ShowEvpnTable>::CreateData;
168 ps.stages_.push_back(s1);
177 void ShowEvpnTableReqIterate::HandleRequest()
const {
185 ShowEvpnTableReqIterate,
187 ShowEvpnTable>::CallbackIterate, _1, _2, _3, _4, _5);
190 ShowEvpnTableReqIterate,
192 ShowEvpnTable>::CreateData;
194 ps.stages_.push_back(s1);
205 void ShowEvpnTableSummaryReq::HandleRequest()
const {
212 ShowEvpnTableSummaryReq,
213 ShowEvpnTableSummaryReqIterate,
214 ShowEvpnTableSummaryResp,
215 ShowEvpnTable>::Callback, _1, _2, _3, _4, _5);
217 ShowEvpnTableSummaryReq,
218 ShowEvpnTableSummaryReqIterate,
219 ShowEvpnTableSummaryResp,
220 ShowEvpnTable>::CreateData;
222 ps.stages_.push_back(s1);
233 void ShowEvpnTableSummaryReqIterate::HandleRequest()
const {
240 ShowEvpnTableSummaryReq,
241 ShowEvpnTableSummaryReqIterate,
242 ShowEvpnTableSummaryResp,
243 ShowEvpnTable>::CallbackIterate, _1, _2, _3, _4, _5);
245 ShowEvpnTableSummaryReq,
246 ShowEvpnTableSummaryReqIterate,
247 ShowEvpnTableSummaryResp,
248 ShowEvpnTable>::CreateData;
250 ps.stages_.push_back(s1);
std::vector< int > instances_
bool operator<(const WaterMarkInfo &lhs, const WaterMarkInfo &rhs)
BgpTable * GetTable(Address::Family fmly)
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
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)
const_name_iterator name_cend()
RoutingInstanceMgr * routing_instance_mgr()
EvpnManager * GetEvpnManager()
static void FillEvpnTableInfo(ShowEvpnTable *sevt, const BgpSandeshContext *bsc, const EvpnTable *table, bool summary)
int GetTaskId(const std::string &name)
uint64_t unique_mac_route_count() const
static bool regex_match(const std::string &input, const regex ®ex)
virtual bool IsVpnTable() const
static TaskScheduler * GetInstance()
uint32_t iter_limit() const
uint64_t im_route_count() const
RoutingInstanceList::const_iterator const_name_iterator
const_name_iterator name_clower_bound(const std::string &name)
std::vector< ShowT > show_list
const std::string & name() const
std::string search_string
static bool regex_search(const std::string &input, const regex ®ex)
void FillShowInfo(ShowEvpnTable *sevt) const
Fill information for introspect command. Note that all IM routes are always in partition 0...
uint32_t page_limit() const
LifetimeActor * deleter()
uint64_t mac_route_count() const
const uint64_t delete_time_stamp_usecs() const
uint64_t ip_route_count() const
static std::string UTCUsecToString(uint64_t tstamp)