neighbor.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:nav 作者: UNINETT 项目源码 文件源码
def __init__(self, record, local_address=None):
        """Given a supported neighbor record, tries to identify the remote
        device and port among the ones registered in NAV's database.

        If a neighbor can be identified, the identified attribute is set to
        True.  The netbox and interface attributes will represent the
        identified items.

        :param record: Some namedtuple instance representing the
                       neighboring record read from the device.
        :param local_address: The management IP address used by the local
                              system. If supplied, will be used to identify
                              and ignore possible self-loops.

        """
        self.record = record
        self._invalid_neighbor_ips = list(INVALID_IPS)
        if local_address:
            self._invalid_neighbor_ips.append(str(local_address))

        self.netbox = self.interfaces = None
        self.identified = False

        self.identify()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号