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

#include <bgp_config_ifmap.h>

Inheritance diagram for BgpIfmapConfigManager:
Collaboration diagram for BgpIfmapConfigManager:

Public Member Functions

 BgpIfmapConfigManager (BgpServer *server)
 
virtual ~BgpIfmapConfigManager ()
 
void Initialize (DB *db, DBGraph *db_graph, const std::string &localname)
 
virtual void Terminate ()
 
virtual const std::string & localname () const
 
virtual InstanceMapRange InstanceMapItems (const std::string &start_name=std::string()) const
 
virtual RoutingPolicyMapRange RoutingPolicyMapItems (const std::string &start_name=std::string()) const
 
virtual NeighborMapRange NeighborMapItems (const std::string &instance_name) const
 
virtual int NeighborCount (const std::string &instance_name) const
 
virtual void ResetRoutingInstanceIndexBit (int index)
 
virtual const BgpInstanceConfigFindInstance (const std::string &name) const
 
virtual const
BgpRoutingPolicyConfig
FindRoutingPolicy (const std::string &name) const
 
virtual const BgpProtocolConfigGetProtocolConfig (const std::string &instance_name) const
 
virtual const BgpNeighborConfigFindNeighbor (const std::string &instance_name, const std::string &name) const
 
void DefaultBgpRouterParams (autogen::BgpRouterParams *param)
 
void OnChange ()
 
DBdatabase ()
 
DBGraphgraph ()
 
const BgpIfmapConfigDataconfig () const
 
BgpIfmapConfigDataconfig ()
 
void UpdateInstanceConfig (BgpIfmapInstanceConfig *rti, BgpConfigManager::EventType event)
 
- Public Member Functions inherited from BgpConfigManager
 BgpConfigManager (BgpServer *server)
 
virtual ~BgpConfigManager ()
 
void RegisterObservers (const Observers &obs)
 
template<typename BgpConfigObject >
void Notify (const BgpConfigObject *, EventType)
 
const BgpServerserver ()
 
template<>
void Notify (const BgpInstanceConfig *config, EventType event)
 
template<>
void Notify (const BgpRoutingPolicyConfig *config, EventType event)
 
template<>
void Notify (const BgpProtocolConfig *config, EventType event)
 
template<>
void Notify (const BgpNeighborConfig *config, EventType event)
 
template<>
void Notify (const BgpGlobalSystemConfig *config, EventType event)
 
template<>
void Notify (const BgpGlobalQosConfig *config, EventType event)
 
- Public Member Functions inherited from IFMapConfigListener::ConfigManager
virtual ~ConfigManager ()
 

Private Types

typedef std::vector
< BgpConfigDelta
ChangeList
 
typedef std::map< std::string,
boost::function< void(const
BgpConfigDelta &)> > 
IdentifierMap
 

Private Member Functions

void IdentifierMapInit ()
 
void DefaultConfig ()
 
void ProcessChanges (const ChangeList &change_list)
 
void ProcessRoutingInstance (const BgpConfigDelta &change)
 
void ProcessRoutingPolicyLink (const BgpConfigDelta &change)
 
void ProcessRoutingPolicy (const BgpConfigDelta &change)
 
void ProcessBgpRouter (const BgpConfigDelta &change)
 
void ProcessBgpProtocol (const BgpConfigDelta &change)
 
void ProcessBgpPeering (const BgpConfigDelta &change)
 
void ProcessGlobalSystemConfig (const BgpConfigDelta &delta)
 
void ProcessGlobalQosConfig (const BgpConfigDelta &delta)
 
bool ConfigHandler ()
 
 DISALLOW_COPY_AND_ASSIGN (BgpIfmapConfigManager)
 

Private Attributes

DBdb_
 
DBGraphdb_graph_
 
std::string localname_
 
IdentifierMap id_map_
 
TaskTrigger trigger_
 
boost::scoped_ptr
< BgpConfigListener
listener_
 
boost::scoped_ptr
< BgpIfmapConfigData
config_
 

Static Private Attributes

static const int kConfigTaskInstanceId = 0
 

Friends

class BgpConfigListenerTest
 

Additional Inherited Members

- Public Types inherited from BgpConfigManager
enum  EventType { CFG_NONE, CFG_ADD, CFG_CHANGE, CFG_DELETE }
 
