plot.py 文件源码

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

项目:python-don 作者: openstack 项目源码 文件源码
def plot_network_node(self):
        tag = 'network'
        redirected = False
        if sys.stdout == sys.__stdout__:
            self.outfile = open(self.network_dot_file, "w")
            sys.stdout = self.outfile
            redirected = True
            self.__digraph_open(tag)

        self.__cluster_open('NetworkNode', 'red')
        self.__cluster_name('Network Node', 1, 'yellow')
        self.__cluster_close()

        # Plot nodes
        self.__cluster_open_plain('OVS')
        self.__plot_br_ex_network()
        self.__plot_br_int_network()
        self.__plot_br_tun(tag)
        self.__cluster_close_plain()

        # Plot edges
        self.__plot_title_edges(tag)
        self.__plot_br_int_to_br_tun(tag)
        self.__plot_br_ex_to_br_int()

        if redirected:
            self.__digraph_close()
            self.outfile.close()
            sys.stdout = sys.__stdout__
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号