Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 671298355f

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
OMakefile
README.markdown
example.png
go
graph.ml

README.markdown

Describe object relationships via graphviz

To create a graph showing relationships between

  • Virtual Machines (VMs)
  • Virtual Disk Images (VDIs)
  • Virtual Block Devices (VBDs)
  • Storage Repositories (SRs)

run:

$ graph -h -u root -pw VM VDI VBD SR > graph.gv

install graphviz and then run:

$ dot -Tpng graph.gv -o graph.png

Here's an example:

Example rendered graph

Notes

Unlike the rest of our ocaml client code, this example doesn't use our regular ocaml XenAPI bindings. Instead the code parses the XMLRPC responses by walking over the type declarations in the datamodel directly. Unfortunatly this means that a lot of unnecessary modules have to be linked in. We should probably improve this by:

  1. creating an actual concrete syntax for the IDL, so you wouldn't have to link all of xapi in to get it
  2. extending the system.listMethods to allow more introspection (e.g. include type information)
Something went wrong with that request. Please try again.