本文整理汇总了Python中exabgp.protocol.family.AFI.implemented_safi方法的典型用法代码示例。如果您正苦于以下问题:Python AFI.implemented_safi方法的具体用法?Python AFI.implemented_safi怎么用?Python AFI.implemented_safi使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类exabgp.protocol.family.AFI
的用法示例。
在下文中一共展示了AFI.implemented_safi方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _add
# 需要导入模块: from exabgp.protocol.family import AFI [as 别名]
# 或者: from exabgp.protocol.family.AFI import implemented_safi [as 别名]
def _add (self,tokeniser,afi_name,safi_names):
self._check_duplicate(tokeniser,RaisedFamily)
known = self.content.setdefault(AFI(AFI.value(afi_name)),[])
for (idx_line,idx_column,line,safi_name) in safi_names:
if safi_name not in AFI.implemented_safi(afi_name):
raise RaisedFamily(Location(idx_line,idx_column,line),'the family pair afi/safi %s/%s is unimplemented' % (afi_name,safi_name))
safi = SAFI(SAFI.value(safi_name))
if safi in known:
raise RaisedFamily(Location(idx_line,idx_column,line),'afi/safi pair already defined in this family')
known.append(safi)
示例2: all
# 需要导入模块: from exabgp.protocol.family import AFI [as 别名]
# 或者: from exabgp.protocol.family.AFI import implemented_safi [as 别名]
def all (self,tokeniser):
for afi_name in ('ipv4','ipv6','l2vpn'):
for safi_name in AFI.implemented_safi(afi_name):
self._add(tokeniser,afi_name,safi_name)