当前位置: 首页>>代码示例>>Python>>正文


Python ExtendedCommunity.__init__方法代码示例

本文整理汇总了Python中exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ExtendedCommunity.__init__方法的具体用法?Python ExtendedCommunity.__init__怎么用?Python ExtendedCommunity.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity的用法示例。


在下文中一共展示了ExtendedCommunity.__init__方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
 def __init__(self, sample, terminal, community=None):
     self.sample = sample
     self.terminal = terminal
     bitmask = self._sample[sample] | self._terminal[terminal]
     ExtendedCommunity.__init__(
         self, community if community is not None else pack("!BBLBB", 0x80, 0x07, 0, 0, bitmask)
     )
开发者ID:noscripter,项目名称:exabgp,代码行数:9,代码来源:traffic.py

示例2: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self, asn, speed, community=None):
		self.asn = asn
		self.speed = speed
		ExtendedCommunity.__init__(
			self,
			community if community is not None else pack(
				"!Hf",asn,speed
			)
		)
开发者ID:Exa-Networks,项目名称:exabgp,代码行数:11,代码来源:bandwidth.py

示例3: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self, tunnel_type, community=None):
		self.tunnel_type = tunnel_type
		ExtendedCommunity.__init__(
			self,community if community is not None else pack(
				"!2sLH",
				self._packedTypeSubtype(),
				0,self.tunnel_type
			)
		)
开发者ID:abn,项目名称:exabgp,代码行数:11,代码来源:encapsulation.py

示例4: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self, tunnel_type, community=None):
		self.tunnel_type = tunnel_type
		ExtendedCommunity.__init__(
			self,community if community is not None else pack(
				"!BBLH",
				0x03,0x0C,
				0,self.tunnel_type
			)
		)
开发者ID:tomwalsh,项目名称:exabgp,代码行数:11,代码来源:encapsulation.py

示例5: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self, copy, community=None):
		self.copy = copy
		ExtendedCommunity.__init__(
			self,
			community if community is not None else pack(
				"!BBLH",
				0x80,0x00,
				0,1 if copy else 0
			)
		)
开发者ID:Akheon23,项目名称:exabgp,代码行数:12,代码来源:traffic.py

示例6: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self, copy, community=None):
		self.copy = copy
		ExtendedCommunity.__init__(
			self,
			community if community is not None else pack(
				"!2sLH",
				self._subtype(),
				0,1 if copy else 0
			)
		)
开发者ID:CadeLaRen,项目名称:exabgp,代码行数:12,代码来源:traffic.py

示例7: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self, sequence, sticky=False, community=None):
		self.sequence = sequence
		self.sticky = sticky
		ExtendedCommunity.__init__(
			self,
			community if community else pack(
				'!2sBxI',
				self._subtype(transitive=True),
				1 if sticky else 0,
				sequence
			)
		)
开发者ID:Exa-Networks,项目名称:exabgp,代码行数:14,代码来源:mac_mobility.py

示例8: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self, order, reserved=0, community=None):
		self.order = order
		self.reserved = reserved

		ExtendedCommunity.__init__(
			self,
			community if community is not None else pack(
				"!2sIH",
				self._subtype(),
				order,reserved
			)
		)
开发者ID:Empia,项目名称:exabgp,代码行数:14,代码来源:chso.py

示例9: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self, trans, asn, target, direction, community=None):
		self.asn = asn
		self.target = target
		self.direction = direction
		self.transitive = trans
		new_target = (direction << 14) + target
		ExtendedCommunity.__init__(
			self,
			community if community is not None else pack(
				"!2sLH",
				self._subtype(self.transitive),
				asn,new_target
			)
		)
开发者ID:Exa-Networks,项目名称:exabgp,代码行数:16,代码来源:flowspec_scope.py

示例10: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self, encaps, control, mtu, reserved, community=None):
		self.encaps = encaps
		self.control = control
		self.mtu = mtu
		self.reserved = reserved
		# reserved is called preference in draft-ietf-l2vpn-vpls-multihoming-07
		ExtendedCommunity.__init__(
			self,
			community if community is not None else pack(
				"!BBBBHH",
				0x80,0x0A,
				encaps,control,
				mtu,reserved
			)
		)
开发者ID:Tourountzis,项目名称:exabgp,代码行数:17,代码来源:l2info.py

示例11: __init__

# 需要导入模块: from exabgp.bgp.message.update.attribute.community.extended import ExtendedCommunity [as 别名]
# 或者: from exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity import __init__ [as 别名]
	def __init__ (self,encaps,control,mtu,reserved,community=None):
		self.encaps = encaps
		self.control = control
		self.mtu = mtu
		self.reserved = reserved
		ExtendedCommunity.__init__(self,community if community is not None else pack("!BBLH",0x80,0x0A,0,self.tunnel_type))
开发者ID:lochiiconnectivity,项目名称:exabgp,代码行数:8,代码来源:l2info.py


注:本文中的exabgp.bgp.message.update.attribute.community.extended.ExtendedCommunity.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。