kube_service_status.py 文件源码

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

项目:kolla-kubernetes 作者: openstack 项目源码 文件源码
def _matchSingleLineField(field_name, haystack):
        """Returns field name's value"""

        # Initial checks
        assert field_name is not None
        if haystack is None:
            return None

        # Execute the Search
        match = re.search('^{}:\s+(?P<MY_VAL>.*)$'.format(field_name),
                          haystack,
                          re.MULTILINE)

        # Check the value
        if match is None:
            return None
        else:
            return match.group('MY_VAL').strip()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号