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

Generated by: LCOV version 1.14