7 #include <ovsdb_types.h>
19 int ha_stale_route_interval) :
21 keepalive_interval_(keepalive_interval),
22 ha_stale_route_interval_(ha_stale_route_interval) {
104 resp_(new OvsdbClientResp()), resp_data_(resp_ctx) {
110 SandeshOvsdbClient client_data;
112 client_data.set_protocol(client->
protocol());
113 client_data.set_server(client->
server());
114 client_data.set_port(client->
port());
115 client_data.set_tor_service_node(client->
tsn_ip().to_string());
119 resp_->set_client(client_data);
123 std::string
Description()
const {
return "OvsdbClientSandesTask"; }
127 resp_->set_context(resp_data_);
128 resp_->set_more(
false);
137 void OvsdbClientReq::HandleRequest()
const {
boost::asio::ip::address IpAddress
OVSDB::OvsdbClient * ovsdb_client() const
static Agent * GetInstance()
static KSyncObjectManager * Init()
virtual const std::string server()=0
OvsPeerManager * peer_manager_
static OvsdbClient * Allocate(Agent *agent, TorAgentParam *params, OvsPeerManager *manager)
SessionEventCb pre_connect_complete_cb_
virtual uint16_t port()=0
static const int OVSDBMinHaStaleRouteTimer
boost::scoped_ptr< ConnectionStateTable > connection_table_
KSyncObjectManager * ksync_obj_manager_
SessionEventCb connect_complete_cb_
int ha_stale_route_interval_
void set_connect_complete_cb(SessionEventCb cb)
static const int OVSDBMinKeepAliveTimer
ConnectionStateTable * connection_table()
static const uint32_t OVSDBHaStaleRouteTimer
void RegisterConnectionTable(Agent *agent)
virtual Ip4Address tsn_ip()=0
int keepalive_interval() const
KSyncObjectManager * ksync_obj_manager()
virtual void AddSessionInfo(SandeshOvsdbClient &client)=0
boost::function< void(OvsdbClientSession *)> SessionEventCb
static const uint32_t OVSDBKeepAliveTimer
virtual const std::string protocol()=0
void set_pre_connect_complete_cb(SessionEventCb cb)
int ha_stale_route_interval() const
std::string Description() const
DISALLOW_COPY_AND_ASSIGN(OvsdbClientSandesTask)
virtual ~OvsdbClientSandesTask()
OvsdbClientSandesTask(std::string resp_ctx)
virtual bool Run()
Code to execute. Returns true if task is completed. Return false to reschedule the task.
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
void Enqueue(Task *task)
Enqueues a task for running. Starts task if all policy rules are met else puts task in waitq....
static TaskScheduler * GetInstance()
Task is a wrapper over tbb::task to support policies.
std::string ssl_privkey() const
uint16_t tor_port() const
int keepalive_interval() const
std::string tor_protocol() const
std::string ssl_cert() const
Ip4Address tor_ip() const
Ip4Address tsn_ip() const
std::string ssl_cacert() const
int ha_stale_route_interval() const
void SendResponse(HttpSession *session, const std::string &msg, int status_code)