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 {
Ip4Address tsn_ip() const
int ha_stale_route_interval() const
OVSDB::OvsdbClient * ovsdb_client() const
static Agent * GetInstance()
int keepalive_interval() const
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
void SendResponse(HttpSession *session, const std::string &msg, int status_code)
boost::asio::ip::address IpAddress
OvsdbClientSandesTask(std::string resp_ctx)
void RegisterConnectionTable(Agent *agent)
virtual Ip4Address tsn_ip()=0
static const int OVSDBMinHaStaleRouteTimer
static const uint32_t OVSDBKeepAliveTimer
static const int OVSDBMinKeepAliveTimer
Ip4Address tor_ip() const
virtual void AddSessionInfo(SandeshOvsdbClient &client)=0
static OvsdbClient * Allocate(Agent *agent, TorAgentParam *params, OvsPeerManager *manager)
std::string tor_protocol() const
std::string ssl_privkey() const
KSyncObjectManager * ksync_obj_manager_
static TaskScheduler * GetInstance()
void Enqueue(Task *task)
Enqueues a task for running. Starts task if all policy rules are met else puts task in waitq...
int keepalive_interval() const
std::string ssl_cert() const
boost::scoped_ptr< ConnectionStateTable > connection_table_
virtual bool Run()
Code to execute. Returns true if task is completed. Return false to reschedule the task...
#define DISALLOW_COPY_AND_ASSIGN(_Class)
std::string Description() const
int ha_stale_route_interval_
virtual const std::string protocol()=0
ConnectionStateTable * connection_table()
boost::function< void(OvsdbClientSession *)> SessionEventCb
virtual uint16_t port()=0
int ha_stale_route_interval() const
uint16_t tor_port() const
void set_connect_complete_cb(SessionEventCb cb)
virtual const std::string server()=0
static KSyncObjectManager * Init()
SessionEventCb connect_complete_cb_
SessionEventCb pre_connect_complete_cb_
void set_pre_connect_complete_cb(SessionEventCb cb)
OvsPeerManager * peer_manager_
KSyncObjectManager * ksync_obj_manager()
Task is a wrapper over tbb::task to support policies.
virtual ~OvsdbClientSandesTask()
static const uint32_t OVSDBHaStaleRouteTimer
std::string ssl_cacert() const