OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OVSDB::OvsdbSandeshTask Class Referenceabstract

#include <ovsdb_sandesh.h>

Inheritance diagram for OVSDB::OvsdbSandeshTask:
Collaboration diagram for OVSDB::OvsdbSandeshTask:

Public Types

enum  TableType {
  PHYSICAL_SWITCH_TABLE = 1, PHYSICAL_PORT_TABLE, LOGICAL_SWITCH_TABLE, VLAN_PORT_TABLE,
  VRF_TABLE, UNICAST_REMOTE_TABLE, UNICAST_LOCAL_TABLE, MULTICAST_LOCAL_TABLE,
  HA_STALE_DEV_VN_TABLE, HA_STALE_L2_ROUTE_TABLE, TABLE_MAX
}
 
enum  FilterResp { FilterAllow = 1, FilterDeny }
 
- Public Types inherited from Task
enum  State { INIT, WAIT, RUN }
 Task states. More...
 
enum  TbbState { TBB_INIT, TBB_ENQUEUED, TBB_EXEC, TBB_DONE }
 

Public Member Functions

 OvsdbSandeshTask (std::string resp_ctx, AgentSandeshArguments &args)
 
 OvsdbSandeshTask (std::string resp_ctx, const std::string &ip, uint32_t port)
 
virtual ~OvsdbSandeshTask ()
 
bool Run ()
 Code to execute. Returns true if task is completed. Return false to reschedule the task. More...
 
std::string Description () const
 
std::string EncodeFirstPage ()
 
- Public Member Functions inherited from Task
 Task (int task_id, int task_instance)
 
 Task (int task_id)
 
virtual ~Task ()
 
virtual void OnTaskCancel ()
 Called on task exit, if it is marked for cancellation. If the user wants to do any cleanup on task cancellation, then he/she can overload this function. More...
 
State GetState () const
 
int GetTaskId () const
 
int GetTaskInstance () const
 
uint64_t GetSeqno () const
 
bool task_cancelled () const
 
uint64_t enqueue_time () const
 
uint64_t schedule_time () const
 
uint32_t execute_delay () const
 
uint32_t schedule_delay () const
 

Static Public Attributes

static const uint8_t kEntriesPerSandesh = 100
 
static const uint8_t kEntriesPerPage = 100
 
- Static Public Attributes inherited from Task
static const int kTaskInstanceAny = -1
 

Protected Attributes

std::string ip_
 
uint32_t port_
 

Private Member Functions

virtual void EncodeArgs (AgentSandeshArguments &args)
 
virtual FilterResp Filter (KSyncEntry *entry)
 
virtual void UpdateResp (KSyncEntry *entry, SandeshResponse *resp)=0
 
virtual SandeshResponseAlloc ()=0
 
virtual KSyncObjectGetObject (OvsdbClientSession *session)=0
 
virtual TableType GetTableType ()=0
 
virtual bool NoSessionObject ()
 
void EncodeSendPageReq (uint32_t display_count, uint32_t table_size)
 
void SendResponse (bool more)
 
 DISALLOW_COPY_AND_ASSIGN (OvsdbSandeshTask)
 

Private Attributes

SandeshResponseresp_
 
std::string resp_data_
 
uint32_t first_
 
uint32_t last_
 
uint32_t total_count_
 
bool needs_next_
 
bool error_
 
std::string error_msg_
 

Additional Inherited Members

- Static Public Member Functions inherited from Task
static TaskRunning ()
 Returns a pointer to the current task the code is executing under. More...
 

Detailed Description

Definition at line 12 of file ovsdb_sandesh.h.

Member Enumeration Documentation

Enumerator
FilterAllow 
FilterDeny 

Definition at line 28 of file ovsdb_sandesh.h.

Enumerator
PHYSICAL_SWITCH_TABLE 
PHYSICAL_PORT_TABLE 
LOGICAL_SWITCH_TABLE 
VLAN_PORT_TABLE 
VRF_TABLE 
UNICAST_REMOTE_TABLE 
UNICAST_LOCAL_TABLE 
MULTICAST_LOCAL_TABLE 
HA_STALE_DEV_VN_TABLE 
HA_STALE_L2_ROUTE_TABLE 
TABLE_MAX 

