sparkcfg.py 文件源码

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

项目:clus2017_iosxe_demo_booth 作者: CiscoDevNet 项目源码 文件源码
def compare_configs(cfg1,cfg2):

    d = difflib.unified_diff(cfg1, cfg2)

    diffstr = ""

    for line in d:
        if line.find('Current configuration') == -1:
            if line.find('Last configuration change') == -1:
                if line.find('length 0') == -1:
                    if line.find('login authentication tacplus') == -1:
                        if (line.find("+++")==-1) and (line.find("---")==-1):
                            if (line.find("-!")==-1) and (line.find('+!')==-1):
                                if line.startswith('+'):
                                    diffstr = diffstr + "\n" + line
                                elif line.startswith('-'):
                                    diffstr = diffstr + "\n" + line

    return diffstr
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号