Skip to content

Instantly share code, notes, and snippets.

@vojtechtrefny
Created October 31, 2014 11:58
Show Gist options
  • Save vojtechtrefny/5d4dc50ff574e30b1180 to your computer and use it in GitHub Desktop.
Save vojtechtrefny/5d4dc50ff574e30b1180 to your computer and use it in GitHub Desktop.
import blivet
import pydot
b = blivet.Blivet()
b.reset()
graph = pydot.Dot(graph_type='graph')
for device in b.devices:
for parent in device.parents:
edge = pydot.Edge(parent.name, device.name)
graph.add_edge(edge)
graph.write_png('blivet-graph.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment