OpenSDN source code
config_manager.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
3  * Copyright Contributors to the OpenSDN project
4  */
5 
6 #include <boost/uuid/uuid_io.hpp>
7 #include <boost/scoped_ptr.hpp>
8 #include <vnc_cfg_types.h>
9 #include <base/util.h>
10 #include <db/db_partition.h>
11 
12 #include <ifmap/ifmap_node.h>
13 #include <ifmap/ifmap_link.h>
15 #include <cmn/agent_cmn.h>
16 #include <oper/operdb_init.h>
18 #include <oper/config_manager.h>
19 
20 #include <oper/interface_common.h>
21 #include <oper/health_check.h>
22 #include <oper/physical_device.h>
24 #include <oper/vn.h>
25 #include <oper/vrf.h>
26 #include <oper/sg.h>
27 #include <oper/tag.h>
28 #include <oper/vm.h>
29 #include <oper/interface_common.h>
30 #include <oper/global_qos_config.h>
32 #include <oper/qos_config.h>
33 #include <oper/vrouter.h>
34 #include <oper/global_vrouter.h>
35 #include <oper/bgp_router.h>
36 #include <oper/forwarding_class.h>
37 #include<oper/qos_queue.h>
38 #include <oper/bridge_domain.h>
40 #include <oper/multicast_policy.h>
41 #include <filter/policy_set.h>
42 #include <vector>
43 #include <string>
44 
45 using std::string;
46 
48  const Agent *agent) :
49  mgr_(mgr), link_table_(NULL), agent_(agent) {
50 }
51 
53  IFMapNode *node) {
54  if (link->left() == node) return link->right();
55  if (link->right() == node) return link->left();
56  return NULL;
57 }
58 
59 //Note: FindLink here checks for many-to-one node.
61  IFMapNode *node) {
62  IFMapLink *link = NULL;
63  if (!link_table_) {
64  link_table_ = static_cast<IFMapAgentLinkTable *>(agent_->db()->
65  FindTable(IFMAP_AGENT_LINK_DB_NAME));
66  }
67 
68  std::ostringstream key_with_node_in_right;
69  key_with_node_in_right << type << ",," << node->ToString();
70  link = link_table_->FindNextLink(key_with_node_in_right.str());
71  if (link && (strcmp(link->metadata().c_str(), type) == 0))
72  return GetOtherAdjacentNode(link, node);
73 
74  std::ostringstream key_with_node_in_left;
75  key_with_node_in_left << type << "," << node->ToString() << ",";
76  link = link_table_->FindNextLink(key_with_node_in_left.str());
77  if (link && (strcmp(link->metadata().c_str(), type) == 0))
78  return GetOtherAdjacentNode(link, node);
79 
80  return NULL;
81 }
82 
84 public:
85  struct Node {
87  ~Node() { }
88 
90  };
91 
92  struct NodeCmp {
93  bool operator() (const Node &lhs, const Node &rhs) const {
94  return lhs.state_.get() < rhs.state_.get();
95  }
96  };
97  typedef std::set<Node, NodeCmp> NodeList;
98  typedef NodeList::iterator NodeListIterator;
99 
101  table_(table), oper_ifmap_table_(NULL), enqueue_count_(0),
102  process_count_(0) {
103  }
104 
106  table_(NULL), oper_ifmap_table_(table), enqueue_count_(0),
107  process_count_(0) {
108  }
109 
111  assert(list_.size() == 0);
112  }
113 
114  bool Add(Agent *agent, ConfigManager *mgr, IFMapNode *node) {
116  Node n(dep->SetState(node));
117  list_.insert(n);
118  enqueue_count_++;
119  mgr->Start();
120  return true;
121  }
122 
123  bool Delete(Agent *agent, ConfigManager *mgr, IFMapNode *node) {
125  IFMapNodeState *state = dep->IFMapNodeGet(node);
126  if (state == NULL)
127  return false;
128  Node n(state);
129  list_.erase(n);
130  return true;
131  }
132 
133  uint32_t Process(uint32_t weight) {
134  uint32_t count = 0;
135  NodeListIterator it = list_.begin();
136  while (weight && (it != list_.end())) {
137  NodeListIterator prev = it++;
138  IFMapNodeState *state = prev->state_.get();
139  IFMapNode *node = state->node();
140 
141  DBRequest req;
142  boost::uuids::uuid id = state->uuid();
143  if (table_) {
144  if (table_->ProcessConfig(node, req, id)) {
145  table_->Enqueue(&req);
146  }
147  }
148 
149  if (oper_ifmap_table_) {
151  }
152 
153  list_.erase(prev);
154  weight--;
155  count++;
156  process_count_++;
157  }
158 
159  return count;
160  }
161 
162  uint32_t Size() const { return list_.size(); }
163  uint32_t enqueue_count() const { return enqueue_count_; }
164  uint32_t process_count() const { return process_count_; }
165 
166 private:
170  uint32_t enqueue_count_;
171  uint32_t process_count_;
173 };
174 
176 public:
177  struct DeviceVnEntry {
179  const boost::uuids::uuid &vn) : dev_(dev), vn_(vn) {
180  }
181 
183 
186  };
187 
189  bool operator() (const DeviceVnEntry &lhs, const DeviceVnEntry &rhs) const {
190  if (lhs.dev_ != rhs.dev_)
191  return lhs.dev_ < rhs.dev_;
192 
193  return lhs.vn_ < rhs.vn_;
194  }
195  };
196 
197  typedef std::set<DeviceVnEntry, DeviceVnEntryCmp> DeviceVnList;
198  typedef DeviceVnList::iterator DeviceVnIterator;
199 
201  table_(table), enqueue_count_(0), process_count_(0) {
202  }
203 
205  assert(list_.size() == 0);
206  }
207 
208  bool Add(Agent *agent, ConfigManager *mgr, const boost::uuids::uuid &dev,
209  const boost::uuids::uuid &vn) {
210  list_.insert(DeviceVnEntry(dev, vn));
211  enqueue_count_++;
212  mgr->Start();
213  return true;
214  }
215 
216  bool Delete(Agent *agent, ConfigManager *mgr, const boost::uuids::uuid &dev,
217  const boost::uuids::uuid &vn) {
218  list_.erase(DeviceVnEntry(dev, vn));
219  return true;
220  }
221 
222  uint32_t Process(uint32_t weight) {
223  uint32_t count = 0;
224  DeviceVnIterator it = list_.begin();
225  while (weight && (it != list_.end())) {
226  DeviceVnIterator prev = it++;
227  DBRequest req;
228  table_->ProcessConfig(prev->dev_, prev->vn_);
229  list_.erase(prev);
230  weight--;
231  count++;
232  }
233  return count;
234  }
235 
236  uint32_t Size() const { return list_.size(); }
237  uint32_t enqueue_count() const { return enqueue_count_; }
238  uint32_t process_count() const { return process_count_; }
239 
240 private:
243  uint32_t enqueue_count_;
244  uint32_t process_count_;
246 };
247 
249  agent_(agent), trigger_(), timer_(NULL), timeout_(kMinTimeout) {
250 
251  int task_id = TaskScheduler::GetInstance()->GetTaskId("db::DBTable");
252  trigger_.reset
253  (new TaskTrigger(boost::bind(&ConfigManager::TriggerRun, this),
254  task_id, 0));
256  "Config Manager", task_id, 0);
257  for (uint32_t i = 0; i < kMaxTimeout; i++) {
258  process_config_count_[i] = 0;
259  }
260  helper_.reset(new ConfigHelper(this, agent_));
261 }
262 
264  timer_->Cancel();
266 }
267 
269  AgentDBTable *intf_table = agent_->interface_table();
270  vmi_list_.reset(new ConfigManagerNodeList(intf_table));
271  physical_interface_list_.reset(new ConfigManagerNodeList(intf_table));
272  logical_interface_list_.reset(new ConfigManagerNodeList(intf_table));
273 
291  forwarding_class_list_.reset(new
293  slo_list_.reset(new
296 
297  OperDB *oper_db = agent()->oper_db();
299  (new ConfigManagerNodeList(oper_db->global_vrouter()));
301  (new ConfigManagerNodeList(oper_db->bgp_router_config()));
303  (new ConfigManagerNodeList(oper_db->vrouter()));
305  (new ConfigManagerNodeList(oper_db->global_qos_config()));
308  network_ipam_list_.reset
309  (new ConfigManagerNodeList(oper_db->network_ipam()));
310  virtual_dns_list_.reset(new ConfigManagerNodeList(oper_db->virtual_dns()));
311 }
312 
313 uint32_t ConfigManager::Size() const {
314  return
315  global_vrouter_list_->Size() +
316  bgp_router_config_list_->Size() +
317  virtual_router_list_->Size() +
318  global_qos_config_list_->Size() +
320  network_ipam_list_->Size() + + +
321  virtual_dns_list_->Size() +
322  vmi_list_->Size() +
323  physical_interface_list_->Size() +
324  logical_interface_list_->Size() +
325  device_list_->Size() +
326  sg_list_->Size() +
327  tag_list_->Size() +
328  vn_list_->Size() +
329  vrf_list_->Size() +
330  vm_list_->Size() +
331  hc_list_->Size() +
332  device_vn_list_->Size() +
333  qos_config_list_->Size() +
334  bridge_domain_list_->Size() +
335  policy_set_list_->Size() +
336  mp_list_->Size();
337 }
338 
339 uint32_t ConfigManager::ProcessCount() const {
340  return
341  global_vrouter_list_->process_count() +
342  bgp_router_config_list_->process_count() +
343  virtual_router_list_->process_count() +
344  global_qos_config_list_->process_count() +
345  global_system_config_list_->process_count() +
346  network_ipam_list_->process_count() +
347  virtual_dns_list_->process_count() +
348  vmi_list_->process_count() +
349  physical_interface_list_->process_count() +
350  logical_interface_list_->process_count() +
351  device_list_->process_count() +
352  sg_list_->process_count() +
353  tag_list_->process_count() +
354  vn_list_->process_count() +
355  vrf_list_->process_count() +
356  vm_list_->process_count() +
357  hc_list_->process_count() +
358  device_vn_list_->process_count() +
359  qos_config_list_->process_count() +
360  policy_set_list_->process_count() +
361  mp_list_->process_count();
362 }
363 
365  if (agent_->ResourceManagerReady() == false) {
366  return;
367  }
368 
369  if (agent_->test_mode()) {
370  trigger_->Set();
371  } else {
372  timeout_++;
373  if (timeout_ > kMaxTimeout)
375  if (timer_->Idle())
377  this));
378  }
379 }
380 
382  int count = Run();
384 
385  if (Size() == 0) {
387  return false;
388  }
389 
390  timeout_--;
391  if (timeout_ <= kMinTimeout)
394  return true;
395 }
396 
398  Run();
399  return (Size() == 0);
400 }
401 
402 // Run the change-list
404  uint32_t max_count = kIterationCount;
405  uint32_t count = 0;
406 
407  count += global_vrouter_list_->Process(max_count - count);
408  count += bgp_router_config_list_->Process(max_count - count);
409  count += virtual_router_list_->Process(max_count - count);
410  count += global_qos_config_list_->Process(max_count - count);
411  count += global_system_config_list_->Process(max_count - count);
412  count += network_ipam_list_->Process(max_count - count);
413  count += virtual_dns_list_->Process(max_count - count);
414  count += sg_list_->Process(max_count - count);
415  count += tag_list_->Process(max_count - count);
416  count += physical_interface_list_->Process(max_count - count);
417  count += qos_queue_list_->Process(max_count - count);
418  count += forwarding_class_list_->Process(max_count - count);
419  count += qos_config_list_->Process(max_count - count);
420  count += vn_list_->Process(max_count - count);
421  count += vm_list_->Process(max_count - count);
422  count += vrf_list_->Process(max_count - count);
423  count += bridge_domain_list_->Process(max_count - count);
424  count += policy_set_list_->Process(max_count - count);
425  count += logical_interface_list_->Process(max_count - count);
426  count += hc_list_->Process(max_count - count);
427  count += vmi_list_->Process(max_count - count);
428  count += device_list_->Process(max_count - count);
429  count += device_vn_list_->Process(max_count - count);
430  count += slo_list_->Process(max_count - count);
431  count += mp_list_->Process(max_count - count);
432  return count;
433 }
434 
436  vmi_list_->Add(agent_, this, node);
437 }
438 
439 uint32_t ConfigManager::VmiNodeCount() const {
440  return vmi_list_->Size();
441 }
442 
444  logical_interface_list_->Add(agent_, this, node);
445 }
446 
448  return logical_interface_list_->Size();
449 }
450 
452  device_list_->Add(agent_, this, node);
453 }
454 
456  hc_list_->Add(agent_, this, node);
457 }
458 
460  bridge_domain_list_->Add(agent_, this, node);
461 }
462 
464  policy_set_list_->Add(agent_, this, node);
465 }
466 
468  sg_list_->Add(agent_, this, node);
469 }
470 
472  tag_list_->Add(agent_, this, node);
473 }
474 
476  vn_list_->Add(agent_, this, node);
477 }
478 
480  vrf_list_->Add(agent_, this, node);
481 }
482 
484  vm_list_->Add(agent_, this, node);
485 }
486 
488  physical_interface_list_->Add(agent_, this, node);
489 }
490 
492  qos_config_list_->Add(agent_, this, node);
493 }
494 
496  forwarding_class_list_->Add(agent_, this, node);
497 }
498 
500  slo_list_->Add(agent_, this, node);
501 }
502 
504  mp_list_->Add(agent_, this, node);
505 }
506 
508  qos_queue_list_->Add(agent_, this, node);
509 }
510 
512  const boost::uuids::uuid &vn) {
513  device_vn_list_->Add(agent_, this, dev, vn);
514 }
515 
517  const boost::uuids::uuid &vn) {
518  device_vn_list_->Delete(agent_, this, dev, vn);
519 }
521  return device_vn_list_->Size();
522 }
523 
525  global_qos_config_list_->Add(agent_, this, node);
526 }
527 
529  global_system_config_list_->Add(agent_, this, node);
530 }
531 
533  network_ipam_list_->Add(agent_, this, node);
534 }
535 
537  virtual_dns_list_->Add(agent_, this, node);
538 }
539 
541  global_vrouter_list_->Add(agent_, this, node);
542 }
543 
545  bgp_router_config_list_->Add(agent_, this, node);
546 }
547 
549  virtual_router_list_->Add(agent_, this, node);
550 }
551 
553  using std::setw;
554  using std::endl;
555 
556  std::stringstream str;
557  str << setw(16) << "CfgMgr"
558  << " Queue" << setw(8) << Size()
559  << " Timeout " << setw(8) << timeout()
560  << " Process" << setw(8) << ProcessCount() << endl;
561  str << setw(22)
562  << " VMI-Q " << setw(8) << vmi_list_->Size()
563  << " Enqueue " << setw(8) << vmi_list_->enqueue_count()
564  << " Process" << setw(8) << vmi_list_->process_count() << endl;
565  str << setw(22)
566  << " LI-Q " << setw(8) << logical_interface_list_->Size()
567  << " Enqueue " << setw(8) << logical_interface_list_->enqueue_count()
568  << " Process" << setw(8) << logical_interface_list_->process_count() << endl;
569  return str.str();
570 }
571 
572 // When traversing graph, check if an IFMapNode can be used. Conditions are,
573 // - The node is not in deleted state
574 // - The node was notified earlier
576  if (node->IsDeleted()) {
577  return false;
578  }
579 
582 
583  // Table not managed by dependency manager. Node can be used
584  if (dep->IsRegistered(node) == false)
585  return true;
586 
587  IFMapNodeState *state = dep->IFMapNodeGet(node);
588  if (state == NULL) {
589  // State not set. Means, IFMapDependency manager manages the node
590  // and has not seen the node yet. Node cannot be used.
591  return false;
592  }
593 
594  if (state->notify() == false ||
595  state->oper_db_request_enqueued() == false) {
596  return false;
597  }
598 
599  return true;
600 }
601 
602 // When traversing graph, check if an IFMapNode can be used. Conditions are,
603 // - The node is not in deleted state
604 // - The node was notified earlier
605 // - The node is an entry in IFMapAgentTable specified
607  if (table != static_cast<IFMapAgentTable *>(node->table())) {
608  return false;
609  }
610 
611  return CanUseNode(node);
612 }
613 
615  return !CanUseNode(node);
616 }
617 
619  return !CanUseNode(node, table);
620 }
621 
622 
624  const char *type) {
625  IFMapAgentTable *table = static_cast<IFMapAgentTable *>(node->table());
626  DBGraph *graph = table->GetGraph();
627  assert(node->IsVertexValid());
628  for (DBGraphVertex::adjacency_iterator iter = node->begin(graph);
629  iter != node->end(graph); ++iter) {
630  IFMapNode *adj_node = static_cast<IFMapNode *>(iter.operator->());
631  if (SkipNode(adj_node)) {
632  continue;
633  }
634  if (strcmp(adj_node->table()->Typename(), type) == 0) {
635  return adj_node;
636  }
637  }
638 
639  return NULL;
640 }
641 
644  dep->PropogateNodeAndLinkChange(node);
645 }
virtual bool ProcessConfig(IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
Definition: agent_db.h:209
Definition: agent.h:361
InterfaceTable * interface_table() const
Definition: agent.h:468
VmTable * vm_table() const
Definition: agent.h:493
ForwardingClassTable * forwarding_class_table() const
Definition: agent.h:543
bool ResourceManagerReady() const
Definition: agent.h:1242
TagTable * tag_table() const
Definition: agent.h:508
OperDB * oper_db() const
Definition: agent.cc:1017
QosQueueTable * qos_queue_table() const
Definition: agent.h:565
VrfTable * vrf_table() const
Definition: agent.h:488
EventManager * event_manager() const
Definition: agent.h:1106
AgentQosConfigTable * qos_config_table() const
Definition: agent.h:557
SecurityLoggingObjectTable * slo_table() const
Definition: agent.h:550
MulticastPolicyTable * mp_table() const
Definition: agent.h:645
BridgeDomainTable * bridge_domain_table() const
Definition: agent.cc:945
VnTable * vn_table() const
Definition: agent.h:498
PhysicalDeviceVnTable * physical_device_vn_table() const
Definition: agent.h:638
PhysicalDeviceTable * physical_device_table() const
Definition: agent.h:631
bool test_mode() const
Definition: agent.h:1194
DB * db() const
Definition: agent.h:1121
SgTable * sg_table() const
Definition: agent.h:503
HealthCheckTable * health_check_table() const
Definition: agent.cc:937
PolicySetTable * policy_set_table() const
Definition: agent.h:523
ConfigHelper(const ConfigManager *mgr, const Agent *agent)
IFMapNode * GetOtherAdjacentNode(IFMapLink *link, IFMapNode *node)
const Agent * agent_
IFMapAgentLinkTable * link_table_
IFMapNode * FindLink(const char *type, IFMapNode *node)
DeviceVnList::iterator DeviceVnIterator
PhysicalDeviceVnTable * table_
bool Add(Agent *agent, ConfigManager *mgr, const boost::uuids::uuid &dev, const boost::uuids::uuid &vn)
uint32_t enqueue_count() const
uint32_t Process(uint32_t weight)
bool Delete(Agent *agent, ConfigManager *mgr, const boost::uuids::uuid &dev, const boost::uuids::uuid &vn)
DISALLOW_COPY_AND_ASSIGN(ConfigManagerDeviceVnList)
std::set< DeviceVnEntry, DeviceVnEntryCmp > DeviceVnList
ConfigManagerDeviceVnList(PhysicalDeviceVnTable *table)
uint32_t process_count() const
uint32_t process_count() const
bool Add(Agent *agent, ConfigManager *mgr, IFMapNode *node)
DISALLOW_COPY_AND_ASSIGN(ConfigManagerNodeList)
uint32_t enqueue_count() const
uint32_t Process(uint32_t weight)
std::set< Node, NodeCmp > NodeList
bool Delete(Agent *agent, ConfigManager *mgr, IFMapNode *node)
uint32_t Size() const
ConfigManagerNodeList(AgentDBTable *table)
OperIFMapTable * oper_ifmap_table_
ConfigManagerNodeList(OperIFMapTable *table)
NodeList::iterator NodeListIterator
std::unique_ptr< ConfigManagerNodeList > vm_list_
void AddNetworkIpamNode(IFMapNode *node)
uint64_t process_config_count_[kMaxTimeout+1]
uint32_t timeout() const
void AddBridgeDomainNode(IFMapNode *node)
void AddPolicySetNode(IFMapNode *node)
void AddQosConfigNode(IFMapNode *node)
static const uint32_t kIterationCount
uint32_t LogicalInterfaceNodeCount() const
static const uint32_t kMinTimeout
void AddMulticastPolicyNode(IFMapNode *node)
std::unique_ptr< TaskTrigger > trigger_
static const uint32_t kMaxTimeout
std::unique_ptr< ConfigManagerNodeList > virtual_router_list_
void AddForwardingClassNode(IFMapNode *node)
std::unique_ptr< ConfigManagerNodeList > policy_set_list_
std::unique_ptr< ConfigManagerNodeList > forwarding_class_list_
void AddTagNode(IFMapNode *node)
std::unique_ptr< ConfigManagerNodeList > virtual_dns_list_
std::unique_ptr< ConfigManagerNodeList > global_system_config_list_
std::unique_ptr< ConfigManagerNodeList > vrf_list_
std::unique_ptr< ConfigManagerNodeList > slo_list_
std::unique_ptr< ConfigManagerNodeList > network_ipam_list_
uint32_t ProcessCount() const
std::unique_ptr< ConfigManagerNodeList > tag_list_
boost::scoped_ptr< ConfigHelper > helper_
bool SkipNode(IFMapNode *node)
void AddGlobalVrouterNode(IFMapNode *node)
void AddSecurityLoggingObjectNode(IFMapNode *node)
std::unique_ptr< ConfigManagerNodeList > bgp_router_config_list_
virtual ~ConfigManager()
void AddVirtualRouterNode(IFMapNode *node)
void AddPhysicalDeviceNode(IFMapNode *node)
uint32_t timeout_
std::unique_ptr< ConfigManagerNodeList > mp_list_
std::unique_ptr< ConfigManagerNodeList > logical_interface_list_
std::unique_ptr< ConfigManagerDeviceVnList > device_vn_list_
std::unique_ptr< ConfigManagerNodeList > bridge_domain_list_
Agent * agent()
std::unique_ptr< ConfigManagerNodeList > qos_config_list_
void AddQosQueueNode(IFMapNode *node)
void AddSgNode(IFMapNode *node)
void AddGlobalSystemConfigNode(IFMapNode *node)
uint32_t Size() const
void AddVmNode(IFMapNode *node)
bool CanUseNode(IFMapNode *node)
std::unique_ptr< ConfigManagerNodeList > vmi_list_
std::unique_ptr< ConfigManagerNodeList > physical_interface_list_
void AddVirtualDnsNode(IFMapNode *node)
std::unique_ptr< ConfigManagerNodeList > global_vrouter_list_
ConfigManager(Agent *agent)
void AddVrfNode(IFMapNode *node)
std::unique_ptr< ConfigManagerNodeList > device_list_
uint32_t VmiNodeCount() const
std::unique_ptr< ConfigManagerNodeList > hc_list_
void AddVmiNode(IFMapNode *node)
void AddLogicalInterfaceNode(IFMapNode *node)
IFMapNode * FindAdjacentIFMapNode(IFMapNode *node, const char *type)
void AddPhysicalDeviceVn(const boost::uuids::uuid &dev, const boost::uuids::uuid &vn)
uint32_t PhysicalDeviceVnCount() const
void AddPhysicalInterfaceNode(IFMapNode *node)
std::unique_ptr< ConfigManagerNodeList > global_qos_config_list_
void AddGlobalQosConfigNode(IFMapNode *node)
void AddVnNode(IFMapNode *node)
std::unique_ptr< ConfigManagerNodeList > sg_list_
void AddHealthCheckServiceNode(IFMapNode *node)
void AddBgpRouterConfigNode(IFMapNode *node)
std::unique_ptr< ConfigManagerNodeList > qos_queue_list_
std::string ProfileInfo() const
void NodeResync(IFMapNode *node)
void DelPhysicalDeviceVn(const boost::uuids::uuid &dev, const boost::uuids::uuid &vn)
std::unique_ptr< ConfigManagerNodeList > vn_list_
bool IsDeleted() const
Definition: db_entry.h:49
adjacency_iterator end(DBGraph *graph)
adjacency_iterator begin(DBGraph *graph)
bool Enqueue(DBRequest *req)
Definition: db_table.cc:221
boost::asio::io_context * io_service()
Definition: event_manager.h:43
const DBGraph * GetGraph() const
IFMapNodeState * IFMapNodeGet(IFMapNode *node)
bool IsRegistered(const IFMapNode *node)
boost::intrusive_ptr< IFMapNodeState > IFMapNodePtr
IFMapNodePtr SetState(IFMapNode *node)
void PropogateNodeAndLinkChange(IFMapNode *node)
IFMapLink * FindNextLink(const std::string &name)
boost::uuids::uuid uuid()
bool oper_db_request_enqueued() const
IFMapTable * table()
Definition: ifmap_node.h:30
virtual std::string ToString() const
Definition: ifmap_node.cc:32
virtual const char * Typename() const =0
OperNetworkIpam * network_ipam() const
Definition: operdb_init.h:90
OperVirtualDns * virtual_dns() const
Definition: operdb_init.h:91
GlobalVrouter * global_vrouter() const
Definition: operdb_init.h:55
GlobalSystemConfig * global_system_config() const
Definition: operdb_init.h:86
BgpRouterConfig * bgp_router_config() const
Definition: operdb_init.h:56
GlobalQosConfig * global_qos_config() const
Definition: operdb_init.h:82
IFMapDependencyManager * dependency_manager()
Definition: operdb_init.h:62
VRouter * vrouter() const
Definition: operdb_init.h:77
void ProcessConfig(IFMapNode *node)
Definition: oper_db.h:263
void ProcessConfig(const boost::uuids::uuid &dev, const boost::uuids::uuid &vn)
int GetTaskId(const std::string &name)
Definition: task.cc:884
static TaskScheduler * GetInstance()
Definition: task.cc:574
static bool DeleteTimer(Timer *Timer)
Definition: timer.cc:222
static Timer * CreateTimer(boost::asio::io_context &service, const std::string &name, int task_id=Timer::GetTimerTaskId(), int task_instance=Timer::GetTimerInstanceId(), bool delete_on_completion=false)
Definition: timer.cc:201
bool Idle() const
Definition: timer.h:109
bool Cancel()
Definition: timer.cc:150
bool Start(int time, Handler handler, ErrorHandler error_handler=NULL)
Definition: timer.cc:108
bool Reschedule(int time)
Definition: timer.cc:137
#define IFMAP_AGENT_LINK_DB_NAME
uint8_t type
Definition: load_balance.h:2
bool operator()(const DeviceVnEntry &lhs, const DeviceVnEntry &rhs) const
DeviceVnEntry(const boost::uuids::uuid &dev, const boost::uuids::uuid &vn)
bool operator()(const Node &lhs, const Node &rhs) const
IFMapDependencyManager::IFMapNodePtr state_
Node(IFMapDependencyManager::IFMapNodePtr state)
boost::uuids::uuid uuid