OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VnTable Class Reference

#include <vn.h>

Inheritance diagram for VnTable:
Collaboration diagram for VnTable:

Public Member Functions

 VnTable (DB *db, const std::string &name)
 
virtual ~VnTable ()
 
virtual std::unique_ptr< DBEntryAllocEntry (const DBRequestKey *k) const
 
virtual size_t Hash (const DBEntry *entry) const
 
virtual size_t Hash (const DBRequestKey *key) const
 
virtual AgentSandeshPtr GetAgentSandesh (const AgentSandeshArguments *args, const std::string &context)
 
virtual DBEntryOperDBAdd (const DBRequest *req)
 
virtual bool OperDBOnChange (DBEntry *entry, const DBRequest *req)
 
virtual bool OperDBDelete (DBEntry *entry, const DBRequest *req)
 
virtual bool OperDBResync (DBEntry *entry, const DBRequest *req)
 
virtual bool IFNodeToReq (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
 
virtual bool IFNodeToUuid (IFMapNode *node, boost::uuids::uuid &u)
 
virtual bool ProcessConfig (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
 
virtual void Clear ()
 
void CfgForwardingFlags (IFMapNode *node, bool *rpf, bool *flood_unknown_unicast, Agent::ForwardingMode *forwarding_mode, bool *mirror_destination)
 
void AddVn (const boost::uuids::uuid &vn_uuid, const string &name, const boost::uuids::uuid &acl_id, const string &vrf_name, const std::vector< VnIpam > &ipam, const VnData::VnIpamDataMap &vn_ipam_data, int vn_id, int vxlan_id, bool admin_state, bool enable_rpf, bool flood_unknown_unicast, bool pbb_etree_enable, bool pbb_evpn_enable, bool layer2_control_word)
 
void DelVn (const boost::uuids::uuid &vn_uuid)
 
void ResyncReq (const boost::uuids::uuid &vn)
 
VnEntryFind (const boost::uuids::uuid &vn_uuid)
 
void GlobalVrouterConfigChanged ()
 
bool VnEntryWalk (DBTablePartBase *partition, DBEntryBase *entry)
 
void VnEntryWalkDone (DBTable::DBTableWalkRef walk_ref, DBTableBase *partition)
 
int GetCfgVnId (autogen::VirtualNetwork *cfg_vn)
 
- Public Member Functions inherited from AgentOperDBTable
 AgentOperDBTable (DB *db, const std::string &name)
 
 AgentOperDBTable (DB *db, const std::string &name, bool del_on_zero_refcount)
 
virtual ~AgentOperDBTable ()
 
virtual void ConfigEventHandler (IFMapNode *node, DBEntry *entry)
 
- Public Member Functions inherited from AgentDBTable
 AgentDBTable (DB *db, const std::string &name)
 
 AgentDBTable (DB *db, const std::string &name, bool del_on_zero_refcount)
 
virtual ~AgentDBTable ()
 
virtual int PartitionCount () const
 
virtual void Input (DBTablePartition *root, DBClient *client, DBRequest *req)
 
virtual DBEntryCfgAdd (DBRequest *req)
 
virtual bool IFLinkToReq (IFMapLink *link, IFMapNode *node, const std::string &peer_name, IFMapNode *peer, DBRequest &req)
 
virtual DBTablePartitionAllocPartition (int index)
 
virtual void OnZeroRefcount (AgentDBEntry *e)
 
virtual void NotifyEntry (DBEntryBase *entry)
 
void Notify (DBTablePartBase *partition, DBEntryBase *entry)
 
DBTableBase::ListenerId GetRefListenerId () const
 
AgentDBEntryFindActiveEntry (const DBEntry *key)
 
AgentDBEntryFindActiveEntryNoLock (const DBEntry *key)
 
AgentDBEntryFindActiveEntry (const DBRequestKey *key)
 
AgentDBEntryFindActiveEntryNoLock (const DBRequestKey *key)
 
AgentDBEntryFind (const DBEntry *key, bool ret_del)
 
AgentDBEntryFind (const DBRequestKey *key, bool ret_del)
 
virtual bool CanNotify (IFMapNode *dbe)
 
virtual void Process (DBRequest &req)
 
void set_agent (Agent *agent)
 
Agentagent () const
 
void Flush ()
 
void reset_flush_walk_ref ()
 
SandeshTraceBufferPtr GetOperDBTraceBuf () const
 
- Public Member Functions inherited from DBTable
 DBTable (DB *db, const std::string &name)
 
virtual ~DBTable ()
 
void Init ()
 
void NotifyAllEntries ()
 
DBEntryFind (const DBEntry *entry)
 
const DBEntryFind (const DBEntry *entry) const
 
DBEntryFind (const DBRequestKey *key, int id=-1)
 
const DBEntryFind (const DBRequestKey *key, int id=-1) const
 
DBEntryFindNoLock (const DBEntry *entry)
 
DBEntryFindNoLock (const DBRequestKey *key)
 
virtual DBTablePartBaseGetTablePartition (const DBRequestKey *key)
 
virtual const DBTablePartBaseGetTablePartition (const DBRequestKey *key) const
 
virtual DBTablePartBaseGetTablePartition (const DBEntryBase *entry)
 
virtual const DBTablePartBaseGetTablePartition (const DBEntryBase *entry) const
 
virtual DBTablePartBaseGetTablePartition (const int index)
 
virtual const DBTablePartBaseGetTablePartition (const int index) const
 
virtual void Change (DBEntryBase *entry)
 
virtual size_t Size () const
 
DBTableWalkRef AllocWalker (WalkFn walk_fn, WalkCompleteFn walk_complete)
 
void ReleaseWalker (DBTableWalkRef &walk)
 
void WalkTable (DBTableWalkRef walk)
 
void WalkAgain (DBTableWalkRef walk)
 
void SetWalkIterationToYield (int count)
 
int GetWalkIterationToYield ()
 
void SetWalkTaskId (int task_id)
 
int GetWalkerTaskId ()
 
- Public Member Functions inherited from DBTableBase
 DBTableBase (DB *db, const std::string &name)
 
virtual ~DBTableBase ()
 
bool Enqueue (DBRequest *req)
 
void EnqueueRemove (DBEntryBase *db_entry)
 
virtual void AddRemoveCallback (const DBEntryBase *entry, bool add) const
 
ListenerId Register (ChangeCallback callback, const std::string &name="unspecified")
 
void Unregister (ListenerId listener)
 
void RunNotify (DBTablePartBase *tpart, DBEntryBase *entry)
 
void AddToDBStateCount (ListenerId listener, int count)
 
uint64_t GetDBStateCount (ListenerId listener)
 
bool empty () const
 
virtual void RetryDelete ()
 
virtual bool MayDelete () const
 
DBdatabase ()
 
const DBdatabase () const
 
const std::string & name () const
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void FillListeners (std::vector< ShowTableListener > *listeners) const
 
uint64_t enqueue_count () const
 
void incr_enqueue_count ()
 
void reset_enqueue_count ()
 
uint64_t input_count () const
 
void incr_input_count ()
 
void reset_input_count ()
 
uint64_t notify_count () const
 
void incr_notify_count ()
 
void reset_notify_count ()
 
bool HasWalkers () const
 
uint64_t walker_count () const
 
void incr_walker_count ()
 
uint64_t decr_walker_count ()
 
uint64_t walk_request_count () const
 
uint64_t walk_complete_count () const
 
uint64_t walk_cancel_count () const
 
uint64_t walk_again_count () const
 
uint64_t walk_count () const
 
void incr_walk_request_count ()
 
void incr_walk_complete_count ()
 
void incr_walk_cancel_count ()
 
void incr_walk_again_count ()
 
void incr_walk_count ()
 

Static Public Member Functions

static DBTableBaseCreateTable (DB *db, const std::string &name)
 
static VnTableGetInstance ()
 
- Static Public Member Functions inherited from DBTable
static void DBStateClear (DBTable *table, ListenerId id)
 

Private Member Functions

bool IsGwHostRouteRequired ()
 
bool IsGatewayL2 (const string &gateway) const
 
void BuildVnIpamData (const std::vector< autogen::IpamSubnetType > &subnets, const std::string &ipam_name, std::vector< VnIpam > *vn_ipam)
 
VnDataBuildData (IFMapNode *node)
 
IFMapNodeFindTarget (IFMapAgentTable *table, IFMapNode *node, std::string node_type)
 
 DISALLOW_COPY_AND_ASSIGN (VnTable)
 

Private Attributes

DBTable::DBTableWalkRef walk_ref_
 

Static Private Attributes

static VnTablevn_table_
 

Additional Inherited Members

- Public Types inherited from DBTable
typedef boost::intrusive_ptr
< DBTableWalk
DBTableWalkRef
 
typedef boost::function< bool(DBTablePartBase
*, DBEntryBase *)> 
WalkFn
 
typedef boost::function< void(DBTableWalkRef,
DBTableBase *)> 
WalkCompleteFn
 
- Public Types inherited from DBTableBase
typedef boost::function< void(DBTablePartBase
*, DBEntryBase *)> 
ChangeCallback
 
typedef int ListenerId
 
- Static Public Attributes inherited from AgentDBTable
static const int kPartitionCount = 1
 
- Static Public Attributes inherited from DBTable
static const int kIterationToYield = 256
 
- Static Public Attributes inherited from DBTableBase
static const int kInvalidId = -1
 
- Protected Member Functions inherited from AgentOperDBTable
void UpdateIfMapNode (AgentOperDBEntry *entry, IFMapNode *node)
 
virtual DBEntryAdd (const DBRequest *req)
 
virtual bool OnChange (DBEntry *entry, const DBRequest *req)
 
virtual bool Resync (DBEntry *entry, const DBRequest *req)
 
virtual bool Delete (DBEntry *entry, const DBRequest *req)
 

Detailed Description

Definition at line 331 of file vn.h.

Constructor & Destructor Documentation

VnTable::VnTable ( DB db,
const std::string &  name 
)

Definition at line 740 of file vn.cc.

Here is the call graph for this function:

VnTable::~VnTable ( )
virtual

Definition at line 746 of file vn.cc.

Member Function Documentation

void VnTable::AddVn ( const boost::uuids::uuid vn_uuid,
const string &  name,
const boost::uuids::uuid acl_id,
const string &  vrf_name,
const std::vector< VnIpam > &  ipam,
const VnData::VnIpamDataMap vn_ipam_data,
int  vn_id,
int  vxlan_id,
bool  admin_state,
bool  enable_rpf,
bool  flood_unknown_unicast,
bool  pbb_etree_enable,
bool  pbb_evpn_enable,
bool  layer2_control_word 
)

Definition at line 1178 of file vn.cc.

Here is the call graph for this function:

std::unique_ptr< DBEntry > VnTable::AllocEntry ( const DBRequestKey k) const
virtual

Implements DBTable.

Definition at line 764 of file vn.cc.

Here is the call graph for this function:

VnData * VnTable::BuildData ( IFMapNode node)
private

Definition at line 952 of file vn.cc.

Here is the call graph for this function:

void VnTable::BuildVnIpamData ( const std::vector< autogen::IpamSubnetType > &  subnets,
const std::string &  ipam_name,
std::vector< VnIpam > *  vn_ipam 
)
private

Definition at line 926 of file vn.cc.

void VnTable::CfgForwardingFlags ( IFMapNode node,
bool *  rpf,
bool *  flood_unknown_unicast,
Agent::ForwardingMode forwarding_mode,
bool *  mirror_destination 
)

Definition at line 906 of file vn.cc.

Here is the call graph for this function:

void VnTable::Clear ( )
virtual

Reimplemented from AgentDBTable.

Definition at line 749 of file vn.cc.

Here is the call graph for this function:

DBTableBase * VnTable::CreateTable ( DB db,
const std::string &  name 
)
static

Definition at line 753 of file vn.cc.

Here is the call graph for this function:

void VnTable::DelVn ( const boost::uuids::uuid vn_uuid)

Definition at line 1204 of file vn.cc.

Here is the call graph for this function:

VnTable::DISALLOW_COPY_AND_ASSIGN ( VnTable  )
private
VnEntry * VnTable::Find ( const boost::uuids::uuid vn_uuid)

Definition at line 759 of file vn.cc.

Here is the call graph for this function:

IFMapNode * VnTable::FindTarget ( IFMapAgentTable table,
IFMapNode node,
std::string  node_type 
)
private

Definition at line 888 of file vn.cc.

Here is the call graph for this function:

AgentSandeshPtr VnTable::GetAgentSandesh ( const AgentSandeshArguments args,
const std::string &  context 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 1400 of file vn.cc.

Here is the call graph for this function:

int VnTable::GetCfgVnId ( autogen::VirtualNetwork *  cfg_vn)

Definition at line 899 of file vn.cc.

static VnTable* VnTable::GetInstance ( )
inlinestatic

Definition at line 360 of file vn.h.

void VnTable::GlobalVrouterConfigChanged ( )

Definition at line 838 of file vn.cc.

Here is the call graph for this function:

virtual size_t VnTable::Hash ( const DBEntry entry) const
inlinevirtual

Reimplemented from DBTable.

Definition at line 337 of file vn.h.

virtual size_t VnTable::Hash ( const DBRequestKey key) const
inlinevirtual

Reimplemented from DBTable.

Definition at line 338 of file vn.h.

bool VnTable::IFNodeToReq ( IFMapNode node,
DBRequest req,
const boost::uuids::uuid u 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 1148 of file vn.cc.

Here is the call graph for this function:

bool VnTable::IFNodeToUuid ( IFMapNode node,
boost::uuids::uuid u 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 1140 of file vn.cc.

Here is the call graph for this function:

bool VnTable::IsGatewayL2 ( const string &  gateway) const
private
bool VnTable::IsGwHostRouteRequired ( )
private
DBEntry * VnTable::OperDBAdd ( const DBRequest req)
virtual

Implements AgentOperDBTable.

Definition at line 770 of file vn.cc.

Here is the call graph for this function:

bool VnTable::OperDBDelete ( DBEntry entry,
const DBRequest req 
)
virtual

Implements AgentOperDBTable.

Definition at line 790 of file vn.cc.

Here is the call graph for this function:

bool VnTable::OperDBOnChange ( DBEntry entry,
const DBRequest req 
)
virtual

Implements AgentOperDBTable.

Definition at line 804 of file vn.cc.

Here is the call graph for this function:

bool VnTable::OperDBResync ( DBEntry entry,
const DBRequest req 
)
virtual

Reimplemented from AgentOperDBTable.

Definition at line 818 of file vn.cc.

Here is the call graph for this function:

bool VnTable::ProcessConfig ( IFMapNode node,
DBRequest req,
const boost::uuids::uuid u 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 1164 of file vn.cc.

Here is the call graph for this function:

void VnTable::ResyncReq ( const boost::uuids::uuid vn)

Definition at line 1211 of file vn.cc.

Here is the call graph for this function:

bool VnTable::VnEntryWalk ( DBTablePartBase partition,
DBEntryBase entry 
)

Definition at line 823 of file vn.cc.

Here is the call graph for this function:

void VnTable::VnEntryWalkDone ( DBTable::DBTableWalkRef  walk_ref,
DBTableBase partition 
)

Definition at line 831 of file vn.cc.

Here is the call graph for this function:

Member Data Documentation

VnTable * VnTable::vn_table_
staticprivate

Definition at line 378 of file vn.h.

DBTable::DBTableWalkRef VnTable::walk_ref_
private

Definition at line 387 of file vn.h.


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