typedef boost::function< void(const
BgpProtocolConfig *, EventType)> 
BgpProtocolObserver
 
typedef boost::function< void(const
BgpInstanceConfig *, EventType)> 
BgpInstanceObserver
 
typedef boost::function< void(const
BgpNeighborConfig *, EventType)> 
BgpNeighborObserver
 
typedef boost::function< void(const
BgpRoutingPolicyConfig
*, EventType)> 
BgpRoutingPolicyObserver
 
typedef boost::function< void(const
BgpGlobalSystemConfig
*, EventType)> 
BgpGlobalSystemConfigObserver
 
typedef boost::function< void(const
BgpGlobalQosConfig
*, EventType)> 
BgpGlobalQosConfigObserver
 
typedef std::map< std::string,
BgpRoutingPolicyConfig * > 
RoutingPolicyMap
 
typedef std::pair
< RoutingPolicyMap::const_iterator,
RoutingPolicyMap::const_iterator > 
RoutingPolicyMapRange
 
typedef std::map< std::string,
BgpInstanceConfig * > 
InstanceMap
 
typedef std::pair
< InstanceMap::const_iterator,
InstanceMap::const_iterator > 
InstanceMapRange
 
typedef std::map< std::string,
BgpNeighborConfig * > 
NeighborMap
 
typedef std::pair
< NeighborMap::const_iterator,
NeighborMap::const_iterator > 
NeighborMapRange
 
- Static Public Attributes inherited from BgpConfigManager
static const char * kMasterNetwork
 
static const char * kMasterInstance
 
static const char * kFabricInstance
 
static const int kDefaultPort = 179
 
static const uint32_t kDefaultAutonomousSystem = 64512
 

Detailed Description

Definition at line 468 of file bgp_config_ifmap.h.

Member Typedef Documentation

typedef std::vector<BgpConfigDelta> BgpIfmapConfigManager::ChangeList
private

Definition at line 515 of file bgp_config_ifmap.h.

typedef std::map<std::string, boost::function<void(const BgpConfigDelta &)> > BgpIfmapConfigManager::IdentifierMap
private

Definition at line 517 of file bgp_config_ifmap.h.

Constructor & Destructor Documentation

BgpIfmapConfigManager::BgpIfmapConfigManager ( BgpServer server)
explicit

Definition at line 1720 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

BgpIfmapConfigManager::~BgpIfmapConfigManager ( )
virtual

Definition at line 1735 of file bgp_config_ifmap.cc.

Member Function Documentation

const BgpIfmapConfigData* BgpIfmapConfigManager::config ( ) const
inline

Definition at line 507 of file bgp_config_ifmap.h.

BgpIfmapConfigData* BgpIfmapConfigManager::config ( )
inline

Definition at line 508 of file bgp_config_ifmap.h.

bool BgpIfmapConfigManager::ConfigHandler ( )
private

Definition at line 2578 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

DB* BgpIfmapConfigManager::database ( )
inlinevirtual

Implements IFMapConfigListener::ConfigManager.

Definition at line 505 of file bgp_config_ifmap.h.

void BgpIfmapConfigManager::DefaultBgpRouterParams ( autogen::BgpRouterParams *  param)

Definition at line 1989 of file bgp_config_ifmap.cc.

void BgpIfmapConfigManager::DefaultConfig ( )
private

Definition at line 2001 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

BgpIfmapConfigManager::DISALLOW_COPY_AND_ASSIGN ( BgpIfmapConfigManager  )
private
const BgpInstanceConfig * BgpIfmapConfigManager::FindInstance ( const std::string &  name) const
virtual

Implements BgpConfigManager.

Definition at line 1955 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

const BgpNeighborConfig * BgpIfmapConfigManager::FindNeighbor ( const std::string &  instance_name,
const std::string &  name 
) const
virtual

Implements BgpConfigManager.

Definition at line 1977 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

const BgpRoutingPolicyConfig * BgpIfmapConfigManager::FindRoutingPolicy ( const std::string &  name) const
virtual

Implements BgpConfigManager.

Definition at line 1946 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

const BgpProtocolConfig * BgpIfmapConfigManager::GetProtocolConfig ( const std::string &  instance_name) const
virtual

Implements BgpConfigManager.

Definition at line 1964 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

DBGraph* BgpIfmapConfigManager::graph ( )
inlinevirtual

Implements IFMapConfigListener::ConfigManager.

Definition at line 506 of file bgp_config_ifmap.h.

void BgpIfmapConfigManager::IdentifierMapInit ( )
private

Definition at line 2141 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::Initialize ( DB db,
DBGraph db_graph,
const std::string &  localname 
)

Definition at line 1741 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

BgpConfigManager::InstanceMapRange BgpIfmapConfigManager::InstanceMapItems ( const std::string &  start_name = std::string()) const
virtual

Implements BgpConfigManager.

Definition at line 1759 of file bgp_config_ifmap.cc.

virtual const std::string& BgpIfmapConfigManager::localname ( ) const
inlinevirtual

Implements BgpConfigManager.

Definition at line 480 of file bgp_config_ifmap.h.

int BgpIfmapConfigManager::NeighborCount ( const std::string &  instance_name) const
virtual

Implements BgpConfigManager.

Definition at line 1783 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

BgpConfigManager::NeighborMapRange BgpIfmapConfigManager::NeighborMapItems ( const std::string &  instance_name) const
virtual

Implements BgpConfigManager.

Definition at line 1769 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::OnChange ( )
virtual

Implements IFMapConfigListener::ConfigManager.

Definition at line 1753 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::ProcessBgpPeering ( const BgpConfigDelta change)
private

Definition at line 2456 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::ProcessBgpProtocol ( const BgpConfigDelta change)
private

Definition at line 2266 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::ProcessBgpRouter ( const BgpConfigDelta change)
private

Definition at line 2412 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::ProcessChanges ( const ChangeList change_list)
private

Definition at line 2562 of file bgp_config_ifmap.cc.

void BgpIfmapConfigManager::ProcessGlobalQosConfig ( const BgpConfigDelta delta)
private

Definition at line 2540 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::ProcessGlobalSystemConfig ( const BgpConfigDelta delta)
private

Definition at line 2522 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::ProcessRoutingInstance ( const BgpConfigDelta change)
private

Definition at line 2212 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::ProcessRoutingPolicy ( const BgpConfigDelta change)
private

Definition at line 2367 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::ProcessRoutingPolicyLink ( const BgpConfigDelta change)
private

Definition at line 1080 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

void BgpIfmapConfigManager::ResetRoutingInstanceIndexBit ( int  index)
virtual

Implements BgpConfigManager.

Definition at line 1779 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

BgpConfigManager::RoutingPolicyMapRange BgpIfmapConfigManager::RoutingPolicyMapItems ( const std::string &  start_name = std::string()) const
virtual

Implements BgpConfigManager.

Definition at line 1764 of file bgp_config_ifmap.cc.

void BgpIfmapConfigManager::Terminate ( )
virtual

Implements BgpConfigManager.

Definition at line 2590 of file bgp_config_ifmap.cc.

void BgpIfmapConfigManager::UpdateInstanceConfig ( BgpIfmapInstanceConfig rti,
BgpConfigManager::EventType  event 
)

Definition at line 2162 of file bgp_config_ifmap.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class BgpConfigListenerTest
friend

Definition at line 513 of file bgp_config_ifmap.h.

Member Data Documentation

boost::scoped_ptr<BgpIfmapConfigData> BgpIfmapConfigManager::config_
private

Definition at line 543 of file bgp_config_ifmap.h.

DB* BgpIfmapConfigManager::db_
private

Definition at line 536 of file bgp_config_ifmap.h.

DBGraph* BgpIfmapConfigManager::db_graph_
private

Definition at line 537 of file bgp_config_ifmap.h.

IdentifierMap BgpIfmapConfigManager::id_map_
private

Definition at line 539 of file bgp_config_ifmap.h.

const int BgpIfmapConfigManager::kConfigTaskInstanceId = 0
staticprivate

Definition at line 534 of file bgp_config_ifmap.h.

boost::scoped_ptr<BgpConfigListener> BgpIfmapConfigManager::listener_
private

Definition at line 542 of file bgp_config_ifmap.h.

std::string BgpIfmapConfigManager::localname_
private

Definition at line 538 of file bgp_config_ifmap.h.

TaskTrigger BgpIfmapConfigManager::trigger_
private

Definition at line 541 of file bgp_config_ifmap.h.


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