OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
contrail_agent_init.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef vnsw_contrail_agent_init_hpp
6 #define vnsw_contrail_agent_init_hpp
7 
8 #include <boost/program_options.hpp>
11 
12 class Agent;
13 class AgentParam;
14 class DiagTable;
15 class ServicesModule;
16 class PktModule;
17 
18 // The class to drive agent initialization.
19 // Defines control parameters used to enable/disable agent features
21 public:
23  virtual ~ContrailAgentInit();
24 
25  void ProcessOptions(const std::string &config_file,
26  const std::string &program_name);
27 
28  // Initialization virtual methods
29  void FactoryInit() override;
30  void CreateModules();
31  void InitDone();
32 
33  // Shutdown virtual methods
34  void ModulesShutdown();
35  void KSyncShutdown();
36  void UveShutdown();
39  void WaitForIdle();
40 
41 private:
42  std::unique_ptr<KSync> ksync_;
43  std::unique_ptr<AgentUveBase> uve_;
44  std::unique_ptr<VrouterControlInterface> pkt0_;
45  std::unique_ptr<AgentStatsCollector> stats_collector_;
46  std::unique_ptr<FlowStatsManager> flow_stats_manager_;
47  std::unique_ptr<PortIpcHandler> port_ipc_handler_;
48  std::unique_ptr<RestServer> rest_server_;
49 
51 };
52 
53 #endif // vnsw_contrail_agent_init_hpp
std::unique_ptr< AgentStatsCollector > stats_collector_
string program_name(string filename)
void ProcessOptions(const std::string &config_file, const std::string &program_name)
std::unique_ptr< VrouterControlInterface > pkt0_
std::unique_ptr< FlowStatsManager > flow_stats_manager_
DISALLOW_COPY_AND_ASSIGN(ContrailAgentInit)
Definition: agent.h:358
std::unique_ptr< KSync > ksync_
void FactoryInit() override
std::unique_ptr< RestServer > rest_server_
std::unique_ptr< AgentUveBase > uve_
std::unique_ptr< PortIpcHandler > port_ipc_handler_