Definition at line 14 of file ovsdb_sandesh.h.

Constructor & Destructor Documentation

OvsdbSandeshTask::OvsdbSandeshTask ( std::string  resp_ctx,
AgentSandeshArguments args 
)

Definition at line 32 of file ovsdb_sandesh.cc.

Here is the call graph for this function:

OvsdbSandeshTask::OvsdbSandeshTask ( std::string  resp_ctx,
const std::string &  ip,
uint32_t  port 
)

Definition at line 62 of file ovsdb_sandesh.cc.

OvsdbSandeshTask::~OvsdbSandeshTask ( )
virtual

Definition at line 70 of file ovsdb_sandesh.cc.

Member Function Documentation

std::string OVSDB::OvsdbSandeshTask::Description ( ) const
inlinevirtual

Implements Task.

Definition at line 42 of file ovsdb_sandesh.h.

OVSDB::OvsdbSandeshTask::DISALLOW_COPY_AND_ASSIGN ( OvsdbSandeshTask  )
private
std::string OvsdbSandeshTask::EncodeFirstPage ( )

Definition at line 144 of file ovsdb_sandesh.cc.

Here is the call graph for this function:

void OvsdbSandeshTask::EncodeSendPageReq ( uint32_t  display_count,
uint32_t  table_size 
)
private

Definition at line 158 of file ovsdb_sandesh.cc.

Here is the call graph for this function:

virtual bool OVSDB::OvsdbSandeshTask::NoSessionObject ( )
inlineprivatevirtual

Reimplemented in OVSDB::HaStaleL2RouteSandeshTask, and OVSDB::HaStaleDevVnSandeshTask.

Definition at line 58 of file ovsdb_sandesh.h.

bool OvsdbSandeshTask::Run ( )
virtual

Code to execute. Returns true if task is completed. Return false to reschedule the task.

Implements Task.

Definition at line 73 of file ovsdb_sandesh.cc.

Here is the call graph for this function:

void OvsdbSandeshTask::SendResponse ( bool  more)
private

Definition at line 229 of file ovsdb_sandesh.cc.

Here is the call graph for this function:

Member Data Documentation

bool OVSDB::OvsdbSandeshTask::error_
private

Definition at line 70 of file ovsdb_sandesh.h.

std::string OVSDB::OvsdbSandeshTask::error_msg_
private

Definition at line 71 of file ovsdb_sandesh.h.

uint32_t OVSDB::OvsdbSandeshTask::first_
private

Definition at line 66 of file ovsdb_sandesh.h.

std::string OVSDB::OvsdbSandeshTask::ip_
protected

Definition at line 47 of file ovsdb_sandesh.h.

const uint8_t OVSDB::OvsdbSandeshTask::kEntriesPerPage = 100
static

Definition at line 34 of file ovsdb_sandesh.h.

const uint8_t OVSDB::OvsdbSandeshTask::kEntriesPerSandesh = 100
static

Definition at line 33 of file ovsdb_sandesh.h.

uint32_t OVSDB::OvsdbSandeshTask::last_
private

Definition at line 67 of file ovsdb_sandesh.h.

bool OVSDB::OvsdbSandeshTask::needs_next_
private

Definition at line 69 of file ovsdb_sandesh.h.

uint32_t OVSDB::OvsdbSandeshTask::port_
protected

Definition at line 48 of file ovsdb_sandesh.h.

SandeshResponse* OVSDB::OvsdbSandeshTask::resp_
private

Definition at line 64 of file ovsdb_sandesh.h.

std::string OVSDB::OvsdbSandeshTask::resp_data_
private

Definition at line 65 of file ovsdb_sandesh.h.

uint32_t OVSDB::OvsdbSandeshTask::total_count_
private

Definition at line 68 of file ovsdb_sandesh.h.


The documentation for this class was generated from the following files: