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

#include <bgp_config_yaml.h>

Inheritance diagram for BgpYamlConfigManager:
Collaboration diagram for BgpYamlConfigManager:

Classes

class  Configuration
 

Public Member Functions

 BgpYamlConfigManager (BgpServer *server)
 
virtual ~BgpYamlConfigManager ()
 
virtual void Terminate ()
 
virtual const std::string & localname () const
 
virtual InstanceMapRange InstanceMapItems (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 const BgpInstanceConfigFindInstance (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
 
bool Parse (std::istream *istream, std::string *error_msg)
 
- Public Member Functions inherited from BgpConfigManager
 BgpConfigManager (BgpServer *server)
 
virtual ~BgpConfigManager ()
 
void RegisterObservers (const Observers &obs)
 
virtual RoutingPolicyMapRange RoutingPolicyMapItems (const std::string &start_policy=std::string()) const =0
 
virtual void ResetRoutingInstanceIndexBit (int index)=0
 
virtual const
BgpRoutingPolicyConfig
FindRoutingPolicy (const std::string &name) const =0
 
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)
 

Static Public Attributes

static const int kMaxHoldTime = 60 * 60
 
- 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
 

Private Member Functions

bool Resolve (Configuration *candidate, std::string *error_msg)
 
void Update (Configuration *current, Configuration *next)
 
void UpdateProtocol (Configuration *current, Configuration *next)
 
void UpdateInstances (Configuration *current, Configuration *next)
 
void UpdateNeighbors (Configuration *current, Configuration *next)
 
void AddInstance (InstanceMap::iterator iter)
 
void DeleteInstance (InstanceMap::iterator iter)
 
void UpdateInstance (InstanceMap::iterator iter1, InstanceMap::iterator iter2)
 
void AddNeighbor (NeighborMap::iterator iter)
 
void DeleteNeighbor (NeighborMap::iterator iter)
 
void UpdateNeighbor (NeighborMap::iterator iter1, NeighborMap::iterator iter2)
 

Private Attributes

std::unique_ptr< Configurationdata_
 

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
 

Detailed Description

Definition at line 16 of file bgp_config_yaml.h.

Constructor & Destructor Documentation

BgpYamlConfigManager::BgpYamlConfigManager ( BgpServer server)
explicit

Definition at line 167 of file bgp_config_yaml.cc.

BgpYamlConfigManager::~BgpYamlConfigManager ( )
virtual

Definition at line 172 of file bgp_config_yaml.cc.

Member Function Documentation

void BgpYamlConfigManager::AddInstance ( InstanceMap::iterator  iter)
private

Definition at line 612 of file bgp_config_yaml.cc.

Here is the call graph for this function:

void BgpYamlConfigManager::AddNeighbor ( NeighborMap::iterator  iter)
private

Definition at line 638 of file bgp_config_yaml.cc.

Here is the call graph for this function:

void BgpYamlConfigManager::DeleteInstance ( InstanceMap::iterator  iter)
private

Definition at line 615 of file bgp_config_yaml.cc.

Here is the call graph for this function:

void BgpYamlConfigManager::DeleteNeighbor ( NeighborMap::iterator  iter)
private

Definition at line 641 of file bgp_config_yaml.cc.

Here is the call graph for this function:

const BgpInstanceConfig * BgpYamlConfigManager::FindInstance ( const std::string &  name) const
virtual

Implements BgpConfigManager.

Definition at line 208 of file bgp_config_yaml.cc.

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

Implements BgpConfigManager.

Definition at line 218 of file bgp_config_yaml.cc.

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

Implements BgpConfigManager.

Definition at line 213 of file bgp_config_yaml.cc.

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

Implements BgpConfigManager.

Definition at line 184 of file bgp_config_yaml.cc.

const string & BgpYamlConfigManager::localname ( ) const
virtual

Implements BgpConfigManager.

Definition at line 178 of file bgp_config_yaml.cc.

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

Implements BgpConfigManager.

Definition at line 202 of file bgp_config_yaml.cc.

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

Implements BgpConfigManager.

Definition at line 196 of file bgp_config_yaml.cc.

bool BgpYamlConfigManager::Parse ( std::istream *  istream,
std::string *  error_msg 
)

Definition at line 672 of file bgp_config_yaml.cc.

Here is the call graph for this function:

bool BgpYamlConfigManager::Resolve ( Configuration candidate,
std::string *  error_msg 
)
private

Definition at line 554 of file bgp_config_yaml.cc.

Here is the call graph for this function:

void BgpYamlConfigManager::Terminate ( )
virtual

Implements BgpConfigManager.

Definition at line 175 of file bgp_config_yaml.cc.

void BgpYamlConfigManager::Update ( Configuration current,
Configuration next 
)
private

Definition at line 666 of file bgp_config_yaml.cc.

Here is the call graph for this function:

void BgpYamlConfigManager::UpdateInstance ( InstanceMap::iterator  iter1,
InstanceMap::iterator  iter2 
)
private

Definition at line 619 of file bgp_config_yaml.cc.

void BgpYamlConfigManager::UpdateInstances ( Configuration current,
Configuration next 
)
private

Definition at line 626 of file bgp_config_yaml.cc.

Here is the call graph for this function:

void BgpYamlConfigManager::UpdateNeighbor ( NeighborMap::iterator  iter1,
NeighborMap::iterator  iter2 
)
private

Definition at line 645 of file bgp_config_yaml.cc.

Here is the call graph for this function:

void BgpYamlConfigManager::UpdateNeighbors ( Configuration current,
Configuration next 
)
private

Definition at line 654 of file bgp_config_yaml.cc.

Here is the call graph for this function:

void BgpYamlConfigManager::UpdateProtocol ( Configuration current,
Configuration next 
)
private

Definition at line 603 of file bgp_config_yaml.cc.

Here is the call graph for this function:

Member Data Documentation

std::unique_ptr<Configuration> BgpYamlConfigManager::data_
private

Definition at line 64 of file bgp_config_yaml.h.

const int BgpYamlConfigManager::kMaxHoldTime = 60 * 60
static

Definition at line 19 of file bgp_config_yaml.h.


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