diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2008-01-08 13:26:23 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2008-01-08 13:26:23 +0000 |
commit | 9b4bab1fe618affd0e69666ec6467b414cee325e (patch) | |
tree | ff0334a53631096c82f1fe234c1c1775bc63adc9 /README | |
parent | 4c5a6c02d72a5c40102b6c26705574f84c89eb20 (diff) | |
download | virt-top-9b4bab1fe618affd0e69666ec6467b414cee325e.tar.gz virt-top-9b4bab1fe618affd0e69666ec6467b414cee325e.tar.xz virt-top-9b4bab1fe618affd0e69666ec6467b414cee325e.zip |
Move programming information to libvirt generated doc.
* README, libvirt/libvirt.mli: Moved programming information to
libvirt generated documentation, greatly expanded examples and
other issues.
* examples/Makefile.in, examples/node_info.ml, examples/.depend:
Added node_info example program.
* .hgignore, Makefile.in: Ignore, clean up node_info binary.
* examples/list_domains.ml: Make a read-only connection.
Diffstat (limited to 'README')
-rw-r--r-- | README | 27 |
1 files changed, 0 insertions, 27 deletions
@@ -152,33 +152,6 @@ domains, or show the machine console. Programming ---------------------------------------------------------------------- -The interface is described in 'libvirt.mli'. The main modules are -Libvirt.Connect, Libvirt.Domain and Libvirt.Network, corresponding -respectively to the virConnect*, virDomain*, and virNetwork* -functions. For brevity I usually rename these modules like this: - - module C = Libvirt.Connect - module D = Libvirt.Domain - module N = Libvirt.Network - -To get a connection handle, do: - - let name = "xen:///" - let conn = C.connect ~name () - -To list domains, do: - - let n = C.num_of_domains conn - let ids = C.list_domains conn n - let domains = Array.map (D.lookup_by_id conn) ids - let () = - Array.iter ( - fun dom -> - printf "%5d %s\n" (D.get_id dom) (D.get_name dom) - ) domains - -(See also the program list_domains.ml). - For documentation on these bindings, read libvirt.mli and/or 'make doc' and browse the HTML documentation in the html/ subdirectory. |