@classmethod
	def register (cls,attribute_id=None,flag=None):
		def register_attribute (klass):
			aid = klass.ID if attribute_id is None else attribute_id
			flg = klass.FLAG | Attribute.Flag.EXTENDED_LENGTH if flag is None else flag | Attribute.Flag.EXTENDED_LENGTH
			if (aid,flg) in cls.registered_attributes:
				raise RuntimeError('only one class can be registered per attribute')
			cls.registered_attributes[(aid,flg)] = klass
			cls.attributes_known.append(aid)
			if klass.FLAG & Attribute.Flag.OPTIONAL:
				cls.attributes_optional.append(aid)
			else:
				cls.attributes_well_know.append(aid)
			return klass
		return register_attribute
dataset/ETHPy150Open Exa-Networks/exabgp/lib/exabgp/bgp/message/update/attribute/attribute.py/Attribute.register/original