LCOV - code coverage report
Current view: top level - vnsw/agent/oper - operdb_init.h (source / functions) Hit Total Coverage
Test: OpenSDN C/C++ coverage (all TARGET_SET jobs) Lines: 26 31 83.9 %
Date: 2026-06-04 02:06:09 Functions: 17 20 85.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
       3             :  */
       4             : 
       5             : #ifndef __VNSW_OPERDB_INIT__
       6             : #define __VNSW_OPERDB_INIT__
       7             : 
       8             : #include <base/util.h>
       9             : #include <cmn/agent_cmn.h>
      10             : #include <cmn/agent.h>
      11             : 
      12             : class DBEntryBase;
      13             : class Agent;
      14             : class DB;
      15             : class GlobalVrouter;
      16             : class BgpRouterConfig;
      17             : class PathPreferenceModule;
      18             : class IFMapDependencyManager;
      19             : class MulticastHandler;
      20             : class InstanceManager;
      21             : class NexthopManager;
      22             : class AgentSandeshManager;
      23             : class AgentProfile;
      24             : class VRouter;
      25             : class BgpAsAService;
      26             : class GlobalQosConfig;
      27             : class GlobalSystemConfig;
      28             : class OperNetworkIpam;
      29             : class OperVirtualDns;
      30             : class AgentRouteWalkerManager;
      31             : class RouteLeakManager;
      32             : class TsnElector;
      33             : class ProjectConfig;
      34             : class VxlanRoutingManager;
      35             : class HBFHandler;
      36             : 
      37             : class OperDB {
      38             : public:
      39             :     static const uint16_t max_linklocal_addresses = 65535;
      40             : 
      41             :     OperDB(Agent *agent);
      42             :     virtual ~OperDB();
      43             : 
      44             :     void CreateDBTables(DB *);
      45             :     void RegisterDBClients();
      46             :     void Init();
      47             :     void InitDone();
      48             :     void CreateDefaultVrf();
      49             :     void DeleteRoutes();
      50             :     void Shutdown();
      51             : 
      52          12 :     Agent *agent() const { return agent_; }
      53          17 :     MulticastHandler *multicast() const { return multicast_.get(); }
      54         389 :     GlobalVrouter *global_vrouter() const { return global_vrouter_.get(); }
      55           4 :     BgpRouterConfig *bgp_router_config() const {
      56           4 :         return bgp_router_config_.get();
      57             :     }
      58        1042 :     PathPreferenceModule *route_preference_module() const {
      59        1042 :         return route_preference_module_.get();
      60             :     }
      61        4027 :     IFMapDependencyManager *dependency_manager() {
      62        4027 :         return dependency_manager_.get();
      63             :     }
      64           1 :     InstanceManager *instance_manager() {
      65           1 :         return instance_manager_.get();
      66             :     }
      67          55 :     DomainConfig *domain_config_table() {
      68          55 :         return domain_config_.get();
      69             :     }
      70             :     NexthopManager *nexthop_manager() {
      71             :       return nexthop_manager_.get();
      72             :     }
      73           0 :     AgentSandeshManager *agent_sandesh_manager() {
      74           0 :         return agent_sandesh_manager_.get();
      75             :     }
      76           4 :     VRouter *vrouter() const { return vrouter_.get(); }
      77         155 :     BgpAsAService *bgp_as_a_service() const { return bgp_as_a_service_.get(); }
      78             : 
      79           8 :     AgentProfile *agent_profile() const { return profile_.get(); }
      80             : 
      81          10 :     GlobalQosConfig* global_qos_config() const {
      82          10 :         return global_qos_config_.get();
      83             :     }
      84             : 
      85         137 :     GlobalSystemConfig* global_system_config() const {
      86         137 :         return global_system_config_.get();
      87             :     }
      88             : 
      89           4 :     OperNetworkIpam *network_ipam() const { return network_ipam_.get(); }
      90           4 :     OperVirtualDns *virtual_dns() const { return virtual_dns_.get(); }
      91         273 :     AgentRouteWalkerManager* agent_route_walk_manager() const {
      92         273 :         return route_walk_manager_.get();
      93             :     }
      94           0 :     TsnElector *tsn_elector() const { return tsn_elector_.get(); }
      95           0 :     RouteLeakManager *route_leak_manager() const {
      96           0 :         return route_leak_manager_.get();
      97             :     }
      98          70 :     VxlanRoutingManager *vxlan_routing_manager() const {
      99          70 :         return vxlan_routing_manager_.get();
     100             :     }
     101             :     HBFHandler *hbf_handler() const {
     102             :         return hbf_handler_.get();
     103             :     }
     104             : 
     105             : private:
     106             :     OperDB();
     107             : 
     108             :     Agent *agent_;
     109             :     std::unique_ptr<MulticastHandler> multicast_;
     110             :     std::unique_ptr<PathPreferenceModule> route_preference_module_;
     111             :     std::unique_ptr<IFMapDependencyManager> dependency_manager_;
     112             :     std::unique_ptr<InstanceManager> instance_manager_;
     113             :     std::unique_ptr<NexthopManager> nexthop_manager_;
     114             :     std::unique_ptr<AgentSandeshManager> agent_sandesh_manager_;
     115             :     std::unique_ptr<AgentProfile> profile_;
     116             :     std::unique_ptr<BgpAsAService> bgp_as_a_service_;
     117             :     std::unique_ptr<DomainConfig> domain_config_;
     118             : 
     119             :     std::unique_ptr<VRouter> vrouter_;
     120             :     std::unique_ptr<GlobalVrouter> global_vrouter_;
     121             :     std::unique_ptr<BgpRouterConfig> bgp_router_config_;
     122             :     std::unique_ptr<OperNetworkIpam> network_ipam_;
     123             :     std::unique_ptr<OperVirtualDns> virtual_dns_;
     124             :     std::unique_ptr<GlobalQosConfig> global_qos_config_;
     125             :     std::unique_ptr<GlobalSystemConfig> global_system_config_;
     126             :     std::unique_ptr<AgentRouteWalkerManager> route_walk_manager_;
     127             :     std::unique_ptr<RouteLeakManager> route_leak_manager_;
     128             :     std::unique_ptr<TsnElector> tsn_elector_;
     129             :     std::unique_ptr<VxlanRoutingManager> vxlan_routing_manager_;
     130             :     std::unique_ptr<HBFHandler> hbf_handler_;
     131             : 
     132             :     DISALLOW_COPY_AND_ASSIGN(OperDB);
     133             : };
     134             : #endif

Generated by: LCOV version 1.14