build.py 文件源码

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

项目:kolla-kubernetes-personal 作者: rthallisey 项目源码 文件源码
def save_dependency(self, to_file):
        dot = graphviz.Digraph(comment='Docker Images Dependency')
        dot.body.extend(['rankdir=LR'])
        for image in self.images:
            if image['status'] not in ['matched']:
                continue
            dot.node(image['name'])
            if image['parent'] is not None:
                dot.edge(image['parent']['name'], image['name'])

        with open(to_file, 'w') as f:
            f.write(dot.source)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号