本文整理汇总了Python中exabgp.bgp.message.update.nlri.nlri.NLRI.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python NLRI.__init__方法的具体用法?Python NLRI.__init__怎么用?Python NLRI.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类exabgp.bgp.message.update.nlri.nlri.NLRI
的用法示例。
在下文中一共展示了NLRI.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self,afi=AFI.ipv4,safi=SAFI.flow_ip,nexthop=None,rd=None):
NLRI.__init__(self,afi,safi)
self.rules = {}
self.action = OUT.announce
self.nexthop = IP.unpack(nexthop) if nexthop else NoIP
self.rd = rd
self.unique = unique.next()
示例2: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, afi=AFI.ipv4,safi=SAFI.flow_ip,nexthop=None,rd=None):
NLRI.__init__(self,afi,safi)
self.rules = {}
self.action = OUT.UNSET
self.nexthop = IP.unpack(nexthop) if nexthop else NoNextHop
self.rd = rd if rd else RouteDistinguisher.NORD
self.unique = unique.next()
示例3: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__(self,afi,safi,packed,mask,nexthop,action):
self.labels = Labels.NOLABEL
self.rd = RouteDistinguisher.NORD
self.nexthop = IP.unpack(nexthop) if nexthop else NoIP
self.action = action
NLRI.__init__(self,afi,safi)
CIDR.__init__(self,packed,mask)
示例4: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, afi, safi, packed, mask, nexthop, action,path=None):
self.path_info = PathInfo.NOPATH if path is None else path
self.labels = Labels.NOLABEL
self.rd = RouteDistinguisher.NORD
self.nexthop = IP.unpack(nexthop) if nexthop else NoNextHop
self.action = action
NLRI.__init__(self,afi,safi)
CIDR.__init__(self,packed,mask)
示例5: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, rd, endpoint, base, offset, size):
NLRI.__init__(self,AFI.l2vpn,SAFI.vpls)
self.action = OUT.ANNOUNCE
self.nexthop = None
self.rd = rd
self.base = base
self.offset = offset
self.size = size
self.endpoint = endpoint
self.unique = unique.next()
示例6: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self,rd,ve,base,offset,size):
NLRI.__init__(self,AFI.l2vpn,SAFI.vpls)
self.action = OUT.announce
self.nexthop = None
self.rd = rd
self.base = base
self.offset = offset
self.size = size
self.ve = ve
self.unique = unique.next()
示例7: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, local_node, protocol, remote_node, link_local_identifier, link_remote_identifier, ipv4_interface_address, ipv4_neighbor_address):
NLRI.__init__(self,AFI.traffic_engineering,SAFI.ls_unicast)
self.action = OUT.ANNOUNCE
self.nexthop = None
self.local_node = local_node
self.protocol = protocol
self.remote_node = remote_node
self.link_local_identifier = link_local_identifier
self.link_remote_identifier = link_remote_identifier
self.ipv4_interface_address = ipv4_interface_address
self.ipv4_neighbor_address = ipv4_neighbor_address
self.unique = unique.next()
示例8: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, local_node_id, local_asn, remote_node_id, remote_asn, local_ipv4, remote_ipv4, action):
NLRI.__init__(self,AFI.bgpls,SAFI.bgp_ls)
self.action = OUT.ANNOUNCE
self.nexthop = None
self.local_node_id = local_node_id
self.local_asn = local_asn
self.remote_node_id = remote_node_id
self.remote_asn = remote_asn
self.local_ipv4 = local_ipv4
self.remote_ipv4 = remote_ipv4
if action == 1:
self.action_str = "update"
elif action == 2:
self.action_str = "withdraw"
else:
self.action_str = "unknown"
示例9: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, afi, safi, action, origin, rt):
NLRI.__init__(self,afi,safi)
self.action = action
self.origin = origin
self.rt = rt
self.nexthop = NoNextHop
示例10: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, afi, safi, action):
_NLRI.__init__(self,afi,safi)
self.action = action
示例11: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, afi, safi, action=OUT.UNSET):
NLRI.__init__(self,afi,safi,action)
self.path_info = PathInfo.NOPATH
self.cidr = CIDR.NOCIDR
self.nexthop = NoNextHop
示例12: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, afi=AFI.ipv4, safi=SAFI.flow_ip, action=OUT.UNSET):
NLRI.__init__(self,afi,safi,action)
self.rules = {}
self.nexthop = NoNextHop
self.rd = RouteDistinguisher.NORD
self.unique = unique.next()
示例13: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, afi, safi, packed, mask, nexthop, action,path=None):
self.path_info = PathInfo.NOPATH if path is None else path
self.nexthop = IP.unpack(nexthop) if nexthop else NoIP
NLRI.__init__(self,afi,safi)
CIDR.__init__(self,packed,mask)
self.action = action
示例14: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, afi, safi, packed, mask, nexthop, action):
self.path_info = PathInfo.NOPATH
self.nexthop = IP.unpack(nexthop) if nexthop else NoNextHop
NLRI.__init__(self,afi,safi)
CIDR.__init__(self,packed,mask)
self.action = action
示例15: __init__
# 需要导入模块: from exabgp.bgp.message.update.nlri.nlri import NLRI [as 别名]
# 或者: from exabgp.bgp.message.update.nlri.nlri.NLRI import __init__ [as 别名]
def __init__ (self, afi, safi, action, nexthop, origin, rt):
NLRI.__init__(self,afi,safi)
self.action = action
self.nexthop = IP.unpack(nexthop) if nexthop else NoNextHop
self.origin = origin
self.rt = rt