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