bigip_selfip.py 文件源码

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

项目:ansible_f5 作者: mcgonagle 项目源码 文件源码
def address(self, value):
        pattern = '^(?P<ip>[0-9A-Fa-f:.]+)%?(?P<rd>\d+)?\/(?P<nm>\d+)$'
        matches = re.match(pattern, value)
        if not matches:
            raise F5ModuleError(
                "The specified address is malformed. Please see documentation."
            )
        try:
            ip = matches.group('ip')
            self._values['ip'] = str(IPAddress(ip))
        except AddrFormatError:
            raise F5ModuleError(
                'The provided address is not a valid IP address'
            )
        self._values['route_domain'] = matches.group('rd')
        self._values['netmask'] = matches.group('nm')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号