OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
tor_agent_init.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef SRC_VNSW_AGENT_PHYSICAL_DEVICES_OVS_TOR_AGENT_TOR_AGENT_INIT_H_
6 #define SRC_VNSW_AGENT_PHYSICAL_DEVICES_OVS_TOR_AGENT_TOR_AGENT_INIT_H_
7 
8 // Agent daemon on ovs-agent-node
9 #include <boost/program_options.hpp>
10 #include <init/agent_init.h>
11 #include <string>
12 
13 class Agent;
14 class AgentParam;
15 class OvsPeerManager;
16 namespace OVSDB {
17 class OvsdbClient;
18 };
19 
20 // The class to drive agent initialization.
21 // Defines control parameters used to enable/disable agent features
22 class TorAgentInit : public AgentInit {
23  public:
24  TorAgentInit();
25  ~TorAgentInit();
26 
27  void ProcessOptions(const std::string &config_file,
28  const std::string &program_name);
29  int Start();
30 
31  virtual std::string InstanceId();
32  virtual int ModuleType();
33  // Initialization virtual methods
34  void FactoryInit();
35  void CreatePeers();
36  void CreateDBTables();
37  void CreateModules();
38  void RegisterDBClients();
39  void InitModules();
40  void ConnectToController();
41 
42  // Shutdown virtual methods
43  void UveShutdown();
44  void WaitForIdle();
45 
46  // Accessor methods
49 
50  private:
51  std::unique_ptr<OvsPeerManager> ovs_peer_manager_;
52  std::unique_ptr<OVSDB::OvsdbClient> ovsdb_client_;
53  std::unique_ptr<AgentUveBase> uve_;
55 };
56 
57 #endif // SRC_VNSW_AGENT_PHYSICAL_DEVICES_OVS_TOR_AGENT_TOR_AGENT_INIT_H_
void ProcessOptions(const std::string &config_file, const std::string &program_name)
string program_name(string filename)
void RegisterDBClients()
void ConnectToController()
void CreateModules()
void InitModules()
std::unique_ptr< OvsPeerManager > ovs_peer_manager_
Definition: agent.h:358
std::unique_ptr< OVSDB::OvsdbClient > ovsdb_client_
void CreatePeers()
OvsPeerManager * ovs_peer_manager() const
virtual std::string InstanceId()
OVSDB::OvsdbClient * ovsdb_client()
DISALLOW_COPY_AND_ASSIGN(TorAgentInit)
virtual int ModuleType()
std::unique_ptr< AgentUveBase > uve_
void FactoryInit()
void CreateDBTables()