def graph_json(): Node.reset_counter() # FIXME: NO! Edge.reset_counter() # FIXME: NO! dot = DotGraph('', file_contents=run_tf_graph()) tf = Terraform(os.getcwd()) for node in dot.nodes: node.definition = tf.get_def(node) return dot.json()
def graph_svg(): Node.reset_counter() Edge.reset_counter() # FIXME: NO! dot = DotGraph('', file_contents=run_tf_graph()) return dot.svg()