arista_template_connection_comb.py 文件源码

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

项目:polite 作者: CsilLAB 项目源码 文件源码
def create_template():

    conf_list = []

    with open("huge_file.json") as json_data:
        info = json.load(json_data)

    t = jinja2.Template(template)
    asn_list = info['asns'].keys()

    for i in asn_list:
        abcd = info['asns'][i]
        out = t.render(data=abcd, seq_num=1)
        conf_list += ([y for y in (x.strip() for x in out.splitlines()) if y])

    return conf_list
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号