Compare commits
1 Commits
v0.0.4
...
LIBXEN_FIR
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f25f7f0db |
22
.cvsignore
@@ -1,22 +0,0 @@
|
||||
Makefile
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
stamp-h.in
|
||||
Makefile.in
|
||||
configure
|
||||
config.cache
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.guess
|
||||
config.status
|
||||
config.sub
|
||||
stamp-h
|
||||
stamp-h1
|
||||
libtool
|
||||
ltconfig
|
||||
ltmain.sh
|
||||
update.log
|
||||
libxen.pc
|
||||
libxen.spec
|
||||
|
||||
2
AUTHORS
@@ -1,2 +0,0 @@
|
||||
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
|
||||
Karel Zak <kzak@redhat.com>
|
||||
446
ChangeLog
@@ -1,449 +1,3 @@
|
||||
Fri Feb 10 11:30:41 EST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* python/libvir.c: fixed one more problem prior to 0.0.4
|
||||
|
||||
Fri Feb 10 11:21:53 EST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* NEWS configure.in docs/libvir.html docs/news.html include/libvirt.h
|
||||
libvirt.spec.in: preparing 0.0.4 release
|
||||
|
||||
Fri Feb 10 11:09:11 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* README TODO config.h.in libvirt.pc.in: more cleanups.
|
||||
|
||||
Fri Feb 10 09:42:45 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* NEWS docs/*: regenerated and updated the docs post 0.0.3 release
|
||||
|
||||
Fri Feb 10 09:39:23 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* autogen.sh configure.in: fixed snapshot autogeneration, had to
|
||||
tweak a few things
|
||||
|
||||
Wed Feb 8 11:43:43 EST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* //* : renamed the project libvirt , this affects all makefiles,
|
||||
the specs, the icons, the docs, etc ...
|
||||
* configure.in: prepare for 0.0.3
|
||||
|
||||
Fri Feb 3 15:47:32 CET 2006 Karel Zak <kzak@redhat.com>
|
||||
|
||||
* src/virsh.c: fix order of the save command options
|
||||
|
||||
Tue Jan 31 19:12:19 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in docs/examples/*: starting to add examples. the XSLT
|
||||
still need to be fixed for web site
|
||||
|
||||
Tue Jan 31 11:22:51 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* python/*: update of the python bindings, fix names, add
|
||||
missing features like list of domains and domain info extraction
|
||||
|
||||
Tue Jan 31 11:21:56 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in libvir.spec.in NEWS docs/*: commiting the state of 0.0.2
|
||||
release
|
||||
|
||||
Sun Jan 29 11:55:13 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* NEWS docs/news.xsl: added stylesheet to generate NEWS file
|
||||
* docs/*: updated docs preparing for the release
|
||||
|
||||
Sun Jan 29 09:52:03 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/site.xsl docs/*.html: credits to Diana Fong for graphics
|
||||
and web site design
|
||||
|
||||
Sat Jan 28 21:24:05 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* python/libvir.c: fix a stupid bug in python bindings (DomainDestroy
|
||||
is still mishandled though)
|
||||
|
||||
Fri Jan 27 09:58:31 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvir.c src/xml.c: applied patch from Anthony Liguori
|
||||
to remove the XenStore transactions as this is not needed
|
||||
anymore.
|
||||
|
||||
Thu Jan 26 13:10:43 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* TODO: updated
|
||||
* docs/search.php: use the new web site design
|
||||
* python/generator.py: fix a generation bug on python keyword
|
||||
|
||||
Tue Jan 24 11:44:53 CET 2006 Karel Zak <kzak@redhat.com>
|
||||
|
||||
* src/libvir_sym.version: add virDeomainRestore and virDomainSave
|
||||
* src/virsh.c: support '=' in options, fix command grammar
|
||||
* src/libvir.c: add conn->xshandle checks
|
||||
|
||||
Tue Jan 24 14:09:37 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvir.c: Karel pointed out handle was lost in
|
||||
virConnectOpenReadOnly()
|
||||
|
||||
Mon Jan 23 23:53:07 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/site.xsl docs/*.png docs/*.html: update the images from Diana,
|
||||
added favicon to page.
|
||||
* src/libvir.c: reorganized the include imports.
|
||||
|
||||
Mon Jan 23 14:23:16 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/*: augment and try to complete the doc in its current state
|
||||
|
||||
Sun Jan 22 17:26:20 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/*: started to augment and update the documentation
|
||||
|
||||
Sat Jan 21 23:33:46 GMT 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs//*: mostly finished the revamp in the plane, starts to look good
|
||||
|
||||
Fri Jan 20 16:48:05 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/* : total revamp of the web site based on Diana Fong design
|
||||
but not completely integrated yet
|
||||
|
||||
Fri Jan 20 10:57:44 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h include/libvir.h.in src/libvir.c: revamped the
|
||||
restore API (though it would be better if it was returning
|
||||
a domain pointer in case of success)
|
||||
* src/virsh.c: added save and restore to the commands, tested,
|
||||
the option handling need work though
|
||||
|
||||
Thu Jan 19 11:21:57 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvir.c src/xend_internal.c src/xend_internal.h: continue
|
||||
the integration of more xend based accesses, virsh seems to work
|
||||
without accessing the xen store now.
|
||||
|
||||
Wed Jan 18 19:57:53 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvir.c: small change w.r.t. reboot.
|
||||
|
||||
Wed Jan 18 11:32:04 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h include/libvir.h.in src/libvir.c: more integration
|
||||
of libxend capabilities, including checkpointing and restoring
|
||||
in a file.
|
||||
* docs//*: regenerated the docs
|
||||
|
||||
Tue Jan 17 17:53:43 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h[.in]: added VIR_DOMAIN_CRASHED status, small
|
||||
doc fix
|
||||
* src/virsh.c: fix a integer being formatted as %s in idof
|
||||
* src/internal.h src/libvir.c src/xend_internal.[ch]: started to
|
||||
integrated the xend back-end, especially for getting informations
|
||||
about a domain.
|
||||
|
||||
Fri Jan 13 17:39:24 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h.in include/libvir.h src/internal.h src/libvir.c
|
||||
src/xend_internal.c src/xend_internal.h: starting to plug the
|
||||
xend code in, replacing structures mostly, but not finished.
|
||||
|
||||
Thu Jan 12 16:36:21 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/Makefile.am src/xend_internal.c src/xend_internal.h:
|
||||
added more of Anthony Liquori libxend code, commented and reformatted
|
||||
this still need to be plugged, it's still dead code ATM.
|
||||
|
||||
Wed Jan 11 14:57:01 CET 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/libvir.html: grammatical fix
|
||||
* src/Makefile.am src/sexpr.c src/sexpr.h: starting to integrate
|
||||
Anthony Liquori libxend code
|
||||
* src/libvir.c: fix an uninitialized value
|
||||
|
||||
Wed Dec 21 17:58:45 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/architecture.* docs/*: added a section on the architecture
|
||||
and regenerated the docs.
|
||||
|
||||
Mon Dec 19 19:04:11 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* NEWS docs/libvir.html docs/news.html: preparing 0.0.1 release
|
||||
|
||||
Mon Dec 19 17:32:22 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* Makefile.am configure.in libvir.spec.in python/*: added a first
|
||||
version for python bindings, heavilly based on libxml2/libxslt
|
||||
way of doing things, maybe this need to be revisited. Added packaging
|
||||
too.
|
||||
* src/hash.h: fixed the Copyright notice.
|
||||
|
||||
Fri Dec 16 19:35:29 CET 2005 Karel Zak <kzak@redhat.com>
|
||||
|
||||
* src/xml.c src/internal.h src/libvir.c: struct checks cleanup,
|
||||
add macros VIS_IS_DOMAIN(), VIR_IS_CONNECT() and VIR_IS_CONNECTED_DOMAIN()
|
||||
|
||||
Fri Dec 16 14:26:05 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* libvir.spec.in src/Makefile.am: cleaned up the spec file, removed
|
||||
static libraries, adding virsh as an installed program
|
||||
|
||||
Fri Dec 16 13:59:35 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvir_sym.version: oops forgot to export the new symbol
|
||||
|
||||
Fri Dec 16 13:15:04 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h include/libvir.h.in src/internal.h src/libvir.c:
|
||||
adding the virDomainShutdown() API
|
||||
* src/virsh.c: adding a shutdown command
|
||||
* docs/*: regenerated
|
||||
|
||||
Fri Dec 16 01:43:18 CET 2005 Karel Zak <kzak@redhat.com>
|
||||
|
||||
* include/libvir.h.in: add missing declaration of virDomainGetXMLDesc()
|
||||
* include/libvir.h.in src/libvir.c src/virsh src/libvir_sym.version: add
|
||||
virDomainGetOSType()
|
||||
* src/internal.h src/libvir.c src/xml.c: add internal function virDomainGetVM(),
|
||||
move virDomainGetVMInfo() from src/xml.c
|
||||
|
||||
Thu Dec 15 17:56:27 CET 2005 Karel Zak <kzak@redhat.com>
|
||||
|
||||
* src/virsh.c: remove --id / --name options
|
||||
|
||||
Wed Dec 14 16:28:24 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xml.c: add dump of os/boot informations
|
||||
|
||||
Wed Dec 14 13:35:39 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xml.c: added dump of physical vbd and read-only status
|
||||
|
||||
Wed Dec 14 12:20:06 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xml.c: started to add block devices and interfaces descriptions
|
||||
in the XML dump.
|
||||
|
||||
Tue Dec 13 17:20:11 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h src/Makefile.am src/internal.h src/libvir.c
|
||||
src/libvir_sym.version src/virsh.c src/xml.c: started working on
|
||||
the XML dump, added a dumpxml virsh version and a bit of
|
||||
infrastructure code. Found a way to detect dead ID from xenstore
|
||||
data.
|
||||
|
||||
Mon Dec 12 14:21:18 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvir.c src/xen_internal.c src/xen_internal.h: completing the
|
||||
API implementation, only CreateLinux is now missing.
|
||||
|
||||
Fri Dec 9 15:39:18 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/search.php docs/index.py docs/*.xsl docs/html/*: fixed the
|
||||
page generation, added the search engine.
|
||||
|
||||
Fri Dec 9 14:03:13 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/*: extended the documentation
|
||||
|
||||
Fri Dec 9 11:15:41 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in: adding --without-depends to make dist on non
|
||||
Xenified machine.
|
||||
|
||||
Fri Dec 9 00:47:12 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* Makefile.am include/libvir.h.in libvir.pc.in: various fixes.
|
||||
* docs/*: regenerated the docs
|
||||
|
||||
Fri Dec 9 00:02:06 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/virsh.c: added support for suspend/resume/destroy, validating
|
||||
the previous code.
|
||||
|
||||
Thu Dec 8 18:16:20 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvir.c src/xen_internal.c src/xen_internal.h: implement
|
||||
Pause, Resume, Destroy, but untested yet.
|
||||
|
||||
Thu Dec 8 17:43:11 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h src/libvir.c src/libvir_sym.version: adding
|
||||
virDomainFree()
|
||||
* docs/*: regenerated the docs
|
||||
|
||||
Thu Dec 8 16:07:07 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in include/libvir.h.in include/libvir.h src/Makefile.am
|
||||
include/Makefile.am: provide/fix library versionning information
|
||||
include/libvir.h is now generated !
|
||||
* include/libvir.h.in src/libvir.c: revamp APIs and implement
|
||||
complete ones.
|
||||
* src/virsh.c: finish the version command and a bit of cleanup.
|
||||
|
||||
Thu Dec 8 15:20:57 CET 2005 Karel Zak <kzak@redhat.com>
|
||||
|
||||
* src/virsh.c: code cleanup to prevent gcc warnings
|
||||
|
||||
Thu Dec 8 14:25:09 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in: activate pedantic flags
|
||||
* src/libvir.c src/libvir_sym.version src/xen_internal.[ch]
|
||||
include/libvir.h: implementing hypervisor Version and Type interfaces
|
||||
* src/virsh.c: adding a version command, WIP
|
||||
|
||||
Thu Dec 8 11:19:48 CET 2005 Karel Zak <kzak@redhat.com>
|
||||
|
||||
* src/Makefile.am src/virsh.c configure.in: adding readline support,
|
||||
and implement basic commands to virsh.
|
||||
|
||||
Thu Dec 8 11:12:36 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libvir.c src/xen_internal.c: fixed the new Xen hypervisor call
|
||||
|
||||
Wed Dec 7 19:09:48 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in src/Makefile.am src/libvir.c src/xen_internal.c
|
||||
src/xen_internal.h: removed dependancy on xenctrl library, untested
|
||||
yet.
|
||||
|
||||
Wed Dec 7 15:08:54 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/*: adding missing links to API page.
|
||||
|
||||
Wed Dec 7 14:43:28 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in libvir.spec.in docs/Makefile.am: make sure the
|
||||
docs are installed and packaged in the -devel RPM
|
||||
* docs/api.xsl docs/newapi.xsl: forgot to commit API HTML stylesheets
|
||||
|
||||
Wed Dec 7 14:09:48 CET 2005 Karel Zak <kzak@redhat.com>
|
||||
* include/libvir.h src/libvir.c: adding xenConnectNumOfDomains()
|
||||
to returns number of active domains.
|
||||
|
||||
Wed Dec 7 13:55:04 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/ChangeLog.awk docs/ChangeLog.xsl: Changelog handling from
|
||||
libxml2 adapted to libvir
|
||||
* docs/* docs/html/libxml-libvir.html: regenerated
|
||||
|
||||
Wed Dec 7 11:58:20 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/* docs/html/*: more work on the docs generation
|
||||
* include/libvir.h: adding informations on the header
|
||||
|
||||
Wed Dec 7 10:31:29 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in docs/FAQ.html docs/Libxml2-Logo-90x34.gif
|
||||
docs/Makefile.am docs/bugs.html docs/index.html docs/intro.html
|
||||
docs/libvir.html docs/redhat.gif docs/site.xsl: starting to add
|
||||
the web site, based on libxml2 one.
|
||||
* src/hash.c: add a missing include
|
||||
|
||||
Tue Dec 6 17:47:11 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/Makefile.am docs/apibuild.py docs/libvir-api.xml
|
||||
docs/libvir-refs.xml: fix XML API generation
|
||||
* include/libvir.h src/libvir.c src/virsh.c: fix the info memory
|
||||
API again, use KB, not bytes so that an unsigned long is sufficient.
|
||||
|
||||
Tue Dec 6 17:12:52 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h src/libvir.c src/virsh.c: adding the extraction
|
||||
of the number of virtual CPUs for both interfaces.
|
||||
|
||||
Tue Dec 6 14:46:50 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h src/libvir.c src/virsh.c: tweaking of the
|
||||
GetInfo() API, returns bytes and nanoseconds, try to fix
|
||||
the scales, but time on unpriviledged interfaces doesn't work.
|
||||
|
||||
Mon Dec 5 19:14:05 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvir.h src/libvir.c src/libvir_sym.version src/virsh.c:
|
||||
first pass at trying to implement virDomainGetInfo() quite a bit
|
||||
of work left to do.
|
||||
|
||||
Mon Dec 5 12:15:16 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* Makefile.am README TODO autogen.sh configure.in libvir.pc.in
|
||||
libvir.spec.in docs/Makefile.am docs/apibuild.py docs/structures.fig
|
||||
include/Makefile.am include/libvir.h src/Makefile.am src/hash.c
|
||||
src/hash.h src/internal.h src/libvir.c src/libvir_sym.version
|
||||
src/virsh.c: renamed to libvir
|
||||
|
||||
Fri Dec 2 15:15:26 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libxen.h src/libxen.c src/libxen_sym.version: adding
|
||||
xenConnectListDomains() to list active domains
|
||||
* src/xensh.c: integrated a basic test for xenConnectListDomains()
|
||||
|
||||
Fri Dec 2 13:10:04 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in src/Makefile.am: more warnings from compiler and
|
||||
link static in work environement
|
||||
|
||||
Thu Dec 1 18:32:43 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* Makefile.am configure.in docs/apibuild.py docs/libxen-api.xml
|
||||
docs/libxen-refs.xml docs/structures.fig: starting to add docs
|
||||
and the extraction tool
|
||||
* src/libxen.c: fixed comments error raised by apibuild
|
||||
|
||||
Thu Dec 1 17:34:23 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libxen.h src/libxen.c src/libxen_sym.version: add read-only
|
||||
connections for normal users (but need /var/run/xenstored/socket_ro
|
||||
to be chmoded to 666)
|
||||
* src/xensh.c: if not root use the RO access
|
||||
|
||||
Thu Dec 1 11:50:16 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libxen.h src/libxen.c src/libxen_sym.version src/xensh.c:
|
||||
changed entry points naming conventions based on feedback with
|
||||
Karel Zak
|
||||
|
||||
Wed Nov 30 14:18:19 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/Makefile.am src/hash.[ch]: added hash module based on libxml2
|
||||
one.
|
||||
* include/libxen.h src/libxen.c src/libxen_sym.version: extend API
|
||||
start to access libxenctrl directly (need xen update to get includes)
|
||||
* src/xensh.c: access to both xenstore and hypervisor
|
||||
|
||||
Tue Nov 22 17:09:11 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in: checking xenstore library, error out on missing libs
|
||||
* include/libxen.h src/libxen.c src/libxen_sym.version: adding new
|
||||
entry points
|
||||
|
||||
Thu Nov 10 17:11:03 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/makefile.am src/libxen.c src/xensh.c: add a small tool sensh,
|
||||
implement xenopenconnect and xencloseconnect.
|
||||
|
||||
Wed Nov 9 10:57:12 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/Goals: added a Goals document for the library
|
||||
|
||||
Mon Nov 7 18:14:50 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* TODO: updated
|
||||
* include/libxen.h src/libxen.c src/libxen_sym.version: extended
|
||||
entry points to a first minimal set.
|
||||
* src/internal.h: TODO macro
|
||||
|
||||
Wed Nov 2 16:35:54 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* TODO libxen.pc.in libxen.spec.in include/Makefile.am Makefile.am
|
||||
config.h.in configure.in: fix make dist, add rpm packaging
|
||||
* src/libxen_sym.version src/Makefile.am: set a policy of no
|
||||
export by default of library symbols
|
||||
|
||||
Wed Nov 2 14:17:50 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* AUTHORS NEWS README autogen.sh configure.in: allow autogen.sh and
|
||||
configure to start working
|
||||
* src/Makefile.am src/internal.h src/libxen.c: make the first compile
|
||||
|
||||
Wed Nov 2 13:44:47 CET 2005 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/libxen.c src/Makefile.am include/libxen.h configure.in
|
||||
|
||||
12
Makefile.am
@@ -1,13 +1,9 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = src include docs @PYTHON_SUBDIR@
|
||||
|
||||
EXTRA_DIST = libvirt.spec.in libvirt.spec COPYING.LIB \
|
||||
libvirt.pc.in libvirt.pc TODO AUTHORS ChangeLog \
|
||||
NEWS README
|
||||
SUBDIRS = src #docs
|
||||
EXTRA_DIST = libxen.spec.in libxen.spec COPYING.LIB \
|
||||
libxen.pc.in libxen.pc
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libvirt.pc
|
||||
pkgconfig_DATA = libxen.pc
|
||||
|
||||
rpm: clean
|
||||
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
|
||||
|
||||
32
NEWS
@@ -1,32 +0,0 @@
|
||||
|
||||
NEWS file for libvirt
|
||||
|
||||
Note that this is automatically generated from the news webpage at:
|
||||
http://libvirt.org/news.html
|
||||
|
||||
Releases
|
||||
0.0.4: Feb 10 2006:
|
||||
- Fix various bugs introduced in the name change
|
||||
|
||||
|
||||
0.0.3: Feb 9 2006:
|
||||
- Switch name from from 'libvir' to libvirt
|
||||
- Starting infrastructure to add code examples
|
||||
- Update of python bindings for completeness
|
||||
|
||||
|
||||
0.0.2: Jan 29 2006:
|
||||
- Update of the documentation, web site redesign (Diana Fong)
|
||||
- integration of HTTP xend RPC based on libxend by Anthony Liquori for
|
||||
most operations
|
||||
- Adding Save and Restore APIs
|
||||
- extended the virsh command line tool (Karel Zak)
|
||||
- remove xenstore transactions (Anthony Liguori)
|
||||
- fix the Python bindings bug when domain and connections where freed
|
||||
|
||||
|
||||
0.0.1: Dec 19 2005:
|
||||
- First release
|
||||
- Basic management of existing Xen domains
|
||||
- Minimal autogenerated Python bindings
|
||||
|
||||
13
README
@@ -1,13 +0,0 @@
|
||||
|
||||
LibVirt : simple API for virtualization
|
||||
|
||||
Libvirt is a C toolkit to interract with the virtualization capabilities
|
||||
of recent versions of Linux (and other OSes). It is free software
|
||||
available under the GNU Lesser General Public License. Virtualization of
|
||||
the Linux Operating System means the ability to run multiple instances of
|
||||
Operating Systems concurently on a single hardware system where the basic
|
||||
resources are driven by a Linux instance. The library aim at providing
|
||||
long term stable C API initially for the Xen paravirtualization but
|
||||
should be able to integrate other virtualization mechanisms if needed.
|
||||
|
||||
Daniel Veillard <veillard@redhat.com>
|
||||
25
TODO
@@ -1,25 +0,0 @@
|
||||
Absolute TODOs:
|
||||
- Create() API, how do we best keep flexibility and allow various
|
||||
specific environment and space for evolution (VMX)
|
||||
- thread protection, reentrancy, refcounting, etc ...
|
||||
- documentation and examples on using the toolkit
|
||||
- Error API. probably similar to libxml2 structured API
|
||||
|
||||
TODO:
|
||||
- track change of xend API, XML-RPC, UUID based lookup and naming
|
||||
- API for the Node: extracting informations, selecting scheduling policy
|
||||
- better resources allocation APIs (%CPU, set memory)
|
||||
|
||||
Probable TODOs:
|
||||
- event on big domain state change (create, crashed, paused, shutdown, destroy)
|
||||
- bindings for more languages
|
||||
|
||||
Would-be-nice TODO:
|
||||
- man page for virsh and the libraries entry points
|
||||
- support for QEmu and other virtualization engines
|
||||
|
||||
Done:
|
||||
- make dist and make rpm targets
|
||||
- set a no public by default policy for libvir symbols
|
||||
- fix the python bindings
|
||||
- renamed to libvirt
|
||||
64
autogen.sh
@@ -1,64 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
THEDIR=`pwd`
|
||||
cd $srcdir
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile libxen."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or see http://www.gnu.org/software/autoconf"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have libtool installed to compile libxen."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or see http://www.gnu.org/software/libtool"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(automake --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
DIE=1
|
||||
echo "You must have automake installed to compile libxen."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or see http://www.gnu.org/software/automake"
|
||||
}
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test -f src/libvirt.c || {
|
||||
echo "You must run this script in the top-level libxen directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
libtoolize --copy --force
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
automake --add-missing
|
||||
autoconf
|
||||
|
||||
cd $THEDIR
|
||||
|
||||
if test x$OBJ_DIR != x; then
|
||||
mkdir -p "$OBJ_DIR"
|
||||
cd "$OBJ_DIR"
|
||||
fi
|
||||
|
||||
$srcdir/configure "$@"
|
||||
|
||||
echo
|
||||
echo "Now type 'make' to compile libvirt."
|
||||
61
config.h.in
@@ -1,61 +0,0 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if the C compiler supports function prototypes. */
|
||||
#undef PROTOTYPES
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define like PROTOTYPES; this can be used by system headers. */
|
||||
#undef __PROTOTYPES
|
||||
199
configure.in
@@ -1,196 +1,35 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(src/libvirt.c)
|
||||
AC_INIT(entities.c)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
LIBVIR_MAJOR_VERSION=0
|
||||
LIBVIR_MINOR_VERSION=0
|
||||
LIBVIR_MICRO_VERSION=4
|
||||
LIBVIR_MICRO_VERSION_SUFFIX=
|
||||
LIBVIR_VERSION=$LIBVIR_MAJOR_VERSION.$LIBVIR_MINOR_VERSION.$LIBVIR_MICRO_VERSION$LIBVIR_MICRO_VERSION_SUFFIX
|
||||
LIBVIR_VERSION_INFO=`expr $LIBVIR_MAJOR_VERSION + $LIBVIR_MINOR_VERSION`:$LIBVIR_MICRO_VERSION:$LIBVIR_MINOR_VERSION
|
||||
LIBXEN_MAJOR_VERSION=0
|
||||
LIBXEN_MINOR_VERSION=0
|
||||
LIBXEN_MICRO_VERSION=1
|
||||
LIBXEN_MICRO_VERSION_SUFFIX=
|
||||
LIBXEN_VERSION=$LIBXEN_MAJOR_VERSION.$LIBXEN_MINOR_VERSION.$LIBXEN_MICRO_VERSION$LIBXEN_MICRO_VERSION_SUFFIX
|
||||
LIBXEN_VERSION_INFO=`expr $LIBXEN_MAJOR_VERSION + $LIBXEN_MINOR_VERSION`:$LIBXEN_MICRO_VERSION:$LIBXEN_MINOR_VERSION
|
||||
|
||||
LIBVIR_VERSION_NUMBER=`expr $LIBVIR_MAJOR_VERSION \* 1000000 + $LIBVIR_MINOR_VERSION \* 1000 + $LIBVIR_MICRO_VERSION`
|
||||
LIBXEN_VERSION_NUMBER=`expr $LIBXEN_MAJOR_VERSION \* 10000 + $LIBXEN_MINOR_VERSION \* 100 + $LIBXEN_MICRO_VERSION`
|
||||
|
||||
if test -f CVS/Entries; then
|
||||
extra=`grep ChangeLog CVS/Entries | grep -v LIBVIR | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
|
||||
extra=`grep ChangeLog CVS/Entries | grep -v LIBXEN | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
|
||||
echo extra=$extra
|
||||
if test "$extra" != ""
|
||||
then
|
||||
LIBVIR_VERSION_EXTRA="-CVS$extra"
|
||||
LIBXEN_VERSION_EXTRA="-CVS$extra"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBVIR_MAJOR_VERSION)
|
||||
AC_SUBST(LIBVIR_MINOR_VERSION)
|
||||
AC_SUBST(LIBVIR_MICRO_VERSION)
|
||||
AC_SUBST(LIBVIR_VERSION)
|
||||
AC_SUBST(LIBVIR_VERSION_INFO)
|
||||
AC_SUBST(LIBVIR_VERSION_NUMBER)
|
||||
AC_SUBST(LIBVIR_VERSION_EXTRA)
|
||||
AC_SUBST(LIBXEN_MAJOR_VERSION)
|
||||
AC_SUBST(LIBXEN_MINOR_VERSION)
|
||||
AC_SUBST(LIBXEN_MICRO_VERSION)
|
||||
AC_SUBST(LIBXEN_VERSION)
|
||||
AC_SUBST(LIBXEN_VERSION_INFO)
|
||||
AC_SUBST(LIBXEN_VERSION_NUMBER)
|
||||
AC_SUBST(LIBXEN_VERSION_EXTRA)
|
||||
|
||||
VERSION=${LIBVIR_VERSION}
|
||||
VERSION=${LIBXEN_VERSION}
|
||||
|
||||
AM_INIT_AUTOMAKE(libvirt, $VERSION)
|
||||
AM_INIT_AUTOMAKE(libxen, $VERSION)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CPP
|
||||
AC_PATH_PROG(RM, rm, /bin/rm)
|
||||
AC_PATH_PROG(MV, mv, /bin/mv)
|
||||
AC_PATH_PROG(TAR, tar, /bin/tar)
|
||||
AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)
|
||||
AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
|
||||
|
||||
|
||||
dnl Make sure we have an ANSI compiler
|
||||
AM_C_PROTOTYPES
|
||||
test "x$U" != "x" && AC_MSG_ERROR(Compiler not ANSI compliant)
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
dnl Specific dir for HTML output ?
|
||||
AC_ARG_WITH(html-dir, AC_HELP_STRING([--with-html-dir=path],
|
||||
[path to base html directory, default $datadir/doc/html]),
|
||||
[HTML_DIR=$withval], [HTML_DIR='$(datadir)/doc'])
|
||||
|
||||
AC_ARG_WITH(html-subdir, AC_HELP_STRING([--with-html-subdir=path],
|
||||
[directory used under html-dir, default $PACKAGE-$VERSION/html]),
|
||||
[test "x$withval" != "x" && HTML_DIR="$HTML_DIR/$withval"],
|
||||
[HTML_DIR="$HTML_DIR/\$(PACKAGE)-\$(VERSION)/html"])
|
||||
AC_SUBST(HTML_DIR)
|
||||
|
||||
dnl
|
||||
dnl specific tests to setup DV devel environments with debug etc ...
|
||||
dnl
|
||||
if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/libvirt" ]] ; then
|
||||
STATIC_BINARIES="-static"
|
||||
else
|
||||
STATIC_BINARIES=
|
||||
fi
|
||||
AC_SUBST(STATIC_BINARIES)
|
||||
|
||||
dnl
|
||||
dnl make CFLAGS very pedantic at least during the devel phase for everybody
|
||||
dnl
|
||||
if test "${GCC}" = "yes" ; then
|
||||
CFLAGS="-g -O -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl To be able to make dist on a non-xenified host
|
||||
dnl
|
||||
AC_ARG_WITH(depends,
|
||||
[ --with-depends check for dependancies (on)])
|
||||
|
||||
if test "$with_depends" != "no"
|
||||
then
|
||||
|
||||
dnl search for the Xen store library
|
||||
AC_SEARCH_LIBS(xs_read, [xenstore], [], [AC_MSG_ERROR([Xen store library not found])])
|
||||
|
||||
dnl virsh libraries
|
||||
AC_CHECK_LIB(curses, initscr,
|
||||
[VIRSH_LIBS="$VIRSH_LIBS -lcurses"],
|
||||
[AC_MSG_ERROR([curses library not found])],
|
||||
[$VIRSH_LIBS])
|
||||
AC_CHECK_LIB(readline, main,
|
||||
[VIRSH_LIBS="$VIRSH_LIBS -lreadline"],
|
||||
[AC_MSG_ERROR([readline library not found])],
|
||||
[$VIRSH_LIBS])
|
||||
AC_SUBST(VIRSH_LIBS)
|
||||
|
||||
# end of if with_depends
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl check for python
|
||||
dnl
|
||||
|
||||
PYTHON_VERSION=
|
||||
PYTHON_INCLUDES=
|
||||
PYTHON_SITE_PACKAGES=
|
||||
PYTHON_TESTS=
|
||||
pythondir=
|
||||
if test "$with_python" != "no" ; then
|
||||
if test -x "$with_python/bin/python"
|
||||
then
|
||||
echo Found python in $with_python/bin/python
|
||||
PYTHON="$with_python/bin/python"
|
||||
else
|
||||
if test -x "$with_python"
|
||||
then
|
||||
echo Found python in $with_python
|
||||
PYTHON="$with_python"
|
||||
else
|
||||
if test -x "$PYTHON"
|
||||
then
|
||||
echo Found python in environment PYTHON=$PYTHON
|
||||
else
|
||||
AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$PYTHON" != ""
|
||||
then
|
||||
PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
|
||||
echo Found Python version $PYTHON_VERSION
|
||||
fi
|
||||
if test "$PYTHON_VERSION" != ""
|
||||
then
|
||||
if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
|
||||
-d $with_python/lib/python$PYTHON_VERSION/site-packages
|
||||
then
|
||||
PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
|
||||
PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
|
||||
else
|
||||
if test -r $prefix/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
|
||||
PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
|
||||
else
|
||||
if test -r /usr/include/python$PYTHON_VERSION/Python.h
|
||||
then
|
||||
PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
|
||||
PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
|
||||
else
|
||||
echo could not find python$PYTHON_VERSION/Python.h
|
||||
fi
|
||||
fi
|
||||
if test ! -d "$PYTHON_SITE_PACKAGES"
|
||||
then
|
||||
PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$with_python" != ""
|
||||
then
|
||||
pythondir='$(PYTHON_SITE_PACKAGES)'
|
||||
else
|
||||
pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
|
||||
fi
|
||||
else
|
||||
PYTHON=
|
||||
fi
|
||||
AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
|
||||
if test "$PYTHON_INCLUDES" != ""
|
||||
then
|
||||
PYTHON_SUBDIR=python
|
||||
else
|
||||
PYTHON_SUBDIR=
|
||||
fi
|
||||
AC_SUBST(pythondir)
|
||||
AC_SUBST(PYTHON)
|
||||
AC_SUBST(PYTHON_VERSION)
|
||||
AC_SUBST(PYTHON_INCLUDES)
|
||||
AC_SUBST(PYTHON_SITE_PACKAGES)
|
||||
AC_SUBST(PYTHON_SUBDIR)
|
||||
|
||||
# very annoying
|
||||
rm -f COPYING
|
||||
cp COPYING.LIB COPYING
|
||||
|
||||
AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
|
||||
docs/examples/Makefile \
|
||||
libvirt.pc libvirt.spec include/libvirt.h python/Makefile)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.memdump
|
||||
|
Before Width: | Height: | Size: 495 B |
|
Before Width: | Height: | Size: 783 B |
@@ -1,256 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>API Alphabetic Index A-f for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">API Alphabetic Index A-f for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-f</a>
|
||||
<a href="APIchunk1.html">g-r</a>
|
||||
<a href="APIchunk2.html">s-z</a>
|
||||
</h2><h2>Letter A:</h2><dl><dt>ABI</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>API</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>APIs</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>After</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd></dl><h2>Letter C:</h2><dl><dt>CPU</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>Collect</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
</dd></dl><h2>Letter D:</h2><dl><dt>Destroy</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
</dd><dt>Domain0</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>Dynamically</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd></dl><h2>Letter E:</h2><dl><dt>Extract</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd></dl><h2>Letter F:</h2><dl><dt>Free</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
</dd></dl><h2>Letter G:</h2><dl><dt>Get</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
</dd></dl><h2>Letter H:</h2><dl><dt>Hypervisor</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
</dd></dl><h2>Letter I:</h2><dl><dt>IDs</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
</dd><dt>Informations</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd></dl><h2>Letter K:</h2><dl><dt>KBytes</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd></dl><h2>Letter L:</h2><dl><dt>Launch</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>Linux</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd></dl><h2>Letter M:</h2><dl><dt>Macro</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
|
||||
</dd></dl><h2>Letter N:</h2><dl><dt>NOTE:</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>NULL</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>Note</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd></dl><h2>Letter O:</h2><dl><dt>OUT</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd></dl><h2>Letter P:</h2><dl><dt>Provide</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>Provides</dt><dd><a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd></dl><h2>Letter R:</h2><dl><dt>Read-Only</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
</dd><dt>Resume</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
</dd><dt>Retrieve</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
</dd></dl><h2>Letter S:</h2><dl><dt>Shutdown</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>Suspends</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd></dl><h2>Letter T:</h2><dl><dt>TODO:</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>This</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>Try</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
</dd></dl><h2>Letter U:</h2><dl><dt>UTF-8</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>Use</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd></dl><h2>Letter X:</h2><dl><dt>XML</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>Xen</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd></dl><h2>Letter a:</h2><dl><dt>about</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd><dt>access</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>active</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>add</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>after</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>against</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>alive</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
</dd><dt>all</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
</dd><dt>allocated</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>allowed</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>already</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
</dd><dt>amount</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>anymore</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>application</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>are</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
</dd><dt>argument</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>array</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
</dd><dt>assumed</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>available</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>availble</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd></dl><h2>Letter b:</h2><dl><dt>back</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>based</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
</dd><dt>being</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>below</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>block</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
</dd><dt>but</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd></dl><h2>Letter c:</h2><dl><dt>call</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>called</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>caller</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>calling</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
</dd><dt>can</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd><dt>capacities</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
</dd><dt>change</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>changes</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>check</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>clients</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>closes</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
</dd><dt>code</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>collect</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
</dd><dt>command</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>compiled</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>connection</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
</dd><dt>contents</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>control</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>currently</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd></dl><h2>Letter d:</h2><dl><dt>data</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
</dd><dt>deallocated</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
</dd><dt>defined</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>description</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>device</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
</dd><dt>disk</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>doable</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>does</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
</dd><dt>domains</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>down</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
</dd></dl><h2>Letter e:</h2><dl><dt>encoded</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>error</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>especially</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
</dd><dt>extracted</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd><dt>extraction</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd></dl><h2>Letter f:</h2><dl><dt>failure</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>file</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>filename</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
</dd><dt>find</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
</dd><dt>first</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>flags</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>for</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>format</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>found</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
</dd><dt>free</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>freed</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
</dd><dt>from</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
</dd><dt>frozen</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>full</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>function</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>functionalities</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>further</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-f</a>
|
||||
<a href="APIchunk1.html">g-r</a>
|
||||
<a href="APIchunk2.html">s-z</a>
|
||||
</h2></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,226 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>API Alphabetic Index g-r for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">API Alphabetic Index g-r for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-f</a>
|
||||
<a href="APIchunk1.html">g-r</a>
|
||||
<a href="APIchunk2.html">s-z</a>
|
||||
</h2><h2>Letter g:</h2><dl><dt>general</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>get</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
</dd><dt>given</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
</dd><dt>guest</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd></dl><h2>Letter h:</h2><dl><dt>have</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>hypervisor</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd></dl><h2>Letter i:</h2><dl><dt>ignore</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>image</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>information</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>informations</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd><dt>init</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
</dd><dt>initrd</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>instance</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>int</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
</dd><dt>interaction</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
</dd><dt>its</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd></dl><h2>Letter k:</h2><dl><dt>kept</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
</dd><dt>kernel</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>kilobytes</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>knowing</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd></dl><h2>Letter l:</h2><dl><dt>lack</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
</dd><dt>level</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>libbrary</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>library</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>lifetime</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
</dd><dt>limited</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd><dt>line</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>list</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
</dd><dt>listed</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>long</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>lookup</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
</dd></dl><h2>Letter m:</h2><dl><dt>major</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>maximum</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>may</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>memory</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>method</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>methods</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>micro</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
|
||||
</dd><dt>minor</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>monitoring</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
</dd><dt>must</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd></dl><h2>Letter n:</h2><dl><dt>name</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
</dd><dt>need</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
</dd><dt>needed</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
</dd><dt>new</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
</dd><dt>not</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>number</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
</dd></dl><h2>Letter o:</h2><dl><dt>object</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>one</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>only</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd><dt>operation</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
</dd><dt>option</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>optional</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>otherwise</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>output</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd></dl><h2>Letter p:</h2><dl><dt>padding</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>parameters</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>partial</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd><dt>pass</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>path</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>physical</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>pointer</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
</dd><dt>pointing</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
</dd><dt>private</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>priviledged</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>problem</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>process</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>protection</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>providing</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
|
||||
</dd><dt>public</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
</dd><dt>publicly</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd></dl><h2>Letter r:</h2><dl><dt>ramdisk</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
</dd><dt>reactivate</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>reboot</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>release</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>request</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>requires</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>reserved</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>resources</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>restarted</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
</dd><dt>restore</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>restricted</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>return</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>returned</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>returns</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
</dd><dt>root</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
</dd><dt>running</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>runs</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-f</a>
|
||||
<a href="APIchunk1.html">g-r</a>
|
||||
<a href="APIchunk2.html">s-z</a>
|
||||
</h2></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,135 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>API Alphabetic Index s-z for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">API Alphabetic Index s-z for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-f</a>
|
||||
<a href="APIchunk1.html">g-r</a>
|
||||
<a href="APIchunk2.html">s-z</a>
|
||||
</h2><h2>Letter s:</h2><dl><dt>same</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
</dd><dt>save</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>saved</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
</dd><dt>saving</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>set</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>should</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>shutdown</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
</dd><dt>size</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>software</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
</dd><dt>state</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
</dd><dt>static</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
</dd><dt>stay</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>still</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>stopped</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>store</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
</dd><dt>string</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
</dd><dt>structure</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd><dt>subject</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>success</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>successful</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>suspend</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>suspended</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
</dd><dt>system</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
</dd></dl><h2>Letter t:</h2><dl><dt>term</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>terminated</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd><dt>that</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>their</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
</dd><dt>then</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>there</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>thereafter</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
</dd><dt>this</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>two</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>type</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd></dl><h2>Letter u:</h2><dl><dt>unimplemented</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>unknown</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>unsigned</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
</dd><dt>unused</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</dd><dt>usable</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>used</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>user</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd></dl><h2>Letter v:</h2><dl><dt>value</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>values</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>version</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>virDomainFlags</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd><dt>virDomainInfo</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</dd><dt>virDomainRestore</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
</dd><dt>virDomainResume</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>virDomainSave</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
</dd><dt>virSuspendDomain</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
</dd></dl><h2>Letter w:</h2><dl><dt>was</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>what</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd><dt>where</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</dd><dt>which</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>while</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>will</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>with</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
</dd><dt>without</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>work</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
</dd><dt>would</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</dd></dl><h2>Letter x:</h2><dl><dt>xen</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
</dd><dt>xenstore</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
</dd></dl><h2>Letter y:</h2><dl><dt>yet</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
</dd></dl><h2>Letter z:</h2><dl><dt>zero</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-f</a>
|
||||
<a href="APIchunk1.html">g-r</a>
|
||||
<a href="APIchunk2.html">s-z</a>
|
||||
</h2></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>List of constructors for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">List of constructors for libvirt</h1><h2>Type unsigned int:</h2><p><a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
</p><h2>Type unsigned long:</h2><p><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
</p><h2>Type virConnectPtr:</h2><p><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
</p><h2>Type virDomainPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>List of Symbols per Module for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">List of Symbols per Module for libvirt</h1><h2><a name="libvirt" id="libvirt">Module libvirt</a>:</h2><p><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DEVICE_DEFAULT">VIR_DEVICE_DEFAULT</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RO">VIR_DEVICE_RO</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RW">VIR_DEVICE_RW</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RW_FORCE">VIR_DEVICE_RW_FORCE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_BLOCKED">VIR_DOMAIN_BLOCKED</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_CRASHED">VIR_DOMAIN_CRASHED</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_DESTROY">VIR_DOMAIN_DESTROY</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_NOSTATE">VIR_DOMAIN_NOSTATE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_PAUSED">VIR_DOMAIN_PAUSED</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_PRESERVE">VIR_DOMAIN_PRESERVE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_RENAME_RESTART">VIR_DOMAIN_RENAME_RESTART</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_RESTART">VIR_DOMAIN_RESTART</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnect">virConnect</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectPtr">virConnectPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDeviceMode">virDeviceMode</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomain">virDomain</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateFlags">virDomainCreateFlags</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainInfo">virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainKernel">virDomainKernel</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainKernelPtr">virDomainKernelPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestart">virDomainRestart</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainState">virDomainState</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>List of function manipulating types in libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">List of function manipulating types in libvirt</h1><h2>Type int *:</h2><p><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
</p><h2>Type unsigned int:</h2><p><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
</p><h2>Type unsigned long:</h2><p><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
</p><h2>Type unsigned long *:</h2><p><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</p><h2>Type virConnectPtr:</h2><p><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
</p><h2>Type virDomainInfoPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
</p><h2>Type virDomainPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Alphabetic List of Symbols in libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Alphabetic List of Symbols in libvirt</h1><h2>Letter L:</h2><p><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
|
||||
</p><h2>Letter V:</h2><p><a href="html/libvirt-libvirt.html#VIR_DEVICE_DEFAULT">VIR_DEVICE_DEFAULT</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RO">VIR_DEVICE_RO</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RW">VIR_DEVICE_RW</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RW_FORCE">VIR_DEVICE_RW_FORCE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_BLOCKED">VIR_DOMAIN_BLOCKED</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_CRASHED">VIR_DOMAIN_CRASHED</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_DESTROY">VIR_DOMAIN_DESTROY</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_NOSTATE">VIR_DOMAIN_NOSTATE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_PAUSED">VIR_DOMAIN_PAUSED</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_PRESERVE">VIR_DOMAIN_PRESERVE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_RENAME_RESTART">VIR_DOMAIN_RENAME_RESTART</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_RESTART">VIR_DOMAIN_RESTART</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a><br />
|
||||
</p><h2>Letter _:</h2><p><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
|
||||
</p><h2>Letter v:</h2><p><a href="html/libvirt-libvirt.html#virConnect">virConnect</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectPtr">virConnectPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDeviceMode">virDeviceMode</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomain">virDomain</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateFlags">virDomainCreateFlags</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainInfo">virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainKernel">virDomainKernel</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainKernelPtr">virDomainKernelPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestart">virDomainRestart</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainState">virDomainState</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,49 +0,0 @@
|
||||
#!/bin/awk -f
|
||||
function translate(str) {
|
||||
while (sub(/&/, "#amp;", str) == 1);
|
||||
while (sub(/#amp;/, "\\&", str) == 1); # fun isn't it ?
|
||||
while (sub(/</, "\\<", str) == 1);
|
||||
while (sub(/>/, "\\>", str) == 1);
|
||||
sub(/[0-9][0-9][0-9][0-9][0-9]+/, "<bug number='&'/>", str)
|
||||
return(str)
|
||||
}
|
||||
BEGIN {
|
||||
nb_entry = 0
|
||||
in_entry = 0
|
||||
in_item = 0
|
||||
print "<?xml version='1.0' encoding='ISO-8859-1'?>"
|
||||
print "<log>"
|
||||
}
|
||||
END {
|
||||
if (in_item == 1) printf("%s</item>\n", translate(item))
|
||||
if (in_entry == 1) print " </entry>"
|
||||
print "</log>"
|
||||
}
|
||||
/^[ \t]*$/ { next }
|
||||
/^[A-Za-z0-9]/ {
|
||||
match($0, "\(.*\) \([A-Z]+\) \([0-9][0-9][0-9][0-9]\) \(.*\) <\(.*\)>", loge)
|
||||
if (in_item == 1) printf("%s</item>\n", translate(item))
|
||||
if (in_entry == 1) print " </entry>"
|
||||
nb_entry = nb_entry + 1
|
||||
if (nb_entry > 50) {
|
||||
in_entry = 0
|
||||
in_item = 0
|
||||
exit
|
||||
}
|
||||
in_entry = 1
|
||||
in_item = 0
|
||||
printf(" <entry date='%s' timezone='%s' year='%s'\n who='%s' email='%s'>\n", loge[1], loge[2], loge[3], loge[4], loge[5])
|
||||
}
|
||||
/^[ \t]*\*/ {
|
||||
if (in_item == 1) printf("%s</item>\n", translate(item))
|
||||
in_item = 1
|
||||
printf(" <item>")
|
||||
match($0, "[ \t]*. *\(.*\)", loge)
|
||||
item = loge[1]
|
||||
}
|
||||
/^[ \t]*[a-zA-Z0-9\#]/ {
|
||||
if (in_item == 1) {
|
||||
match($0, "[ \t]*\(.*\)[ \t]*", loge)
|
||||
item = sprintf("%s %s", item, loge[1])
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- this stylesheet builds the ChangeLog.html -->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- Import the rest of the site stylesheets -->
|
||||
<xsl:import href="site.xsl"/>
|
||||
|
||||
<!-- Generate XHTML-1.0 transitional -->
|
||||
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:param name="module">libvirt</xsl:param>
|
||||
|
||||
<!-- The table of content for the HTML page -->
|
||||
<xsl:variable name="menu_name">API Menu</xsl:variable>
|
||||
<xsl:variable name="develtoc">
|
||||
<form action="../search.php"
|
||||
enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="20" value=""/>
|
||||
<input name="submit" type="submit" value="Search ..."/>
|
||||
</form>
|
||||
<ul><!-- style="margin-left: -1em" -->
|
||||
<li><a style="font-weight:bold"
|
||||
href="{$href_base}index.html">Main Menu</a></li>
|
||||
<li><a style="font-weight:bold"
|
||||
href="{$href_base}html/index.html">Modules Index</a></li>
|
||||
<li><a style="font-weight:bold"
|
||||
href="index.html">API Menu</a></li>
|
||||
</ul>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:template match="bug">
|
||||
<a href="https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id={@number}">
|
||||
<xsl:value-of select="@number"/></a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="item">
|
||||
<li><xsl:apply-templates/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="entry">
|
||||
|
||||
<p>
|
||||
<b><xsl:value-of select="@who"/></b>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@date"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@timezone"/>
|
||||
<ul>
|
||||
<xsl:apply-templates select="item"/>
|
||||
</ul>
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="log">
|
||||
<xsl:variable name="title">ChangeLog last entries of <xsl:value-of select="$module"/></xsl:variable>
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments"/>
|
||||
<div id="pageHeader"/>
|
||||
<div id="content2">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates select="entry"/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList2"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -1,80 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>FAQ</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">FAQ</h1><p>Table of Contents:</p><ul><li><a href="FAQ.html#License">License(s)</a></li>
|
||||
<li><a href="FAQ.html#Installati">Installation</a></li>
|
||||
<li><a href="FAQ.html#Compilatio">Compilation</a></li>
|
||||
<li><a href="FAQ.html#Developer">Developer corner</a></li>
|
||||
</ul><h3><a name="License" id="License">License</a>(s)</h3><ol><li><em>Licensing Terms for libvirt</em>
|
||||
<p>libvirt is released under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU Lesser
|
||||
General Public License</a>, see the file COPYING.LIB in the distribution
|
||||
for the precise wording. The only library that libvirt depends upon is the
|
||||
Xen store access library which is also licenced under the LGPL.</p>
|
||||
</li>
|
||||
<li><em>Can I embed libvirt in a proprietary application ?</em>
|
||||
<p>Yes. The LGPL allows you to embed libvirt into a proprietary
|
||||
application. It would be graceful to send-back bug fixes and improvements
|
||||
as patches for possible incorporation in the main development tree. It
|
||||
will decrease your maintainance costs anyway if you do so.</p>
|
||||
</li>
|
||||
</ol><h3><a name="Installati" id="Installati">Installation</a></h3><ol><li><em>Where can I get libvirt</em> ?
|
||||
<p>The original distribution comes from <a href="ftp://libvirt.org/libvirt/">ftp://libvirt.org/libvirt/</a>.</p>
|
||||
</li>
|
||||
<li><em>I can't install the libvirt/libvirt-devel RPM packages due to failed
|
||||
dependencies</em>
|
||||
<p>The most generic solution is to re-fetch the latest src.rpm , and
|
||||
rebuild it locally with</p>
|
||||
<p><code>rpm --rebuild libvirt-xxx.src.rpm</code>.</p>
|
||||
<p>If everything goes well it will generate two binary rpm packages (one
|
||||
providing the shared libs and virsh, and the other one, the -devel
|
||||
package, providing includes, static libraries and scripts needed to build
|
||||
applications with libvirt that you can install locally.</p>
|
||||
<p>One can also rebuild the RPMs from a tarball:</p>
|
||||
<p><code>rpmbuild -ta libdir-xxx.tar.gz</code></p>
|
||||
<p>Or from a configured tree with:</p>
|
||||
<p><code>make rpm</code></p>
|
||||
</li>
|
||||
<li><em>Failure to use the API for non-root users</em>
|
||||
<p>Large parts of the API may only be accessible with root priviledges,
|
||||
however the read only access to the xenstore data doesnot have to be
|
||||
forbidden to user, at least for monitoring purposes. If "virsh dinfo"
|
||||
fails to run as an user, change the mode of the xenstore read-only socket
|
||||
with:</p>
|
||||
<p><code>chmod 666 /var/run/xenstored/socket_ro</code></p>
|
||||
<p>and also make sure that the Xen Daemon is running correctly with local
|
||||
HTTP server enabled, this is defined in
|
||||
<code>/etc/xen/xend-config.sxp</code> which need the following line to be
|
||||
enabled:</p>
|
||||
<p><code>(xend-http-server yes)</code></p>
|
||||
<p>If needed restart the xend daemon after making the change with the
|
||||
following command run as root:</p>
|
||||
<p><code>service xend restart</code></p>
|
||||
</li>
|
||||
</ol><h3><a name="Compilatio" id="Compilatio">Compilation</a></h3><ol><li><em>What is the process to compile libvirt ?</em>
|
||||
<p>As most UNIX libraries libvirt follows the "standard":</p>
|
||||
<p><code>gunzip -c libvirt-xxx.tar.gz | tar xvf -</code></p>
|
||||
<p><code>cd libvirt-xxxx</code></p>
|
||||
<p><code>./configure --help</code></p>
|
||||
<p>to see the options, then the compilation/installation proper</p>
|
||||
<p><code>./configure [possible options]</code></p>
|
||||
<p><code>make</code></p>
|
||||
<p><code>make install</code></p>
|
||||
<p>At that point you may have to rerun ldconfig or a similar utility to
|
||||
update your list of installed shared libs.</p>
|
||||
</li>
|
||||
<li><em>What other libraries are needed to compile/install libvirt ?</em>
|
||||
<p>Libvir requires libxenstore, which is usually provided by the xen
|
||||
packages as well as the public headers to compile against libxenstore.</p>
|
||||
</li>
|
||||
<li><em>I use the CVS version and there is no configure script</em>
|
||||
<p>The configure script (and other Makefiles) are generated. Use the
|
||||
autogen.sh script to regenerate the configure script and Makefiles,
|
||||
like:</p>
|
||||
<p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
|
||||
</li>
|
||||
</ol><h3><a name="Developer" id="Developer">Developer</a> corner</h3><ol><li><em>Troubles compiling or linking programs using libvirt</em>
|
||||
<p>To simplify the process of reusing the library, libvirt comes with
|
||||
pkgconfig support, which can be used directly from autoconf support or
|
||||
via the pkg-config command line tool, like:</p>
|
||||
<p><code>pkg-config libvirt --libs</code></p>
|
||||
</li>
|
||||
</ol></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
29
docs/Goals
@@ -1,29 +0,0 @@
|
||||
|
||||
Why libxen:
|
||||
-----------
|
||||
|
||||
|
||||
The main goals of the library is to provide an stable API abstracting
|
||||
the underlying acual implementation of the hypervisor calls.
|
||||
|
||||
1/ Stable API:
|
||||
by isolating the data structures and entry points used at the low
|
||||
level Xen Hypervisor interfaces, allowing evolution of said interface
|
||||
over time without breaking the application visible API and ABI
|
||||
|
||||
2/ Abstraction:
|
||||
by providing at the C level simplified concept exposed only as opaque
|
||||
structure for the hypervisor connection, domains and other kind of
|
||||
objects which may be needed in the future. It must also provide
|
||||
a set of higher level function calls simplifying the developement
|
||||
of applications using the supervisor.
|
||||
|
||||
3/ Maintainability and openness:
|
||||
All data structures and entry points must be fully documented, all
|
||||
changes will be driven in an open fashion based on a publicly archived
|
||||
mailing-list allowing peer-review before changes will be introduced.
|
||||
Tools and regression tests will be implemented and shipped as part of the
|
||||
releases of the library.
|
||||
|
||||
Daniel Veillard <veillard@redhat.com>
|
||||
$Date$
|
||||
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -1,70 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
SUBDIRS=examples
|
||||
|
||||
# The directory containing the source code (if it contains documentation).
|
||||
DOC_SOURCE_DIR=../src
|
||||
|
||||
PAGES= index.html bugs.html FAQ.html
|
||||
APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
|
||||
APIsymbols.html APIchunk0.html
|
||||
EXTRA_DIST= \
|
||||
libvirt-api.xml libvirt-refs.xml apibuild.py \
|
||||
*.xsl *.html *.gif html/*.html html/*.png
|
||||
|
||||
|
||||
man_MANS=
|
||||
|
||||
all: web $(top_builddir)/NEWS $(man_MANS)
|
||||
|
||||
api: libvirt-api.xml libvirt-refs.xml $(APIPAGES) $(srcdir)/html/index.html
|
||||
|
||||
web: $(PAGES)
|
||||
|
||||
$(PAGES): libvir.html site.xsl
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Rebuilding the HTML Web pages from libvir.html" ; \
|
||||
$(XSLTPROC) --nonet --html $(top_srcdir)/docs/site.xsl $(top_srcdir)/docs/libvir.html > index.html ; fi );
|
||||
-@(if [ -x $(XMLLINT) ] ; then \
|
||||
echo "Validating the HTML Web pages" ; \
|
||||
$(XMLLINT) --nonet --valid --noout $(PAGES) ; fi );
|
||||
|
||||
|
||||
$(APIPAGES): libvirt-api.xml libvirt-refs.xml $(top_srcdir)/docs/site.xsl $(top_srcdir)/docs/api.xsl
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Rebuilding the HTML API pages from libvirt-refs.xml" ; \
|
||||
$(XSLTPROC) --nonet --html $(top_srcdir)/docs/api.xsl \
|
||||
$(top_srcdir)/docs/libvir.html ; fi );
|
||||
-@(if [ -x $(XMLLINT) ] ; then \
|
||||
echo "Validating the HTML API pages" ; \
|
||||
$(XMLLINT) --nonet --valid --noout API*.html ; fi );
|
||||
|
||||
$(srcdir)/html/index.html: libvirt-api.xml $(srcdir)/newapi.xsl
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
echo "Rebuilding the HTML pages from the XML API" ; \
|
||||
$(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
|
||||
-@(if [ -x $(XMLLINT) ] ; then \
|
||||
echo "Validating the resulting XHTML pages" ; \
|
||||
$(XMLLINT) --nonet --valid --noout html/*.html ; fi );
|
||||
|
||||
libvirt-api.xml libvirt-refs.xml: apibuild.py ../include/*.h ../src/*.h ../src/*.c
|
||||
-(./apibuild.py)
|
||||
|
||||
$(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html
|
||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||
$(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html > $(top_builddir)/NEWS ; fi );
|
||||
|
||||
clean-local:
|
||||
rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
|
||||
|
||||
maintainer-clean-local: clean-local
|
||||
rm -rf libvirt-api.xml libvirt-refs.xml
|
||||
|
||||
rebuild: api all
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html $(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
|
||||
-@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
|
||||
-@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
|
||||
|
||||
4
docs/Plan
Normal file
@@ -0,0 +1,4 @@
|
||||
1/ go for a minimal library first, expand on use cases
|
||||
2/ reuse xenctrl.h / libxenctrl in a first implementation, but make
|
||||
sure to clearly isolate the bits calling them
|
||||
3/
|
||||
33
docs/analysis
Normal file
@@ -0,0 +1,33 @@
|
||||
arch/xen/kernel/evtchn.c: Communication via Xen event channels
|
||||
->HYPERVISOR_xen_version call
|
||||
->HYPERVISOR_physdev_op call
|
||||
->HYPERVISOR_event_channel_op call
|
||||
-> global HYPERVISOR_shared_info
|
||||
|
||||
arch/xen/kernel/fixup.c: binary rewrinting for threads TLS
|
||||
-> message to suppress... + boot delay
|
||||
|
||||
arch/xen/kernel/gnttab.c: memory access and sharing
|
||||
inline assemby from privcmd.c using TRAP_INSTR macro to do an hypervisor
|
||||
call apparently.
|
||||
|
||||
arch/xen/kernel/reboot.c:
|
||||
-> HYPERVISOR_suspend call
|
||||
|
||||
include/asm-xen/asm-i386/hypercall.h:
|
||||
-> assembly macro for the hypervisor calls
|
||||
|
||||
tools/libxc/xc_*.c: library for xen control
|
||||
|
||||
tools/libxc/xc_private.h:
|
||||
-> Xen hypervisor call is an ioctl() with an privcmd_hypercall_t parameter
|
||||
xc_domain.c:
|
||||
-> API for all domain supervisor calls, create, memory, cpu weight, destroy
|
||||
|
||||
=> Fraser all over the place ...
|
||||
|
||||
/Xen/xen-unstable.hg/tools/libxc
|
||||
|
||||
|
||||
The hypervisor calls are defined as inlined functions in xc_private.h
|
||||
This is GPL and not installed.
|
||||
274
docs/api.xsl
@@ -1,274 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- this stylesheet builds the API*.html , it works based on libvirt-refs.xml
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:exsl="http://exslt.org/common"
|
||||
extension-element-prefixes="exsl"
|
||||
exclude-result-prefixes="exsl">
|
||||
|
||||
<!-- Import the rest of the site stylesheets -->
|
||||
<xsl:import href="site.xsl"/>
|
||||
|
||||
<!-- Generate XHTML-1.0 transitional -->
|
||||
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:variable name="href_base" select="''"/>
|
||||
<xsl:variable name="apirefs" select="document('libvirt-refs.xml')"/>
|
||||
<xsl:variable name="module" select="$apirefs/apirefs/@name"/>
|
||||
<xsl:key name="refhref" match="reference" use="@name"/>
|
||||
|
||||
<xsl:template match="ref" mode="anchor">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:for-each select="document('libvirt-refs.xml')">
|
||||
<a href="{key('refhref', $name)/@href}"><xsl:value-of select="$name"/></a><br/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
<xsl:template match="type" mode="reflist">
|
||||
<h2>Type <xsl:value-of select="@name"/>:</h2>
|
||||
<p>
|
||||
<xsl:for-each select="ref">
|
||||
<xsl:apply-templates mode="anchor" select="."/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
</p>
|
||||
</xsl:template>
|
||||
<xsl:template match="letter" mode="reflist">
|
||||
<h2>Letter <xsl:value-of select="@name"/>:</h2>
|
||||
<p>
|
||||
<xsl:for-each select="ref">
|
||||
<xsl:apply-templates mode="anchor" select="."/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
</p>
|
||||
</xsl:template>
|
||||
<xsl:template match="file" mode="reflist">
|
||||
<h2><a name="{@name}">Module <xsl:value-of select="@name"/></a>:</h2>
|
||||
<p>
|
||||
<xsl:for-each select="ref">
|
||||
<xsl:apply-templates mode="anchor" select="."/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
</p>
|
||||
</xsl:template>
|
||||
<xsl:template match="letter" mode="wordlist">
|
||||
<h2>Letter <xsl:value-of select="@name"/>:</h2>
|
||||
<dl>
|
||||
<xsl:for-each select="word">
|
||||
<dt><xsl:value-of select="@name"/></dt>
|
||||
<dd>
|
||||
<xsl:for-each select="ref">
|
||||
<xsl:apply-templates mode="anchor" select="."/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
</dd>
|
||||
</xsl:for-each>
|
||||
</dl>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="constructors">
|
||||
<xsl:message>Generating API Constructors</xsl:message>
|
||||
<xsl:variable name="title">List of constructors for <xsl:value-of select="$module"/></xsl:variable>
|
||||
<xsl:document href="APIconstructors.html" method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments"/>
|
||||
<div id="pageHeader"/>
|
||||
<div id="content2">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates mode="reflist" select="type"/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList2"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:document>
|
||||
</xsl:template>
|
||||
<xsl:template match="files">
|
||||
<xsl:message>Generating API List of synbols per file</xsl:message>
|
||||
<xsl:variable name="title">List of Symbols per Module for <xsl:value-of select="$module"/></xsl:variable>
|
||||
<xsl:document href="APIfiles.html" method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments"/>
|
||||
<div id="pageHeader"/>
|
||||
<div id="content2">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates mode="reflist" select="file"/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList2"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:document>
|
||||
</xsl:template>
|
||||
<xsl:template match="functions">
|
||||
<xsl:message>Generating API Functions by Type</xsl:message>
|
||||
<xsl:variable name="title">List of function manipulating types in <xsl:value-of select="$module"/></xsl:variable>
|
||||
<xsl:document href="APIfunctions.html" method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments"/>
|
||||
<div id="pageHeader"/>
|
||||
<div id="content2">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates mode="reflist" select="type"/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList2"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:document>
|
||||
</xsl:template>
|
||||
<xsl:template match="alpha">
|
||||
<xsl:message>Generating API Alphabetic list</xsl:message>
|
||||
<xsl:variable name="title">Alphabetic List of Symbols in <xsl:value-of select="$module"/></xsl:variable>
|
||||
<xsl:document href="APIsymbols.html" method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments"/>
|
||||
<div id="pageHeader"/>
|
||||
<div id="content2">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates mode="reflist" select="letter"/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList2"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:document>
|
||||
</xsl:template>
|
||||
<xsl:template name="apichunks">
|
||||
<h2 align="center">
|
||||
<xsl:for-each select="/apirefs/index/chunks/chunk">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="start" select="@start"/>
|
||||
<xsl:variable name="end" select="@end"/>
|
||||
<xsl:variable name="block" select="concat($start, '-', $end)"/>
|
||||
<a href="API{$name}.html"><xsl:value-of select="$block"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
</h2>
|
||||
</xsl:template>
|
||||
<xsl:template match="chunk">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="start" select="@start"/>
|
||||
<xsl:variable name="end" select="@end"/>
|
||||
<xsl:variable name="block" select="concat($start, '-', $end)"/>
|
||||
<xsl:variable name="target" select="/apirefs/index/chunk[@name = $name]"/>
|
||||
<xsl:variable name="title">API Alphabetic Index <xsl:value-of select="$block"/> for <xsl:value-of select="$module"/></xsl:variable>
|
||||
<xsl:document href="API{$name}.html" method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments"/>
|
||||
<div id="pageHeader"/>
|
||||
<div id="content2">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="apichunks"/>
|
||||
<xsl:apply-templates mode="wordlist"
|
||||
select="$target/letter"/>
|
||||
<xsl:call-template name="apichunks"/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList2"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:document>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="index">
|
||||
<xsl:message>Generating API Index</xsl:message>
|
||||
<xsl:apply-templates select="chunks/chunk"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="apirefs">
|
||||
<xsl:message>Generating API Cross References</xsl:message>
|
||||
<xsl:apply-templates select="constructors"/>
|
||||
<xsl:apply-templates select="functions"/>
|
||||
<xsl:apply-templates select="alpha"/>
|
||||
<xsl:apply-templates select="files"/>
|
||||
<xsl:apply-templates select="index"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="$apirefs/apirefs"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
2105
docs/apibuild.py
@@ -1,87 +0,0 @@
|
||||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
1050 7500 9375 7500 9375 8700 1050 8700 1050 7500
|
||||
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
|
||||
3525 7275 3525 4125 1050 4125 1050 7275 3525 7275
|
||||
2 1 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
|
||||
1050 6540 3540 6525
|
||||
2 4 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
1590 6900 1590 6645 1140 6645 1140 6900 1590 6900
|
||||
2 4 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
1590 7185 1590 6930 1140 6930 1140 7185 1590 7185
|
||||
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 1 2
|
||||
1 1 2.00 120.00 240.00
|
||||
1 1 2.00 120.00 240.00
|
||||
1875 7725 8625 7725
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
1650 5625 3000 5625 3000 6375 1650 6375 1650 5625
|
||||
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
2850 7725 2850 6375
|
||||
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
|
||||
6450 7275 6450 4125 3975 4125 3975 7275 6450 7275
|
||||
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
|
||||
9300 7275 9300 4125 6825 4125 6825 7275 9300 7275
|
||||
2 1 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
|
||||
3975 6540 6465 6525
|
||||
2 1 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
|
||||
6825 6540 9315 6525
|
||||
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
5400 7725 5400 7050
|
||||
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
8025 7725 8025 7050
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
1050 8925 9375 8925 9375 9900 1050 9900 1050 8925
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
2100 4575 3450 4575 3450 5325 2100 5325 2100 4575
|
||||
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
3225 5325 3225 8325
|
||||
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
6225 6900 6225 8250
|
||||
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
8925 6900 8925 8250
|
||||
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
1725 7125 1725 8325
|
||||
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 1 2
|
||||
1 1 2.00 120.00 240.00
|
||||
1 1 2.00 120.00 240.00
|
||||
2850 5850 2850 5025
|
||||
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
5175 8475 5175 9375
|
||||
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
1350 7125 1350 9450
|
||||
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
|
||||
1 1 2.00 120.00 240.00
|
||||
2325 7725 2325 7200
|
||||
2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 1
|
||||
900 3975
|
||||
2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 1
|
||||
9525 9975
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 870 4350 7980 XenBus\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 780 1680 6870 drivers\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 1050 1800 6075 XenStore\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 900 1875 7125 Kernel0\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 960 4875 6975 KernelU\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 960 7650 6975 KernelU\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 255 1740 4050 8400 Xen Hypervisor\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 585 2325 4950 Xend\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 690 1200 4725 Dom0\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 750 4875 5325 DomU\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 750 7650 5325 DomU\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 1080 3750 9450 Hardware\001
|
||||
|
Before Width: | Height: | Size: 5.4 KiB |
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>libvirt architecture</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">libvirt architecture</h1><h3>This is Xen specific since this is the only hypervisor supported at the
|
||||
moment</h3><p>When running in a Xen environment, programs using libvirt have to execute
|
||||
in "Domain 0", which is the primary Linux OS loaded on the machine. That OS
|
||||
kernel provides most if not all of the actual drivers used by the set of
|
||||
domains. It also runs the Xen Store, a database of informations shared by the
|
||||
hypervisor, the kernels, the drivers and the xen daemon. Xend. The xen daemon
|
||||
supervise the control and execution of the sets of domains. The hypervisor,
|
||||
drivers, kernels and daemons communicate though a shared system bus
|
||||
implemented in the hypervisor. The figure below tries to provide a view of
|
||||
this environment:</p><img src="architecture.gif" alt="The Xen architecture" /><p>The library can be initialized in 2 ways depending on the level of
|
||||
priviledge of the embedding program. If it runs with root access,
|
||||
virConnectOpen() can be used, it will use three different ways to connect to
|
||||
the Xen infrastructure:</p><ul><li>a connection to the Xen Daemon though an HTTP RPC layer</li>
|
||||
<li>a read/write connection to the Xen Store</li>
|
||||
<li>use Xen Hypervisor calls</li>
|
||||
</ul><p>The library will usually interract with the Xen daemon for any operation
|
||||
changing the state of the system, but for performance and accuracy reasons
|
||||
may talk directly to the hypervisor when gathering state informations at
|
||||
least when possible (i.e. when the running program using libvirt has root
|
||||
priviledge access).</p><p>If it runs without root access virConnectOpenReadOnly() should be used to
|
||||
connect to initialize the library. It will try to open the read-only socket
|
||||
<code>/var/run/xenstored/socket_ro</code> to connect to the Xen Store and
|
||||
also try to use the RPC to the Xen daemon. In this case use of hypervisor
|
||||
calls and write to the Xen Store will not be possible, restraining the amount
|
||||
of APIs available and slowing down information gathering about domains.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
|
Before Width: | Height: | Size: 267 B |
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reporting bugs and getting help</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reporting bugs and getting help</h1><p>There is a mailing-list <a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a> for libvirt,
|
||||
with an <a href="https://www.redhat.com/archives/libvir-list/">on-line
|
||||
archive</a>. Please subscribe to this list before posting by visiting the <a href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a>
|
||||
page and follow the instructions. Patches with explanations and provided as
|
||||
attachments are really appreciated and will be discussed on the mailing list.
|
||||
If possible generate the patches by using cvs diff -u in a CVS checkout.</p><p>We expect to use <a href="https://bugzilla.redhat.com/">Red Hat
|
||||
Bugzilla</a> to track bugs for libvirt, though there isn't a libvirt software
|
||||
module defined yet, in the meantime use the mailing-list, thanks !.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Downloads</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Downloads</h1><p>The latest versions of libvirt can be found on the <a href="ftp://libvirt.org/libvirt/">libvirt.org</a> server ( <a href="http://libvirt.org/sources/">HTTP</a>, <a href="ftp://libvirt.org/libvirt/">FTP</a>). You will find there the released
|
||||
versions as well as <a href="http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz">snapshot
|
||||
tarballs</a> updated from CVS head every hour</p><p>Anonymous <a href="http://ximbiot.com/cvs/cvshome/docs/">CVS</a> is also
|
||||
available, first register onto the server:</p><p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs login</code></p><p>it will request a password, enter <strong>anoncvs</strong>. Then you can
|
||||
checkout the development tree with:</p><p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co libvirt</code></p><p>Use ./autogen.sh to configure the local checkout, then <code>make</code>
|
||||
and <code>make install</code>, as usual. All normal cvs commands are now
|
||||
available except commiting to the base.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,34 +0,0 @@
|
||||
# Beware this is autogenerated by index.py
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
|
||||
DEPS = $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(top_builddir)/src/libvirt.la
|
||||
|
||||
rebuild: examples.xml index.html
|
||||
|
||||
examples.xml: index.py *.c
|
||||
-@($(srcdir)/index.py)
|
||||
|
||||
index.html: examples.xml examples.xsl
|
||||
-@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
|
||||
|
||||
EXTRA_DIST=examples.xsl index.py examples.xml
|
||||
|
||||
noinst_PROGRAMS=info1
|
||||
|
||||
info1_SOURCES=info1.c
|
||||
info1_LDFLAGS=
|
||||
info1_DEPENDENCIES= $(DEPS)
|
||||
info1_LDADD= $(LDADDS)
|
||||
|
||||
valgrind:
|
||||
$(MAKE) CHECKER='valgrind' tests
|
||||
|
||||
tests: $(noinst_PROGRAMS)
|
||||
@(echo '## examples regression tests')
|
||||
@($(CHECKER) ./info1)
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
<examples>
|
||||
<example filename='info1.c'>
|
||||
<synopsis>Extract informations about Xen domain 0</synopsis>
|
||||
<purpose>Demonstrate the basic use of the library to connect to the hypervisor and extract domain informations.</purpose>
|
||||
<usage>info1</usage>
|
||||
<test>info1</test>
|
||||
<author>Daniel Veillard</author>
|
||||
<copy>see Copyright for the status of this software. </copy>
|
||||
<section>Informations</section>
|
||||
<includes>
|
||||
</includes>
|
||||
<uses>
|
||||
<function line='43' file='libvirt' name='virDomainGetInfo'/>
|
||||
<function line='53' file='libvirt' name='virDomainFree'/>
|
||||
<function line='36' file='libvirt' name='virDomainLookupByID'/>
|
||||
<function line='55' file='libvirt' name='virConnectClose'/>
|
||||
<struct line='25' file='libvirt' name='virDomainInfo'/>
|
||||
<function line='29' file='libvirt' name='virConnectOpenReadOnly'/>
|
||||
</uses>
|
||||
</example>
|
||||
<symbols>
|
||||
<symbol name='virConnectClose'>
|
||||
<ref filename='info1.c'/>
|
||||
</symbol>
|
||||
<symbol name='virConnectOpenReadOnly'>
|
||||
<ref filename='info1.c'/>
|
||||
</symbol>
|
||||
<symbol name='virDomainFree'>
|
||||
<ref filename='info1.c'/>
|
||||
</symbol>
|
||||
<symbol name='virDomainGetInfo'>
|
||||
<ref filename='info1.c'/>
|
||||
</symbol>
|
||||
<symbol name='virDomainInfo'>
|
||||
<ref filename='info1.c'/>
|
||||
</symbol>
|
||||
<symbol name='virDomainLookupByID'>
|
||||
<ref filename='info1.c'/>
|
||||
</symbol>
|
||||
</symbols>
|
||||
<sections>
|
||||
<section name='Informations'>
|
||||
<example filename='info1.c'/>
|
||||
</section>
|
||||
</sections>
|
||||
</examples>
|
||||
@@ -1,174 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:exsl="http://exslt.org/common"
|
||||
extension-element-prefixes="exsl"
|
||||
exclude-result-prefixes="exsl">
|
||||
|
||||
<xsl:import href="../site.xsl"/>
|
||||
|
||||
<xsl:variable name="href_base">../</xsl:variable>
|
||||
<xsl:variable name="menu_name">Examples Menu</xsl:variable>
|
||||
|
||||
<xsl:variable name="toc">
|
||||
<form action="../search.php"
|
||||
enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="20" value=""/>
|
||||
<input name="submit" type="submit" value="Search ..."/>
|
||||
</form>
|
||||
<ul><!-- style="margin-left: -1em" -->
|
||||
<li><a href="{$href_base}index.html">Home</a></li>
|
||||
<li><a style="font-weight:bold"
|
||||
href="{$href_base}docs.html">Developer Menu</a></li>
|
||||
<li><a style="font-weight:bold"
|
||||
href="{$href_base}html/index.html">API Menu</a></li>
|
||||
<xsl:for-each select="/examples/sections/section">
|
||||
<li><a href="#{@name}"><xsl:value-of select="@name"/> Examples</a></li>
|
||||
</xsl:for-each>
|
||||
<li><a href="{$href_base}guidelines.html">XML Guidelines</a></li>
|
||||
</ul>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:template match="include">
|
||||
<xsl:variable name="header" select="substring-before(substring-after(., '/'), '>')"/>
|
||||
<xsl:variable name="doc" select="concat('../html/libxml-', $header, 'tml')"/>
|
||||
<li><a href="{$doc}"><xsl:value-of select="."/></a></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="typedef">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="header" select="concat(@file, '.h')"/>
|
||||
<xsl:variable name="doc" select="concat('../html/libxml-', @file, '.html#', $name)"/>
|
||||
<li> line <xsl:value-of select="@line"/>: Type <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="function">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="header" select="concat(@file, '.h')"/>
|
||||
<xsl:variable name="doc" select="concat('../html/libxml-', @file, '.html#', $name)"/>
|
||||
<li> line <xsl:value-of select="@line"/>: Function <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="macro">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="header" select="concat(@file, '.h')"/>
|
||||
<xsl:variable name="doc" select="concat('../html/libxml-', @file, '.html#', $name)"/>
|
||||
<li> line <xsl:value-of select="@line"/>: Macro <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="example">
|
||||
<xsl:variable name="filename" select="string(@filename)"/>
|
||||
<h3><a name="{$filename}" href="{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="synopsis"/></h3>
|
||||
<p><xsl:value-of select="purpose"/></p>
|
||||
<p>Includes:</p>
|
||||
<ul>
|
||||
<xsl:for-each select="includes/include">
|
||||
<xsl:apply-templates select='.'/>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<p>Uses:</p>
|
||||
<ul>
|
||||
<xsl:for-each select="uses/*">
|
||||
<xsl:sort select="@line" data-type="number"/>
|
||||
<xsl:apply-templates select='.'/>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<p>Usage:</p>
|
||||
<p><xsl:value-of select="usage"/></p>
|
||||
<p>Author: <xsl:value-of select="author"/></p>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="section">
|
||||
<li><p> <a href="#{@name}"><xsl:value-of select="@name"/></a> :</p>
|
||||
<ul>
|
||||
<xsl:for-each select="example">
|
||||
<xsl:sort select='.'/>
|
||||
<xsl:variable name="filename" select="@filename"/>
|
||||
<li> <a href="#{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="/examples/example[@filename = $filename]/synopsis"/></li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sections">
|
||||
<p> The examples are stored per section depending on the main focus
|
||||
of the example:</p>
|
||||
<ul>
|
||||
<xsl:for-each select="section">
|
||||
<xsl:sort select='.'/>
|
||||
<xsl:apply-templates select='.'/>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<p> Getting the compilation options and libraries dependancies needed
|
||||
to generate binaries from the examples is best done on Linux/Unix by using
|
||||
the xml2-config script which should have been installed as part of <i>make
|
||||
install</i> step or when installing the libxml2 development package:</p>
|
||||
<pre>gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`</pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="sections-list">
|
||||
<xsl:for-each select="sections/section">
|
||||
<xsl:variable name="section" select="@name"/>
|
||||
<h2> <a name="{$section}"></a><xsl:value-of select="$section"/> Examples</h2>
|
||||
<xsl:apply-templates select='/examples/example[section = $section]'/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="examples">
|
||||
<xsl:variable name="title">Libxml2 set of examples</xsl:variable>
|
||||
<xsl:document href="index.html" method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
|
||||
<tr>
|
||||
<td bgcolor="#8b7765">
|
||||
<table border="0" cellspacing="0" cellpadding="2" width="100%">
|
||||
<tr>
|
||||
<td valign="top" width="200" bgcolor="#8b7765">
|
||||
<xsl:call-template name="toc"/>
|
||||
</td>
|
||||
<td valign="top" bgcolor="#8b7765">
|
||||
<table border="0" cellspacing="0" cellpadding="1" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" cellpadding="3" cellspacing="1" width="100%">
|
||||
<tr>
|
||||
<td bgcolor="#fffacd">
|
||||
<xsl:apply-templates select="sections"/>
|
||||
<xsl:call-template name="sections-list"/>
|
||||
<p><a href="../bugs.html">Daniel Veillard</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:document>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -1,298 +0,0 @@
|
||||
#!/usr/bin/python -u
|
||||
#
|
||||
# Indexes the examples and build an XML description
|
||||
#
|
||||
import string
|
||||
import glob
|
||||
import sys
|
||||
try:
|
||||
import libxml2
|
||||
except:
|
||||
sys.exit(1)
|
||||
sys.path.insert(0, "..")
|
||||
from apibuild import CParser, escape
|
||||
|
||||
examples = []
|
||||
extras = ['examples.xsl', 'index.py']
|
||||
tests = []
|
||||
sections = {}
|
||||
symbols = {}
|
||||
api_dict = None
|
||||
api_doc = None
|
||||
|
||||
def load_api():
|
||||
global api_dict
|
||||
global api_doc
|
||||
|
||||
if api_dict != None:
|
||||
return
|
||||
api_dict = {}
|
||||
try:
|
||||
print "loading ../libvirt-api.xml"
|
||||
api_doc = libxml2.parseFile("../libvirt-api.xml")
|
||||
except:
|
||||
print "failed to parse ../libvirt-api.xml"
|
||||
sys.exit(1)
|
||||
|
||||
def find_symbol(name):
|
||||
global api_dict
|
||||
global api_doc
|
||||
|
||||
if api_doc == None:
|
||||
load_api()
|
||||
|
||||
if name == None:
|
||||
return
|
||||
if api_dict.has_key(name):
|
||||
return api_dict[name]
|
||||
ctxt = api_doc.xpathNewContext()
|
||||
res = ctxt.xpathEval("/api/symbols/*[@name = '%s']" % (name))
|
||||
if type(res) == type([]) and len(res) >= 1:
|
||||
if len(res) > 1:
|
||||
print "Found %d references to %s in the API" % (len(res), name)
|
||||
node = res[0]
|
||||
typ = node.name
|
||||
file = node.xpathEval("string(@file)")
|
||||
info = node.xpathEval("string(info)")
|
||||
else:
|
||||
print "Reference %s not found in the API" % (name)
|
||||
return None
|
||||
ret = (typ, file, info)
|
||||
api_dict[name] = ret
|
||||
return ret
|
||||
|
||||
def parse_top_comment(filename, comment):
|
||||
res = {}
|
||||
lines = string.split(comment, "\n")
|
||||
item = None
|
||||
for line in lines:
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
while line != "" and line[0] == '*':
|
||||
line = line[1:]
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
try:
|
||||
(it, line) = string.split(line, ":", 1)
|
||||
item = it
|
||||
while line != "" and (line[0] == ' ' or line[0] == '\t'):
|
||||
line = line[1:]
|
||||
if res.has_key(item):
|
||||
res[item] = res[item] + " " + line
|
||||
else:
|
||||
res[item] = line
|
||||
except:
|
||||
if item != None:
|
||||
if res.has_key(item):
|
||||
res[item] = res[item] + " " + line
|
||||
else:
|
||||
res[item] = line
|
||||
return res
|
||||
|
||||
def parse(filename, output):
|
||||
global symbols
|
||||
global sections
|
||||
|
||||
parser = CParser(filename)
|
||||
parser.collect_references()
|
||||
idx = parser.parse()
|
||||
info = parse_top_comment(filename, parser.top_comment)
|
||||
output.write(" <example filename='%s'>\n" % filename)
|
||||
try:
|
||||
synopsis = info['synopsis']
|
||||
output.write(" <synopsis>%s</synopsis>\n" % escape(synopsis));
|
||||
except:
|
||||
print "Example %s lacks a synopsis description" % (filename)
|
||||
try:
|
||||
purpose = info['purpose']
|
||||
output.write(" <purpose>%s</purpose>\n" % escape(purpose));
|
||||
except:
|
||||
print "Example %s lacks a purpose description" % (filename)
|
||||
try:
|
||||
usage = info['usage']
|
||||
output.write(" <usage>%s</usage>\n" % escape(usage));
|
||||
except:
|
||||
print "Example %s lacks an usage description" % (filename)
|
||||
try:
|
||||
test = info['test']
|
||||
output.write(" <test>%s</test>\n" % escape(test));
|
||||
progname=filename[0:-2]
|
||||
command=string.replace(test, progname, './' + progname, 1)
|
||||
tests.append(command)
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
author = info['author']
|
||||
output.write(" <author>%s</author>\n" % escape(author));
|
||||
except:
|
||||
print "Example %s lacks an author description" % (filename)
|
||||
try:
|
||||
copy = info['copy']
|
||||
output.write(" <copy>%s</copy>\n" % escape(copy));
|
||||
except:
|
||||
print "Example %s lacks a copyright description" % (filename)
|
||||
try:
|
||||
section = info['section']
|
||||
output.write(" <section>%s</section>\n" % escape(section));
|
||||
if sections.has_key(section):
|
||||
sections[section].append(filename)
|
||||
else:
|
||||
sections[section] = [filename]
|
||||
except:
|
||||
print "Example %s lacks a section description" % (filename)
|
||||
for topic in info.keys():
|
||||
if topic != "purpose" and topic != "usage" and \
|
||||
topic != "author" and topic != "copy" and \
|
||||
topic != "section" and topic != "synopsis" and topic != "test":
|
||||
str = info[topic]
|
||||
output.write(" <extra topic='%s'>%s</extra>\n" % (
|
||||
escape(topic), escape(str)))
|
||||
output.write(" <includes>\n")
|
||||
for include in idx.includes.keys():
|
||||
if include.find("libxml") != -1:
|
||||
output.write(" <include>%s</include>\n" % (escape(include)))
|
||||
output.write(" </includes>\n")
|
||||
output.write(" <uses>\n")
|
||||
for ref in idx.references.keys():
|
||||
id = idx.references[ref]
|
||||
name = id.get_name()
|
||||
line = id.get_lineno()
|
||||
if symbols.has_key(name):
|
||||
sinfo = symbols[name]
|
||||
refs = sinfo[0]
|
||||
# gather at most 5 references per symbols
|
||||
if refs > 5:
|
||||
continue
|
||||
sinfo.append(filename)
|
||||
sinfo[0] = refs + 1
|
||||
else:
|
||||
symbols[name] = [1, filename]
|
||||
info = find_symbol(name)
|
||||
if info != None:
|
||||
type = info[0]
|
||||
file = info[1]
|
||||
output.write(" <%s line='%d' file='%s' name='%s'/>\n" % (type,
|
||||
line, file, name))
|
||||
else:
|
||||
type = id.get_type()
|
||||
output.write(" <%s line='%d' name='%s'/>\n" % (type,
|
||||
line, name))
|
||||
|
||||
output.write(" </uses>\n")
|
||||
output.write(" </example>\n")
|
||||
|
||||
return idx
|
||||
|
||||
def dump_symbols(output):
|
||||
global symbols
|
||||
|
||||
output.write(" <symbols>\n")
|
||||
keys = symbols.keys()
|
||||
keys.sort()
|
||||
for symbol in keys:
|
||||
output.write(" <symbol name='%s'>\n" % (symbol))
|
||||
info = symbols[symbol]
|
||||
i = 1
|
||||
while i < len(info):
|
||||
output.write(" <ref filename='%s'/>\n" % (info[i]))
|
||||
i = i + 1
|
||||
output.write(" </symbol>\n")
|
||||
output.write(" </symbols>\n")
|
||||
|
||||
def dump_sections(output):
|
||||
global sections
|
||||
|
||||
output.write(" <sections>\n")
|
||||
keys = sections.keys()
|
||||
keys.sort()
|
||||
for section in keys:
|
||||
output.write(" <section name='%s'>\n" % (section))
|
||||
info = sections[section]
|
||||
i = 0
|
||||
while i < len(info):
|
||||
output.write(" <example filename='%s'/>\n" % (info[i]))
|
||||
i = i + 1
|
||||
output.write(" </section>\n")
|
||||
output.write(" </sections>\n")
|
||||
|
||||
def dump_Makefile():
|
||||
for file in glob.glob('*.xml'):
|
||||
extras.append(file)
|
||||
for file in glob.glob('*.res'):
|
||||
extras.append(file)
|
||||
Makefile="""# Beware this is autogenerated by index.py
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
|
||||
DEPS = $(top_builddir)/src/libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ $(top_builddir)/src/libvirt.la
|
||||
|
||||
rebuild: examples.xml index.html
|
||||
|
||||
examples.xml: index.py *.c
|
||||
-@($(srcdir)/index.py)
|
||||
|
||||
index.html: examples.xml examples.xsl
|
||||
-@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html)
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
|
||||
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml $(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
|
||||
|
||||
"""
|
||||
EXTRA_DIST=""
|
||||
for extra in extras:
|
||||
EXTRA_DIST = EXTRA_DIST + extra + " "
|
||||
Makefile = Makefile + "EXTRA_DIST=%s\n\n" % (EXTRA_DIST)
|
||||
noinst_PROGRAMS=""
|
||||
for example in examples:
|
||||
noinst_PROGRAMS = noinst_PROGRAMS + example + " "
|
||||
Makefile = Makefile + "noinst_PROGRAMS=%s\n\n" % (noinst_PROGRAMS)
|
||||
for example in examples:
|
||||
Makefile = Makefile + "%s_SOURCES=%s.c\n%s_LDFLAGS=\n%s_DEPENDENCIES= $(DEPS)\n%s_LDADD= $(LDADDS)\n\n" % (example, example, example,
|
||||
example, example)
|
||||
Makefile = Makefile + "valgrind: \n\t$(MAKE) CHECKER='valgrind' tests\n\n"
|
||||
Makefile = Makefile + "tests: $(noinst_PROGRAMS)\n"
|
||||
Makefile = Makefile + "\t@(echo '## examples regression tests')\n"
|
||||
# Makefile = Makefile + "\t@(echo > .memdump)\n"
|
||||
for test in tests:
|
||||
Makefile = Makefile + "\t@($(CHECKER) %s)\n" % (test)
|
||||
# Makefile = Makefile + '\t@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)\n'
|
||||
Makefile = Makefile + "\n\n"
|
||||
try:
|
||||
old = open("Makefile.am", "r").read()
|
||||
if old != Makefile:
|
||||
n = open("Makefile.am", "w").write(Makefile)
|
||||
print "Updated Makefile.am"
|
||||
except:
|
||||
print "Failed to read or save Makefile.am"
|
||||
#
|
||||
# Autogenerate the .cvsignore too ...
|
||||
#
|
||||
ignore = """.memdump
|
||||
Makefile.in
|
||||
Makefile
|
||||
"""
|
||||
for example in examples:
|
||||
ignore = ignore + "%s\n" % (example)
|
||||
try:
|
||||
old = open(".cvsignore", "r").read()
|
||||
if old != ignore:
|
||||
n = open(".cvsignore", "w").write(ignore)
|
||||
print "Updated .cvsignore"
|
||||
except:
|
||||
print "Failed to read or save .cvsignore"
|
||||
|
||||
if __name__ == "__main__":
|
||||
load_api()
|
||||
output = open("examples.xml", "w")
|
||||
output.write("<examples>\n")
|
||||
|
||||
for file in glob.glob('*.c'):
|
||||
parse(file, output)
|
||||
examples.append(file[:-2])
|
||||
|
||||
dump_symbols(output)
|
||||
dump_sections(output)
|
||||
output.write("</examples>\n")
|
||||
output.close()
|
||||
dump_Makefile()
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
/**
|
||||
* section: Informations
|
||||
* synopsis: Extract informations about Xen domain 0
|
||||
* purpose: Demonstrate the basic use of the library to connect to the
|
||||
* hypervisor and extract domain informations.
|
||||
* usage: info1
|
||||
* test: info1
|
||||
* author: Daniel Veillard
|
||||
* copy: see Copyright for the status of this software.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libvirt.h>
|
||||
|
||||
/**
|
||||
* getDomainInfo:
|
||||
* @id: the id of the domain
|
||||
*
|
||||
* extract the domain 0 informations
|
||||
*/
|
||||
static void
|
||||
getDomainInfo(int id) {
|
||||
virConnectPtr conn = NULL; /* the hypervisor connection */
|
||||
virDomainPtr dom = NULL; /* the domain being checked */
|
||||
virDomainInfo info; /* the informations being fetched */
|
||||
int ret;
|
||||
|
||||
/* NULL means connect to local Xen hypervisor */
|
||||
conn = virConnectOpenReadOnly(NULL);
|
||||
if (conn == NULL) {
|
||||
fprintf(stderr, "Failed to connect to hypervisor\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Find the domain of the given id */
|
||||
dom = virDomainLookupByID(conn, id);
|
||||
if (dom == NULL) {
|
||||
fprintf(stderr, "Failed to find Domain %d\n", id);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Get the informations */
|
||||
ret = virDomainGetInfo(dom, &info);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "Failed to get informations for Domain %d\n", id);
|
||||
goto error;
|
||||
}
|
||||
|
||||
printf("Domains %d: %d CPUs\n", id, info.nrVirtCpu);
|
||||
|
||||
error:
|
||||
if (dom != NULL)
|
||||
virDomainFree(dom);
|
||||
if (conn != NULL)
|
||||
virConnectClose(conn);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
getDomainInfo(0);
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
|
Before Width: | Height: | Size: 654 B |
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
|
Before Width: | Height: | Size: 459 B |
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvir.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvir</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvir</h1><h2>Table of Contents</h2><ul><li><a href="libvir-libvir.html">libvir</a>: core interfaces for the libvir library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,141 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvir.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Module libvir from libvir</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Module libvir from libvir</h1><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The virtualization API</a></th></tr></table><p>Provides the interfaces of the libvir library to handle Xen domains from a process running in domain 0 </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a></pre><pre class="programlisting">Structure <a href="#virConnect">virConnect</a><br />struct _virConnect
|
||||
The content of this structure is not made public by the API.
|
||||
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virConnect">virConnect</a> * <a name="virConnectPtr" id="virConnectPtr">virConnectPtr</a>
|
||||
</pre><pre class="programlisting">Enum <a href="#virDeviceMode">virDeviceMode</a>
|
||||
</pre><pre class="programlisting">Structure <a href="#virDomain">virDomain</a><br />struct _virDomain
|
||||
The content of this structure is not made public by the API.
|
||||
</pre><pre class="programlisting">Enum <a href="#virDomainCreateFlags">virDomainCreateFlags</a>
|
||||
</pre><pre class="programlisting">Structure <a href="#virDomainInfo">virDomainInfo</a><br />struct _virDomainInfo
|
||||
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virDomainInfo">virDomainInfo</a> * <a name="virDomainInfoPtr" id="virDomainInfoPtr">virDomainInfoPtr</a>
|
||||
</pre><pre class="programlisting">Structure <a href="#virDomainKernel">virDomainKernel</a><br />struct _virDomainKernel
|
||||
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virDomainKernel">virDomainKernel</a> * <a name="virDomainKernelPtr" id="virDomainKernelPtr">virDomainKernelPtr</a>
|
||||
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virDomain">virDomain</a> * <a name="virDomainPtr" id="virDomainPtr">virDomainPtr</a>
|
||||
</pre><pre class="programlisting">Enum <a href="#virDomainRestart">virDomainRestart</a>
|
||||
</pre><pre class="programlisting">Enum <a href="#virDomainState">virDomainState</a>
|
||||
</pre><pre class="programlisting">int <a href="#virConnectClose">virConnectClose</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)</pre>
|
||||
<pre class="programlisting">const char * <a href="#virConnectGetType">virConnectGetType</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)</pre>
|
||||
<pre class="programlisting">int <a href="#virConnectGetVersion">virConnectGetVersion</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)</pre>
|
||||
<pre class="programlisting">int <a href="#virConnectListDomains">virConnectListDomains</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)</pre>
|
||||
<pre class="programlisting">int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)</pre>
|
||||
<pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name)</pre>
|
||||
<pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpenReadOnly">virConnectOpenReadOnly</a> (const char * name)</pre>
|
||||
<pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateLinux">virDomainCreateLinux</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * kernel_path, <br /> const char * initrd_path, <br /> const char * cmdline, <br /> unsigned long memory, <br /> unsigned int flags)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainDestroy">virDomainDestroy</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainFree">virDomainFree</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">unsigned int <a href="#virDomainGetID">virDomainGetID</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainGetInfo">virDomainGetInfo</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvir-libvir.html#virDomainInfoPtr">virDomainInfoPtr</a> info)</pre>
|
||||
<pre class="programlisting">unsigned long <a href="#virDomainGetMaxMemory">virDomainGetMaxMemory</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">char * <a href="#virDomainGetOSType">virDomainGetOSType</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">char * <a href="#virDomainGetXMLDesc">virDomainGetXMLDesc</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)</pre>
|
||||
<pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByID">virDomainLookupByID</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)</pre>
|
||||
<pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByName">virDomainLookupByName</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainRestore">virDomainRestore</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainResume">virDomainResume</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainSave">virDomainSave</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainShutdown">virDomainShutdown</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainSuspend">virDomainSuspend</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virGetVersion">virGetVersion</a> (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)</pre>
|
||||
<h2>Description</h2>
|
||||
<h3><a name="LIBVIR_VERSION_NUMBER" id="LIBVIR_VERSION_NUMBER"></a>Macro: LIBVIR_VERSION_NUMBER</h3><pre>#define LIBVIR_VERSION_NUMBER</pre><p>Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro</p>
|
||||
<h3><a name="virConnect" id="virConnect">Structure virConnect</a></h3><pre class="programlisting">Structure virConnect<br />struct _virConnect {
|
||||
The content of this structure is not made public by the API.
|
||||
}</pre>
|
||||
a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.
|
||||
<h3>Enum <a name="virDeviceMode" id="virDeviceMode">virDeviceMode</a></h3><pre class="programlisting">Enum virDeviceMode {
|
||||
<a name="VIR_DEVICE_DEFAULT" id="VIR_DEVICE_DEFAULT">VIR_DEVICE_DEFAULT</a> = 0 : Default mode
|
||||
<a name="VIR_DEVICE_RO" id="VIR_DEVICE_RO">VIR_DEVICE_RO</a> = 1 : Access read-only
|
||||
<a name="VIR_DEVICE_RW" id="VIR_DEVICE_RW">VIR_DEVICE_RW</a> = 2 : Access read-write
|
||||
<a name="VIR_DEVICE_RW_FORCE" id="VIR_DEVICE_RW_FORCE">VIR_DEVICE_RW_FORCE</a> = 3 : Forced read-write even if already used
|
||||
}
|
||||
</pre><h3><a name="virDomain" id="virDomain">Structure virDomain</a></h3><pre class="programlisting">Structure virDomain<br />struct _virDomain {
|
||||
The content of this structure is not made public by the API.
|
||||
}</pre><h3>Enum <a name="virDomainCreateFlags" id="virDomainCreateFlags">virDomainCreateFlags</a></h3><pre class="programlisting">Enum virDomainCreateFlags {
|
||||
<a name="VIR_DOMAIN_NONE" id="VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a> = 0
|
||||
}
|
||||
</pre><h3><a name="virDomainInfo" id="virDomainInfo">Structure virDomainInfo</a></h3><pre class="programlisting">Structure virDomainInfo<br />struct _virDomainInfo {
|
||||
unsigned char state : the running state, one of virDomainFlag
|
||||
unsigned long maxMem : the maximum memory in KBytes allowed
|
||||
unsigned long memory : the memory in KBytes used by the domain
|
||||
unsigned short nrVirtCpu : * Informations below are only available
|
||||
unsigned long long cpuTime : * TODO: * - check what can be extracted
|
||||
}</pre>
|
||||
a virDomainInfoPtr is a pointer to a virDomainInfo structure.
|
||||
<h3><a name="virDomainKernel" id="virDomainKernel">Structure virDomainKernel</a></h3><pre class="programlisting">Structure virDomainKernel<br />struct _virDomainKernel {
|
||||
const char * kernel : filename pointing to the kernel image
|
||||
const char * ramdisk : an optional init ramdisk
|
||||
const char * root : an optional root block device
|
||||
const char * extra : optional kernel command line parameters
|
||||
}</pre>
|
||||
a virDomainKernelPtr is a pointer to a virDomainKernel structure.
|
||||
|
||||
a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a Xen domain in the API.
|
||||
<h3>Enum <a name="virDomainRestart" id="virDomainRestart">virDomainRestart</a></h3><pre class="programlisting">Enum virDomainRestart {
|
||||
<a name="VIR_DOMAIN_DESTROY" id="VIR_DOMAIN_DESTROY">VIR_DOMAIN_DESTROY</a> = 1 : destroy the domain
|
||||
<a name="VIR_DOMAIN_RESTART" id="VIR_DOMAIN_RESTART">VIR_DOMAIN_RESTART</a> = 2 : restart the domain
|
||||
<a name="VIR_DOMAIN_PRESERVE" id="VIR_DOMAIN_PRESERVE">VIR_DOMAIN_PRESERVE</a> = 3 : keep as is, need manual destroy, for debug
|
||||
<a name="VIR_DOMAIN_RENAME_RESTART" id="VIR_DOMAIN_RENAME_RESTART">VIR_DOMAIN_RENAME_RESTART</a> = 4 : restart under an new unique name
|
||||
}
|
||||
</pre><h3>Enum <a name="virDomainState" id="virDomainState">virDomainState</a></h3><pre class="programlisting">Enum virDomainState {
|
||||
<a name="VIR_DOMAIN_NOSTATE" id="VIR_DOMAIN_NOSTATE">VIR_DOMAIN_NOSTATE</a> = 0 : no state
|
||||
<a name="VIR_DOMAIN_RUNNING" id="VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a> = 1 : the domain is running
|
||||
<a name="VIR_DOMAIN_BLOCKED" id="VIR_DOMAIN_BLOCKED">VIR_DOMAIN_BLOCKED</a> = 2 : the domain is blocked on resource
|
||||
<a name="VIR_DOMAIN_PAUSED" id="VIR_DOMAIN_PAUSED">VIR_DOMAIN_PAUSED</a> = 3 : the domain is paused by user
|
||||
<a name="VIR_DOMAIN_SHUTDOWN" id="VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a> = 4 : the domain is being shut down
|
||||
<a name="VIR_DOMAIN_SHUTOFF" id="VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a> = 5 : the domain is shut off
|
||||
<a name="VIR_DOMAIN_CRASHED" id="VIR_DOMAIN_CRASHED">VIR_DOMAIN_CRASHED</a> = 6 : the domain is crashed
|
||||
}
|
||||
</pre><h3><a name="virConnectClose" id="virConnectClose"></a>Function: virConnectClose</h3><pre class="programlisting">int virConnectClose (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConnectGetType" id="virConnectGetType"></a>Function: virConnectGetType</h3><pre class="programlisting">const char * virConnectGetType (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Get the name of the Hypervisor software used.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a static zero terminated string otherwise.</td></tr></tbody></table></div><h3><a name="virConnectGetVersion" id="virConnectGetVersion"></a>Function: virConnectGetVersion</h3><pre class="programlisting">int virConnectGetVersion (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)<br />
|
||||
</pre><p>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>hvVer</tt></i>:</span></td><td>return value for the version of the running hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release</td></tr></tbody></table></div><h3><a name="virConnectListDomains" id="virConnectListDomains"></a>Function: virConnectListDomains</h3><pre class="programlisting">int virConnectListDomains (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)<br />
|
||||
</pre><p>Collect the list of active domains, and store their ID in @maxids</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><span class="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDomains" id="virConnectNumOfDomains"></a>Function: virConnectNumOfDomains</h3><pre class="programlisting">int virConnectNumOfDomains (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of active domains.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpen" id="virConnectOpen"></a>Function: virConnectOpen</h3><pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> virConnectOpen (const char * name)<br />
|
||||
</pre><p>This function should be called first to get a connection to the Hypervisor and xen store</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpenReadOnly" id="virConnectOpenReadOnly"></a>Function: virConnectOpenReadOnly</h3><pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> virConnectOpenReadOnly (const char * name)<br />
|
||||
</pre><p>This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virDomainCreateLinux" id="virDomainCreateLinux"></a>Function: virDomainCreateLinux</h3><pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> virDomainCreateLinux (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * kernel_path, <br /> const char * initrd_path, <br /> const char * cmdline, <br /> unsigned long memory, <br /> unsigned int flags)<br />
|
||||
</pre><p>Launch a new Linux guest domain, unimplemented yet, API to be defined. This would function requires priviledged access to the hypervisor.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>kernel_path</tt></i>:</span></td><td>the file path to the kernel image</td></tr><tr><td><span class="term"><i><tt>initrd_path</tt></i>:</span></td><td>an optional file path to an initrd</td></tr><tr><td><span class="term"><i><tt>cmdline</tt></i>:</span></td><td>optional command line parameters for the kernel</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>an optional set of virDomainFlags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainDestroy" id="virDomainDestroy"></a>Function: virDomainDestroy</h3><pre class="programlisting">int virDomainDestroy (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainFree" id="virDomainFree"></a>Function: virDomainFree</h3><pre class="programlisting">int virDomainFree (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetID" id="virDomainGetID"></a>Function: virDomainGetID</h3><pre class="programlisting">unsigned int virDomainGetID (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Get the hypervisor ID number for the domain</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the domain ID number or (unsigned int) -1 in case of error</td></tr></tbody></table></div><h3><a name="virDomainGetInfo" id="virDomainGetInfo"></a>Function: virDomainGetInfo</h3><pre class="programlisting">int virDomainGetInfo (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvir-libvir.html#virDomainInfoPtr">virDomainInfoPtr</a> info)<br />
|
||||
</pre><p>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <a href="libvir-libvir.html#virDomainInfo">virDomainInfo</a> structure allocated by the user</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetMaxMemory" id="virDomainGetMaxMemory"></a>Function: virDomainGetMaxMemory</h3><pre class="programlisting">unsigned long virDomainGetMaxMemory (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the memory size in kilobytes or 0 in case of error.</td></tr></tbody></table></div><h3><a name="virDomainGetName" id="virDomainGetName"></a>Function: virDomainGetName</h3><pre class="programlisting">const char * virDomainGetName (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Get the public name for that domain</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.</td></tr></tbody></table></div><h3><a name="virDomainGetOSType" id="virDomainGetOSType"></a>Function: virDomainGetOSType</h3><pre class="programlisting">char * virDomainGetOSType (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Get the type of domain operation system.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL in case of error</td></tr></tbody></table></div><h3><a name="virDomainGetXMLDesc" id="virDomainGetXMLDesc"></a>Function: virDomainGetXMLDesc</h3><pre class="programlisting">char * virDomainGetXMLDesc (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)<br />
|
||||
</pre><p>Provide an XML description of the domain. NOTE: this API is subject to changes.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virDomainLookupByID" id="virDomainLookupByID"></a>Function: virDomainLookupByID</h3><pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> virDomainLookupByID (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)<br />
|
||||
</pre><p>Try to find a domain based on the hypervisor ID number</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>id</tt></i>:</span></td><td>the domain ID number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainLookupByName" id="virDomainLookupByName"></a>Function: virDomainLookupByName</h3><pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> virDomainLookupByName (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
|
||||
</pre><p>Try to lookup a domain on the given hypervisor based on its name.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainRestore" id="virDomainRestore"></a>Function: virDomainRestore</h3><pre class="programlisting">int virDomainRestore (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)<br />
|
||||
</pre><p>This method will restore a domain saved to disk by virDomainSave().</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>path to the</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainResume" id="virDomainResume"></a>Function: virDomainResume</h3><pre class="programlisting">int virDomainResume (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSave" id="virDomainSave"></a>Function: virDomainSave</h3><pre class="programlisting">int virDomainSave (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)<br />
|
||||
</pre><p>This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>path for the output file</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSetMaxMemory" id="virDomainSetMaxMemory"></a>Function: virDomainSetMaxMemory</h3><pre class="programlisting">int virDomainSetMaxMemory (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)<br />
|
||||
</pre><p>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainShutdown" id="virDomainShutdown"></a>Function: virDomainShutdown</h3><pre class="programlisting">int virDomainShutdown (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. Note that the guest OS may ignore the request. TODO: should we add an option for reboot, knowing it may not be doable in the general case ?</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSuspend" id="virDomainSuspend"></a>Function: virDomainSuspend</h3><pre class="programlisting">int virDomainSuspend (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires priviledged access.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virGetVersion" id="virGetVersion"></a>Function: virGetVersion</h3><pre class="programlisting">int virGetVersion (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)<br />
|
||||
</pre><p>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>libVer</tt></i>:</span></td><td>return value for the library version (OUT)</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>hypervisor type</td></tr><tr><td><span class="term"><i><tt>typeVer</tt></i>:</span></td><td>return value for the version of the hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.</td></tr></tbody></table></div></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,3 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,141 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Module libvirt from libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Module libvirt from libvirt</h1><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The virtualization API</a></th></tr></table><p>Provides the interfaces of the libvirt library to handle Xen domains from a process running in domain 0 </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a></pre><pre class="programlisting">Structure <a href="#virConnect">virConnect</a><br />struct _virConnect
|
||||
The content of this structure is not made public by the API.
|
||||
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virConnect">virConnect</a> * <a name="virConnectPtr" id="virConnectPtr">virConnectPtr</a>
|
||||
</pre><pre class="programlisting">Enum <a href="#virDeviceMode">virDeviceMode</a>
|
||||
</pre><pre class="programlisting">Structure <a href="#virDomain">virDomain</a><br />struct _virDomain
|
||||
The content of this structure is not made public by the API.
|
||||
</pre><pre class="programlisting">Enum <a href="#virDomainCreateFlags">virDomainCreateFlags</a>
|
||||
</pre><pre class="programlisting">Structure <a href="#virDomainInfo">virDomainInfo</a><br />struct _virDomainInfo
|
||||
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomainInfo">virDomainInfo</a> * <a name="virDomainInfoPtr" id="virDomainInfoPtr">virDomainInfoPtr</a>
|
||||
</pre><pre class="programlisting">Structure <a href="#virDomainKernel">virDomainKernel</a><br />struct _virDomainKernel
|
||||
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomainKernel">virDomainKernel</a> * <a name="virDomainKernelPtr" id="virDomainKernelPtr">virDomainKernelPtr</a>
|
||||
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomain">virDomain</a> * <a name="virDomainPtr" id="virDomainPtr">virDomainPtr</a>
|
||||
</pre><pre class="programlisting">Enum <a href="#virDomainRestart">virDomainRestart</a>
|
||||
</pre><pre class="programlisting">Enum <a href="#virDomainState">virDomainState</a>
|
||||
</pre><pre class="programlisting">int <a href="#virConnectClose">virConnectClose</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
|
||||
<pre class="programlisting">const char * <a href="#virConnectGetType">virConnectGetType</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
|
||||
<pre class="programlisting">int <a href="#virConnectGetVersion">virConnectGetVersion</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)</pre>
|
||||
<pre class="programlisting">int <a href="#virConnectListDomains">virConnectListDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)</pre>
|
||||
<pre class="programlisting">int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
|
||||
<pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name)</pre>
|
||||
<pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpenReadOnly">virConnectOpenReadOnly</a> (const char * name)</pre>
|
||||
<pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateLinux">virDomainCreateLinux</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * kernel_path, <br /> const char * initrd_path, <br /> const char * cmdline, <br /> unsigned long memory, <br /> unsigned int flags)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainDestroy">virDomainDestroy</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainFree">virDomainFree</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">unsigned int <a href="#virDomainGetID">virDomainGetID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainGetInfo">virDomainGetInfo</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a> info)</pre>
|
||||
<pre class="programlisting">unsigned long <a href="#virDomainGetMaxMemory">virDomainGetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">char * <a href="#virDomainGetOSType">virDomainGetOSType</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">char * <a href="#virDomainGetXMLDesc">virDomainGetXMLDesc</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)</pre>
|
||||
<pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByID">virDomainLookupByID</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)</pre>
|
||||
<pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByName">virDomainLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainRestore">virDomainRestore</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainResume">virDomainResume</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainSave">virDomainSave</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainShutdown">virDomainShutdown</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virDomainSuspend">virDomainSuspend</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
|
||||
<pre class="programlisting">int <a href="#virGetVersion">virGetVersion</a> (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)</pre>
|
||||
<h2>Description</h2>
|
||||
<h3><a name="LIBVIR_VERSION_NUMBER" id="LIBVIR_VERSION_NUMBER"></a>Macro: LIBVIR_VERSION_NUMBER</h3><pre>#define LIBVIR_VERSION_NUMBER</pre><p>Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro</p>
|
||||
<h3><a name="virConnect" id="virConnect">Structure virConnect</a></h3><pre class="programlisting">Structure virConnect<br />struct _virConnect {
|
||||
The content of this structure is not made public by the API.
|
||||
}</pre>
|
||||
a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.
|
||||
<h3>Enum <a name="virDeviceMode" id="virDeviceMode">virDeviceMode</a></h3><pre class="programlisting">Enum virDeviceMode {
|
||||
<a name="VIR_DEVICE_DEFAULT" id="VIR_DEVICE_DEFAULT">VIR_DEVICE_DEFAULT</a> = 0 : Default mode
|
||||
<a name="VIR_DEVICE_RO" id="VIR_DEVICE_RO">VIR_DEVICE_RO</a> = 1 : Access read-only
|
||||
<a name="VIR_DEVICE_RW" id="VIR_DEVICE_RW">VIR_DEVICE_RW</a> = 2 : Access read-write
|
||||
<a name="VIR_DEVICE_RW_FORCE" id="VIR_DEVICE_RW_FORCE">VIR_DEVICE_RW_FORCE</a> = 3 : Forced read-write even if already used
|
||||
}
|
||||
</pre><h3><a name="virDomain" id="virDomain">Structure virDomain</a></h3><pre class="programlisting">Structure virDomain<br />struct _virDomain {
|
||||
The content of this structure is not made public by the API.
|
||||
}</pre><h3>Enum <a name="virDomainCreateFlags" id="virDomainCreateFlags">virDomainCreateFlags</a></h3><pre class="programlisting">Enum virDomainCreateFlags {
|
||||
<a name="VIR_DOMAIN_NONE" id="VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a> = 0
|
||||
}
|
||||
</pre><h3><a name="virDomainInfo" id="virDomainInfo">Structure virDomainInfo</a></h3><pre class="programlisting">Structure virDomainInfo<br />struct _virDomainInfo {
|
||||
unsigned char state : the running state, one of virDomainFlag
|
||||
unsigned long maxMem : the maximum memory in KBytes allowed
|
||||
unsigned long memory : the memory in KBytes used by the domain
|
||||
unsigned short nrVirtCpu : * Informations below are only available
|
||||
unsigned long long cpuTime : * TODO: * - check what can be extracted
|
||||
}</pre>
|
||||
a virDomainInfoPtr is a pointer to a virDomainInfo structure.
|
||||
<h3><a name="virDomainKernel" id="virDomainKernel">Structure virDomainKernel</a></h3><pre class="programlisting">Structure virDomainKernel<br />struct _virDomainKernel {
|
||||
const char * kernel : filename pointing to the kernel image
|
||||
const char * ramdisk : an optional init ramdisk
|
||||
const char * root : an optional root block device
|
||||
const char * extra : optional kernel command line parameters
|
||||
}</pre>
|
||||
a virDomainKernelPtr is a pointer to a virDomainKernel structure.
|
||||
|
||||
a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a Xen domain in the API.
|
||||
<h3>Enum <a name="virDomainRestart" id="virDomainRestart">virDomainRestart</a></h3><pre class="programlisting">Enum virDomainRestart {
|
||||
<a name="VIR_DOMAIN_DESTROY" id="VIR_DOMAIN_DESTROY">VIR_DOMAIN_DESTROY</a> = 1 : destroy the domain
|
||||
<a name="VIR_DOMAIN_RESTART" id="VIR_DOMAIN_RESTART">VIR_DOMAIN_RESTART</a> = 2 : restart the domain
|
||||
<a name="VIR_DOMAIN_PRESERVE" id="VIR_DOMAIN_PRESERVE">VIR_DOMAIN_PRESERVE</a> = 3 : keep as is, need manual destroy, for debug
|
||||
<a name="VIR_DOMAIN_RENAME_RESTART" id="VIR_DOMAIN_RENAME_RESTART">VIR_DOMAIN_RENAME_RESTART</a> = 4 : restart under an new unique name
|
||||
}
|
||||
</pre><h3>Enum <a name="virDomainState" id="virDomainState">virDomainState</a></h3><pre class="programlisting">Enum virDomainState {
|
||||
<a name="VIR_DOMAIN_NOSTATE" id="VIR_DOMAIN_NOSTATE">VIR_DOMAIN_NOSTATE</a> = 0 : no state
|
||||
<a name="VIR_DOMAIN_RUNNING" id="VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a> = 1 : the domain is running
|
||||
<a name="VIR_DOMAIN_BLOCKED" id="VIR_DOMAIN_BLOCKED">VIR_DOMAIN_BLOCKED</a> = 2 : the domain is blocked on resource
|
||||
<a name="VIR_DOMAIN_PAUSED" id="VIR_DOMAIN_PAUSED">VIR_DOMAIN_PAUSED</a> = 3 : the domain is paused by user
|
||||
<a name="VIR_DOMAIN_SHUTDOWN" id="VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a> = 4 : the domain is being shut down
|
||||
<a name="VIR_DOMAIN_SHUTOFF" id="VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a> = 5 : the domain is shut off
|
||||
<a name="VIR_DOMAIN_CRASHED" id="VIR_DOMAIN_CRASHED">VIR_DOMAIN_CRASHED</a> = 6 : the domain is crashed
|
||||
}
|
||||
</pre><h3><a name="virConnectClose" id="virConnectClose"></a>Function: virConnectClose</h3><pre class="programlisting">int virConnectClose (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConnectGetType" id="virConnectGetType"></a>Function: virConnectGetType</h3><pre class="programlisting">const char * virConnectGetType (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Get the name of the Hypervisor software used.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a static zero terminated string otherwise.</td></tr></tbody></table></div><h3><a name="virConnectGetVersion" id="virConnectGetVersion"></a>Function: virConnectGetVersion</h3><pre class="programlisting">int virConnectGetVersion (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)<br />
|
||||
</pre><p>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>hvVer</tt></i>:</span></td><td>return value for the version of the running hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release</td></tr></tbody></table></div><h3><a name="virConnectListDomains" id="virConnectListDomains"></a>Function: virConnectListDomains</h3><pre class="programlisting">int virConnectListDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)<br />
|
||||
</pre><p>Collect the list of active domains, and store their ID in @maxids</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><span class="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDomains" id="virConnectNumOfDomains"></a>Function: virConnectNumOfDomains</h3><pre class="programlisting">int virConnectNumOfDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
||||
</pre><p>Provides the number of active domains.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpen" id="virConnectOpen"></a>Function: virConnectOpen</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpen (const char * name)<br />
|
||||
</pre><p>This function should be called first to get a connection to the Hypervisor and xen store</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpenReadOnly" id="virConnectOpenReadOnly"></a>Function: virConnectOpenReadOnly</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpenReadOnly (const char * name)<br />
|
||||
</pre><p>This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virDomainCreateLinux" id="virDomainCreateLinux"></a>Function: virDomainCreateLinux</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainCreateLinux (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * kernel_path, <br /> const char * initrd_path, <br /> const char * cmdline, <br /> unsigned long memory, <br /> unsigned int flags)<br />
|
||||
</pre><p>Launch a new Linux guest domain, unimplemented yet, API to be defined. This would function requires priviledged access to the hypervisor.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>kernel_path</tt></i>:</span></td><td>the file path to the kernel image</td></tr><tr><td><span class="term"><i><tt>initrd_path</tt></i>:</span></td><td>an optional file path to an initrd</td></tr><tr><td><span class="term"><i><tt>cmdline</tt></i>:</span></td><td>optional command line parameters for the kernel</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>an optional set of virDomainFlags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainDestroy" id="virDomainDestroy"></a>Function: virDomainDestroy</h3><pre class="programlisting">int virDomainDestroy (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainFree" id="virDomainFree"></a>Function: virDomainFree</h3><pre class="programlisting">int virDomainFree (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetID" id="virDomainGetID"></a>Function: virDomainGetID</h3><pre class="programlisting">unsigned int virDomainGetID (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Get the hypervisor ID number for the domain</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the domain ID number or (unsigned int) -1 in case of error</td></tr></tbody></table></div><h3><a name="virDomainGetInfo" id="virDomainGetInfo"></a>Function: virDomainGetInfo</h3><pre class="programlisting">int virDomainGetInfo (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a> info)<br />
|
||||
</pre><p>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virDomainInfo">virDomainInfo</a> structure allocated by the user</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetMaxMemory" id="virDomainGetMaxMemory"></a>Function: virDomainGetMaxMemory</h3><pre class="programlisting">unsigned long virDomainGetMaxMemory (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the memory size in kilobytes or 0 in case of error.</td></tr></tbody></table></div><h3><a name="virDomainGetName" id="virDomainGetName"></a>Function: virDomainGetName</h3><pre class="programlisting">const char * virDomainGetName (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Get the public name for that domain</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.</td></tr></tbody></table></div><h3><a name="virDomainGetOSType" id="virDomainGetOSType"></a>Function: virDomainGetOSType</h3><pre class="programlisting">char * virDomainGetOSType (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Get the type of domain operation system.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL in case of error</td></tr></tbody></table></div><h3><a name="virDomainGetXMLDesc" id="virDomainGetXMLDesc"></a>Function: virDomainGetXMLDesc</h3><pre class="programlisting">char * virDomainGetXMLDesc (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)<br />
|
||||
</pre><p>Provide an XML description of the domain. NOTE: this API is subject to changes.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virDomainLookupByID" id="virDomainLookupByID"></a>Function: virDomainLookupByID</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainLookupByID (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)<br />
|
||||
</pre><p>Try to find a domain based on the hypervisor ID number</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>id</tt></i>:</span></td><td>the domain ID number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainLookupByName" id="virDomainLookupByName"></a>Function: virDomainLookupByName</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
|
||||
</pre><p>Try to lookup a domain on the given hypervisor based on its name.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainRestore" id="virDomainRestore"></a>Function: virDomainRestore</h3><pre class="programlisting">int virDomainRestore (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)<br />
|
||||
</pre><p>This method will restore a domain saved to disk by virDomainSave().</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>path to the</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainResume" id="virDomainResume"></a>Function: virDomainResume</h3><pre class="programlisting">int virDomainResume (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSave" id="virDomainSave"></a>Function: virDomainSave</h3><pre class="programlisting">int virDomainSave (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)<br />
|
||||
</pre><p>This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>path for the output file</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSetMaxMemory" id="virDomainSetMaxMemory"></a>Function: virDomainSetMaxMemory</h3><pre class="programlisting">int virDomainSetMaxMemory (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)<br />
|
||||
</pre><p>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainShutdown" id="virDomainShutdown"></a>Function: virDomainShutdown</h3><pre class="programlisting">int virDomainShutdown (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. Note that the guest OS may ignore the request. TODO: should we add an option for reboot, knowing it may not be doable in the general case ?</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSuspend" id="virDomainSuspend"></a>Function: virDomainSuspend</h3><pre class="programlisting">int virDomainSuspend (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
||||
</pre><p>Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires priviledged access.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virGetVersion" id="virGetVersion"></a>Function: virGetVersion</h3><pre class="programlisting">int virGetVersion (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)<br />
|
||||
</pre><p>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>libVer</tt></i>:</span></td><td>return value for the library version (OUT)</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>hypervisor type</td></tr><tr><td><span class="term"><i><tt>typeVer</tt></i>:</span></td><td>return value for the version of the hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.</td></tr></tbody></table></div></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
|
Before Width: | Height: | Size: 472 B |
BIN
docs/html/up.png
|
Before Width: | Height: | Size: 406 B |
@@ -1,94 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="libvirt.css" />
|
||||
<link rel="SHORTCUT ICON" href="/32favicon.png" />
|
||||
<title>the virtualization API</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments">
|
||||
<p class="p1"></p>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h3>what is <span class="style1">libvirt?</span></h3>
|
||||
<p>Libvir is a C toolkit to interract with the virtualization capabilities of
|
||||
recent versions of Linux (and other OSes). It is free software available
|
||||
under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
|
||||
Lesser General Public License</a>. Virtualization of the Linux Operating
|
||||
System means the ability to run multiple instances of Operating Systems
|
||||
concurently on a single hardware system where the basic resources are driven
|
||||
by a Linux instance. The library aim at providing long term stable C API
|
||||
initially for the <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen
|
||||
paravirtualization</a> but should be able to integrate other virtualization
|
||||
mechanisms if needed.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="linkList">
|
||||
<div class="llinks">
|
||||
<h3 class="links">
|
||||
<span>main menu</span>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>Home</li>
|
||||
<li>
|
||||
<a href="news.html">Releases</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="intro.html">Introduction</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="architecture.html">libvirt architecture</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="downloads.html">Downloads</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="FAQ.html">FAQ</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="bugs.html">Reporting bugs and getting help</a>
|
||||
</li>
|
||||
<li>
|
||||
<a style="font-weight:bold" href="html/index.html">API Menu</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ChangeLog.html">Recent Changes</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="llinks">
|
||||
<h3 class="links">
|
||||
<span>related links</span>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a>
|
||||
</li>
|
||||
<li>
|
||||
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="12" value="Search..." />
|
||||
<input name="submit" type="submit" value="Go" />
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://xmlsoft.org/">
|
||||
<img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bottom">
|
||||
<p class="p1"></p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1264
docs/index.py
@@ -1,30 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Introduction</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Introduction</h1><p>Libvir is a C toolkit to interact with the virtualization capabilities of
|
||||
recent versions of Linux (and other OSes), but libvirt won't try to provide
|
||||
all possible interfaces for interacting with the virtualization features.</p><p>To avoid ambiguity about the terms used here here are the definitions for
|
||||
some of the specific concepts used in libvirt documentation:</p><ul><li>a <strong>node</strong> is a single physical machine</li>
|
||||
<li>an <strong>hypervisor</strong> is a layer of software allowing to
|
||||
virtualize a node in a set of virtual machines with possibly different
|
||||
configurations than the node itself</li>
|
||||
<li>a <strong>domain</strong> is an instance of an operating system running
|
||||
on a virtualized machine provided by the hypervisor</li>
|
||||
</ul><p style="text-align: center"><img alt="Hypervisor and domains running on a node" src="node.gif" /></p><p>Now we can define the goal of libvirt: to provide the lowest possible
|
||||
generic and stable layer to manage domains on a node.</p><p>This implies the following:</p><ul><li>the API should not be targetted to a single virtualization environment
|
||||
though Xen is the current default, which also means that some very
|
||||
specific capabilities which are not generic enough may not be provided as
|
||||
libvirt APIs</li>
|
||||
<li>the API should allow to do efficiently and cleanly all the operations
|
||||
needed to manage domains on a node</li>
|
||||
<li>the API will not try to provide hight level multi-nodes management
|
||||
features like load balancing, though they could be implemented on top of
|
||||
libvirt</li>
|
||||
<li>stability of the API is a big concern, libvirt should isolate
|
||||
applications from the frequent changes expected at the lower level of the
|
||||
virtualization framework</li>
|
||||
</ul><p>So libvirt should be a building block for higher level management tools and
|
||||
for applications focusing on virtualization of a single node (the only
|
||||
exception being domain migration between node capabilities which may need to
|
||||
be added at the libvirt level). Where possible libvirt should be extendable to
|
||||
be able to provide the same API for remote nodes, however this is not the
|
||||
case at the moment, the code currently handle only local node accesses.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
291
docs/libvir.html
@@ -1,291 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="">
|
||||
<title>Libvir the virtualization API</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
<h1 align="center">Libvir the virtualization API</h1>
|
||||
|
||||
<h1>Note: this is the flat content of the <a href="index.html">web
|
||||
site</a></h1>
|
||||
|
||||
<h1 style="text-align: center">libvirt</h1>
|
||||
|
||||
<h3>what is <span class="style1">libvirt?</span></h3>
|
||||
|
||||
<p>Libvir is a C toolkit to interract with the virtualization capabilities of
|
||||
recent versions of Linux (and other OSes). It is free software available
|
||||
under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
|
||||
Lesser General Public License</a>. Virtualization of the Linux Operating
|
||||
System means the ability to run multiple instances of Operating Systems
|
||||
concurently on a single hardware system where the basic resources are driven
|
||||
by a Linux instance. The library aim at providing long term stable C API
|
||||
initially for the <a
|
||||
href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen
|
||||
paravirtualization</a> but should be able to integrate other virtualization
|
||||
mechanisms if needed.</p>
|
||||
|
||||
<h2><a name="News">Releases</a></h2>
|
||||
|
||||
<p>Here is the list of official releases, however since it is early on in the
|
||||
development of libvirt, it is preferable when possible to just use the <a
|
||||
href="downloads.html">CVS version or snapshot</a>, contact the mailing list
|
||||
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p>
|
||||
|
||||
<h3>0.0.4: Feb 10 2006</h3>
|
||||
<ul>
|
||||
<li>Fix various bugs introduced in the name change</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.0.3: Feb 9 2006</h3>
|
||||
<ul>
|
||||
<li>Switch name from from 'libvir' to libvirt</li>
|
||||
<li>Starting infrastructure to add code examples</li>
|
||||
<li>Update of python bindings for completeness</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.0.2: Jan 29 2006</h3>
|
||||
<ul>
|
||||
<li>Update of the documentation, web site redesign (Diana Fong)</li>
|
||||
<li>integration of HTTP xend RPC based on libxend by Anthony Liquori for
|
||||
most operations</li>
|
||||
<li>Adding Save and Restore APIs</li>
|
||||
<li>extended the virsh command line tool (Karel Zak)</li>
|
||||
<li>remove xenstore transactions (Anthony Liguori)</li>
|
||||
<li>fix the Python bindings bug when domain and connections where freed</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.0.1: Dec 19 2005</h3>
|
||||
<ul>
|
||||
<li>First release</li>
|
||||
<li>Basic management of existing Xen domains</li>
|
||||
<li>Minimal autogenerated Python bindings</li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="Introducti">Introduction</a></h2>
|
||||
|
||||
<p>Libvir is a C toolkit to interact with the virtualization capabilities of
|
||||
recent versions of Linux (and other OSes), but libvirt won't try to provide
|
||||
all possible interfaces for interacting with the virtualization features.</p>
|
||||
|
||||
<p>To avoid ambiguity about the terms used here here are the definitions for
|
||||
some of the specific concepts used in libvirt documentation:</p>
|
||||
<ul>
|
||||
<li>a <strong>node</strong> is a single physical machine</li>
|
||||
<li>an <strong>hypervisor</strong> is a layer of software allowing to
|
||||
virtualize a node in a set of virtual machines with possibly different
|
||||
configurations than the node itself</li>
|
||||
<li>a <strong>domain</strong> is an instance of an operating system running
|
||||
on a virtualized machine provided by the hypervisor</li>
|
||||
</ul>
|
||||
|
||||
<p style="text-align: center"><img
|
||||
alt="Hypervisor and domains running on a node" src="node.gif"></p>
|
||||
|
||||
<p>Now we can define the goal of libvirt: to provide the lowest possible
|
||||
generic and stable layer to manage domains on a node.</p>
|
||||
|
||||
<p>This implies the following:</p>
|
||||
<ul>
|
||||
<li>the API should not be targetted to a single virtualization environment
|
||||
though Xen is the current default, which also means that some very
|
||||
specific capabilities which are not generic enough may not be provided as
|
||||
libvirt APIs</li>
|
||||
<li>the API should allow to do efficiently and cleanly all the operations
|
||||
needed to manage domains on a node</li>
|
||||
<li>the API will not try to provide hight level multi-nodes management
|
||||
features like load balancing, though they could be implemented on top of
|
||||
libvirt</li>
|
||||
<li>stability of the API is a big concern, libvirt should isolate
|
||||
applications from the frequent changes expected at the lower level of the
|
||||
virtualization framework</li>
|
||||
</ul>
|
||||
|
||||
<p>So libvirt should be a building block for higher level management tools and
|
||||
for applications focusing on virtualization of a single node (the only
|
||||
exception being domain migration between node capabilities which may need to
|
||||
be added at the libvirt level). Where possible libvirt should be extendable to
|
||||
be able to provide the same API for remote nodes, however this is not the
|
||||
case at the moment, the code currently handle only local node accesses.</p>
|
||||
|
||||
<h2><a name="architecture">libvirt architecture</a></h2>
|
||||
|
||||
<h3>This is Xen specific since this is the only hypervisor supported at the
|
||||
moment</h3>
|
||||
|
||||
<p>When running in a Xen environment, programs using libvirt have to execute
|
||||
in "Domain 0", which is the primary Linux OS loaded on the machine. That OS
|
||||
kernel provides most if not all of the actual drivers used by the set of
|
||||
domains. It also runs the Xen Store, a database of informations shared by the
|
||||
hypervisor, the kernels, the drivers and the xen daemon. Xend. The xen daemon
|
||||
supervise the control and execution of the sets of domains. The hypervisor,
|
||||
drivers, kernels and daemons communicate though a shared system bus
|
||||
implemented in the hypervisor. The figure below tries to provide a view of
|
||||
this environment:</p>
|
||||
<img src="architecture.gif" alt="The Xen architecture">
|
||||
|
||||
<p>The library can be initialized in 2 ways depending on the level of
|
||||
priviledge of the embedding program. If it runs with root access,
|
||||
virConnectOpen() can be used, it will use three different ways to connect to
|
||||
the Xen infrastructure:</p>
|
||||
<ul>
|
||||
<li>a connection to the Xen Daemon though an HTTP RPC layer</li>
|
||||
<li>a read/write connection to the Xen Store</li>
|
||||
<li>use Xen Hypervisor calls</li>
|
||||
</ul>
|
||||
|
||||
<p>The library will usually interract with the Xen daemon for any operation
|
||||
changing the state of the system, but for performance and accuracy reasons
|
||||
may talk directly to the hypervisor when gathering state informations at
|
||||
least when possible (i.e. when the running program using libvirt has root
|
||||
priviledge access).</p>
|
||||
|
||||
<p>If it runs without root access virConnectOpenReadOnly() should be used to
|
||||
connect to initialize the library. It will try to open the read-only socket
|
||||
<code>/var/run/xenstored/socket_ro</code> to connect to the Xen Store and
|
||||
also try to use the RPC to the Xen daemon. In this case use of hypervisor
|
||||
calls and write to the Xen Store will not be possible, restraining the amount
|
||||
of APIs available and slowing down information gathering about domains.</p>
|
||||
|
||||
<h2><a name="Downloads">Downloads</a></h2>
|
||||
|
||||
<p>The latest versions of libvirt can be found on the <a
|
||||
href="ftp://libvirt.org/libvirt/">libvirt.org</a> server ( <a
|
||||
href="http://libvirt.org/sources/">HTTP</a>, <a
|
||||
href="ftp://libvirt.org/libvirt/">FTP</a>). You will find there the released
|
||||
versions as well as <a
|
||||
href="http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz">snapshot
|
||||
tarballs</a> updated from CVS head every hour</p>
|
||||
|
||||
<p>Anonymous <a href="http://ximbiot.com/cvs/cvshome/docs/">CVS</a> is also
|
||||
available, first register onto the server:</p>
|
||||
|
||||
<p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs login</code></p>
|
||||
|
||||
<p>it will request a password, enter <strong>anoncvs</strong>. Then you can
|
||||
checkout the development tree with:</p>
|
||||
|
||||
<p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co libvirt</code></p>
|
||||
|
||||
<p>Use ./autogen.sh to configure the local checkout, then <code>make</code>
|
||||
and <code>make install</code>, as usual. All normal cvs commands are now
|
||||
available except commiting to the base.</p>
|
||||
|
||||
<h2><a name="FAQ">FAQ</a></h2>
|
||||
|
||||
<p>Table of Contents:</p>
|
||||
<ul>
|
||||
<li><a href="FAQ.html#License">License(s)</a></li>
|
||||
<li><a href="FAQ.html#Installati">Installation</a></li>
|
||||
<li><a href="FAQ.html#Compilatio">Compilation</a></li>
|
||||
<li><a href="FAQ.html#Developer">Developer corner</a></li>
|
||||
</ul>
|
||||
|
||||
<h3><a name="License">License</a>(s)</h3>
|
||||
<ol>
|
||||
<li><em>Licensing Terms for libvirt</em>
|
||||
<p>libvirt is released under the <a
|
||||
href="http://www.opensource.org/licenses/lgpl-license.html">GNU Lesser
|
||||
General Public License</a>, see the file COPYING.LIB in the distribution
|
||||
for the precise wording. The only library that libvirt depends upon is the
|
||||
Xen store access library which is also licenced under the LGPL.</p>
|
||||
</li>
|
||||
<li><em>Can I embed libvirt in a proprietary application ?</em>
|
||||
<p>Yes. The LGPL allows you to embed libvirt into a proprietary
|
||||
application. It would be graceful to send-back bug fixes and improvements
|
||||
as patches for possible incorporation in the main development tree. It
|
||||
will decrease your maintainance costs anyway if you do so.</p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3><a name="Installati">Installation</a></h3>
|
||||
<ol>
|
||||
<li><em>Where can I get libvirt</em> ?
|
||||
<p>The original distribution comes from <a
|
||||
href="ftp://libvirt.org/libvirt/">ftp://libvirt.org/libvirt/</a>.</p>
|
||||
</li>
|
||||
<li><em>I can't install the libvirt/libvirt-devel RPM packages due to failed
|
||||
dependencies</em>
|
||||
<p>The most generic solution is to re-fetch the latest src.rpm , and
|
||||
rebuild it locally with</p>
|
||||
<p><code>rpm --rebuild libvirt-xxx.src.rpm</code>.</p>
|
||||
<p>If everything goes well it will generate two binary rpm packages (one
|
||||
providing the shared libs and virsh, and the other one, the -devel
|
||||
package, providing includes, static libraries and scripts needed to build
|
||||
applications with libvirt that you can install locally.</p>
|
||||
<p>One can also rebuild the RPMs from a tarball:</p>
|
||||
<p><code>rpmbuild -ta libdir-xxx.tar.gz</code></p>
|
||||
<p>Or from a configured tree with:</p>
|
||||
<p><code>make rpm</code></p>
|
||||
</li>
|
||||
<li><em>Failure to use the API for non-root users</em>
|
||||
<p>Large parts of the API may only be accessible with root priviledges,
|
||||
however the read only access to the xenstore data doesnot have to be
|
||||
forbidden to user, at least for monitoring purposes. If "virsh dinfo"
|
||||
fails to run as an user, change the mode of the xenstore read-only socket
|
||||
with:</p>
|
||||
<p><code>chmod 666 /var/run/xenstored/socket_ro</code></p>
|
||||
<p>and also make sure that the Xen Daemon is running correctly with local
|
||||
HTTP server enabled, this is defined in
|
||||
<code>/etc/xen/xend-config.sxp</code> which need the following line to be
|
||||
enabled:</p>
|
||||
<p><code>(xend-http-server yes)</code></p>
|
||||
<p>If needed restart the xend daemon after making the change with the
|
||||
following command run as root:</p>
|
||||
<p><code>service xend restart</code></p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3><a name="Compilatio">Compilation</a></h3>
|
||||
<ol>
|
||||
<li><em>What is the process to compile libvirt ?</em>
|
||||
<p>As most UNIX libraries libvirt follows the "standard":</p>
|
||||
<p><code>gunzip -c libvirt-xxx.tar.gz | tar xvf -</code></p>
|
||||
<p><code>cd libvirt-xxxx</code></p>
|
||||
<p><code>./configure --help</code></p>
|
||||
<p>to see the options, then the compilation/installation proper</p>
|
||||
<p><code>./configure [possible options]</code></p>
|
||||
<p><code>make</code></p>
|
||||
<p><code>make install</code></p>
|
||||
<p>At that point you may have to rerun ldconfig or a similar utility to
|
||||
update your list of installed shared libs.</p>
|
||||
</li>
|
||||
<li><em>What other libraries are needed to compile/install libvirt ?</em>
|
||||
<p>Libvir requires libxenstore, which is usually provided by the xen
|
||||
packages as well as the public headers to compile against libxenstore.</p>
|
||||
</li>
|
||||
<li><em>I use the CVS version and there is no configure script</em>
|
||||
<p>The configure script (and other Makefiles) are generated. Use the
|
||||
autogen.sh script to regenerate the configure script and Makefiles,
|
||||
like:</p>
|
||||
<p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h3><a name="Developer">Developer</a> corner</h3>
|
||||
<ol>
|
||||
<li><em>Troubles compiling or linking programs using libvirt</em>
|
||||
<p>To simplify the process of reusing the library, libvirt comes with
|
||||
pkgconfig support, which can be used directly from autoconf support or
|
||||
via the pkg-config command line tool, like:</p>
|
||||
<p><code>pkg-config libvirt --libs</code></p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
<h2><a name="Reporting">Reporting bugs and getting help</a></h2>
|
||||
|
||||
<p>There is a mailing-list <a
|
||||
href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a> for libvirt,
|
||||
with an <a href="https://www.redhat.com/archives/libvir-list/">on-line
|
||||
archive</a>. Please subscribe to this list before posting by visiting the <a
|
||||
href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a>
|
||||
page and follow the instructions. Patches with explanations and provided as
|
||||
attachments are really appreciated and will be discussed on the mailing list.
|
||||
If possible generate the patches by using cvs diff -u in a CVS checkout.</p>
|
||||
|
||||
<p>We expect to use <a href="https://bugzilla.redhat.com/">Red Hat
|
||||
Bugzilla</a> to track bugs for libvirt, though there isn't a libvirt software
|
||||
module defined yet, in the meantime use the mailing-list, thanks !.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 29 KiB |
@@ -1,266 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<api name='libvirt'>
|
||||
<files>
|
||||
<file name='libvirt'>
|
||||
<summary>core interfaces for the libvirt library</summary>
|
||||
<description>Provides the interfaces of the libvirt library to handle Xen domains from a process running in domain 0 </description>
|
||||
<author>Daniel Veillard <veillard@redhat.com> </author>
|
||||
<exports symbol='LIBVIR_VERSION_NUMBER' type='macro'/>
|
||||
<exports symbol='VIR_DOMAIN_SHUTOFF' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_DESTROY' type='enum'/>
|
||||
<exports symbol='VIR_DEVICE_DEFAULT' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_RENAME_RESTART' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_PRESERVE' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_SHUTDOWN' type='enum'/>
|
||||
<exports symbol='VIR_DEVICE_RO' type='enum'/>
|
||||
<exports symbol='VIR_DEVICE_RW_FORCE' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_CRASHED' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_NONE' type='enum'/>
|
||||
<exports symbol='VIR_DEVICE_RW' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_BLOCKED' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_PAUSED' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_RESTART' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_RUNNING' type='enum'/>
|
||||
<exports symbol='VIR_DOMAIN_NOSTATE' type='enum'/>
|
||||
<exports symbol='virDomainInfoPtr' type='typedef'/>
|
||||
<exports symbol='virDomainKernelPtr' type='typedef'/>
|
||||
<exports symbol='virConnectPtr' type='typedef'/>
|
||||
<exports symbol='virDomainKernel' type='typedef'/>
|
||||
<exports symbol='virDomainState' type='typedef'/>
|
||||
<exports symbol='virDeviceMode' type='typedef'/>
|
||||
<exports symbol='virDomain' type='typedef'/>
|
||||
<exports symbol='virDomainPtr' type='typedef'/>
|
||||
<exports symbol='virDomainRestart' type='typedef'/>
|
||||
<exports symbol='virConnect' type='typedef'/>
|
||||
<exports symbol='virDomainCreateFlags' type='typedef'/>
|
||||
<exports symbol='virDomainInfo' type='typedef'/>
|
||||
<exports symbol='_virDomainInfo' type='struct'/>
|
||||
<exports symbol='_virDomainKernel' type='struct'/>
|
||||
<exports symbol='virDomainGetInfo' type='function'/>
|
||||
<exports symbol='virDomainShutdown' type='function'/>
|
||||
<exports symbol='virGetVersion' type='function'/>
|
||||
<exports symbol='virDomainLookupByName' type='function'/>
|
||||
<exports symbol='virDomainRestore' type='function'/>
|
||||
<exports symbol='virConnectGetType' type='function'/>
|
||||
<exports symbol='virDomainSave' type='function'/>
|
||||
<exports symbol='virConnectListDomains' type='function'/>
|
||||
<exports symbol='virDomainLookupByID' type='function'/>
|
||||
<exports symbol='virDomainGetOSType' type='function'/>
|
||||
<exports symbol='virConnectNumOfDomains' type='function'/>
|
||||
<exports symbol='virDomainSetMaxMemory' type='function'/>
|
||||
<exports symbol='virDomainGetMaxMemory' type='function'/>
|
||||
<exports symbol='virConnectGetVersion' type='function'/>
|
||||
<exports symbol='virDomainFree' type='function'/>
|
||||
<exports symbol='virConnectOpen' type='function'/>
|
||||
<exports symbol='virDomainSuspend' type='function'/>
|
||||
<exports symbol='virConnectClose' type='function'/>
|
||||
<exports symbol='virDomainGetID' type='function'/>
|
||||
<exports symbol='virDomainResume' type='function'/>
|
||||
<exports symbol='virDomainCreateLinux' type='function'/>
|
||||
<exports symbol='virDomainDestroy' type='function'/>
|
||||
<exports symbol='virDomainGetXMLDesc' type='function'/>
|
||||
<exports symbol='virDomainGetName' type='function'/>
|
||||
<exports symbol='virConnectOpenReadOnly' type='function'/>
|
||||
</file>
|
||||
</files>
|
||||
<symbols>
|
||||
<macro name='LIBVIR_VERSION_NUMBER' file='libvirt'>
|
||||
<info>Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro</info>
|
||||
</macro>
|
||||
<enum name='VIR_DEVICE_DEFAULT' file='libvirt' value='0' type='virDeviceMode' info='Default mode'/>
|
||||
<enum name='VIR_DEVICE_RO' file='libvirt' value='1' type='virDeviceMode' info='Access read-only'/>
|
||||
<enum name='VIR_DEVICE_RW' file='libvirt' value='2' type='virDeviceMode' info='Access read-write'/>
|
||||
<enum name='VIR_DEVICE_RW_FORCE' file='libvirt' value='3' type='virDeviceMode' info=' Forced read-write even if already used'/>
|
||||
<enum name='VIR_DOMAIN_BLOCKED' file='libvirt' value='2' type='virDomainState' info='the domain is blocked on resource'/>
|
||||
<enum name='VIR_DOMAIN_CRASHED' file='libvirt' value='6' type='virDomainState' info=' the domain is crashed'/>
|
||||
<enum name='VIR_DOMAIN_DESTROY' file='libvirt' value='1' type='virDomainRestart' info='destroy the domain'/>
|
||||
<enum name='VIR_DOMAIN_NONE' file='libvirt' value='0' type='virDomainCreateFlags'/>
|
||||
<enum name='VIR_DOMAIN_NOSTATE' file='libvirt' value='0' type='virDomainState' info='no state'/>
|
||||
<enum name='VIR_DOMAIN_PAUSED' file='libvirt' value='3' type='virDomainState' info='the domain is paused by user'/>
|
||||
<enum name='VIR_DOMAIN_PRESERVE' file='libvirt' value='3' type='virDomainRestart' info='keep as is, need manual destroy, for debug'/>
|
||||
<enum name='VIR_DOMAIN_RENAME_RESTART' file='libvirt' value='4' type='virDomainRestart' info=' restart under an new unique name'/>
|
||||
<enum name='VIR_DOMAIN_RESTART' file='libvirt' value='2' type='virDomainRestart' info='restart the domain'/>
|
||||
<enum name='VIR_DOMAIN_RUNNING' file='libvirt' value='1' type='virDomainState' info='the domain is running'/>
|
||||
<enum name='VIR_DOMAIN_SHUTDOWN' file='libvirt' value='4' type='virDomainState' info='the domain is being shut down'/>
|
||||
<enum name='VIR_DOMAIN_SHUTOFF' file='libvirt' value='5' type='virDomainState' info='the domain is shut off'/>
|
||||
<struct name='virConnect' file='libvirt' type='struct _virConnect'/>
|
||||
<typedef name='virConnectPtr' file='libvirt' type='virConnect *'>
|
||||
<info>a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.</info>
|
||||
</typedef>
|
||||
<typedef name='virDeviceMode' file='libvirt' type='enum'/>
|
||||
<struct name='virDomain' file='libvirt' type='struct _virDomain'/>
|
||||
<typedef name='virDomainCreateFlags' file='libvirt' type='enum'/>
|
||||
<struct name='virDomainInfo' file='libvirt' type='struct _virDomainInfo'>
|
||||
<field name='state' type='unsigned char' info=' the running state, one of virDomainFlags'/>
|
||||
<field name='maxMem' type='unsigned long' info=' the maximum memory in KBytes allowed'/>
|
||||
<field name='memory' type='unsigned long' info=' the memory in KBytes used by the domain'/>
|
||||
<field name='nrVirtCpu' type='unsigned short' info='* Informations below are only available to clients with a connection
|
||||
* with full access to the hypervisor
|
||||
*'/>
|
||||
<field name='cpuTime' type='unsigned long long' info='* TODO:
|
||||
* - check what can be extracted publicly from xenstore
|
||||
* and what's private limited to the hypervisor call.
|
||||
* - add padding to this structure for ABI long term protection
|
||||
*'/>
|
||||
</struct>
|
||||
<typedef name='virDomainInfoPtr' file='libvirt' type='virDomainInfo *'>
|
||||
<info>a virDomainInfoPtr is a pointer to a virDomainInfo structure.</info>
|
||||
</typedef>
|
||||
<struct name='virDomainKernel' file='libvirt' type='struct _virDomainKernel'>
|
||||
<field name='kernel' type='const char *' info=' filename pointing to the kernel image'/>
|
||||
<field name='ramdisk' type='const char *' info=' an optional init ramdisk'/>
|
||||
<field name='root' type='const char *' info=' an optional root block device'/>
|
||||
<field name='extra' type='const char *' info=' optional kernel command line parameters'/>
|
||||
</struct>
|
||||
<typedef name='virDomainKernelPtr' file='libvirt' type='virDomainKernel *'>
|
||||
<info>a virDomainKernelPtr is a pointer to a virDomainKernel structure.</info>
|
||||
</typedef>
|
||||
<typedef name='virDomainPtr' file='libvirt' type='virDomain *'>
|
||||
<info>a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a Xen domain in the API.</info>
|
||||
</typedef>
|
||||
<typedef name='virDomainRestart' file='libvirt' type='enum'/>
|
||||
<typedef name='virDomainState' file='libvirt' type='enum'/>
|
||||
<function name='virConnectClose' file='libvirt' module='libvirt'>
|
||||
<info>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</info>
|
||||
<return type='int' info='0 in case of success or -1 in case of error.'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
</function>
|
||||
<function name='virConnectGetType' file='libvirt' module='libvirt'>
|
||||
<info>Get the name of the Hypervisor software used.</info>
|
||||
<return type='const char *' info='NULL in case of error, a static zero terminated string otherwise.'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
</function>
|
||||
<function name='virConnectGetVersion' file='libvirt' module='libvirt'>
|
||||
<info>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</info>
|
||||
<return type='int' info='-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='hvVer' type='unsigned long *' info='return value for the version of the running hypervisor (OUT)'/>
|
||||
</function>
|
||||
<function name='virConnectListDomains' file='libvirt' module='libvirt'>
|
||||
<info>Collect the list of active domains, and store their ID in @maxids</info>
|
||||
<return type='int' info='the number of domain found or -1 in case of error'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='ids' type='int *' info='array to collect the list of IDs of active domains'/>
|
||||
<arg name='maxids' type='int' info='size of @ids'/>
|
||||
</function>
|
||||
<function name='virConnectNumOfDomains' file='libvirt' module='libvirt'>
|
||||
<info>Provides the number of active domains.</info>
|
||||
<return type='int' info='the number of domain found or -1 in case of error'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
</function>
|
||||
<function name='virConnectOpen' file='libvirt' module='libvirt'>
|
||||
<info>This function should be called first to get a connection to the Hypervisor and xen store</info>
|
||||
<return type='virConnectPtr' info='a pointer to the hypervisor connection or NULL in case of error'/>
|
||||
<arg name='name' type='const char *' info='optional argument currently unused, pass NULL'/>
|
||||
</function>
|
||||
<function name='virConnectOpenReadOnly' file='libvirt' module='libvirt'>
|
||||
<info>This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</info>
|
||||
<return type='virConnectPtr' info='a pointer to the hypervisor connection or NULL in case of error'/>
|
||||
<arg name='name' type='const char *' info='optional argument currently unused, pass NULL'/>
|
||||
</function>
|
||||
<function name='virDomainCreateLinux' file='libvirt' module='libvirt'>
|
||||
<info>Launch a new Linux guest domain, unimplemented yet, API to be defined. This would function requires priviledged access to the hypervisor.</info>
|
||||
<return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='kernel_path' type='const char *' info='the file path to the kernel image'/>
|
||||
<arg name='initrd_path' type='const char *' info='an optional file path to an initrd'/>
|
||||
<arg name='cmdline' type='const char *' info='optional command line parameters for the kernel'/>
|
||||
<arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
|
||||
<arg name='flags' type='unsigned int' info='an optional set of virDomainFlags'/>
|
||||
</function>
|
||||
<function name='virDomainDestroy' file='libvirt' module='libvirt'>
|
||||
<info>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
</function>
|
||||
<function name='virDomainFree' file='libvirt' module='libvirt'>
|
||||
<info>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
</function>
|
||||
<function name='virDomainGetID' file='libvirt' module='libvirt'>
|
||||
<info>Get the hypervisor ID number for the domain</info>
|
||||
<return type='unsigned int' info='the domain ID number or (unsigned int) -1 in case of error'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
</function>
|
||||
<function name='virDomainGetInfo' file='libvirt' module='libvirt'>
|
||||
<info>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
<arg name='info' type='virDomainInfoPtr' info='pointer to a virDomainInfo structure allocated by the user'/>
|
||||
</function>
|
||||
<function name='virDomainGetMaxMemory' file='libvirt' module='libvirt'>
|
||||
<info>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</info>
|
||||
<return type='unsigned long' info='the memory size in kilobytes or 0 in case of error.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object or NULL'/>
|
||||
</function>
|
||||
<function name='virDomainGetName' file='libvirt' module='libvirt'>
|
||||
<info>Get the public name for that domain</info>
|
||||
<return type='const char *' info='a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
</function>
|
||||
<function name='virDomainGetOSType' file='libvirt' module='libvirt'>
|
||||
<info>Get the type of domain operation system.</info>
|
||||
<return type='char *' info='the new string or NULL in case of error'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
</function>
|
||||
<function name='virDomainGetXMLDesc' file='libvirt' module='xml'>
|
||||
<info>Provide an XML description of the domain. NOTE: this API is subject to changes.</info>
|
||||
<return type='char *' info='a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
<arg name='flags' type='int' info='and OR'ed set of extraction flags, not used yet'/>
|
||||
</function>
|
||||
<function name='virDomainLookupByID' file='libvirt' module='libvirt'>
|
||||
<info>Try to find a domain based on the hypervisor ID number</info>
|
||||
<return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='id' type='int' info='the domain ID number'/>
|
||||
</function>
|
||||
<function name='virDomainLookupByName' file='libvirt' module='libvirt'>
|
||||
<info>Try to lookup a domain on the given hypervisor based on its name.</info>
|
||||
<return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='name' type='const char *' info='name for the domain'/>
|
||||
</function>
|
||||
<function name='virDomainRestore' file='libvirt' module='libvirt'>
|
||||
<info>This method will restore a domain saved to disk by virDomainSave().</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<arg name='from' type='const char *' info='path to the'/>
|
||||
</function>
|
||||
<function name='virDomainResume' file='libvirt' module='libvirt'>
|
||||
<info>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
</function>
|
||||
<function name='virDomainSave' file='libvirt' module='libvirt'>
|
||||
<info>This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
<arg name='to' type='const char *' info='path for the output file'/>
|
||||
</function>
|
||||
<function name='virDomainSetMaxMemory' file='libvirt' module='libvirt'>
|
||||
<info>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object or NULL'/>
|
||||
<arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
|
||||
</function>
|
||||
<function name='virDomainShutdown' file='libvirt' module='libvirt'>
|
||||
<info>Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. Note that the guest OS may ignore the request. TODO: should we add an option for reboot, knowing it may not be doable in the general case ?</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
</function>
|
||||
<function name='virDomainSuspend' file='libvirt' module='libvirt'>
|
||||
<info>Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires priviledged access.</info>
|
||||
<return type='int' info='0 in case of success and -1 in case of failure.'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
</function>
|
||||
<function name='virGetVersion' file='libvirt' module='libvirt'>
|
||||
<info>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</info>
|
||||
<return type='int' info='-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.'/>
|
||||
<arg name='libVer' type='unsigned long *' info='return value for the library version (OUT)'/>
|
||||
<arg name='type' type='const char *' info='hypervisor type'/>
|
||||
<arg name='typeVer' type='unsigned long *' info='return value for the version of the hypervisor (OUT)'/>
|
||||
</function>
|
||||
</symbols>
|
||||
</api>
|
||||
171
docs/libvirt.css
@@ -1,171 +0,0 @@
|
||||
body
|
||||
{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #333333;
|
||||
font: 13px Verdana, Arial, Helvetica, sans;
|
||||
background: #898989;
|
||||
text-align: justify;
|
||||
}
|
||||
a
|
||||
{
|
||||
color: #0D7520;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
color: #a8a8a8;
|
||||
}
|
||||
|
||||
img
|
||||
{
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#container
|
||||
{
|
||||
margin: 0 auto;
|
||||
width: 766px;
|
||||
position: relative;
|
||||
background: #fff;
|
||||
padding: 0 10px 0 10px;
|
||||
text-align: justify;
|
||||
}
|
||||
* html #container
|
||||
{
|
||||
width: 766px;
|
||||
}
|
||||
|
||||
#pageHeader
|
||||
{
|
||||
position: absolute;
|
||||
background: url(libvirtHeader.png) center no-repeat;
|
||||
top: 30px;
|
||||
height: 76px;
|
||||
width: 766px;
|
||||
}
|
||||
#content h3
|
||||
{
|
||||
text-align: right;
|
||||
color: #a8a8a8;
|
||||
}
|
||||
#content2 h1
|
||||
{
|
||||
text-align: right;
|
||||
color: #0d7520;
|
||||
}
|
||||
#content h3
|
||||
{
|
||||
text-align: right;
|
||||
font-size: 24px;
|
||||
}
|
||||
#content h3 .style1
|
||||
{
|
||||
color: #0d7520;
|
||||
}
|
||||
#adjustments
|
||||
{
|
||||
padding-top: 15px;
|
||||
}
|
||||
#container #adjustments .p1
|
||||
{
|
||||
font-size: 11px;
|
||||
height: 300px;
|
||||
background: url(libvirtLogo.png) center no-repeat;
|
||||
margin: 0;
|
||||
width: 766px;
|
||||
}
|
||||
#container #bottom .p1
|
||||
{
|
||||
font-size: 11px;
|
||||
height: 600px;
|
||||
margin: 0;
|
||||
width: 766px;
|
||||
}
|
||||
#content2
|
||||
{
|
||||
margin: 100px 10px 0 160px;
|
||||
}
|
||||
#content2 p
|
||||
{
|
||||
line-height: 150%;
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
#content
|
||||
{
|
||||
margin: 0 10px 0 160px;
|
||||
}
|
||||
#content p
|
||||
{
|
||||
line-height: 150%;
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
.linkList
|
||||
{
|
||||
position: absolute;
|
||||
top: 320px;
|
||||
left: 10px;
|
||||
width: 140px;
|
||||
}
|
||||
.llinks ul
|
||||
{
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
.linkList .llinks ul li
|
||||
{
|
||||
font-size: 13px;
|
||||
border-bottom: 1px solid #E6EEF0;
|
||||
display: block;
|
||||
padding: 8px 0;
|
||||
}
|
||||
.llinks h3.links
|
||||
{
|
||||
background: #e6e6e6;
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
height: 25px;
|
||||
padding: 10px 0 0 5px;
|
||||
margin: 15px 0 5px 5px;
|
||||
}
|
||||
.linkList2
|
||||
{
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
left: 10px;
|
||||
width: 140px;
|
||||
}
|
||||
.llinks2 ul
|
||||
{
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0 0 0 10px;
|
||||
}
|
||||
.linkList2 .llinks2 ul li
|
||||
{
|
||||
font-size: 13px;
|
||||
border-bottom: 1px solid #E6EEF0;
|
||||
display: block;
|
||||
padding: 8px 0;
|
||||
}
|
||||
.llinks2 h3.links2
|
||||
{
|
||||
background: #e6e6e6;
|
||||
color: #999999;
|
||||
font-size: 14px;
|
||||
height: 25px;
|
||||
padding: 10px 0 0 5px;
|
||||
margin: 15px 0 5px 5px;
|
||||
}
|
||||
|
||||
div.deprecated pre.programlisting
|
||||
{
|
||||
border-style: double;
|
||||
border-color: red;
|
||||
}
|
||||
|
||||
pre.programlisting
|
||||
{
|
||||
border-style: double;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
637
docs/newapi.xsl
@@ -1,637 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Stylesheet to generate the HTML documentation from an XML API descriptions:
|
||||
xsltproc newapi.xsl libvirt-api.xml
|
||||
|
||||
Daniel Veillard
|
||||
-->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:exsl="http://exslt.org/common"
|
||||
xmlns:str="http://exslt.org/strings"
|
||||
extension-element-prefixes="exsl str"
|
||||
exclude-result-prefixes="exsl str">
|
||||
|
||||
<!-- Import the main part of the site stylesheets -->
|
||||
<xsl:import href="site.xsl"/>
|
||||
|
||||
<!-- Generate XHTML-1.0 transitional -->
|
||||
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<!-- Build keys for all symbols -->
|
||||
<xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
|
||||
|
||||
<!-- the target directory for the HTML output -->
|
||||
<xsl:variable name="htmldir">html</xsl:variable>
|
||||
<xsl:variable name="href_base">../</xsl:variable>
|
||||
|
||||
<xsl:template name="navbar">
|
||||
<xsl:variable name="previous" select="preceding-sibling::file[1]"/>
|
||||
<xsl:variable name="next" select="following-sibling::file[1]"/>
|
||||
<table class="navigation" width="100%" summary="Navigation header"
|
||||
cellpadding="2" cellspacing="2">
|
||||
<tr valign="middle">
|
||||
<xsl:if test="$previous">
|
||||
<td><a accesskey="p" href="libvirt-{$previous/@name}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td>
|
||||
<th align="left"><a href="libvirt-{$previous/@name}.html"><xsl:value-of select="$previous/@name"/></a></th>
|
||||
</xsl:if>
|
||||
<td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td>
|
||||
<th align="left"><a href="index.html">API documentation</a></th>
|
||||
<td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td>
|
||||
<th align="center"><a href="../index.html">The virtualization API</a></th>
|
||||
<xsl:if test="$next">
|
||||
<th align="right"><a href="libvirt-{$next/@name}.html"><xsl:value-of select="$next/@name"/></a></th>
|
||||
<td><a accesskey="n" href="libvirt-{$next/@name}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td>
|
||||
</xsl:if>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<!-- This is convoluted but needed to force the current document to
|
||||
be the API one and not the result tree from the tokenize() result,
|
||||
because the keys are only defined on the main document -->
|
||||
<xsl:template mode="dumptoken" match='*'>
|
||||
<xsl:param name="token"/>
|
||||
<xsl:variable name="ref" select="key('symbols', $token)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$ref">
|
||||
<a href="libvirt-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$token"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- dumps a string, making cross-reference links -->
|
||||
<xsl:template name="dumptext">
|
||||
<xsl:param name="text"/>
|
||||
<xsl:variable name="ctxt" select='.'/>
|
||||
<!-- <xsl:value-of select="$text"/> -->
|
||||
<xsl:for-each select="str:tokenize($text, ' 	')">
|
||||
<xsl:apply-templates select="$ctxt" mode='dumptoken'>
|
||||
<xsl:with-param name="token" select="string(.)"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="macro" mode="toc">
|
||||
<pre class="programlisting">
|
||||
<xsl:text>#define </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a>
|
||||
</pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="variable" mode="toc">
|
||||
<pre class="programlisting">
|
||||
<xsl:text>Variable </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="string(@type)"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<a name="{@name}"></a>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:text>
|
||||
|
||||
</xsl:text>
|
||||
</pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="typedef" mode="toc">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<pre class="programlisting">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@type = 'enum'">
|
||||
<xsl:text>Enum </xsl:text>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>Typedef </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<a name="{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="typedef[@type = 'enum']">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<h3>Enum <a name="{$name}"><xsl:value-of select="$name"/></a></h3>
|
||||
<pre class="programlisting">
|
||||
<xsl:text>Enum </xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text> {
|
||||
</xsl:text>
|
||||
<xsl:for-each select="/api/symbols/enum[@type = $name]">
|
||||
<xsl:sort select="@value" data-type="number" order="ascending"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<a name="{@name}"><xsl:value-of select="@name"/></a>
|
||||
<xsl:text> = </xsl:text>
|
||||
<xsl:value-of select="@value"/>
|
||||
<xsl:if test="@info != ''">
|
||||
<xsl:text> : </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text>}
|
||||
</xsl:text>
|
||||
</pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="struct" mode="toc">
|
||||
<pre class="programlisting">
|
||||
<xsl:text>Structure </xsl:text><a href="#{@name}"><xsl:value-of select="@name"/></a><br/>
|
||||
<xsl:value-of select="@type"/><xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:if test="not(field)">
|
||||
<xsl:text>The content of this structure is not made public by the API.
|
||||
</xsl:text>
|
||||
</xsl:if>
|
||||
</pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="struct">
|
||||
<h3><a name="{@name}">Structure <xsl:value-of select="@name"/></a></h3>
|
||||
<pre class="programlisting">
|
||||
<xsl:text>Structure </xsl:text><xsl:value-of select="@name"/><br/>
|
||||
<xsl:value-of select="@type"/><xsl:text> {
|
||||
</xsl:text>
|
||||
<xsl:if test="not(field)">
|
||||
<xsl:text>The content of this structure is not made public by the API.
|
||||
</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="field">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>	</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="@info != ''">
|
||||
<xsl:text>	: </xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="substring(@info, 1, 40)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:for-each>
|
||||
<xsl:text>}</xsl:text>
|
||||
</pre>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="macro">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<h3><a name="{$name}"></a>Macro: <xsl:value-of select="$name"/></h3>
|
||||
<pre><xsl:text>#define </xsl:text><xsl:value-of select="$name"/></pre>
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</p><xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="function" mode="toc">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<xsl:variable name="nlen" select="string-length($name)"/>
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<pre class="programlisting">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>	</xsl:text>
|
||||
<a href="#{@name}"><xsl:value-of select="@name"/></a>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$blen - 40 < 0">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<xsl:text>void</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>, </xsl:text><br/>
|
||||
<xsl:if test="$blen - 40 > 8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$blen - 40 > 0">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>					 </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text>
|
||||
</pre><xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="functype" mode="toc">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<xsl:variable name="nlen" select="string-length($name)"/>
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<pre class="programlisting">
|
||||
<xsl:text>Function type: </xsl:text>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>	</xsl:text>
|
||||
<a href="#{$name}"><xsl:value-of select="$name"/></a>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$blen - 40 < 0">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<xsl:text>void</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>, </xsl:text><br/>
|
||||
<xsl:if test="$blen - 40 > 8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$blen - 40 > 0">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>					 </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)
|
||||
</xsl:text>
|
||||
</pre>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="functype">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<xsl:variable name="nlen" select="string-length($name)"/>
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<h3>
|
||||
<a name="{$name}"></a>
|
||||
<xsl:text>Function type: </xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
</h3>
|
||||
<pre class="programlisting">
|
||||
<xsl:text>Function type: </xsl:text>
|
||||
<xsl:value-of select="$name"/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>	</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$blen - 40 < 0">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<xsl:text>void</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>, </xsl:text><br/>
|
||||
<xsl:if test="$blen - 40 > 8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$blen - 40 > 0">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>					 </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)
|
||||
</xsl:text>
|
||||
</pre>
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
<xsl:if test="arg | return">
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody>
|
||||
<xsl:for-each select="arg">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="return/@info">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</tbody></table></div>
|
||||
</xsl:if>
|
||||
<br/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="function">
|
||||
<xsl:variable name="name" select="string(@name)"/>
|
||||
<xsl:variable name="nlen" select="string-length($name)"/>
|
||||
<xsl:variable name="tlen" select="string-length(return/@type)"/>
|
||||
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
|
||||
<h3><a name="{$name}"></a>Function: <xsl:value-of select="$name"/></h3>
|
||||
<pre class="programlisting">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text>	</xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="$blen - 40 < -8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$blen - 40 < 0">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>	(</xsl:text>
|
||||
<xsl:if test="not(arg)">
|
||||
<xsl:text>void</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:for-each select="arg">
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@type"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="position() != last()">
|
||||
<xsl:text>, </xsl:text><br/>
|
||||
<xsl:if test="$blen - 40 > 8">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="$blen - 40 > 0">
|
||||
<xsl:text>	</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>					 </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text><br/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</pre>
|
||||
<p>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="info"/>
|
||||
</xsl:call-template>
|
||||
</p><xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:if test="arg | return/@info">
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody>
|
||||
<xsl:for-each select="arg">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
<xsl:if test="return/@info">
|
||||
<tr>
|
||||
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
|
||||
<td>
|
||||
<xsl:call-template name="dumptext">
|
||||
<xsl:with-param name="text" select="return/@info"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</tbody></table></div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="exports" mode="toc">
|
||||
<xsl:apply-templates select="key('symbols', string(@symbol))[1]" mode="toc"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="exports">
|
||||
<xsl:apply-templates select="key('symbols', string(@symbol))[1]"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="description">
|
||||
<xsl:if test="deprecated">
|
||||
<h2 style="font-weight:bold;color:red;text-align:center">This module is deprecated</h2>
|
||||
</xsl:if>
|
||||
<xsl:if test="description">
|
||||
<p><xsl:value-of select="description"/></p>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="docomponents">
|
||||
<xsl:param name="mode"/>
|
||||
<xsl:apply-templates select="exports[@type='macro']" mode="$mode">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='enum']" mode="$mode">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='typedef']" mode="$mode">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='struct']" mode="$mode">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='function']" mode="$mode">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="file">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<xsl:variable name="title">Module <xsl:value-of select="$name"/> from <xsl:value-of select="/api/@name"/></xsl:variable>
|
||||
<xsl:document href="{$htmldir}/libvirt-{$name}.html" method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments"/>
|
||||
<div id="pageHeader"/>
|
||||
<div id="content2">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="navbar"/>
|
||||
<xsl:call-template name="description"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="deprecated">
|
||||
<div class="deprecated">
|
||||
<h2>Table of Contents</h2>
|
||||
<xsl:apply-templates select="exports" mode="toc"/>
|
||||
<h2>Description</h2>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:apply-templates select="exports"/>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<h2>Table of Contents</h2>
|
||||
<xsl:apply-templates select="exports[@type='macro']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='enum']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='typedef']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='struct']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='function']" mode="toc">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<h2>Description</h2>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:apply-templates select="exports[@type='macro']">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='enum']">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='typedef']">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='struct']">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="exports[@type='function']">
|
||||
<xsl:sort select='@symbol'/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList2"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:document>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="file" mode="toc">
|
||||
<xsl:variable name="name" select="@name"/>
|
||||
<li>
|
||||
<a href="libvirt-{$name}.html"><xsl:value-of select="$name"/></a>
|
||||
<xsl:text>: </xsl:text>
|
||||
<xsl:value-of select="summary"/>
|
||||
</li>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="mainpage">
|
||||
<xsl:param name="file" select="concat($htmldir, '/index.html')"/>
|
||||
<xsl:variable name="title">Reference Manual for <xsl:value-of select="/api/@name"/></xsl:variable>
|
||||
<xsl:document href="{$file}" method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments"/>
|
||||
<div id="pageHeader"/>
|
||||
<div id="content2">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<h2>Table of Contents</h2>
|
||||
<ul>
|
||||
<xsl:apply-templates select="/api/files/file" mode="toc"/>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList2"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:document>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/">
|
||||
<!-- Save the main index.html as well as a couple of copies -->
|
||||
<xsl:call-template name="mainpage"/>
|
||||
<xsl:call-template name="mainpage">
|
||||
<xsl:with-param name="file" select="concat($htmldir, '/book1.html')"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="mainpage">
|
||||
<xsl:with-param name="file" select="concat($htmldir, '/libvirt-lib.html')"/>
|
||||
</xsl:call-template>
|
||||
<!-- now build the file for each of the modules -->
|
||||
<xsl:apply-templates select="/api/files/file"/>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Releases</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Releases</h1><p>Here is the list of official releases, however since it is early on in the
|
||||
development of libvirt, it is preferable when possible to just use the <a href="downloads.html">CVS version or snapshot</a>, contact the mailing list
|
||||
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3>0.0.4: Feb 10 2006</h3><ul><li>Fix various bugs introduced in the name change</li>
|
||||
</ul><h3>0.0.3: Feb 9 2006</h3><ul><li>Switch name from from 'libvir' to libvirt</li>
|
||||
<li>Starting infrastructure to add code examples</li>
|
||||
<li>Update of python bindings for completeness</li>
|
||||
</ul><h3>0.0.2: Jan 29 2006</h3><ul><li>Update of the documentation, web site redesign (Diana Fong)</li>
|
||||
<li>integration of HTTP xend RPC based on libxend by Anthony Liquori for
|
||||
most operations</li>
|
||||
<li>Adding Save and Restore APIs</li>
|
||||
<li>extended the virsh command line tool (Karel Zak)</li>
|
||||
<li>remove xenstore transactions (Anthony Liguori)</li>
|
||||
<li>fix the Python bindings bug when domain and connections where freed</li>
|
||||
</ul><h3>0.0.1: Dec 19 2005</h3><ul><li>First release</li>
|
||||
<li>Basic management of existing Xen domains</li>
|
||||
<li>Minimal autogenerated Python bindings</li>
|
||||
</ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
|
||||
@@ -1,46 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
version="1.0">
|
||||
<xsl:output method="text" encoding="ISO-8859-1"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:text>
|
||||
NEWS file for libvirt
|
||||
|
||||
Note that this is automatically generated from the news webpage at:
|
||||
http://libvirt.org/news.html
|
||||
|
||||
</xsl:text>
|
||||
<xsl:apply-templates select="//xhtml:div[@id='content2']//xhtml:h3[1]/.."/>
|
||||
</xsl:template>
|
||||
<xsl:template match="xhtml:h3">
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text>:
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="xhtml:ul">
|
||||
<xsl:apply-templates select=".//xhtml:li"/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="xhtml:li">
|
||||
<xsl:text> - </xsl:text>
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="xhtml:a">
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text> at
|
||||
</xsl:text>
|
||||
<xsl:value-of select="@href"/>
|
||||
<xsl:text>
|
||||
</xsl:text>
|
||||
</xsl:template>
|
||||
<xsl:template match="xhtml:p">
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
6 1275 1800 2550 2250
|
||||
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
|
||||
2550 2250 2550 1800 1275 1800 1275 2250 2550 2250
|
||||
4 0 0 50 -1 0 20 0.0000 4 195 930 1500 2100 Domain\001
|
||||
-6
|
||||
6 1275 2325 2550 2775
|
||||
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
|
||||
2550 2775 2550 2325 1275 2325 1275 2775 2550 2775
|
||||
4 0 0 50 -1 0 20 0.0000 4 195 930 1500 2625 Domain\001
|
||||
-6
|
||||
6 1275 2850 2550 3300
|
||||
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
|
||||
2550 3300 2550 2850 1275 2850 1275 3300 2550 3300
|
||||
4 0 0 50 -1 0 20 0.0000 4 195 930 1500 3150 Domain\001
|
||||
-6
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
975 1500 3375 1500 3375 4125 975 4125 975 1500
|
||||
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
|
||||
3225 3975 3225 3450 1125 3450 1125 3975 3225 3975
|
||||
4 0 0 50 -1 0 20 0.0000 4 255 1260 1500 3825 Hypervisor\001
|
||||
4 0 0 50 -1 0 20 0.0000 4 195 600 2700 2850 Node\001
|
||||
BIN
docs/node.gif
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
docs/redhat.gif
|
Before Width: | Height: | Size: 697 B |
310
docs/search.php
@@ -1,310 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
||||
<link rel="stylesheet" type="text/css" href="libvir.css" />
|
||||
<link rel="SHORTCUT ICON" href="/32favicon.png" />
|
||||
<title>Search the documentation on Libvir.org</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments">
|
||||
<p class="p1"></p>
|
||||
</div>
|
||||
<div id="content">
|
||||
<?php
|
||||
$query = $HTTP_GET_VARS[ "query" ];
|
||||
$scope = $HTTP_GET_VARS[ "scope" ];
|
||||
// We handle only the first argument so far
|
||||
$query = $_GET['query'];
|
||||
$query = ltrim ($query);
|
||||
if (! $query) {
|
||||
echo "<h1 align='center'>Search the documentation on Libvir.org</h1>";
|
||||
}
|
||||
if ($scope == NULL)
|
||||
$scope = "any";
|
||||
$scope = ltrim ($scope);
|
||||
if ($scope == "")
|
||||
$scope = "any";
|
||||
|
||||
?>
|
||||
<p> The search service indexes the libvir APIs and documentation as well as the libvir-list@redhat.com mailing-list archives. To use it simply provide a set of keywords:
|
||||
<p>
|
||||
<form action="<?php echo "$PHP_SELF", "?query=", rawurlencode($query) ?>"
|
||||
enctype="application/x-www-form-urlencoded" method="GET">
|
||||
<input name="query" type="TEXT" size="50" value="<?php echo $query?>">
|
||||
<select name="scope">
|
||||
<option value="any">Search All</option>
|
||||
<option value="API" <?php if ($scope == 'API') print "selected"?>>Only the APIs</option>
|
||||
<option value="DOCS" <?php if ($scope == 'DOCS') print "selected"?>>Only the Documentation</option>
|
||||
<option value="LISTS" <?php if ($scope == 'LISTS') print "selected"?>>Only the lists archives</option>
|
||||
</select>
|
||||
<input name=submit type=submit value="Search ...">
|
||||
</form>
|
||||
<?php
|
||||
function logQueryWord($word) {
|
||||
$result = mysql_query ("SELECT ID,Count FROM Queries WHERE Value='$word'");
|
||||
if ($result) {
|
||||
$i = mysql_num_rows($result);
|
||||
if ($i == 0) {
|
||||
mysql_free_result($result);
|
||||
mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
|
||||
} else {
|
||||
$id = mysql_result($result, 0, 0);
|
||||
$count = mysql_result($result, 0, 1);
|
||||
$count ++;
|
||||
mysql_query ("UPDATE Queries SET Count=$count WHERE ID=$id");
|
||||
}
|
||||
} else {
|
||||
mysql_query ("INSERT INTO Queries (Value,Count) VALUES ('$word',1)");
|
||||
}
|
||||
}
|
||||
function queryWord($word) {
|
||||
$result = NULL;
|
||||
$j = 0;
|
||||
if ($word) {
|
||||
$result = mysql_query ("SELECT words.relevance, symbols.name, symbols.type, symbols.module, symbols.descr FROM words, symbols WHERE LCASE(words.name) LIKE LCASE('$word') and words.symbol = symbols.name ORDER BY words.relevance DESC LIMIT 75");
|
||||
if ($result) {
|
||||
$j = mysql_num_rows($result);
|
||||
if ($j == 0)
|
||||
mysql_free_result($result);
|
||||
}
|
||||
logQueryWord($word);
|
||||
}
|
||||
return array($result, $j);
|
||||
}
|
||||
function queryHTMLWord($word) {
|
||||
$result = NULL;
|
||||
$j = 0;
|
||||
if ($word) {
|
||||
$result = mysql_query ("SELECT relevance, name, id, resource, section FROM wordsHTML WHERE LCASE(name) LIKE LCASE('$word') ORDER BY relevance DESC LIMIT 75");
|
||||
if ($result) {
|
||||
$j = mysql_num_rows($result);
|
||||
if ($j == 0)
|
||||
mysql_free_result($result);
|
||||
}
|
||||
logQueryWord($word);
|
||||
}
|
||||
return array($result, $j);
|
||||
}
|
||||
function queryArchiveWord($word) {
|
||||
$result = NULL;
|
||||
$j = 0;
|
||||
if ($word) {
|
||||
$result = mysql_query ("SELECT wordsArchive.relevance, wordsArchive.name, 'xml-list', archives.resource, archives.title FROM wordsArchive, archives WHERE LCASE(wordsArchive.name) LIKE LCASE('$word') and wordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
|
||||
if ($result) {
|
||||
$j = mysql_num_rows($result);
|
||||
if ($j == 0)
|
||||
mysql_free_result($result);
|
||||
}
|
||||
logQueryWord($word);
|
||||
}
|
||||
return array($result, $j);
|
||||
}
|
||||
function resSort ($a, $b) {
|
||||
list($ra,$ta,$ma,$na,$da) = $a;
|
||||
list($rb,$tb,$mb,$nb,$db) = $b;
|
||||
if ($ra == $rb) return 0;
|
||||
return ($ra > $rb) ? -1 : 1;
|
||||
}
|
||||
if (($query) && (strlen($query) <= 50)) {
|
||||
$link = mysql_connect ("localhost", "nobody");
|
||||
if (!$link) {
|
||||
echo "<p> Could not connect to the database: ", mysql_error();
|
||||
} else {
|
||||
mysql_select_db("libvir", $link);
|
||||
$list = explode (" ", $query);
|
||||
$results = array();
|
||||
$number = 0;
|
||||
for ($number = 0;$number < count($list);$number++) {
|
||||
|
||||
$word = $list[$number];
|
||||
if (($scope == 'any') || ($scope == 'API')) {
|
||||
list($result, $j) = queryWord($word);
|
||||
if ($j > 0) {
|
||||
for ($i = 0; $i < $j; $i++) {
|
||||
$relevance = mysql_result($result, $i, 0);
|
||||
$name = mysql_result($result, $i, 1);
|
||||
$type = mysql_result($result, $i, 2);
|
||||
$module = mysql_result($result, $i, 3);
|
||||
$desc = mysql_result($result, $i, 4);
|
||||
if (array_key_exists($name, $results)) {
|
||||
list($r,$t,$m,$d,$w,$u) = $results[$name];
|
||||
$results[$name] = array(($r + $relevance) * 2,
|
||||
$t,$m,$d,$w,$u);
|
||||
} else {
|
||||
$id = $name;
|
||||
$m = strtolower($module);
|
||||
$url = "html/libvir-$module.html#$id";
|
||||
$results[$name] = array($relevance,$type,
|
||||
$module, $desc, $name, $url);
|
||||
}
|
||||
}
|
||||
mysql_free_result($result);
|
||||
}
|
||||
}
|
||||
if (($scope == 'any') || ($scope == 'DOCS')) {
|
||||
list($result, $k) = queryHTMLWord($word);
|
||||
if ($k > 0) {
|
||||
for ($i = 0; $i < $k; $i++) {
|
||||
$relevance = mysql_result($result, $i, 0);
|
||||
$name = mysql_result($result, $i, 1);
|
||||
$id = mysql_result($result, $i, 2);
|
||||
$module = mysql_result($result, $i, 3);
|
||||
$desc = mysql_result($result, $i, 4);
|
||||
$url = $module;
|
||||
if ($id != "") {
|
||||
$url = $url + "#$id";
|
||||
}
|
||||
$results["$name _html_ $number _ $i"] =
|
||||
array($relevance, "XML docs",
|
||||
$module, $desc, $name, $url);
|
||||
}
|
||||
mysql_free_result($result);
|
||||
}
|
||||
}
|
||||
if (($scope == 'any') || ($scope == 'LISTS')) {
|
||||
list($result, $j) = queryArchiveWord($word);
|
||||
if ($j > 0) {
|
||||
for ($i = 0; $i < $j; $i++) {
|
||||
$relevance = mysql_result($result, $i, 0);
|
||||
$name = mysql_result($result, $i, 1);
|
||||
$type = mysql_result($result, $i, 2);
|
||||
$url = mysql_result($result, $i, 3);
|
||||
$desc = mysql_result($result, $i, 4);
|
||||
if (array_key_exists($url, $results)) {
|
||||
list($r,$t,$m,$d,$w,$u) = $results[$url];
|
||||
$results[$name] = array(($r + $relevance) * 2,
|
||||
$t,$m,$d,$w,$u);
|
||||
} else {
|
||||
$id = $name;
|
||||
$m = strtolower($module);
|
||||
$u = str_replace(
|
||||
"http://mail.gnome.org/archives/xml/", "", $url);
|
||||
$results[$url] = array($relevance,$type,
|
||||
$u, $desc, $name, $url);
|
||||
}
|
||||
}
|
||||
mysql_free_result($result);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((count($results) == 0) && (count($list) == 1)) {
|
||||
$word = $list[0];
|
||||
if (($scope == 'any') || ($scope == 'XMLAPI')) {
|
||||
list($result, $j) = queryWord("vir$word");
|
||||
if ($j > 0) {
|
||||
for ($i = 0; $i < $j; $i++) {
|
||||
$relevance = mysql_result($result, $i, 0);
|
||||
$name = mysql_result($result, $i, 1);
|
||||
$type = mysql_result($result, $i, 2);
|
||||
$module = mysql_result($result, $i, 3);
|
||||
$desc = mysql_result($result, $i, 4);
|
||||
if (array_key_exists($name, $results)) {
|
||||
list($r,$t,$m,$d,$w,$u) = $results[$name];
|
||||
$results[$name] = array(($r + $relevance) * 2,
|
||||
$t,$m,$d,$w,$u);
|
||||
} else {
|
||||
$id = $name;
|
||||
$m = strtolower($module);
|
||||
$url = "html/libvir-$module.html#$id";
|
||||
$results[$name] = array($relevance,$type,
|
||||
$module, $desc, $name, $url);
|
||||
}
|
||||
}
|
||||
mysql_free_result($result);
|
||||
}
|
||||
}
|
||||
}
|
||||
mysql_close($link);
|
||||
$nb = count($results);
|
||||
echo "<h3 align='center'>Found $nb results for query $query</h3>\n";
|
||||
usort($results, "resSort");
|
||||
|
||||
if ($nb > 0) {
|
||||
printf("<table><tbody>\n");
|
||||
printf("<tr><td>Quality</td><td>Symbol</td><td>Type</td><td>module</td><td>Description</td></tr>\n");
|
||||
$i = 0;
|
||||
while (list ($name, $val) = each ($results)) {
|
||||
list($r,$t,$m,$d,$s,$u) = $val;
|
||||
$m = str_replace("<", "<", $m);
|
||||
$s = str_replace("<", "<", $s);
|
||||
$d = str_replace("<", "<", $d);
|
||||
echo "<tr><td>$r</td><td><a href='$u'>$s</a></td><td>$t</td><td>$m</td><td>$d</td></tr>";
|
||||
$i = $i + 1;
|
||||
if ($i > 75)
|
||||
break;
|
||||
}
|
||||
printf("</tbody></table>\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="linkList">
|
||||
<div class="llinks">
|
||||
<h3 class="links">
|
||||
<span>main menu</span>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="index.html">Home</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="news.html">Releases</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="intro.html">Introduction</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="architecture.html">libvir architecture</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="downloads.html">Downloads</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="FAQ.html">FAQ</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="bugs.html">Reporting bugs and getting help</a>
|
||||
</li>
|
||||
<li>
|
||||
<a style="font-weight:bold" href="html/index.html">API Menu</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="ChangeLog.html">Recent Changes</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="llinks">
|
||||
<h3 class="links">
|
||||
<span>related links</span>
|
||||
</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a>
|
||||
</li>
|
||||
<li>
|
||||
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="12" value="Search..." />
|
||||
<input name="submit" type="submit" value="Go" />
|
||||
</form>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://xmlsoft.org/">
|
||||
<img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bottom">
|
||||
<p class="p1"></p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
521
docs/site.xsl
@@ -1,521 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
|
||||
|
||||
<xsl:variable name="href_base" select="''"/>
|
||||
<xsl:variable name="menu_name">Main Menu</xsl:variable>
|
||||
<!--
|
||||
- returns the filename associated to an ID in the original file
|
||||
-->
|
||||
<xsl:template name="tocfilename">
|
||||
<xsl:param name="name" select="string(@href)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$name = '#Introducti'">
|
||||
<xsl:text>intro.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Documentat'">
|
||||
<xsl:text>docs.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Reporting'">
|
||||
<xsl:text>bugs.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#help'">
|
||||
<xsl:text>help.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Help'">
|
||||
<xsl:text>help.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Downloads'">
|
||||
<xsl:text>downloads.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#News'">
|
||||
<xsl:text>news.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Contributi'">
|
||||
<xsl:text>contribs.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#xsltproc'">
|
||||
<xsl:text>xsltproc2.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#API'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#XSLT'">
|
||||
<xsl:text>XSLT.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#XML'">
|
||||
<xsl:text>XMLinfo.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Validation'">
|
||||
<xsl:text>xmldtd.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#tree'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#library'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#interface'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Example'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Entities'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#architecture'">
|
||||
<xsl:text>architecture.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Namespaces'">
|
||||
<xsl:text>namespaces.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#DOM'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Catalog'">
|
||||
<xsl:text>catalog.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Upgrading'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Encodings'">
|
||||
<xsl:text>encoding.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#IO'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Memory'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Thread'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#FAQ'">
|
||||
<xsl:text>FAQ.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Python'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = ''">
|
||||
<xsl:text>unknown.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$name"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
<xsl:template name="filename">
|
||||
<xsl:param name="name" select="string(@href)"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$name = '#Introducti'">
|
||||
<xsl:text>intro.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Documentat'">
|
||||
<xsl:text>docs.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Reporting'">
|
||||
<xsl:text>bugs.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#help'">
|
||||
<xsl:text>help.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Help'">
|
||||
<xsl:text>help.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Downloads'">
|
||||
<xsl:text>downloads.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#News'">
|
||||
<xsl:text>news.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Contributi'">
|
||||
<xsl:text>contribs.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#xsltproc'">
|
||||
<xsl:text>xsltproc2.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#API'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#XSLT'">
|
||||
<xsl:text>XSLT.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#XML'">
|
||||
<xsl:text>XMLinfo.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Validation'">
|
||||
<xsl:text>xmldtd.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#tree'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#library'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#interface'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Example'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Entities'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#architecture'">
|
||||
<xsl:text>architecture.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Namespaces'">
|
||||
<xsl:text>namespaces.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#DOM'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Catalog'">
|
||||
<xsl:text>catalog.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Upgrading'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Encodings'">
|
||||
<xsl:text>encoding.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#IO'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Memory'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Thread'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#FAQ'">
|
||||
<xsl:text>FAQ.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = '#Python'">
|
||||
<xsl:text></xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="$name = ''">
|
||||
<xsl:text>unknown.html</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$name"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
<!--
|
||||
- The global title
|
||||
-->
|
||||
<xsl:variable name="globaltitle" select="string(/html/body/h1[1])"/>
|
||||
|
||||
<!--
|
||||
the main menu box
|
||||
-->
|
||||
<xsl:template name="linkList">
|
||||
<div class="linkList">
|
||||
<div class="llinks">
|
||||
<h3 class="links"><span>main menu</span></h3>
|
||||
<ul>
|
||||
<li>Home</li>
|
||||
<xsl:for-each select="/html/body/h2">
|
||||
<xsl:variable name="filename">
|
||||
<xsl:call-template name="tocfilename">
|
||||
<xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$filename != ''">
|
||||
<li>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$filename"/>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="$filename = 'docs.html'">
|
||||
<xsl:attribute name="style">font-weight:bold</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</li>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<li><a style="font-weight:bold"
|
||||
href="{$href_base}html/index.html">API Menu</a></li>
|
||||
<li><a href="{$href_base}ChangeLog.html">Recent Changes</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="llinks">
|
||||
<h3 class="links"><span>related links</span></h3>
|
||||
<ul>
|
||||
<li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li>
|
||||
<li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li>
|
||||
<li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" />
|
||||
</form></li>
|
||||
<li><a href="http://xmlsoft.org/"> <img src="{$href_base}Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li>
|
||||
</ul>
|
||||
<p class='credits'>Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
<xsl:template name="linkList2">
|
||||
<div class="linkList2">
|
||||
<div class="llinks2">
|
||||
<h3 class="links2"><span>main menu</span></h3>
|
||||
<ul>
|
||||
<li><a href="{$href_base}index.html">Home</a></li>
|
||||
<xsl:for-each select="/html/body/h2">
|
||||
<xsl:variable name="filename">
|
||||
<xsl:call-template name="tocfilename">
|
||||
<xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$filename != ''">
|
||||
<li>
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$filename"/>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="$filename = 'docs.html'">
|
||||
<xsl:attribute name="style">font-weight:bold</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:element>
|
||||
</li>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<li><a style="font-weight:bold"
|
||||
href="{$href_base}html/index.html">API Menu</a></li>
|
||||
<li><a href="{$href_base}ChangeLog.html">Recent Changes</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="llinks2">
|
||||
<h3 class="links2"><span>related links</span></h3>
|
||||
<ul>
|
||||
<li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li>
|
||||
<li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li>
|
||||
<li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" />
|
||||
</form></li>
|
||||
<li><a href="http://xmlsoft.org/"> <img src="{$href_base}Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li>
|
||||
</ul>
|
||||
<p class='credits'>Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
the main menu box
|
||||
-->
|
||||
<xsl:template name="develtoc">
|
||||
<div class="left">
|
||||
<form action="search.php"
|
||||
enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="20" value=""/>
|
||||
<input name="submit" type="submit" value="Search ..."/>
|
||||
</form>
|
||||
<div class="box">
|
||||
<h2 class="box_title">API menu</h2>
|
||||
</div>
|
||||
<p><a href="{$href_base}index.html">Main menu</a></p>
|
||||
<p><a href="{$href_base}/html/index.html">API menu</a></p>
|
||||
<p><a href="{$href_base}ChangeLog.html">ChangeLog</a></p>
|
||||
<div class="box">
|
||||
<h2 class="box_title">API Indexes</h2>
|
||||
</div>
|
||||
<p><a href="{$href_base}APIchunk0.html">Alphabetic</a></p>
|
||||
<p><a href="{$href_base}APIconstructors.html">Constructors</a></p>
|
||||
<p><a href="{$href_base}APIfunctions.html">Functions/Types</a></p>
|
||||
<p><a href="{$href_base}APIfiles.html">Modules</a></p>
|
||||
<p><a href="{$href_base}APIsymbols.html">Symbols</a></p>
|
||||
<div class="box">
|
||||
<h2 class="box_title">related links</h2>
|
||||
</div>
|
||||
<p><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></p>
|
||||
<p><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></p>
|
||||
<a href="http://xmlsoft.org/"><img src="{$href_base}Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo"/></a>
|
||||
</div>
|
||||
<div class="linkList2">
|
||||
<div class="llinks2">
|
||||
<h3 class="links2"><span>API menu</span></h3>
|
||||
<ul>
|
||||
<li><a href="{$href_base}index.html">Main menu</a></li>
|
||||
<li><a href="{$href_base}/html/index.html">API menu</a></li>
|
||||
<li><a href="{$href_base}ChangeLog.html">ChangeLog</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="llinks2">
|
||||
<h3 class="links2"><span>API indexes</span></h3>
|
||||
<ul>
|
||||
<li><a href="{$href_base}APIchunk0.html">Alphabetic</a></li>
|
||||
<li><a href="{$href_base}APIconstructors.html">Constructors</a></li>
|
||||
<li><a href="{$href_base}APIfunctions.html">Functions/Types</a></li>
|
||||
<li><a href="{$href_base}APIfiles.html">Modules</a></li>
|
||||
<li><a href="{$href_base}APIsymbols.html">Symbols</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="llinks2">
|
||||
<h3 class="links2"><span>related links</span></h3>
|
||||
<ul>
|
||||
<li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li>
|
||||
<li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li>
|
||||
<li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get">
|
||||
<input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" />
|
||||
</form></li>
|
||||
<li><a href="http://xmlsoft.org/"> <img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
the menu box for developper's pages
|
||||
-->
|
||||
<!--
|
||||
the page title
|
||||
-->
|
||||
|
||||
<xsl:template name="titlebox">
|
||||
<xsl:param name="title"/>
|
||||
<h1 class="style1"><xsl:value-of select="$title"/></h1>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
- Write the styles in the head
|
||||
-->
|
||||
<xsl:template name="style">
|
||||
<link rel="stylesheet" type="text/css" href="{$href_base}libvirt.css" />
|
||||
<link rel="SHORTCUT ICON" href="/32favicon.png" />
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
- The top section
|
||||
-->
|
||||
<xsl:template name="top">
|
||||
<div id="top">
|
||||
<img src="{$href_base}libvirtHeader.png" alt="Libvirt the virtualization API" />
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
- The top section for the main page
|
||||
-->
|
||||
<xsl:template name="topmain">
|
||||
<div id="topmain">
|
||||
<img src="{$href_base}libvirtLogo.png" alt="Libvirt the virtualization API" />
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
- The bottom section
|
||||
-->
|
||||
<xsl:template name="bottom">
|
||||
<div id="bottom">
|
||||
<p class="p1"></p>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
- Handling of nodes in the body after an H2
|
||||
- Open a new file and dump all the siblings up to the next H2
|
||||
-->
|
||||
<xsl:template name="subfile">
|
||||
<xsl:param name="header" select="following-sibling::h2[1]"/>
|
||||
<xsl:variable name="filename">
|
||||
<xsl:call-template name="filename">
|
||||
<xsl:with-param name="name" select="concat('#', string($header/a[1]/@name))"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="title">
|
||||
<xsl:value-of select="$header"/>
|
||||
</xsl:variable>
|
||||
<xsl:document href="{$filename}" method="xml" encoding="ISO-8859-1"
|
||||
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<xsl:element name="title">
|
||||
<xsl:value-of select="$title"/>
|
||||
</xsl:element>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments"/>
|
||||
<div id="pageHeader"/>
|
||||
<div id="content2">
|
||||
<xsl:call-template name="titlebox">
|
||||
<xsl:with-param name="title" select="$title"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates mode="subfile" select="$header/following-sibling::*[preceding-sibling::h2[1] = $header and name() != 'h2' ]"/>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList2"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:document>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template mode="subcontent" match="@*|node()">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates mode="subcontent" select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template mode="content" match="@*|node()">
|
||||
<xsl:if test="name() != 'h1' and name() != 'h2'">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates mode="subcontent" select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template mode="subfile" match="@*|node()">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates mode="content" select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<!--
|
||||
- Handling of the initial body and head HTML document
|
||||
-->
|
||||
<xsl:template match="body">
|
||||
<xsl:variable name="firsth2" select="./h2[1]"/>
|
||||
<body>
|
||||
<div id="container">
|
||||
<div id="intro">
|
||||
<div id="adjustments">
|
||||
<p class="p1"></p>
|
||||
</div>
|
||||
<div id="content">
|
||||
<xsl:apply-templates mode="content" select="($firsth2/preceding-sibling::*)"/>
|
||||
<xsl:for-each select="./h2">
|
||||
<xsl:call-template name="subfile">
|
||||
<xsl:with-param name="header" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</div>
|
||||
<xsl:call-template name="linkList"/>
|
||||
<xsl:call-template name="bottom"/>
|
||||
</div>
|
||||
</body>
|
||||
</xsl:template>
|
||||
<xsl:template match="head">
|
||||
</xsl:template>
|
||||
<xsl:template match="html">
|
||||
<xsl:message>Generating the Web pages</xsl:message>
|
||||
<html>
|
||||
<head>
|
||||
<xsl:call-template name="style"/>
|
||||
<title>the virtualization API</title>
|
||||
</head>
|
||||
<xsl:apply-templates/>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -1,72 +0,0 @@
|
||||
#FIG 3.2
|
||||
Landscape
|
||||
Center
|
||||
Inches
|
||||
Letter
|
||||
100.00
|
||||
Single
|
||||
-2
|
||||
1200 2
|
||||
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
|
||||
1125 825 2400 825 2400 2850 1125 2850 1125 825
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
2400 1200 5175 1200
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
2400 1200 5175 2025
|
||||
2 4 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
5925 1500 5925 975 5175 975 5175 1500 5925 1500
|
||||
2 4 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
5925 2400 5925 1875 5175 1875 5175 2400 5925 2400
|
||||
2 4 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
|
||||
2400 5250 2400 4500 1500 4500 1500 5250 2400 5250
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
1875 4725 1875 2850
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
5175 2175 2400 4500
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
5175 1350 2400 4500
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
5925 1200 6825 1200
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
5925 2100 6825 2100
|
||||
2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5
|
||||
3900 4650 6750 4650 6750 4875 3900 4875 3900 4650
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
|
||||
4200 4650 4200 4875
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
|
||||
4500 4650 4500 4875
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
|
||||
4725 4650 4725 4875
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
|
||||
6450 4650 6450 4875
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2
|
||||
6150 4650 6150 4875
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
4050 4725 5250 1500
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
4350 4725 5250 2400
|
||||
2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2
|
||||
1 1 1.00 60.00 120.00
|
||||
2250 4800 3900 4800
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 1005 1275 1125 Domains\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 585 1275 1440 hash \001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 1650 4725 750 virDomainPtr\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 2055 975 5700 virConnectionPtr\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 945 900 4200 domains\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 135 555 3450 2475 conn\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 135 615 6075 1050 name\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 1365 6975 1275 "Domain-0"\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 585 6975 2175 "fc4"\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 540 1275 1755 table\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 135 615 1275 2385 name\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 960 1275 2070 based on\001
|
||||
4 0 0 50 -1 0 18 0.0000 4 195 315 2850 5100 ids\001
|
||||
@@ -1,10 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
virincdir = $(includedir)/libvirt
|
||||
|
||||
virinc_HEADERS = libvirt.h
|
||||
|
||||
install-exec-hook:
|
||||
$(mkinstalldirs) $(DESTDIR)$(virincdir)
|
||||
|
||||
EXTRA_DIST = libvirt.h.in
|
||||
@@ -1,254 +0,0 @@
|
||||
/*
|
||||
* libvirt.h:
|
||||
* Summary: core interfaces for the libvirt library
|
||||
* Description: Provides the interfaces of the libvirt library to handle
|
||||
* Xen domains from a process running in domain 0
|
||||
*
|
||||
* Copy: Copyright (C) 2005,2006 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_VIRLIB_H__
|
||||
#define __VIR_VIRLIB_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* virConnect:
|
||||
*
|
||||
* a virConnect is a private structure representing a connection to
|
||||
* the Xen Hypervisor.
|
||||
*/
|
||||
typedef struct _virConnect virConnect;
|
||||
|
||||
/**
|
||||
* virConnectPtr:
|
||||
*
|
||||
* a virConnectPtr is pointer to a virConnect private structure, this is the
|
||||
* type used to reference a connection to the Xen Hypervisor in the API.
|
||||
*/
|
||||
typedef virConnect *virConnectPtr;
|
||||
|
||||
/**
|
||||
* virDomain:
|
||||
*
|
||||
* a virDomain is a private structure representing a Xen domain.
|
||||
*/
|
||||
typedef struct _virDomain virDomain;
|
||||
|
||||
/**
|
||||
* virDomainPtr:
|
||||
*
|
||||
* a virDomainPtr is pointer to a virDomain private structure, this is the
|
||||
* type used to reference a Xen domain in the API.
|
||||
*/
|
||||
typedef virDomain *virDomainPtr;
|
||||
|
||||
/**
|
||||
* virDomainState:
|
||||
*
|
||||
* A domain may be in different states at a given point in time
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_NOSTATE = 0, /* no state */
|
||||
VIR_DOMAIN_RUNNING = 1, /* the domain is running */
|
||||
VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
|
||||
VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
|
||||
VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
|
||||
VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
|
||||
VIR_DOMAIN_CRASHED = 6 /* the domain is crashed */
|
||||
} virDomainState;
|
||||
|
||||
/**
|
||||
* virDomainRestart:
|
||||
*
|
||||
* Flags that determine the action to take on a shutdown or crash of a domain
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_DESTROY = 1, /* destroy the domain */
|
||||
VIR_DOMAIN_RESTART = 2, /* restart the domain */
|
||||
VIR_DOMAIN_PRESERVE= 3, /* keep as is, need manual destroy, for debug */
|
||||
VIR_DOMAIN_RENAME_RESTART= 4/* restart under an new unique name */
|
||||
} virDomainRestart;
|
||||
|
||||
/**
|
||||
* virDeviceMode:
|
||||
*
|
||||
* Flags that determine permission to expose a device to the guest
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DEVICE_DEFAULT = 0, /* Default mode */
|
||||
VIR_DEVICE_RO = 1, /* Access read-only */
|
||||
VIR_DEVICE_RW = 2, /* Access read-write */
|
||||
VIR_DEVICE_RW_FORCE= 3 /* Forced read-write even if already used */
|
||||
} virDeviceMode;
|
||||
|
||||
/**
|
||||
* virDomainInfoPtr:
|
||||
*
|
||||
* a virDomainInfo is a structure filled by virDomainGetInfo()
|
||||
*/
|
||||
|
||||
typedef struct _virDomainInfo virDomainInfo;
|
||||
|
||||
struct _virDomainInfo {
|
||||
unsigned char state; /* the running state, one of virDomainFlags */
|
||||
unsigned long maxMem; /* the maximum memory in KBytes allowed */
|
||||
unsigned long memory; /* the memory in KBytes used by the domain */
|
||||
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
|
||||
|
||||
/*
|
||||
* Informations below are only available to clients with a connection
|
||||
* with full access to the hypervisor
|
||||
*/
|
||||
unsigned long long cpuTime; /* the CPU time used in nanoseconds */
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* - check what can be extracted publicly from xenstore
|
||||
* and what's private limited to the hypervisor call.
|
||||
* - add padding to this structure for ABI long term protection
|
||||
*/
|
||||
};
|
||||
|
||||
/**
|
||||
* virDomainInfoPtr:
|
||||
*
|
||||
* a virDomainInfoPtr is a pointer to a virDomainInfo structure.
|
||||
*/
|
||||
|
||||
typedef virDomainInfo *virDomainInfoPtr;
|
||||
|
||||
/**
|
||||
* virDomainKernel:
|
||||
*
|
||||
* a virDomainImage is the set of kernel related informations associated
|
||||
* to a domain
|
||||
*/
|
||||
|
||||
typedef struct _virDomainKernel virDomainKernel;
|
||||
|
||||
struct _virDomainKernel {
|
||||
const char *kernel; /* filename pointing to the kernel image */
|
||||
const char *ramdisk; /* an optional init ramdisk */
|
||||
const char *root; /* an optional root block device */
|
||||
const char *extra; /* optional kernel command line parameters */
|
||||
};
|
||||
|
||||
/**
|
||||
* virDomainKernelPtr:
|
||||
*
|
||||
* a virDomainKernelPtr is a pointer to a virDomainKernel structure.
|
||||
*/
|
||||
|
||||
typedef virDomainKernel *virDomainKernelPtr;
|
||||
|
||||
/**
|
||||
* virDomainCreateFlags:
|
||||
*
|
||||
* Flags OR'ed together to provide specific behaviour when creating a
|
||||
* Domain.
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_NONE = 0
|
||||
} virDomainCreateFlags;
|
||||
|
||||
/* library versionning */
|
||||
|
||||
/**
|
||||
* LIBVIR_VERSION_NUMBER:
|
||||
*
|
||||
* Macro providing the version of the library as
|
||||
* version * 1,000,000 + minor * 1000 + micro
|
||||
*/
|
||||
|
||||
#define LIBVIR_VERSION_NUMBER 4
|
||||
|
||||
int virGetVersion (unsigned long *libVer,
|
||||
const char *type,
|
||||
unsigned long *typeVer);
|
||||
|
||||
/*
|
||||
* Connection and disconnections to the Hypervisor
|
||||
*/
|
||||
virConnectPtr virConnectOpen (const char *name);
|
||||
virConnectPtr virConnectOpenReadOnly (const char *name);
|
||||
int virConnectClose (virConnectPtr conn);
|
||||
const char * virConnectGetType (virConnectPtr conn);
|
||||
int virConnectGetVersion (virConnectPtr conn,
|
||||
unsigned long *hvVer);
|
||||
|
||||
/*
|
||||
* Gather list of running domains
|
||||
*/
|
||||
int virConnectListDomains (virConnectPtr conn,
|
||||
int *ids,
|
||||
int maxids);
|
||||
|
||||
/*
|
||||
* Number of domains
|
||||
*/
|
||||
int virConnectNumOfDomains (virConnectPtr conn);
|
||||
|
||||
|
||||
/*
|
||||
* Domain creation and destruction
|
||||
*/
|
||||
virDomainPtr virDomainCreateLinux (virConnectPtr conn,
|
||||
const char *kernel_path,
|
||||
const char *initrd_path,
|
||||
const char *cmdline,
|
||||
unsigned long memory,
|
||||
unsigned int flags);
|
||||
virDomainPtr virDomainLookupByName (virConnectPtr conn,
|
||||
const char *name);
|
||||
virDomainPtr virDomainLookupByID (virConnectPtr conn,
|
||||
int id);
|
||||
int virDomainShutdown (virDomainPtr domain);
|
||||
int virDomainDestroy (virDomainPtr domain);
|
||||
int virDomainFree (virDomainPtr domain);
|
||||
|
||||
/*
|
||||
* Domain suspend/resume
|
||||
*/
|
||||
int virDomainSuspend (virDomainPtr domain);
|
||||
int virDomainResume (virDomainPtr domain);
|
||||
|
||||
/*
|
||||
* Domain save/restore
|
||||
*/
|
||||
int virDomainSave (virDomainPtr domain,
|
||||
const char *to);
|
||||
int virDomainRestore (virConnectPtr conn,
|
||||
const char *from);
|
||||
|
||||
/*
|
||||
* Domain runtime informations
|
||||
*/
|
||||
int virDomainGetInfo (virDomainPtr domain,
|
||||
virDomainInfoPtr info);
|
||||
|
||||
/*
|
||||
* Dynamic control of domains
|
||||
*/
|
||||
const char * virDomainGetName (virDomainPtr domain);
|
||||
unsigned int virDomainGetID (virDomainPtr domain);
|
||||
char * virDomainGetOSType (virDomainPtr domain);
|
||||
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
|
||||
int virDomainSetMaxMemory (virDomainPtr domain,
|
||||
unsigned long memory);
|
||||
/*
|
||||
* XML domain description
|
||||
*/
|
||||
char * virDomainGetXMLDesc (virDomainPtr domain, int flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __VIR_VIRLIB_H__ */
|
||||
@@ -1,254 +0,0 @@
|
||||
/*
|
||||
* libvirt.h:
|
||||
* Summary: core interfaces for the libvirt library
|
||||
* Description: Provides the interfaces of the libvirt library to handle
|
||||
* Xen domains from a process running in domain 0
|
||||
*
|
||||
* Copy: Copyright (C) 2005,2006 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_VIRLIB_H__
|
||||
#define __VIR_VIRLIB_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* virConnect:
|
||||
*
|
||||
* a virConnect is a private structure representing a connection to
|
||||
* the Xen Hypervisor.
|
||||
*/
|
||||
typedef struct _virConnect virConnect;
|
||||
|
||||
/**
|
||||
* virConnectPtr:
|
||||
*
|
||||
* a virConnectPtr is pointer to a virConnect private structure, this is the
|
||||
* type used to reference a connection to the Xen Hypervisor in the API.
|
||||
*/
|
||||
typedef virConnect *virConnectPtr;
|
||||
|
||||
/**
|
||||
* virDomain:
|
||||
*
|
||||
* a virDomain is a private structure representing a Xen domain.
|
||||
*/
|
||||
typedef struct _virDomain virDomain;
|
||||
|
||||
/**
|
||||
* virDomainPtr:
|
||||
*
|
||||
* a virDomainPtr is pointer to a virDomain private structure, this is the
|
||||
* type used to reference a Xen domain in the API.
|
||||
*/
|
||||
typedef virDomain *virDomainPtr;
|
||||
|
||||
/**
|
||||
* virDomainState:
|
||||
*
|
||||
* A domain may be in different states at a given point in time
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_NOSTATE = 0, /* no state */
|
||||
VIR_DOMAIN_RUNNING = 1, /* the domain is running */
|
||||
VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
|
||||
VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
|
||||
VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
|
||||
VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
|
||||
VIR_DOMAIN_CRASHED = 6 /* the domain is crashed */
|
||||
} virDomainState;
|
||||
|
||||
/**
|
||||
* virDomainRestart:
|
||||
*
|
||||
* Flags that determine the action to take on a shutdown or crash of a domain
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_DESTROY = 1, /* destroy the domain */
|
||||
VIR_DOMAIN_RESTART = 2, /* restart the domain */
|
||||
VIR_DOMAIN_PRESERVE= 3, /* keep as is, need manual destroy, for debug */
|
||||
VIR_DOMAIN_RENAME_RESTART= 4/* restart under an new unique name */
|
||||
} virDomainRestart;
|
||||
|
||||
/**
|
||||
* virDeviceMode:
|
||||
*
|
||||
* Flags that determine permission to expose a device to the guest
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DEVICE_DEFAULT = 0, /* Default mode */
|
||||
VIR_DEVICE_RO = 1, /* Access read-only */
|
||||
VIR_DEVICE_RW = 2, /* Access read-write */
|
||||
VIR_DEVICE_RW_FORCE= 3 /* Forced read-write even if already used */
|
||||
} virDeviceMode;
|
||||
|
||||
/**
|
||||
* virDomainInfoPtr:
|
||||
*
|
||||
* a virDomainInfo is a structure filled by virDomainGetInfo()
|
||||
*/
|
||||
|
||||
typedef struct _virDomainInfo virDomainInfo;
|
||||
|
||||
struct _virDomainInfo {
|
||||
unsigned char state; /* the running state, one of virDomainFlags */
|
||||
unsigned long maxMem; /* the maximum memory in KBytes allowed */
|
||||
unsigned long memory; /* the memory in KBytes used by the domain */
|
||||
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
|
||||
|
||||
/*
|
||||
* Informations below are only available to clients with a connection
|
||||
* with full access to the hypervisor
|
||||
*/
|
||||
unsigned long long cpuTime; /* the CPU time used in nanoseconds */
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* - check what can be extracted publicly from xenstore
|
||||
* and what's private limited to the hypervisor call.
|
||||
* - add padding to this structure for ABI long term protection
|
||||
*/
|
||||
};
|
||||
|
||||
/**
|
||||
* virDomainInfoPtr:
|
||||
*
|
||||
* a virDomainInfoPtr is a pointer to a virDomainInfo structure.
|
||||
*/
|
||||
|
||||
typedef virDomainInfo *virDomainInfoPtr;
|
||||
|
||||
/**
|
||||
* virDomainKernel:
|
||||
*
|
||||
* a virDomainImage is the set of kernel related informations associated
|
||||
* to a domain
|
||||
*/
|
||||
|
||||
typedef struct _virDomainKernel virDomainKernel;
|
||||
|
||||
struct _virDomainKernel {
|
||||
const char *kernel; /* filename pointing to the kernel image */
|
||||
const char *ramdisk; /* an optional init ramdisk */
|
||||
const char *root; /* an optional root block device */
|
||||
const char *extra; /* optional kernel command line parameters */
|
||||
};
|
||||
|
||||
/**
|
||||
* virDomainKernelPtr:
|
||||
*
|
||||
* a virDomainKernelPtr is a pointer to a virDomainKernel structure.
|
||||
*/
|
||||
|
||||
typedef virDomainKernel *virDomainKernelPtr;
|
||||
|
||||
/**
|
||||
* virDomainCreateFlags:
|
||||
*
|
||||
* Flags OR'ed together to provide specific behaviour when creating a
|
||||
* Domain.
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_NONE = 0
|
||||
} virDomainCreateFlags;
|
||||
|
||||
/* library versionning */
|
||||
|
||||
/**
|
||||
* LIBVIR_VERSION_NUMBER:
|
||||
*
|
||||
* Macro providing the version of the library as
|
||||
* version * 1,000,000 + minor * 1000 + micro
|
||||
*/
|
||||
|
||||
#define LIBVIR_VERSION_NUMBER @LIBVIR_VERSION_NUMBER@
|
||||
|
||||
int virGetVersion (unsigned long *libVer,
|
||||
const char *type,
|
||||
unsigned long *typeVer);
|
||||
|
||||
/*
|
||||
* Connection and disconnections to the Hypervisor
|
||||
*/
|
||||
virConnectPtr virConnectOpen (const char *name);
|
||||
virConnectPtr virConnectOpenReadOnly (const char *name);
|
||||
int virConnectClose (virConnectPtr conn);
|
||||
const char * virConnectGetType (virConnectPtr conn);
|
||||
int virConnectGetVersion (virConnectPtr conn,
|
||||
unsigned long *hvVer);
|
||||
|
||||
/*
|
||||
* Gather list of running domains
|
||||
*/
|
||||
int virConnectListDomains (virConnectPtr conn,
|
||||
int *ids,
|
||||
int maxids);
|
||||
|
||||
/*
|
||||
* Number of domains
|
||||
*/
|
||||
int virConnectNumOfDomains (virConnectPtr conn);
|
||||
|
||||
|
||||
/*
|
||||
* Domain creation and destruction
|
||||
*/
|
||||
virDomainPtr virDomainCreateLinux (virConnectPtr conn,
|
||||
const char *kernel_path,
|
||||
const char *initrd_path,
|
||||
const char *cmdline,
|
||||
unsigned long memory,
|
||||
unsigned int flags);
|
||||
virDomainPtr virDomainLookupByName (virConnectPtr conn,
|
||||
const char *name);
|
||||
virDomainPtr virDomainLookupByID (virConnectPtr conn,
|
||||
int id);
|
||||
int virDomainShutdown (virDomainPtr domain);
|
||||
int virDomainDestroy (virDomainPtr domain);
|
||||
int virDomainFree (virDomainPtr domain);
|
||||
|
||||
/*
|
||||
* Domain suspend/resume
|
||||
*/
|
||||
int virDomainSuspend (virDomainPtr domain);
|
||||
int virDomainResume (virDomainPtr domain);
|
||||
|
||||
/*
|
||||
* Domain save/restore
|
||||
*/
|
||||
int virDomainSave (virDomainPtr domain,
|
||||
const char *to);
|
||||
int virDomainRestore (virConnectPtr conn,
|
||||
const char *from);
|
||||
|
||||
/*
|
||||
* Domain runtime informations
|
||||
*/
|
||||
int virDomainGetInfo (virDomainPtr domain,
|
||||
virDomainInfoPtr info);
|
||||
|
||||
/*
|
||||
* Dynamic control of domains
|
||||
*/
|
||||
const char * virDomainGetName (virDomainPtr domain);
|
||||
unsigned int virDomainGetID (virDomainPtr domain);
|
||||
char * virDomainGetOSType (virDomainPtr domain);
|
||||
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
|
||||
int virDomainSetMaxMemory (virDomainPtr domain,
|
||||
unsigned long memory);
|
||||
/*
|
||||
* XML domain description
|
||||
*/
|
||||
char * virDomainGetXMLDesc (virDomainPtr domain, int flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __VIR_VIRLIB_H__ */
|
||||
@@ -1,10 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
virincdir = $(includedir)/libvirt
|
||||
|
||||
virinc_HEADERS = libvirt.h
|
||||
|
||||
install-exec-hook:
|
||||
$(mkinstalldirs) $(DESTDIR)$(virincdir)
|
||||
|
||||
EXTRA_DIST = libvirt.h.in
|
||||
@@ -1,254 +0,0 @@
|
||||
/*
|
||||
* libvirt.h:
|
||||
* Summary: core interfaces for the libvirt library
|
||||
* Description: Provides the interfaces of the libvirt library to handle
|
||||
* Xen domains from a process running in domain 0
|
||||
*
|
||||
* Copy: Copyright (C) 2005,2006 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_VIRLIB_H__
|
||||
#define __VIR_VIRLIB_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* virConnect:
|
||||
*
|
||||
* a virConnect is a private structure representing a connection to
|
||||
* the Xen Hypervisor.
|
||||
*/
|
||||
typedef struct _virConnect virConnect;
|
||||
|
||||
/**
|
||||
* virConnectPtr:
|
||||
*
|
||||
* a virConnectPtr is pointer to a virConnect private structure, this is the
|
||||
* type used to reference a connection to the Xen Hypervisor in the API.
|
||||
*/
|
||||
typedef virConnect *virConnectPtr;
|
||||
|
||||
/**
|
||||
* virDomain:
|
||||
*
|
||||
* a virDomain is a private structure representing a Xen domain.
|
||||
*/
|
||||
typedef struct _virDomain virDomain;
|
||||
|
||||
/**
|
||||
* virDomainPtr:
|
||||
*
|
||||
* a virDomainPtr is pointer to a virDomain private structure, this is the
|
||||
* type used to reference a Xen domain in the API.
|
||||
*/
|
||||
typedef virDomain *virDomainPtr;
|
||||
|
||||
/**
|
||||
* virDomainState:
|
||||
*
|
||||
* A domain may be in different states at a given point in time
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_NOSTATE = 0, /* no state */
|
||||
VIR_DOMAIN_RUNNING = 1, /* the domain is running */
|
||||
VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
|
||||
VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
|
||||
VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
|
||||
VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
|
||||
VIR_DOMAIN_CRASHED = 6 /* the domain is crashed */
|
||||
} virDomainState;
|
||||
|
||||
/**
|
||||
* virDomainRestart:
|
||||
*
|
||||
* Flags that determine the action to take on a shutdown or crash of a domain
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_DESTROY = 1, /* destroy the domain */
|
||||
VIR_DOMAIN_RESTART = 2, /* restart the domain */
|
||||
VIR_DOMAIN_PRESERVE= 3, /* keep as is, need manual destroy, for debug */
|
||||
VIR_DOMAIN_RENAME_RESTART= 4/* restart under an new unique name */
|
||||
} virDomainRestart;
|
||||
|
||||
/**
|
||||
* virDeviceMode:
|
||||
*
|
||||
* Flags that determine permission to expose a device to the guest
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DEVICE_DEFAULT = 0, /* Default mode */
|
||||
VIR_DEVICE_RO = 1, /* Access read-only */
|
||||
VIR_DEVICE_RW = 2, /* Access read-write */
|
||||
VIR_DEVICE_RW_FORCE= 3 /* Forced read-write even if already used */
|
||||
} virDeviceMode;
|
||||
|
||||
/**
|
||||
* virDomainInfoPtr:
|
||||
*
|
||||
* a virDomainInfo is a structure filled by virDomainGetInfo()
|
||||
*/
|
||||
|
||||
typedef struct _virDomainInfo virDomainInfo;
|
||||
|
||||
struct _virDomainInfo {
|
||||
unsigned char state; /* the running state, one of virDomainFlags */
|
||||
unsigned long maxMem; /* the maximum memory in KBytes allowed */
|
||||
unsigned long memory; /* the memory in KBytes used by the domain */
|
||||
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
|
||||
|
||||
/*
|
||||
* Informations below are only available to clients with a connection
|
||||
* with full access to the hypervisor
|
||||
*/
|
||||
unsigned long long cpuTime; /* the CPU time used in nanoseconds */
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* - check what can be extracted publicly from xenstore
|
||||
* and what's private limited to the hypervisor call.
|
||||
* - add padding to this structure for ABI long term protection
|
||||
*/
|
||||
};
|
||||
|
||||
/**
|
||||
* virDomainInfoPtr:
|
||||
*
|
||||
* a virDomainInfoPtr is a pointer to a virDomainInfo structure.
|
||||
*/
|
||||
|
||||
typedef virDomainInfo *virDomainInfoPtr;
|
||||
|
||||
/**
|
||||
* virDomainKernel:
|
||||
*
|
||||
* a virDomainImage is the set of kernel related informations associated
|
||||
* to a domain
|
||||
*/
|
||||
|
||||
typedef struct _virDomainKernel virDomainKernel;
|
||||
|
||||
struct _virDomainKernel {
|
||||
const char *kernel; /* filename pointing to the kernel image */
|
||||
const char *ramdisk; /* an optional init ramdisk */
|
||||
const char *root; /* an optional root block device */
|
||||
const char *extra; /* optional kernel command line parameters */
|
||||
};
|
||||
|
||||
/**
|
||||
* virDomainKernelPtr:
|
||||
*
|
||||
* a virDomainKernelPtr is a pointer to a virDomainKernel structure.
|
||||
*/
|
||||
|
||||
typedef virDomainKernel *virDomainKernelPtr;
|
||||
|
||||
/**
|
||||
* virDomainCreateFlags:
|
||||
*
|
||||
* Flags OR'ed together to provide specific behaviour when creating a
|
||||
* Domain.
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_NONE = 0
|
||||
} virDomainCreateFlags;
|
||||
|
||||
/* library versionning */
|
||||
|
||||
/**
|
||||
* LIBVIR_VERSION_NUMBER:
|
||||
*
|
||||
* Macro providing the version of the library as
|
||||
* version * 1,000,000 + minor * 1000 + micro
|
||||
*/
|
||||
|
||||
#define LIBVIR_VERSION_NUMBER 4
|
||||
|
||||
int virGetVersion (unsigned long *libVer,
|
||||
const char *type,
|
||||
unsigned long *typeVer);
|
||||
|
||||
/*
|
||||
* Connection and disconnections to the Hypervisor
|
||||
*/
|
||||
virConnectPtr virConnectOpen (const char *name);
|
||||
virConnectPtr virConnectOpenReadOnly (const char *name);
|
||||
int virConnectClose (virConnectPtr conn);
|
||||
const char * virConnectGetType (virConnectPtr conn);
|
||||
int virConnectGetVersion (virConnectPtr conn,
|
||||
unsigned long *hvVer);
|
||||
|
||||
/*
|
||||
* Gather list of running domains
|
||||
*/
|
||||
int virConnectListDomains (virConnectPtr conn,
|
||||
int *ids,
|
||||
int maxids);
|
||||
|
||||
/*
|
||||
* Number of domains
|
||||
*/
|
||||
int virConnectNumOfDomains (virConnectPtr conn);
|
||||
|
||||
|
||||
/*
|
||||
* Domain creation and destruction
|
||||
*/
|
||||
virDomainPtr virDomainCreateLinux (virConnectPtr conn,
|
||||
const char *kernel_path,
|
||||
const char *initrd_path,
|
||||
const char *cmdline,
|
||||
unsigned long memory,
|
||||
unsigned int flags);
|
||||
virDomainPtr virDomainLookupByName (virConnectPtr conn,
|
||||
const char *name);
|
||||
virDomainPtr virDomainLookupByID (virConnectPtr conn,
|
||||
int id);
|
||||
int virDomainShutdown (virDomainPtr domain);
|
||||
int virDomainDestroy (virDomainPtr domain);
|
||||
int virDomainFree (virDomainPtr domain);
|
||||
|
||||
/*
|
||||
* Domain suspend/resume
|
||||
*/
|
||||
int virDomainSuspend (virDomainPtr domain);
|
||||
int virDomainResume (virDomainPtr domain);
|
||||
|
||||
/*
|
||||
* Domain save/restore
|
||||
*/
|
||||
int virDomainSave (virDomainPtr domain,
|
||||
const char *to);
|
||||
int virDomainRestore (virConnectPtr conn,
|
||||
const char *from);
|
||||
|
||||
/*
|
||||
* Domain runtime informations
|
||||
*/
|
||||
int virDomainGetInfo (virDomainPtr domain,
|
||||
virDomainInfoPtr info);
|
||||
|
||||
/*
|
||||
* Dynamic control of domains
|
||||
*/
|
||||
const char * virDomainGetName (virDomainPtr domain);
|
||||
unsigned int virDomainGetID (virDomainPtr domain);
|
||||
char * virDomainGetOSType (virDomainPtr domain);
|
||||
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
|
||||
int virDomainSetMaxMemory (virDomainPtr domain,
|
||||
unsigned long memory);
|
||||
/*
|
||||
* XML domain description
|
||||
*/
|
||||
char * virDomainGetXMLDesc (virDomainPtr domain, int flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __VIR_VIRLIB_H__ */
|
||||
@@ -1,254 +0,0 @@
|
||||
/*
|
||||
* libvirt.h:
|
||||
* Summary: core interfaces for the libvirt library
|
||||
* Description: Provides the interfaces of the libvirt library to handle
|
||||
* Xen domains from a process running in domain 0
|
||||
*
|
||||
* Copy: Copyright (C) 2005,2006 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Author: Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_VIRLIB_H__
|
||||
#define __VIR_VIRLIB_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* virConnect:
|
||||
*
|
||||
* a virConnect is a private structure representing a connection to
|
||||
* the Xen Hypervisor.
|
||||
*/
|
||||
typedef struct _virConnect virConnect;
|
||||
|
||||
/**
|
||||
* virConnectPtr:
|
||||
*
|
||||
* a virConnectPtr is pointer to a virConnect private structure, this is the
|
||||
* type used to reference a connection to the Xen Hypervisor in the API.
|
||||
*/
|
||||
typedef virConnect *virConnectPtr;
|
||||
|
||||
/**
|
||||
* virDomain:
|
||||
*
|
||||
* a virDomain is a private structure representing a Xen domain.
|
||||
*/
|
||||
typedef struct _virDomain virDomain;
|
||||
|
||||
/**
|
||||
* virDomainPtr:
|
||||
*
|
||||
* a virDomainPtr is pointer to a virDomain private structure, this is the
|
||||
* type used to reference a Xen domain in the API.
|
||||
*/
|
||||
typedef virDomain *virDomainPtr;
|
||||
|
||||
/**
|
||||
* virDomainState:
|
||||
*
|
||||
* A domain may be in different states at a given point in time
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_NOSTATE = 0, /* no state */
|
||||
VIR_DOMAIN_RUNNING = 1, /* the domain is running */
|
||||
VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
|
||||
VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
|
||||
VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
|
||||
VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
|
||||
VIR_DOMAIN_CRASHED = 6 /* the domain is crashed */
|
||||
} virDomainState;
|
||||
|
||||
/**
|
||||
* virDomainRestart:
|
||||
*
|
||||
* Flags that determine the action to take on a shutdown or crash of a domain
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_DESTROY = 1, /* destroy the domain */
|
||||
VIR_DOMAIN_RESTART = 2, /* restart the domain */
|
||||
VIR_DOMAIN_PRESERVE= 3, /* keep as is, need manual destroy, for debug */
|
||||
VIR_DOMAIN_RENAME_RESTART= 4/* restart under an new unique name */
|
||||
} virDomainRestart;
|
||||
|
||||
/**
|
||||
* virDeviceMode:
|
||||
*
|
||||
* Flags that determine permission to expose a device to the guest
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DEVICE_DEFAULT = 0, /* Default mode */
|
||||
VIR_DEVICE_RO = 1, /* Access read-only */
|
||||
VIR_DEVICE_RW = 2, /* Access read-write */
|
||||
VIR_DEVICE_RW_FORCE= 3 /* Forced read-write even if already used */
|
||||
} virDeviceMode;
|
||||
|
||||
/**
|
||||
* virDomainInfoPtr:
|
||||
*
|
||||
* a virDomainInfo is a structure filled by virDomainGetInfo()
|
||||
*/
|
||||
|
||||
typedef struct _virDomainInfo virDomainInfo;
|
||||
|
||||
struct _virDomainInfo {
|
||||
unsigned char state; /* the running state, one of virDomainFlags */
|
||||
unsigned long maxMem; /* the maximum memory in KBytes allowed */
|
||||
unsigned long memory; /* the memory in KBytes used by the domain */
|
||||
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
|
||||
|
||||
/*
|
||||
* Informations below are only available to clients with a connection
|
||||
* with full access to the hypervisor
|
||||
*/
|
||||
unsigned long long cpuTime; /* the CPU time used in nanoseconds */
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* - check what can be extracted publicly from xenstore
|
||||
* and what's private limited to the hypervisor call.
|
||||
* - add padding to this structure for ABI long term protection
|
||||
*/
|
||||
};
|
||||
|
||||
/**
|
||||
* virDomainInfoPtr:
|
||||
*
|
||||
* a virDomainInfoPtr is a pointer to a virDomainInfo structure.
|
||||
*/
|
||||
|
||||
typedef virDomainInfo *virDomainInfoPtr;
|
||||
|
||||
/**
|
||||
* virDomainKernel:
|
||||
*
|
||||
* a virDomainImage is the set of kernel related informations associated
|
||||
* to a domain
|
||||
*/
|
||||
|
||||
typedef struct _virDomainKernel virDomainKernel;
|
||||
|
||||
struct _virDomainKernel {
|
||||
const char *kernel; /* filename pointing to the kernel image */
|
||||
const char *ramdisk; /* an optional init ramdisk */
|
||||
const char *root; /* an optional root block device */
|
||||
const char *extra; /* optional kernel command line parameters */
|
||||
};
|
||||
|
||||
/**
|
||||
* virDomainKernelPtr:
|
||||
*
|
||||
* a virDomainKernelPtr is a pointer to a virDomainKernel structure.
|
||||
*/
|
||||
|
||||
typedef virDomainKernel *virDomainKernelPtr;
|
||||
|
||||
/**
|
||||
* virDomainCreateFlags:
|
||||
*
|
||||
* Flags OR'ed together to provide specific behaviour when creating a
|
||||
* Domain.
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_DOMAIN_NONE = 0
|
||||
} virDomainCreateFlags;
|
||||
|
||||
/* library versionning */
|
||||
|
||||
/**
|
||||
* LIBVIR_VERSION_NUMBER:
|
||||
*
|
||||
* Macro providing the version of the library as
|
||||
* version * 1,000,000 + minor * 1000 + micro
|
||||
*/
|
||||
|
||||
#define LIBVIR_VERSION_NUMBER @LIBVIR_VERSION_NUMBER@
|
||||
|
||||
int virGetVersion (unsigned long *libVer,
|
||||
const char *type,
|
||||
unsigned long *typeVer);
|
||||
|
||||
/*
|
||||
* Connection and disconnections to the Hypervisor
|
||||
*/
|
||||
virConnectPtr virConnectOpen (const char *name);
|
||||
virConnectPtr virConnectOpenReadOnly (const char *name);
|
||||
int virConnectClose (virConnectPtr conn);
|
||||
const char * virConnectGetType (virConnectPtr conn);
|
||||
int virConnectGetVersion (virConnectPtr conn,
|
||||
unsigned long *hvVer);
|
||||
|
||||
/*
|
||||
* Gather list of running domains
|
||||
*/
|
||||
int virConnectListDomains (virConnectPtr conn,
|
||||
int *ids,
|
||||
int maxids);
|
||||
|
||||
/*
|
||||
* Number of domains
|
||||
*/
|
||||
int virConnectNumOfDomains (virConnectPtr conn);
|
||||
|
||||
|
||||
/*
|
||||
* Domain creation and destruction
|
||||
*/
|
||||
virDomainPtr virDomainCreateLinux (virConnectPtr conn,
|
||||
const char *kernel_path,
|
||||
const char *initrd_path,
|
||||
const char *cmdline,
|
||||
unsigned long memory,
|
||||
unsigned int flags);
|
||||
virDomainPtr virDomainLookupByName (virConnectPtr conn,
|
||||
const char *name);
|
||||
virDomainPtr virDomainLookupByID (virConnectPtr conn,
|
||||
int id);
|
||||
int virDomainShutdown (virDomainPtr domain);
|
||||
int virDomainDestroy (virDomainPtr domain);
|
||||
int virDomainFree (virDomainPtr domain);
|
||||
|
||||
/*
|
||||
* Domain suspend/resume
|
||||
*/
|
||||
int virDomainSuspend (virDomainPtr domain);
|
||||
int virDomainResume (virDomainPtr domain);
|
||||
|
||||
/*
|
||||
* Domain save/restore
|
||||
*/
|
||||
int virDomainSave (virDomainPtr domain,
|
||||
const char *to);
|
||||
int virDomainRestore (virConnectPtr conn,
|
||||
const char *from);
|
||||
|
||||
/*
|
||||
* Domain runtime informations
|
||||
*/
|
||||
int virDomainGetInfo (virDomainPtr domain,
|
||||
virDomainInfoPtr info);
|
||||
|
||||
/*
|
||||
* Dynamic control of domains
|
||||
*/
|
||||
const char * virDomainGetName (virDomainPtr domain);
|
||||
unsigned int virDomainGetID (virDomainPtr domain);
|
||||
char * virDomainGetOSType (virDomainPtr domain);
|
||||
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
|
||||
int virDomainSetMaxMemory (virDomainPtr domain,
|
||||
unsigned long memory);
|
||||
/*
|
||||
* XML domain description
|
||||
*/
|
||||
char * virDomainGetXMLDesc (virDomainPtr domain, int flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __VIR_VIRLIB_H__ */
|
||||
80
include/libxen.h
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* libxen.h: interface for the libxen library to handle Xen domains
|
||||
* from a process running in domain 0
|
||||
*
|
||||
* Copyright (C) 2005 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __XEN_XENLIB_H__
|
||||
#define __XEN_XENLIB_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xenConnect:
|
||||
*
|
||||
* a xenConnect is a private structure representing a connection to
|
||||
* the Xen Hypervisor.
|
||||
*/
|
||||
typedef struct _xenConnect xenConnect;
|
||||
|
||||
/**
|
||||
* xenConnectPtr:
|
||||
*
|
||||
* a xenConnectPtr is pointer to a xenConnect private structure, this is the
|
||||
* type used to reference a connection to the Xen Hypervisor in the API.
|
||||
*/
|
||||
typedef xenConnect *xenConnectPtr;
|
||||
|
||||
/**
|
||||
* xenDomain:
|
||||
*
|
||||
* a xenDomain is a private structure representing a Xen domain.
|
||||
*/
|
||||
typedef struct _xenDomain xenDomain;
|
||||
|
||||
/**
|
||||
* xenDomainPtr:
|
||||
*
|
||||
* a xenDomainPtr is pointer to a xenDomain private structure, this is the
|
||||
* type used to reference a Xen domain in the API.
|
||||
*/
|
||||
typedef xenDomain *xenDomainPtr;
|
||||
|
||||
|
||||
/**
|
||||
* xenDomainFlags:
|
||||
*
|
||||
* Flags OR'ed together to provide specific behaviour when creating a
|
||||
* Domain.
|
||||
*/
|
||||
typedef enum {
|
||||
XEN_DOMAIN_NONE = 0
|
||||
} xenDomainFlags;
|
||||
|
||||
/*
|
||||
* Connection and disconnections to the Hypervisor
|
||||
*/
|
||||
xenConnectPtr xenOpenConnect (const char *name);
|
||||
int xenCloseConnect (xenConnectPtr conn);
|
||||
unsigned long xenGetVersion (xenConnectPtr conn);
|
||||
|
||||
/*
|
||||
* Domain creation and destruction
|
||||
*/
|
||||
xenDomainPtr xenCreateLinuxDomain (xenConnectPtr conn,
|
||||
const char *kernel_path,
|
||||
const char *initrd_path,
|
||||
const char *cmdline,
|
||||
unsigned int flags);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XEN_XENLIB_H__ */
|
||||
@@ -1,11 +0,0 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libvir
|
||||
Version: @VERSION@
|
||||
Description: libvirt library
|
||||
Requires:
|
||||
Libs: -L${libdir} -lvirt @LIBS@
|
||||
Cflags:
|
||||
105
libvirt.spec.in
@@ -1,105 +0,0 @@
|
||||
Summary: Library providing an API to use the Xen virtualization
|
||||
Name: libvirt
|
||||
Version: @VERSION@
|
||||
Release: 1
|
||||
License: LGPL
|
||||
Group: Development/Libraries
|
||||
Source: libvirt-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
URL: http://libvir.org/
|
||||
BuildRequires: xen python python-devel
|
||||
Requires: xen
|
||||
Obsoletes: libvir
|
||||
ExclusiveArch: i386 x86_64
|
||||
|
||||
%description
|
||||
This C library provides an API to use the Xen virtualization framework,
|
||||
and the virsh command line tool to control virtual domains.
|
||||
|
||||
%package devel
|
||||
Summary: Libraries, includes, etc. to compile with the libvirt library
|
||||
Group: Development/Libraries
|
||||
Requires: libvirt = %{version}
|
||||
Obsoletes: libvir-devel
|
||||
|
||||
%description devel
|
||||
Includes and documentations for the C library providing an API to use
|
||||
the Xen virtualization framework
|
||||
|
||||
%package python
|
||||
Summary: Python bindings for the libvirt library
|
||||
Group: Development/Libraries
|
||||
Requires: libvirt = %{version}
|
||||
Obsoletes: libvir-python
|
||||
Requires: %{_libdir}/python%(echo `python -c "import sys; print sys.version[0:3]"`)
|
||||
|
||||
%description python
|
||||
The libvirt-python package contains a module that permits applications
|
||||
written in the Python programming language to use the interface
|
||||
supplied by the libvirt library to use the Xen virtualization framework.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure
|
||||
make
|
||||
|
||||
%install
|
||||
rm -fr %{buildroot}
|
||||
|
||||
%makeinstall
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.a
|
||||
|
||||
%clean
|
||||
rm -fr %{buildroot}
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS ChangeLog NEWS README COPYING.LIB TODO
|
||||
%{_bindir}/virsh
|
||||
%{_libdir}/lib*.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-, root, root)
|
||||
|
||||
%{_libdir}/lib*.so
|
||||
%{_includedir}/libvirt/*.h
|
||||
%{_libdir}/pkgconfig/libvirt.pc
|
||||
|
||||
%doc docs/*.html docs/html docs/*.gif
|
||||
%doc docs/libvirt-api.xml
|
||||
|
||||
%files python
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS NEWS README COPYING.LIB
|
||||
%{_libdir}/python*/site-packages/libvirt.py*
|
||||
%{_libdir}/python*/site-packages/libvirtmod*
|
||||
%doc python/TODO
|
||||
%doc python/libvirtclass.txt
|
||||
|
||||
%changelog
|
||||
* Fri Feb 10 2006 Daniel Veillard <veillard@redhat.com> 0.0.4-1
|
||||
- fixes some problems in 0.0.3 due to the change of names
|
||||
|
||||
* Wed Feb 8 2006 Daniel Veillard <veillard@redhat.com> 0.0.3-1
|
||||
- changed library name to libvirt from libvir, complete and test the python
|
||||
bindings
|
||||
|
||||
* Sun Jan 29 2006 Daniel Veillard <veillard@redhat.com> 0.0.2-1
|
||||
- upstream release of 0.0.2, use xend, save and restore added, python bindings
|
||||
fixed
|
||||
|
||||
* Wed Nov 2 2005 Daniel Veillard <veillard@redhat.com> 0.0.1-1
|
||||
- created
|
||||
@@ -1,62 +0,0 @@
|
||||
# Makefile for libvirt python library
|
||||
|
||||
INCLUDES = \
|
||||
-I$(PYTHON_INCLUDES) \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_builddir)/include \
|
||||
-I$(top_builddir)/$(subdir)
|
||||
|
||||
DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIR_VERSION)
|
||||
|
||||
DOCS = ${srcdir}/TODO
|
||||
|
||||
EXTRA_DIST = \
|
||||
libvir.c \
|
||||
types.c \
|
||||
generator.py \
|
||||
libvirt_wrap.h \
|
||||
libvirt.py \
|
||||
libvirt-python-api.xml \
|
||||
$(DOCS)
|
||||
|
||||
libvirtmod_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/src/.libs
|
||||
|
||||
if WITH_PYTHON
|
||||
mylibs = $(top_builddir)/src/libvirt.la
|
||||
|
||||
all-local: libvirt.py
|
||||
|
||||
python_LTLIBRARIES = libvirtmod.la
|
||||
|
||||
libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
|
||||
libvirtmod_la_LIBADD = $(mylibs)
|
||||
|
||||
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(pythondir)
|
||||
@INSTALL@ -m 0644 libvirt.py $(DESTDIR)$(pythondir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(DOCS_DIR)
|
||||
@(for doc in $(DOCS) ; \
|
||||
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
||||
|
||||
GENERATE = generator.py
|
||||
API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml
|
||||
GENERATED= libvirt.py \
|
||||
libvirt-export.c \
|
||||
libvirtclass.txt \
|
||||
libvirt-py.c \
|
||||
libvirt-py.h
|
||||
|
||||
CLEANFILES= $(GENERATED) gen_prog libvirt.py
|
||||
|
||||
$(GENERATED): gen_prog
|
||||
|
||||
gen_prog: $(srcdir)/$(GENERATE) $(API_DESC)
|
||||
$(PYTHON) $(srcdir)/$(GENERATE) $(srcdir)
|
||||
touch gen_prog
|
||||
|
||||
$(libvirtmod_la_OBJECTS): $(GENERATED)
|
||||
|
||||
else
|
||||
all:
|
||||
endif
|
||||
@@ -1,8 +0,0 @@
|
||||
- Need to complete, add custom wrapper function for those
|
||||
which could not be handled fully automatically
|
||||
- Check the names generated, iD is bad, fix the name generation routine
|
||||
- add examples, web page and python based test suite
|
||||
|
||||
Daniel Veillard
|
||||
|
||||
$Date$
|
||||
@@ -1,925 +0,0 @@
|
||||
#!/usr/bin/python -u
|
||||
#
|
||||
# generate python wrappers from the XML API description
|
||||
#
|
||||
|
||||
functions = {}
|
||||
enums = {} # { enumType: { enumConstant: enumValue } }
|
||||
|
||||
import os
|
||||
import sys
|
||||
import string
|
||||
|
||||
if __name__ == "__main__":
|
||||
# launched as a script
|
||||
srcPref = os.path.dirname(sys.argv[0])
|
||||
else:
|
||||
# imported
|
||||
srcPref = os.path.dirname(__file__)
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# That part if purely the API acquisition phase from the
|
||||
# libvirt API description
|
||||
#
|
||||
#######################################################################
|
||||
import os
|
||||
import xmllib
|
||||
try:
|
||||
import sgmlop
|
||||
except ImportError:
|
||||
sgmlop = None # accelerator not available
|
||||
|
||||
debug = 0
|
||||
|
||||
if sgmlop:
|
||||
class FastParser:
|
||||
"""sgmlop based XML parser. this is typically 15x faster
|
||||
than SlowParser..."""
|
||||
|
||||
def __init__(self, target):
|
||||
|
||||
# setup callbacks
|
||||
self.finish_starttag = target.start
|
||||
self.finish_endtag = target.end
|
||||
self.handle_data = target.data
|
||||
|
||||
# activate parser
|
||||
self.parser = sgmlop.XMLParser()
|
||||
self.parser.register(self)
|
||||
self.feed = self.parser.feed
|
||||
self.entity = {
|
||||
"amp": "&", "gt": ">", "lt": "<",
|
||||
"apos": "'", "quot": '"'
|
||||
}
|
||||
|
||||
def close(self):
|
||||
try:
|
||||
self.parser.close()
|
||||
finally:
|
||||
self.parser = self.feed = None # nuke circular reference
|
||||
|
||||
def handle_entityref(self, entity):
|
||||
# <string> entity
|
||||
try:
|
||||
self.handle_data(self.entity[entity])
|
||||
except KeyError:
|
||||
self.handle_data("&%s;" % entity)
|
||||
|
||||
else:
|
||||
FastParser = None
|
||||
|
||||
|
||||
class SlowParser(xmllib.XMLParser):
|
||||
"""slow but safe standard parser, based on the XML parser in
|
||||
Python's standard library."""
|
||||
|
||||
def __init__(self, target):
|
||||
self.unknown_starttag = target.start
|
||||
self.handle_data = target.data
|
||||
self.unknown_endtag = target.end
|
||||
xmllib.XMLParser.__init__(self)
|
||||
|
||||
def getparser(target = None):
|
||||
# get the fastest available parser, and attach it to an
|
||||
# unmarshalling object. return both objects.
|
||||
if target is None:
|
||||
target = docParser()
|
||||
if FastParser:
|
||||
return FastParser(target), target
|
||||
return SlowParser(target), target
|
||||
|
||||
class docParser:
|
||||
def __init__(self):
|
||||
self._methodname = None
|
||||
self._data = []
|
||||
self.in_function = 0
|
||||
|
||||
def close(self):
|
||||
if debug:
|
||||
print "close"
|
||||
|
||||
def getmethodname(self):
|
||||
return self._methodname
|
||||
|
||||
def data(self, text):
|
||||
if debug:
|
||||
print "data %s" % text
|
||||
self._data.append(text)
|
||||
|
||||
def start(self, tag, attrs):
|
||||
if debug:
|
||||
print "start %s, %s" % (tag, attrs)
|
||||
if tag == 'function':
|
||||
self._data = []
|
||||
self.in_function = 1
|
||||
self.function = None
|
||||
self.function_cond = None
|
||||
self.function_args = []
|
||||
self.function_descr = None
|
||||
self.function_return = None
|
||||
self.function_file = None
|
||||
if attrs.has_key('name'):
|
||||
self.function = attrs['name']
|
||||
if attrs.has_key('file'):
|
||||
self.function_file = attrs['file']
|
||||
elif tag == 'cond':
|
||||
self._data = []
|
||||
elif tag == 'info':
|
||||
self._data = []
|
||||
elif tag == 'arg':
|
||||
if self.in_function == 1:
|
||||
self.function_arg_name = None
|
||||
self.function_arg_type = None
|
||||
self.function_arg_info = None
|
||||
if attrs.has_key('name'):
|
||||
self.function_arg_name = attrs['name']
|
||||
if self.function_arg_name == 'from':
|
||||
self.function_arg_name = 'frm'
|
||||
if attrs.has_key('type'):
|
||||
self.function_arg_type = attrs['type']
|
||||
if attrs.has_key('info'):
|
||||
self.function_arg_info = attrs['info']
|
||||
elif tag == 'return':
|
||||
if self.in_function == 1:
|
||||
self.function_return_type = None
|
||||
self.function_return_info = None
|
||||
self.function_return_field = None
|
||||
if attrs.has_key('type'):
|
||||
self.function_return_type = attrs['type']
|
||||
if attrs.has_key('info'):
|
||||
self.function_return_info = attrs['info']
|
||||
if attrs.has_key('field'):
|
||||
self.function_return_field = attrs['field']
|
||||
elif tag == 'enum':
|
||||
enum(attrs['type'],attrs['name'],attrs['value'])
|
||||
|
||||
def end(self, tag):
|
||||
if debug:
|
||||
print "end %s" % tag
|
||||
if tag == 'function':
|
||||
if self.function != None:
|
||||
function(self.function, self.function_descr,
|
||||
self.function_return, self.function_args,
|
||||
self.function_file, self.function_cond)
|
||||
self.in_function = 0
|
||||
elif tag == 'arg':
|
||||
if self.in_function == 1:
|
||||
self.function_args.append([self.function_arg_name,
|
||||
self.function_arg_type,
|
||||
self.function_arg_info])
|
||||
elif tag == 'return':
|
||||
if self.in_function == 1:
|
||||
self.function_return = [self.function_return_type,
|
||||
self.function_return_info,
|
||||
self.function_return_field]
|
||||
elif tag == 'info':
|
||||
str = ''
|
||||
for c in self._data:
|
||||
str = str + c
|
||||
if self.in_function == 1:
|
||||
self.function_descr = str
|
||||
elif tag == 'cond':
|
||||
str = ''
|
||||
for c in self._data:
|
||||
str = str + c
|
||||
if self.in_function == 1:
|
||||
self.function_cond = str
|
||||
|
||||
|
||||
def function(name, desc, ret, args, file, cond):
|
||||
functions[name] = (desc, ret, args, file, cond)
|
||||
|
||||
def enum(type, name, value):
|
||||
if not enums.has_key(type):
|
||||
enums[type] = {}
|
||||
enums[type][name] = value
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# Some filtering rukes to drop functions/types which should not
|
||||
# be exposed as-is on the Python interface
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
functions_failed = []
|
||||
functions_skipped = []
|
||||
|
||||
skipped_modules = {
|
||||
}
|
||||
|
||||
skipped_types = {
|
||||
'int *': "usually a return type",
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# Table of remapping to/from the python type or class to the C
|
||||
# counterpart.
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
py_types = {
|
||||
'void': (None, None, None, None),
|
||||
'int': ('i', None, "int", "int"),
|
||||
'long': ('i', None, "int", "int"),
|
||||
'double': ('d', None, "double", "double"),
|
||||
'unsigned int': ('i', None, "int", "int"),
|
||||
'unsigned long': ('i', None, "int", "int"),
|
||||
'unsigned char *': ('z', None, "charPtr", "char *"),
|
||||
'char *': ('z', None, "charPtr", "char *"),
|
||||
'const char *': ('z', None, "charPtrConst", "const char *"),
|
||||
'virDomainPtr': ('O', "virDomain", "virDomainPtr", "virDomainPtr"),
|
||||
'const virDomainPtr': ('O', "virDomain", "virDomainPtr", "virDomainPtr"),
|
||||
'virDomain *': ('O', "virDomain", "virDomainPtr", "virDomainPtr"),
|
||||
'const virDomain *': ('O', "virDomain", "virDomainPtr", "virDomainPtr"),
|
||||
'virConnectPtr': ('O', "virConnect", "virConnectPtr", "virConnectPtr"),
|
||||
'const virConnectPtr': ('O', "virConnect", "virConnectPtr", "virConnectPtr"),
|
||||
'virConnect *': ('O', "virConnect", "virConnectPtr", "virConnectPtr"),
|
||||
'const virConnect *': ('O', "virConnect", "virConnectPtr", "virConnectPtr"),
|
||||
}
|
||||
|
||||
py_return_types = {
|
||||
}
|
||||
|
||||
unknown_types = {}
|
||||
|
||||
foreign_encoding_args = (
|
||||
)
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# This part writes the C <-> Python stubs libxml2-py.[ch] and
|
||||
# the table libxml2-export.c to add when registrering the Python module
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
# Class methods which are written by hand in libvir.c but the Python-level
|
||||
# code is still automatically generated (so they are not in skip_function()).
|
||||
skip_impl = (
|
||||
'virConnectListDomainsID',
|
||||
'virDomainGetInfo',
|
||||
)
|
||||
|
||||
def skip_function(name):
|
||||
if name == "virConnectClose":
|
||||
return 1
|
||||
if name == "virDomainFree":
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
def print_function_wrapper(name, output, export, include):
|
||||
global py_types
|
||||
global unknown_types
|
||||
global functions
|
||||
global skipped_modules
|
||||
|
||||
try:
|
||||
(desc, ret, args, file, cond) = functions[name]
|
||||
except:
|
||||
print "failed to get function %s infos"
|
||||
return
|
||||
|
||||
if skipped_modules.has_key(file):
|
||||
return 0
|
||||
if skip_function(name) == 1:
|
||||
return 0
|
||||
if name in skip_impl:
|
||||
# Don't delete the function entry in the caller.
|
||||
return 1
|
||||
|
||||
c_call = "";
|
||||
format=""
|
||||
format_args=""
|
||||
c_args=""
|
||||
c_return=""
|
||||
c_convert=""
|
||||
num_bufs=0
|
||||
for arg in args:
|
||||
# This should be correct
|
||||
if arg[1][0:6] == "const ":
|
||||
arg[1] = arg[1][6:]
|
||||
c_args = c_args + " %s %s;\n" % (arg[1], arg[0])
|
||||
if py_types.has_key(arg[1]):
|
||||
(f, t, n, c) = py_types[arg[1]]
|
||||
if (f == 'z') and (name in foreign_encoding_args) and (num_bufs == 0):
|
||||
f = 't#'
|
||||
if f != None:
|
||||
format = format + f
|
||||
if t != None:
|
||||
format_args = format_args + ", &pyobj_%s" % (arg[0])
|
||||
c_args = c_args + " PyObject *pyobj_%s;\n" % (arg[0])
|
||||
c_convert = c_convert + \
|
||||
" %s = (%s) Py%s_Get(pyobj_%s);\n" % (arg[0],
|
||||
arg[1], t, arg[0]);
|
||||
else:
|
||||
format_args = format_args + ", &%s" % (arg[0])
|
||||
if f == 't#':
|
||||
format_args = format_args + ", &py_buffsize%d" % num_bufs
|
||||
c_args = c_args + " int py_buffsize%d;\n" % num_bufs
|
||||
num_bufs = num_bufs + 1
|
||||
if c_call != "":
|
||||
c_call = c_call + ", ";
|
||||
c_call = c_call + "%s" % (arg[0])
|
||||
else:
|
||||
if skipped_types.has_key(arg[1]):
|
||||
return 0
|
||||
if unknown_types.has_key(arg[1]):
|
||||
lst = unknown_types[arg[1]]
|
||||
lst.append(name)
|
||||
else:
|
||||
unknown_types[arg[1]] = [name]
|
||||
return -1
|
||||
if format != "":
|
||||
format = format + ":%s" % (name)
|
||||
|
||||
if ret[0] == 'void':
|
||||
if file == "python_accessor":
|
||||
if args[1][1] == "char *":
|
||||
c_call = "\n if (%s->%s != NULL) free(%s->%s);\n" % (
|
||||
args[0][0], args[1][0], args[0][0], args[1][0])
|
||||
c_call = c_call + " %s->%s = (%s)strdup((const xmlChar *)%s);\n" % (args[0][0],
|
||||
args[1][0], args[1][1], args[1][0])
|
||||
else:
|
||||
c_call = "\n %s->%s = %s;\n" % (args[0][0], args[1][0],
|
||||
args[1][0])
|
||||
else:
|
||||
c_call = "\n %s(%s);\n" % (name, c_call);
|
||||
ret_convert = " Py_INCREF(Py_None);\n return(Py_None);\n"
|
||||
elif py_types.has_key(ret[0]):
|
||||
(f, t, n, c) = py_types[ret[0]]
|
||||
c_return = " %s c_retval;\n" % (ret[0])
|
||||
if file == "python_accessor" and ret[2] != None:
|
||||
c_call = "\n c_retval = %s->%s;\n" % (args[0][0], ret[2])
|
||||
else:
|
||||
c_call = "\n c_retval = %s(%s);\n" % (name, c_call);
|
||||
ret_convert = " py_retval = libvirt_%sWrap((%s) c_retval);\n" % (n,c)
|
||||
ret_convert = ret_convert + " return(py_retval);\n"
|
||||
elif py_return_types.has_key(ret[0]):
|
||||
(f, t, n, c) = py_return_types[ret[0]]
|
||||
c_return = " %s c_retval;\n" % (ret[0])
|
||||
c_call = "\n c_retval = %s(%s);\n" % (name, c_call);
|
||||
ret_convert = " py_retval = libvirt_%sWrap((%s) c_retval);\n" % (n,c)
|
||||
ret_convert = ret_convert + " return(py_retval);\n"
|
||||
else:
|
||||
if skipped_types.has_key(ret[0]):
|
||||
return 0
|
||||
if unknown_types.has_key(ret[0]):
|
||||
lst = unknown_types[ret[0]]
|
||||
lst.append(name)
|
||||
else:
|
||||
unknown_types[ret[0]] = [name]
|
||||
return -1
|
||||
|
||||
if cond != None and cond != "":
|
||||
include.write("#if %s\n" % cond)
|
||||
export.write("#if %s\n" % cond)
|
||||
output.write("#if %s\n" % cond)
|
||||
|
||||
include.write("PyObject * ")
|
||||
include.write("libvirt_%s(PyObject *self, PyObject *args);\n" % (name));
|
||||
|
||||
export.write(" { (char *)\"%s\", libvirt_%s, METH_VARARGS, NULL },\n" %
|
||||
(name, name))
|
||||
|
||||
if file == "python":
|
||||
# Those have been manually generated
|
||||
if cond != None and cond != "":
|
||||
include.write("#endif\n");
|
||||
export.write("#endif\n");
|
||||
output.write("#endif\n");
|
||||
return 1
|
||||
if file == "python_accessor" and ret[0] != "void" and ret[2] is None:
|
||||
# Those have been manually generated
|
||||
if cond != None and cond != "":
|
||||
include.write("#endif\n");
|
||||
export.write("#endif\n");
|
||||
output.write("#endif\n");
|
||||
return 1
|
||||
|
||||
output.write("PyObject *\n")
|
||||
output.write("libvirt_%s(PyObject *self ATTRIBUTE_UNUSED," % (name))
|
||||
output.write(" PyObject *args")
|
||||
if format == "":
|
||||
output.write(" ATTRIBUTE_UNUSED")
|
||||
output.write(") {\n")
|
||||
if ret[0] != 'void':
|
||||
output.write(" PyObject *py_retval;\n")
|
||||
if c_return != "":
|
||||
output.write(c_return)
|
||||
if c_args != "":
|
||||
output.write(c_args)
|
||||
if format != "":
|
||||
output.write("\n if (!PyArg_ParseTuple(args, (char *)\"%s\"%s))\n" %
|
||||
(format, format_args))
|
||||
output.write(" return(NULL);\n")
|
||||
if c_convert != "":
|
||||
output.write(c_convert)
|
||||
|
||||
output.write(c_call)
|
||||
output.write(ret_convert)
|
||||
output.write("}\n\n")
|
||||
if cond != None and cond != "":
|
||||
include.write("#endif /* %s */\n" % cond)
|
||||
export.write("#endif /* %s */\n" % cond)
|
||||
output.write("#endif /* %s */\n" % cond)
|
||||
return 1
|
||||
|
||||
def buildStubs():
|
||||
global py_types
|
||||
global py_return_types
|
||||
global unknown_types
|
||||
|
||||
try:
|
||||
f = open(os.path.join(srcPref,"libvirt-api.xml"))
|
||||
data = f.read()
|
||||
(parser, target) = getparser()
|
||||
parser.feed(data)
|
||||
parser.close()
|
||||
except IOError, msg:
|
||||
try:
|
||||
f = open(os.path.join(srcPref,"..","docs","libvirt-api.xml"))
|
||||
data = f.read()
|
||||
(parser, target) = getparser()
|
||||
parser.feed(data)
|
||||
parser.close()
|
||||
except IOError, msg:
|
||||
print file, ":", msg
|
||||
sys.exit(1)
|
||||
|
||||
n = len(functions.keys())
|
||||
print "Found %d functions in libvirt-api.xml" % (n)
|
||||
|
||||
py_types['pythonObject'] = ('O', "pythonObject", "pythonObject", "pythonObject")
|
||||
try:
|
||||
f = open(os.path.join(srcPref,"libvirt-python-api.xml"))
|
||||
data = f.read()
|
||||
(parser, target) = getparser()
|
||||
parser.feed(data)
|
||||
parser.close()
|
||||
except IOError, msg:
|
||||
print file, ":", msg
|
||||
|
||||
|
||||
print "Found %d functions in libvirt-python-api.xml" % (
|
||||
len(functions.keys()) - n)
|
||||
nb_wrap = 0
|
||||
failed = 0
|
||||
skipped = 0
|
||||
|
||||
include = open("libvirt-py.h", "w")
|
||||
include.write("/* Generated */\n\n")
|
||||
export = open("libvirt-export.c", "w")
|
||||
export.write("/* Generated */\n\n")
|
||||
wrapper = open("libvirt-py.c", "w")
|
||||
wrapper.write("/* Generated */\n\n")
|
||||
wrapper.write("#include <Python.h>\n")
|
||||
wrapper.write("#include <libvirt.h>\n")
|
||||
wrapper.write("#include \"libvirt_wrap.h\"\n")
|
||||
wrapper.write("#include \"libvirt-py.h\"\n\n")
|
||||
for function in functions.keys():
|
||||
ret = print_function_wrapper(function, wrapper, export, include)
|
||||
if ret < 0:
|
||||
failed = failed + 1
|
||||
functions_failed.append(function)
|
||||
del functions[function]
|
||||
if ret == 0:
|
||||
skipped = skipped + 1
|
||||
functions_skipped.append(function)
|
||||
del functions[function]
|
||||
if ret == 1:
|
||||
nb_wrap = nb_wrap + 1
|
||||
include.close()
|
||||
export.close()
|
||||
wrapper.close()
|
||||
|
||||
print "Generated %d wrapper functions, %d failed, %d skipped\n" % (nb_wrap,
|
||||
failed, skipped);
|
||||
print "Missing type converters: "
|
||||
for type in unknown_types.keys():
|
||||
print "%s:%d " % (type, len(unknown_types[type])),
|
||||
print
|
||||
|
||||
#######################################################################
|
||||
#
|
||||
# This part writes part of the Python front-end classes based on
|
||||
# mapping rules between types and classes and also based on function
|
||||
# renaming to get consistent function names at the Python level
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
#
|
||||
# The type automatically remapped to generated classes
|
||||
#
|
||||
classes_type = {
|
||||
"virDomainPtr": ("._o", "virDomain(_obj=%s)", "virDomain"),
|
||||
"virDomain *": ("._o", "virDomain(_obj=%s)", "virDomain"),
|
||||
"virConnectPtr": ("._o", "virConnect(_obj=%s)", "virConnect"),
|
||||
"virConnect *": ("._o", "virConnect(_obj=%s)", "virConnect"),
|
||||
}
|
||||
|
||||
converter_type = {
|
||||
}
|
||||
|
||||
primary_classes = ["virDomain", "virConnect"]
|
||||
|
||||
classes_ancestor = {
|
||||
}
|
||||
classes_destructors = {
|
||||
"virDomain": "virDomainFree",
|
||||
"virConnect": "virConnectClose",
|
||||
}
|
||||
|
||||
functions_noexcept = {
|
||||
}
|
||||
|
||||
reference_keepers = {
|
||||
}
|
||||
|
||||
function_classes = {}
|
||||
|
||||
function_classes["None"] = []
|
||||
|
||||
function_post = {
|
||||
'virDomainDestroy': "self._o = None",
|
||||
}
|
||||
|
||||
def nameFixup(name, classe, type, file):
|
||||
listname = classe + "List"
|
||||
ll = len(listname)
|
||||
l = len(classe)
|
||||
if name[0:l] == listname:
|
||||
func = name[l:]
|
||||
func = string.lower(func[0:1]) + func[1:]
|
||||
elif name[0:12] == "virDomainGet":
|
||||
func = name[12:]
|
||||
func = string.lower(func[0:1]) + func[1:]
|
||||
elif name[0:9] == "virDomain":
|
||||
func = name[9:]
|
||||
func = string.lower(func[0:1]) + func[1:]
|
||||
elif name[0:10] == "virConnect":
|
||||
func = name[10:]
|
||||
func = string.lower(func[0:1]) + func[1:]
|
||||
elif name[0:3] == "xml":
|
||||
func = name[3:]
|
||||
func = string.lower(func[0:1]) + func[1:]
|
||||
else:
|
||||
func = name
|
||||
if func == "iD":
|
||||
func = "ID"
|
||||
if func == "oSType":
|
||||
func = "OSType"
|
||||
if func == "xMLDesc":
|
||||
func = "XMLDesc"
|
||||
return func
|
||||
|
||||
|
||||
def functionCompare(info1, info2):
|
||||
(index1, func1, name1, ret1, args1, file1) = info1
|
||||
(index2, func2, name2, ret2, args2, file2) = info2
|
||||
if file1 == file2:
|
||||
if func1 < func2:
|
||||
return -1
|
||||
if func1 > func2:
|
||||
return 1
|
||||
if file1 == "python_accessor":
|
||||
return -1
|
||||
if file2 == "python_accessor":
|
||||
return 1
|
||||
if file1 < file2:
|
||||
return -1
|
||||
if file1 > file2:
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def writeDoc(name, args, indent, output):
|
||||
if functions[name][0] is None or functions[name][0] == "":
|
||||
return
|
||||
val = functions[name][0]
|
||||
val = string.replace(val, "NULL", "None");
|
||||
output.write(indent)
|
||||
output.write('"""')
|
||||
while len(val) > 60:
|
||||
str = val[0:60]
|
||||
i = string.rfind(str, " ");
|
||||
if i < 0:
|
||||
i = 60
|
||||
str = val[0:i]
|
||||
val = val[i:]
|
||||
output.write(str)
|
||||
output.write('\n ');
|
||||
output.write(indent)
|
||||
output.write(val);
|
||||
output.write(' """\n')
|
||||
|
||||
def buildWrappers():
|
||||
global ctypes
|
||||
global py_types
|
||||
global py_return_types
|
||||
global unknown_types
|
||||
global functions
|
||||
global function_classes
|
||||
global classes_type
|
||||
global classes_list
|
||||
global converter_type
|
||||
global primary_classes
|
||||
global converter_type
|
||||
global classes_ancestor
|
||||
global converter_type
|
||||
global primary_classes
|
||||
global classes_ancestor
|
||||
global classes_destructors
|
||||
global functions_noexcept
|
||||
|
||||
for type in classes_type.keys():
|
||||
function_classes[classes_type[type][2]] = []
|
||||
|
||||
#
|
||||
# Build the list of C types to look for ordered to start
|
||||
# with primary classes
|
||||
#
|
||||
ctypes = []
|
||||
classes_list = []
|
||||
ctypes_processed = {}
|
||||
classes_processed = {}
|
||||
for classe in primary_classes:
|
||||
classes_list.append(classe)
|
||||
classes_processed[classe] = ()
|
||||
for type in classes_type.keys():
|
||||
tinfo = classes_type[type]
|
||||
if tinfo[2] == classe:
|
||||
ctypes.append(type)
|
||||
ctypes_processed[type] = ()
|
||||
for type in classes_type.keys():
|
||||
if ctypes_processed.has_key(type):
|
||||
continue
|
||||
tinfo = classes_type[type]
|
||||
if not classes_processed.has_key(tinfo[2]):
|
||||
classes_list.append(tinfo[2])
|
||||
classes_processed[tinfo[2]] = ()
|
||||
|
||||
ctypes.append(type)
|
||||
ctypes_processed[type] = ()
|
||||
|
||||
for name in functions.keys():
|
||||
found = 0;
|
||||
(desc, ret, args, file, cond) = functions[name]
|
||||
for type in ctypes:
|
||||
classe = classes_type[type][2]
|
||||
|
||||
if name[0:3] == "vir" and len(args) >= 1 and args[0][1] == type:
|
||||
found = 1
|
||||
func = nameFixup(name, classe, type, file)
|
||||
info = (0, func, name, ret, args, file)
|
||||
function_classes[classe].append(info)
|
||||
elif name[0:3] == "vir" and len(args) >= 2 and args[1][1] == type \
|
||||
and file != "python_accessor":
|
||||
found = 1
|
||||
func = nameFixup(name, classe, type, file)
|
||||
info = (1, func, name, ret, args, file)
|
||||
function_classes[classe].append(info)
|
||||
if found == 1:
|
||||
continue
|
||||
func = nameFixup(name, "None", file, file)
|
||||
info = (0, func, name, ret, args, file)
|
||||
function_classes['None'].append(info)
|
||||
|
||||
classes = open("libvirt.py", "w")
|
||||
classes.write("""#!/usr/bin/python -u
|
||||
#
|
||||
# Those are the autogenerated Python bindings for libvirt.
|
||||
# Check python/generator.py in the source distribution of libvirt
|
||||
# to find out more about the generation process
|
||||
#
|
||||
""")
|
||||
|
||||
classes.write("import libvirtmod\n")
|
||||
classes.write("import types\n\n")
|
||||
|
||||
txt = open("libvirtclass.txt", "w")
|
||||
txt.write(" Generated Classes for libvir-python\n\n")
|
||||
|
||||
txt.write("#\n# Global functions of the module\n#\n\n")
|
||||
if function_classes.has_key("None"):
|
||||
flist = function_classes["None"]
|
||||
flist.sort(functionCompare)
|
||||
oldfile = ""
|
||||
for info in flist:
|
||||
(index, func, name, ret, args, file) = info
|
||||
if file != oldfile:
|
||||
classes.write("#\n# Functions from module %s\n#\n\n" % file)
|
||||
txt.write("\n# functions from module %s\n" % file)
|
||||
oldfile = file
|
||||
classes.write("def %s(" % func)
|
||||
txt.write("%s()\n" % func);
|
||||
n = 0
|
||||
for arg in args:
|
||||
if n != 0:
|
||||
classes.write(", ")
|
||||
classes.write("%s" % arg[0])
|
||||
n = n + 1
|
||||
classes.write("):\n")
|
||||
writeDoc(name, args, ' ', classes);
|
||||
|
||||
for arg in args:
|
||||
if classes_type.has_key(arg[1]):
|
||||
classes.write(" if %s is None: %s__o = None\n" %
|
||||
(arg[0], arg[0]))
|
||||
classes.write(" else: %s__o = %s%s\n" %
|
||||
(arg[0], arg[0], classes_type[arg[1]][0]))
|
||||
if ret[0] != "void":
|
||||
classes.write(" ret = ");
|
||||
else:
|
||||
classes.write(" ");
|
||||
classes.write("libvirtmod.%s(" % name)
|
||||
n = 0
|
||||
for arg in args:
|
||||
if n != 0:
|
||||
classes.write(", ");
|
||||
classes.write("%s" % arg[0])
|
||||
if classes_type.has_key(arg[1]):
|
||||
classes.write("__o");
|
||||
n = n + 1
|
||||
classes.write(")\n");
|
||||
if ret[0] != "void":
|
||||
if classes_type.has_key(ret[0]):
|
||||
#
|
||||
# Raise an exception
|
||||
#
|
||||
if functions_noexcept.has_key(name):
|
||||
classes.write(" if ret is None:return None\n");
|
||||
classes.write(" return ");
|
||||
classes.write(classes_type[ret[0]][1] % ("ret"));
|
||||
classes.write("\n");
|
||||
else:
|
||||
classes.write(" return ret\n");
|
||||
classes.write("\n");
|
||||
|
||||
txt.write("\n\n#\n# Set of classes of the module\n#\n\n")
|
||||
for classname in classes_list:
|
||||
if classname == "None":
|
||||
pass
|
||||
else:
|
||||
if classes_ancestor.has_key(classname):
|
||||
txt.write("\n\nClass %s(%s)\n" % (classname,
|
||||
classes_ancestor[classname]))
|
||||
classes.write("class %s(%s):\n" % (classname,
|
||||
classes_ancestor[classname]))
|
||||
classes.write(" def __init__(self, _obj=None):\n")
|
||||
if reference_keepers.has_key(classname):
|
||||
rlist = reference_keepers[classname]
|
||||
for ref in rlist:
|
||||
classes.write(" self.%s = None\n" % ref[1])
|
||||
classes.write(" self._o = _obj\n")
|
||||
classes.write(" %s.__init__(self, _obj=_obj)\n\n" % (
|
||||
classes_ancestor[classname]))
|
||||
else:
|
||||
txt.write("Class %s()\n" % (classname))
|
||||
classes.write("class %s:\n" % (classname))
|
||||
classes.write(" def __init__(self, _obj=None):\n")
|
||||
if reference_keepers.has_key(classname):
|
||||
list = reference_keepers[classname]
|
||||
for ref in list:
|
||||
classes.write(" self.%s = None\n" % ref[1])
|
||||
classes.write(" if _obj != None:self._o = _obj;return\n")
|
||||
classes.write(" self._o = None\n\n");
|
||||
destruct=None
|
||||
if classes_destructors.has_key(classname):
|
||||
classes.write(" def __del__(self):\n")
|
||||
classes.write(" if self._o != None:\n")
|
||||
classes.write(" libvirtmod.%s(self._o)\n" %
|
||||
classes_destructors[classname]);
|
||||
classes.write(" self._o = None\n\n");
|
||||
destruct=classes_destructors[classname]
|
||||
flist = function_classes[classname]
|
||||
flist.sort(functionCompare)
|
||||
oldfile = ""
|
||||
for info in flist:
|
||||
(index, func, name, ret, args, file) = info
|
||||
#
|
||||
# Do not provide as method the destructors for the class
|
||||
# to avoid double free
|
||||
#
|
||||
if name == destruct:
|
||||
continue;
|
||||
if file != oldfile:
|
||||
if file == "python_accessor":
|
||||
classes.write(" # accessors for %s\n" % (classname))
|
||||
txt.write(" # accessors\n")
|
||||
else:
|
||||
classes.write(" #\n")
|
||||
classes.write(" # %s functions from module %s\n" % (
|
||||
classname, file))
|
||||
txt.write("\n # functions from module %s\n" % file)
|
||||
classes.write(" #\n\n")
|
||||
oldfile = file
|
||||
classes.write(" def %s(self" % func)
|
||||
txt.write(" %s()\n" % func);
|
||||
n = 0
|
||||
for arg in args:
|
||||
if n != index:
|
||||
classes.write(", %s" % arg[0])
|
||||
n = n + 1
|
||||
classes.write("):\n")
|
||||
writeDoc(name, args, ' ', classes);
|
||||
n = 0
|
||||
for arg in args:
|
||||
if classes_type.has_key(arg[1]):
|
||||
if n != index:
|
||||
classes.write(" if %s is None: %s__o = None\n" %
|
||||
(arg[0], arg[0]))
|
||||
classes.write(" else: %s__o = %s%s\n" %
|
||||
(arg[0], arg[0], classes_type[arg[1]][0]))
|
||||
n = n + 1
|
||||
if ret[0] != "void":
|
||||
classes.write(" ret = ");
|
||||
else:
|
||||
classes.write(" ");
|
||||
classes.write("libvirtmod.%s(" % name)
|
||||
n = 0
|
||||
for arg in args:
|
||||
if n != 0:
|
||||
classes.write(", ");
|
||||
if n != index:
|
||||
classes.write("%s" % arg[0])
|
||||
if classes_type.has_key(arg[1]):
|
||||
classes.write("__o");
|
||||
else:
|
||||
classes.write("self");
|
||||
if classes_type.has_key(arg[1]):
|
||||
classes.write(classes_type[arg[1]][0])
|
||||
n = n + 1
|
||||
classes.write(")\n");
|
||||
if function_post.has_key(name):
|
||||
classes.write(" %s\n" % (function_post[name]));
|
||||
if ret[0] != "void":
|
||||
if classes_type.has_key(ret[0]):
|
||||
#
|
||||
# Raise an exception
|
||||
#
|
||||
if functions_noexcept.has_key(name):
|
||||
classes.write(
|
||||
" if ret is None:return None\n");
|
||||
|
||||
#
|
||||
# generate the returned class wrapper for the object
|
||||
#
|
||||
classes.write(" __tmp = ");
|
||||
classes.write(classes_type[ret[0]][1] % ("ret"));
|
||||
classes.write("\n");
|
||||
|
||||
#
|
||||
# Sometime one need to keep references of the source
|
||||
# class in the returned class object.
|
||||
# See reference_keepers for the list
|
||||
#
|
||||
tclass = classes_type[ret[0]][2]
|
||||
if reference_keepers.has_key(tclass):
|
||||
list = reference_keepers[tclass]
|
||||
for pref in list:
|
||||
if pref[0] == classname:
|
||||
classes.write(" __tmp.%s = self\n" %
|
||||
pref[1])
|
||||
#
|
||||
# return the class
|
||||
#
|
||||
classes.write(" return __tmp\n");
|
||||
elif converter_type.has_key(ret[0]):
|
||||
#
|
||||
# Raise an exception
|
||||
#
|
||||
if functions_noexcept.has_key(name):
|
||||
classes.write(
|
||||
" if ret is None:return None");
|
||||
classes.write(" return ");
|
||||
classes.write(converter_type[ret[0]] % ("ret"));
|
||||
classes.write("\n");
|
||||
else:
|
||||
classes.write(" return ret\n");
|
||||
classes.write("\n");
|
||||
|
||||
#
|
||||
# Generate enum constants
|
||||
#
|
||||
for type,enum in enums.items():
|
||||
classes.write("# %s\n" % type)
|
||||
items = enum.items()
|
||||
items.sort(lambda i1,i2: cmp(long(i1[1]),long(i2[1])))
|
||||
for name,value in items:
|
||||
classes.write("%s = %s\n" % (name,value))
|
||||
classes.write("\n");
|
||||
|
||||
if len(functions_skipped) != 0:
|
||||
txt.write("\nFunctions skipped:\n")
|
||||
for function in functions_skipped:
|
||||
txt.write(" %s\n" % function)
|
||||
if len(functions_failed) != 0:
|
||||
txt.write("\nFunctions failed:\n")
|
||||
for function in functions_failed:
|
||||
txt.write(" %s\n" % function)
|
||||
txt.close()
|
||||
classes.close()
|
||||
|
||||
buildStubs()
|
||||
buildWrappers()
|
||||
129
python/libvir.c
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* libvir.c: this modules implements the main part of the glue of the
|
||||
* libvir library and the Python interpreter. It provides the
|
||||
* entry points where an automatically generated stub is
|
||||
* unpractical
|
||||
*
|
||||
* Copyright (C) 2005 Red Hat, Inc.
|
||||
*
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
#include <libvirt.h>
|
||||
#include "libvirt_wrap.h"
|
||||
#include "libvirt-py.h"
|
||||
|
||||
void initlibvirmod(void);
|
||||
|
||||
static PyObject *
|
||||
libvirt_virDomainFree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
|
||||
PyObject *py_retval;
|
||||
int c_retval;
|
||||
virDomainPtr domain;
|
||||
PyObject *pyobj_domain;
|
||||
|
||||
if (!PyArg_ParseTuple(args, (char *)"O:virDomainFree", &pyobj_domain))
|
||||
return(NULL);
|
||||
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
|
||||
|
||||
c_retval = virDomainFree(domain);
|
||||
py_retval = libvirt_intWrap((int) c_retval);
|
||||
return(py_retval);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
libvirt_virConnectClose(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
|
||||
PyObject *py_retval;
|
||||
int c_retval;
|
||||
virConnectPtr conn;
|
||||
PyObject *pyobj_conn;
|
||||
|
||||
if (!PyArg_ParseTuple(args, (char *)"O:virConnectClose", &pyobj_conn))
|
||||
return(NULL);
|
||||
conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
|
||||
|
||||
c_retval = virConnectClose(conn);
|
||||
py_retval = libvirt_intWrap((int) c_retval);
|
||||
return(py_retval);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
libvirt_virConnectListDomainsID(PyObject *self ATTRIBUTE_UNUSED,
|
||||
PyObject *args) {
|
||||
PyObject *py_retval;
|
||||
int ids[500], c_retval, i;
|
||||
virConnectPtr conn;
|
||||
PyObject *pyobj_conn;
|
||||
|
||||
|
||||
if (!PyArg_ParseTuple(args, (char *)"O:virConnectListDomains", &pyobj_conn))
|
||||
return(NULL);
|
||||
conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
|
||||
|
||||
c_retval = virConnectListDomains(conn, &ids[0], 500);
|
||||
if (c_retval < 0) {
|
||||
Py_INCREF(Py_None);
|
||||
return(Py_None);
|
||||
}
|
||||
py_retval = PyList_New(c_retval);
|
||||
for (i = 0;i < c_retval;i++) {
|
||||
PyList_SetItem(py_retval, i, libvirt_intWrap(ids[i]));
|
||||
}
|
||||
return(py_retval);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
libvirt_virDomainGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
|
||||
PyObject *py_retval;
|
||||
int c_retval;
|
||||
virDomainPtr domain;
|
||||
PyObject *pyobj_domain;
|
||||
virDomainInfo info;
|
||||
|
||||
if (!PyArg_ParseTuple(args, (char *)"O:virDomainGetInfo", &pyobj_domain))
|
||||
return(NULL);
|
||||
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
|
||||
|
||||
c_retval = virDomainGetInfo(domain, &info);
|
||||
if (c_retval < 0) {
|
||||
Py_INCREF(Py_None);
|
||||
return(Py_None);
|
||||
}
|
||||
py_retval = PyList_New(5);
|
||||
PyList_SetItem(py_retval, 0, libvirt_intWrap((int) info.state));
|
||||
PyList_SetItem(py_retval, 1, libvirt_longWrap((long) info.maxMem));
|
||||
PyList_SetItem(py_retval, 2, libvirt_longWrap((long) info.memory));
|
||||
PyList_SetItem(py_retval, 3, libvirt_intWrap((int) info.nrVirtCpu));
|
||||
PyList_SetItem(py_retval, 4,
|
||||
libvirt_longlongWrap((unsigned long long) info.cpuTime));
|
||||
return(py_retval);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* The registration stuff *
|
||||
* *
|
||||
************************************************************************/
|
||||
static PyMethodDef libvirtMethods[] = {
|
||||
#include "libvirt-export.c"
|
||||
{(char *) "virDomainFree", libvirt_virDomainFree, METH_VARARGS, NULL},
|
||||
{(char *) "virConnectClose", libvirt_virConnectClose, METH_VARARGS, NULL},
|
||||
{(char *) "virConnectListDomainsID", libvirt_virConnectListDomainsID, METH_VARARGS, NULL},
|
||||
{(char *) "virDomainGetInfo", libvirt_virDomainGetInfo, METH_VARARGS, NULL},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
void
|
||||
initlibvirtmod(void)
|
||||
{
|
||||
static int initialized = 0;
|
||||
|
||||
if (initialized != 0)
|
||||
return;
|
||||
|
||||
/* intialize the python extension module */
|
||||
Py_InitModule((char *) "libvirtmod", libvirtMethods);
|
||||
|
||||
initialized = 1;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<api name='libvir-python'>
|
||||
<symbols>
|
||||
<function name="virConnectListDomainsID" file='python'>
|
||||
<info>Returns the list of the ID of the domains on the hypervisor</info>
|
||||
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
|
||||
<return type='int *' info="the list of ID or None in case of error"/>
|
||||
</function>
|
||||
<function name='virDomainGetInfo' file='libvir' module='libvir'>
|
||||
<info>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.</info>
|
||||
<return type='int *' info='the list of informations or None in case of error'/>
|
||||
<arg name='domain' type='virDomainPtr' info='a domain object'/>
|
||||
</function>
|
||||
</symbols>
|
||||
</api>
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* libvirt_wrap.h: type wrappers for libvir python bindings
|
||||
*
|
||||
* Copyright (C) 2005 Red Hat, Inc.
|
||||
*
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#include <Python.h>
|
||||
#include <libvirt.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef ATTRIBUTE_UNUSED
|
||||
#undef ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
#endif /* ATTRIBUTE_UNUSED */
|
||||
#else
|
||||
#define ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
|
||||
#define PyvirConnect_Get(v) (((v) == Py_None) ? NULL : \
|
||||
(((PyvirConnect_Object *)(v))->obj))
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
virConnectPtr obj;
|
||||
} PyvirConnect_Object;
|
||||
|
||||
|
||||
#define PyvirDomain_Get(v) (((v) == Py_None) ? NULL : \
|
||||
(((PyvirDomain_Object *)(v))->obj))
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
virDomainPtr obj;
|
||||
} PyvirDomain_Object;
|
||||
|
||||
|
||||
PyObject * libvirt_intWrap(int val);
|
||||
PyObject * libvirt_longWrap(long val);
|
||||
PyObject * libvirt_longlongWrap(long long val);
|
||||
PyObject * libvirt_charPtrWrap(char *str);
|
||||
PyObject * libvirt_constcharPtrWrap(const char *str);
|
||||
PyObject * libvirt_charPtrConstWrap(const char *str);
|
||||
PyObject * libvirt_virConnectPtrWrap(virConnectPtr node);
|
||||
PyObject * libvirt_virDomainPtrWrap(virDomainPtr node);
|
||||
|
||||
131
python/types.c
@@ -1,131 +0,0 @@
|
||||
/*
|
||||
* types.c: converter functions between the internal representation
|
||||
* and the Python objects
|
||||
*
|
||||
* Copyright (C) 2005 Red Hat, Inc.
|
||||
*
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#include "libvirt_wrap.h"
|
||||
|
||||
PyObject *
|
||||
libvirt_intWrap(int val)
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("libvirt_intWrap: val = %d\n", val);
|
||||
#endif
|
||||
ret = PyInt_FromLong((long) val);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
libvirt_longWrap(long val)
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("libvirt_longWrap: val = %ld\n", val);
|
||||
#endif
|
||||
ret = PyInt_FromLong(val);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
libvirt_longlongWrap(long long val)
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("libvirt_longWrap: val = %ld\n", val);
|
||||
#endif
|
||||
ret = PyLong_FromUnsignedLongLong((unsigned long long) val);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
libvirt_charPtrWrap(char *str)
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("libvirt_xmlcharPtrWrap: str = %s\n", str);
|
||||
#endif
|
||||
if (str == NULL) {
|
||||
Py_INCREF(Py_None);
|
||||
return (Py_None);
|
||||
}
|
||||
ret = PyString_FromString(str);
|
||||
free(str);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
libvirt_constcharPtrWrap(const char *str)
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("libvirt_xmlcharPtrWrap: str = %s\n", str);
|
||||
#endif
|
||||
if (str == NULL) {
|
||||
Py_INCREF(Py_None);
|
||||
return (Py_None);
|
||||
}
|
||||
ret = PyString_FromString(str);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
libvirt_charPtrConstWrap(const char *str)
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("libvirt_xmlcharPtrWrap: str = %s\n", str);
|
||||
#endif
|
||||
if (str == NULL) {
|
||||
Py_INCREF(Py_None);
|
||||
return (Py_None);
|
||||
}
|
||||
ret = PyString_FromString(str);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
libvirt_virDomainPtrWrap(virDomainPtr node)
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("libvirt_virDomainPtrWrap: node = %p\n", node);
|
||||
#endif
|
||||
if (node == NULL) {
|
||||
Py_INCREF(Py_None);
|
||||
return (Py_None);
|
||||
}
|
||||
ret =
|
||||
PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "virDomainPtr",
|
||||
NULL);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
libvirt_virConnectPtrWrap(virConnectPtr node)
|
||||
{
|
||||
PyObject *ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("libvirt_virConnectPtrWrap: node = %p\n", node);
|
||||
#endif
|
||||
if (node == NULL) {
|
||||
Py_INCREF(Py_None);
|
||||
return (Py_None);
|
||||
}
|
||||
ret =
|
||||
PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "virConnectPtr",
|
||||
NULL);
|
||||
return (ret);
|
||||
}
|
||||
@@ -1,28 +1,8 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I@srcdir@/include
|
||||
DEPS = libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ libvirt.la
|
||||
VIRSH_LIBS = @VIRSH_LIBS@
|
||||
|
||||
EXTRA_DIST = libvirt_sym.version
|
||||
|
||||
lib_LTLIBRARIES = libvirt.la
|
||||
libvirt_la_LIBADD =
|
||||
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
|
||||
-version-info @LIBVIR_VERSION_INFO@
|
||||
libvirt_la_SOURCES = \
|
||||
libvirt.c internal.h \
|
||||
hash.c hash.h \
|
||||
xml.c \
|
||||
xen_internal.c xen_internal.h \
|
||||
xend_internal.c xend_internal.h \
|
||||
sexpr.c sexpr.h
|
||||
|
||||
bin_PROGRAMS=virsh
|
||||
|
||||
virsh_SOURCES=virsh.c
|
||||
virsh_LDFLAGS =
|
||||
virsh_DEPENDENCIES = $(DEPS)
|
||||
virsh_LDADD= $(LDADDS) $(VIRSH_LIBS)
|
||||
|
||||
lib_LTLIBRARIES = libxen.la
|
||||
libxen_la_LIBADD =
|
||||
libxen_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@
|
||||
libxen_la_SOURCES = libxen.c
|
||||
|
||||
461
src/hash.c
@@ -1,461 +0,0 @@
|
||||
/*
|
||||
* hash.c: chained hash tables
|
||||
*
|
||||
* Reference: Your favorite introductory book on algorithms
|
||||
*
|
||||
* Copyright (C) 2000 Bjorn Reese and Daniel Veillard.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
|
||||
* CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
|
||||
*
|
||||
* Author: breese@users.sourceforge.net
|
||||
*/
|
||||
|
||||
#define IN_LIBXML
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "hash.h"
|
||||
|
||||
#define MAX_HASH_LEN 8
|
||||
|
||||
/* #define DEBUG_GROW */
|
||||
|
||||
/*
|
||||
* A single entry in the hash table
|
||||
*/
|
||||
typedef struct _virHashEntry virHashEntry;
|
||||
typedef virHashEntry *virHashEntryPtr;
|
||||
struct _virHashEntry {
|
||||
struct _virHashEntry *next;
|
||||
char *name;
|
||||
void *payload;
|
||||
int valid;
|
||||
};
|
||||
|
||||
/*
|
||||
* The entire hash table
|
||||
*/
|
||||
struct _virHashTable {
|
||||
struct _virHashEntry *table;
|
||||
int size;
|
||||
int nbElems;
|
||||
};
|
||||
|
||||
/*
|
||||
* virHashComputeKey:
|
||||
* Calculate the hash key
|
||||
*/
|
||||
static unsigned long
|
||||
virHashComputeKey(virHashTablePtr table, const char *name) {
|
||||
unsigned long value = 0L;
|
||||
char ch;
|
||||
|
||||
if (name != NULL) {
|
||||
value += 30 * (*name);
|
||||
while ((ch = *name++) != 0) {
|
||||
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch);
|
||||
}
|
||||
}
|
||||
return (value % table->size);
|
||||
}
|
||||
|
||||
/**
|
||||
* virHashCreate:
|
||||
* @size: the size of the hash table
|
||||
*
|
||||
* Create a new virHashTablePtr.
|
||||
*
|
||||
* Returns the newly created object, or NULL if an error occured.
|
||||
*/
|
||||
virHashTablePtr
|
||||
virHashCreate(int size) {
|
||||
virHashTablePtr table;
|
||||
|
||||
if (size <= 0)
|
||||
size = 256;
|
||||
|
||||
table = malloc(sizeof(virHashTable));
|
||||
if (table) {
|
||||
table->size = size;
|
||||
table->nbElems = 0;
|
||||
table->table = malloc(size * sizeof(virHashEntry));
|
||||
if (table->table) {
|
||||
memset(table->table, 0, size * sizeof(virHashEntry));
|
||||
return(table);
|
||||
}
|
||||
free(table);
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* virHashGrow:
|
||||
* @table: the hash table
|
||||
* @size: the new size of the hash table
|
||||
*
|
||||
* resize the hash table
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of failure
|
||||
*/
|
||||
static int
|
||||
virHashGrow(virHashTablePtr table, int size) {
|
||||
unsigned long key;
|
||||
int oldsize, i;
|
||||
virHashEntryPtr iter, next;
|
||||
struct _virHashEntry *oldtable;
|
||||
#ifdef DEBUG_GROW
|
||||
unsigned long nbElem = 0;
|
||||
#endif
|
||||
|
||||
if (table == NULL)
|
||||
return(-1);
|
||||
if (size < 8)
|
||||
return(-1);
|
||||
if (size > 8 * 2048)
|
||||
return(-1);
|
||||
|
||||
oldsize = table->size;
|
||||
oldtable = table->table;
|
||||
if (oldtable == NULL)
|
||||
return(-1);
|
||||
|
||||
table->table = malloc(size * sizeof(virHashEntry));
|
||||
if (table->table == NULL) {
|
||||
table->table = oldtable;
|
||||
return(-1);
|
||||
}
|
||||
memset(table->table, 0, size * sizeof(virHashEntry));
|
||||
table->size = size;
|
||||
|
||||
/* If the two loops are merged, there would be situations where
|
||||
a new entry needs to allocated and data copied into it from
|
||||
the main table. So instead, we run through the array twice, first
|
||||
copying all the elements in the main array (where we can't get
|
||||
conflicts) and then the rest, so we only free (and don't allocate)
|
||||
*/
|
||||
for (i = 0; i < oldsize; i++) {
|
||||
if (oldtable[i].valid == 0)
|
||||
continue;
|
||||
key = virHashComputeKey(table, oldtable[i].name);
|
||||
memcpy(&(table->table[key]), &(oldtable[i]), sizeof(virHashEntry));
|
||||
table->table[key].next = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < oldsize; i++) {
|
||||
iter = oldtable[i].next;
|
||||
while (iter) {
|
||||
next = iter->next;
|
||||
|
||||
/*
|
||||
* put back the entry in the new table
|
||||
*/
|
||||
|
||||
key = virHashComputeKey(table, iter->name);
|
||||
if (table->table[key].valid == 0) {
|
||||
memcpy(&(table->table[key]), iter, sizeof(virHashEntry));
|
||||
table->table[key].next = NULL;
|
||||
free(iter);
|
||||
} else {
|
||||
iter->next = table->table[key].next;
|
||||
table->table[key].next = iter;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_GROW
|
||||
nbElem++;
|
||||
#endif
|
||||
|
||||
iter = next;
|
||||
}
|
||||
}
|
||||
|
||||
free(oldtable);
|
||||
|
||||
#ifdef DEBUG_GROW
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"virHashGrow : from %d to %d, %d elems\n", oldsize, size, nbElem);
|
||||
#endif
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* virHashFree:
|
||||
* @table: the hash table
|
||||
* @f: the deallocator function for items in the hash
|
||||
*
|
||||
* Free the hash @table and its contents. The userdata is
|
||||
* deallocated with @f if provided.
|
||||
*/
|
||||
void
|
||||
virHashFree(virHashTablePtr table, virHashDeallocator f) {
|
||||
int i;
|
||||
virHashEntryPtr iter;
|
||||
virHashEntryPtr next;
|
||||
int inside_table = 0;
|
||||
int nbElems;
|
||||
|
||||
if (table == NULL)
|
||||
return;
|
||||
if (table->table) {
|
||||
nbElems = table->nbElems;
|
||||
for(i = 0; (i < table->size) && (nbElems > 0); i++) {
|
||||
iter = &(table->table[i]);
|
||||
if (iter->valid == 0)
|
||||
continue;
|
||||
inside_table = 1;
|
||||
while (iter) {
|
||||
next = iter->next;
|
||||
if ((f != NULL) && (iter->payload != NULL))
|
||||
f(iter->payload, iter->name);
|
||||
if (iter->name)
|
||||
free(iter->name);
|
||||
iter->payload = NULL;
|
||||
if (!inside_table)
|
||||
free(iter);
|
||||
nbElems--;
|
||||
inside_table = 0;
|
||||
iter = next;
|
||||
}
|
||||
inside_table = 0;
|
||||
}
|
||||
free(table->table);
|
||||
}
|
||||
free(table);
|
||||
}
|
||||
|
||||
/**
|
||||
* virHashAddEntry3:
|
||||
* @table: the hash table
|
||||
* @name: the name of the userdata
|
||||
* @userdata: a pointer to the userdata
|
||||
*
|
||||
* Add the @userdata to the hash @table. This can later be retrieved
|
||||
* by using @name. Duplicate entries generate errors.
|
||||
*
|
||||
* Returns 0 the addition succeeded and -1 in case of error.
|
||||
*/
|
||||
int
|
||||
virHashAddEntry(virHashTablePtr table, const char *name,
|
||||
void *userdata) {
|
||||
unsigned long key, len = 0;
|
||||
virHashEntryPtr entry;
|
||||
virHashEntryPtr insert;
|
||||
|
||||
if ((table == NULL) || (name == NULL))
|
||||
return(-1);
|
||||
|
||||
/*
|
||||
* Check for duplicate and insertion location.
|
||||
*/
|
||||
key = virHashComputeKey(table, name);
|
||||
if (table->table[key].valid == 0) {
|
||||
insert = NULL;
|
||||
} else {
|
||||
for (insert = &(table->table[key]); insert->next != NULL;
|
||||
insert = insert->next) {
|
||||
if (!strcmp(insert->name, name))
|
||||
return(-1);
|
||||
len++;
|
||||
}
|
||||
if (!strcmp(insert->name, name))
|
||||
return(-1);
|
||||
}
|
||||
|
||||
if (insert == NULL) {
|
||||
entry = &(table->table[key]);
|
||||
} else {
|
||||
entry = malloc(sizeof(virHashEntry));
|
||||
if (entry == NULL)
|
||||
return(-1);
|
||||
}
|
||||
|
||||
entry->name = strdup(name);
|
||||
entry->payload = userdata;
|
||||
entry->next = NULL;
|
||||
entry->valid = 1;
|
||||
|
||||
|
||||
if (insert != NULL)
|
||||
insert->next = entry;
|
||||
|
||||
table->nbElems++;
|
||||
|
||||
if (len > MAX_HASH_LEN)
|
||||
virHashGrow(table, MAX_HASH_LEN * table->size);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* virHashUpdateEntry:
|
||||
* @table: the hash table
|
||||
* @name: the name of the userdata
|
||||
* @userdata: a pointer to the userdata
|
||||
* @f: the deallocator function for replaced item (if any)
|
||||
*
|
||||
* Add the @userdata to the hash @table. This can later be retrieved
|
||||
* by using @name. Existing entry for this tuple
|
||||
* will be removed and freed with @f if found.
|
||||
*
|
||||
* Returns 0 the addition succeeded and -1 in case of error.
|
||||
*/
|
||||
int
|
||||
virHashUpdateEntry(virHashTablePtr table, const char *name,
|
||||
void *userdata, virHashDeallocator f) {
|
||||
unsigned long key;
|
||||
virHashEntryPtr entry;
|
||||
virHashEntryPtr insert;
|
||||
|
||||
if ((table == NULL) || name == NULL)
|
||||
return(-1);
|
||||
|
||||
/*
|
||||
* Check for duplicate and insertion location.
|
||||
*/
|
||||
key = virHashComputeKey(table, name);
|
||||
if (table->table[key].valid == 0) {
|
||||
insert = NULL;
|
||||
} else {
|
||||
for (insert = &(table->table[key]); insert->next != NULL;
|
||||
insert = insert->next) {
|
||||
if (!strcmp(insert->name, name)) {
|
||||
if (f)
|
||||
f(insert->payload, insert->name);
|
||||
insert->payload = userdata;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
if (!strcmp(insert->name, name)) {
|
||||
if (f)
|
||||
f(insert->payload, insert->name);
|
||||
insert->payload = userdata;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (insert == NULL) {
|
||||
entry = &(table->table[key]);
|
||||
} else {
|
||||
entry = malloc(sizeof(virHashEntry));
|
||||
if (entry == NULL)
|
||||
return(-1);
|
||||
}
|
||||
|
||||
entry->name = strdup(name);
|
||||
entry->payload = userdata;
|
||||
entry->next = NULL;
|
||||
entry->valid = 1;
|
||||
table->nbElems++;
|
||||
|
||||
|
||||
if (insert != NULL) {
|
||||
insert->next = entry;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* virHashLookup:
|
||||
* @table: the hash table
|
||||
* @name: the name of the userdata
|
||||
*
|
||||
* Find the userdata specified by the (@name, @name2, @name3) tuple.
|
||||
*
|
||||
* Returns the a pointer to the userdata
|
||||
*/
|
||||
void *
|
||||
virHashLookup(virHashTablePtr table, const char *name) {
|
||||
unsigned long key;
|
||||
virHashEntryPtr entry;
|
||||
|
||||
if (table == NULL)
|
||||
return(NULL);
|
||||
if (name == NULL)
|
||||
return(NULL);
|
||||
key = virHashComputeKey(table, name);
|
||||
if (table->table[key].valid == 0)
|
||||
return(NULL);
|
||||
for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
|
||||
if (!strcmp(entry->name, name))
|
||||
return(entry->payload);
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* virHashSize:
|
||||
* @table: the hash table
|
||||
*
|
||||
* Query the number of elements installed in the hash @table.
|
||||
*
|
||||
* Returns the number of elements in the hash table or
|
||||
* -1 in case of error
|
||||
*/
|
||||
int
|
||||
virHashSize(virHashTablePtr table) {
|
||||
if (table == NULL)
|
||||
return(-1);
|
||||
return(table->nbElems);
|
||||
}
|
||||
|
||||
/**
|
||||
* virHashRemoveEntry:
|
||||
* @table: the hash table
|
||||
* @name: the name of the userdata
|
||||
* @f: the deallocator function for removed item (if any)
|
||||
*
|
||||
* Find the userdata specified by the @name and remove
|
||||
* it from the hash @table. Existing userdata for this tuple will be removed
|
||||
* and freed with @f.
|
||||
*
|
||||
* Returns 0 if the removal succeeded and -1 in case of error or not found.
|
||||
*/
|
||||
int
|
||||
virHashRemoveEntry(virHashTablePtr table, const char *name,
|
||||
virHashDeallocator f) {
|
||||
unsigned long key;
|
||||
virHashEntryPtr entry;
|
||||
virHashEntryPtr prev = NULL;
|
||||
|
||||
if (table == NULL || name == NULL)
|
||||
return(-1);
|
||||
|
||||
key = virHashComputeKey(table, name);
|
||||
if (table->table[key].valid == 0) {
|
||||
return(-1);
|
||||
} else {
|
||||
for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
|
||||
if (!strcmp(entry->name, name)) {
|
||||
if ((f != NULL) && (entry->payload != NULL))
|
||||
f(entry->payload, entry->name);
|
||||
entry->payload = NULL;
|
||||
if(entry->name)
|
||||
free(entry->name);
|
||||
if(prev) {
|
||||
prev->next = entry->next;
|
||||
free(entry);
|
||||
} else {
|
||||
if (entry->next == NULL) {
|
||||
entry->valid = 0;
|
||||
} else {
|
||||
entry = entry->next;
|
||||
memcpy(&(table->table[key]), entry, sizeof(virHashEntry));
|
||||
free(entry);
|
||||
}
|
||||
}
|
||||
table->nbElems--;
|
||||
return(0);
|
||||
}
|
||||
prev = entry;
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
71
src/hash.h
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Summary: Chained hash tables
|
||||
* Description: This module implements the hash table support used in
|
||||
* various places in the library.
|
||||
*
|
||||
* Copy: Copyright (C) 2005 Red Hat, Inc.
|
||||
*
|
||||
* Author: Bjorn Reese <bjorn.reese@systematic.dk>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_HASH_H__
|
||||
#define __VIR_HASH_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The hash table.
|
||||
*/
|
||||
typedef struct _virHashTable virHashTable;
|
||||
typedef virHashTable *virHashTablePtr;
|
||||
|
||||
/*
|
||||
* function types:
|
||||
*/
|
||||
/**
|
||||
* virHashDeallocator:
|
||||
* @payload: the data in the hash
|
||||
* @name: the name associated
|
||||
*
|
||||
* Callback to free data from a hash.
|
||||
*/
|
||||
typedef void (*virHashDeallocator)(void *payload, char *name);
|
||||
|
||||
/*
|
||||
* Constructor and destructor.
|
||||
*/
|
||||
virHashTablePtr virHashCreate (int size);
|
||||
void
|
||||
virHashFree (virHashTablePtr table,
|
||||
virHashDeallocator f);
|
||||
int virHashSize (virHashTablePtr table);
|
||||
|
||||
/*
|
||||
* Add a new entry to the hash table.
|
||||
*/
|
||||
int virHashAddEntry (virHashTablePtr table,
|
||||
const char *name,
|
||||
void *userdata);
|
||||
int virHashUpdateEntry(virHashTablePtr table,
|
||||
const char *name,
|
||||
void *userdata,
|
||||
virHashDeallocator f);
|
||||
|
||||
/*
|
||||
* Remove an entry from the hash table.
|
||||
*/
|
||||
int virHashRemoveEntry(virHashTablePtr table,
|
||||
const char *name,
|
||||
virHashDeallocator f);
|
||||
/*
|
||||
* Retrieve the userdata.
|
||||
*/
|
||||
void * virHashLookup (virHashTablePtr table,
|
||||
const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* ! __VIR_HASH_H__ */
|
||||
129
src/internal.h
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* internal.h: internal definitions just used by code from the library
|
||||
*/
|
||||
|
||||
#ifndef __VIR_INTERNAL_H__
|
||||
#define __VIR_INTERNAL_H__
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
#include "hash.h"
|
||||
#include "libvirt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
* Macro to flag conciously unused parameters to functions
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
#ifdef HAVE_ANSIDECL_H
|
||||
#include <ansidecl.h>
|
||||
#endif
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
#define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
#endif
|
||||
#else
|
||||
#define ATTRIBUTE_UNUSED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
*
|
||||
* macro to flag unimplemented blocks
|
||||
*/
|
||||
#define TODO \
|
||||
fprintf(stderr, "Unimplemented block at %s:%d\n", \
|
||||
__FILE__, __LINE__);
|
||||
|
||||
/**
|
||||
* VIR_CONNECT_MAGIC:
|
||||
*
|
||||
* magic value used to protect the API when pointers to connection structures
|
||||
* are passed down by the uers.
|
||||
*/
|
||||
#define VIR_CONNECT_MAGIC 0x4F23DEAD
|
||||
#define VIR_IS_CONNECT(obj) ((obj) && (obj)->magic==VIR_CONNECT_MAGIC)
|
||||
|
||||
|
||||
/**
|
||||
* VIR_DOMAIN_MAGIC:
|
||||
*
|
||||
* magic value used to protect the API when pointers to domain structures
|
||||
* are passed down by the uers.
|
||||
*/
|
||||
#define VIR_DOMAIN_MAGIC 0xDEAD4321
|
||||
#define VIR_IS_DOMAIN(obj) ((obj) && (obj)->magic==VIR_DOMAIN_MAGIC)
|
||||
#define VIR_IS_CONNECTED_DOMAIN(obj) (VIR_IS_DOMAIN(obj) && VIR_IS_CONNECT((obj)->conn))
|
||||
|
||||
/*
|
||||
* Flags for Xen connections
|
||||
*/
|
||||
#define VIR_CONNECT_RO 1
|
||||
|
||||
/**
|
||||
* _virConnect:
|
||||
*
|
||||
* Internal structure associated to a connection
|
||||
*/
|
||||
struct _virConnect {
|
||||
unsigned int magic; /* specific value to check */
|
||||
int handle; /* internal handle used for hypercall */
|
||||
struct xs_handle *xshandle; /* handle to talk to the xenstore */
|
||||
|
||||
/* connection to xend */
|
||||
int type; /* PF_UNIX or PF_INET */
|
||||
int len; /* lenght of addr */
|
||||
struct sockaddr *addr; /* type of address used */
|
||||
struct sockaddr_un addr_un; /* the unix address */
|
||||
struct sockaddr_in addr_in; /* the inet address */
|
||||
|
||||
virHashTablePtr domains; /* hash table for known domains */
|
||||
int flags; /* a set of connection flags */
|
||||
};
|
||||
|
||||
/**
|
||||
* virDomainFlags:
|
||||
*
|
||||
* a set of special flag values associated to the domain
|
||||
*/
|
||||
|
||||
enum {
|
||||
DOMAIN_IS_SHUTDOWN = (1 << 0) /* the domain is being shutdown */
|
||||
} virDomainFlags;
|
||||
|
||||
/**
|
||||
* _virDomain:
|
||||
*
|
||||
* Internal structure associated to a domain
|
||||
*/
|
||||
struct _virDomain {
|
||||
unsigned int magic; /* specific value to check */
|
||||
virConnectPtr conn; /* pointer back to the connection */
|
||||
char *name; /* the domain external name */
|
||||
char *path; /* the domain internal path */
|
||||
int handle; /* internal handle for the dmonain ID */
|
||||
int flags; /* extra flags */
|
||||
unsigned char uuid[16]; /* the domain unique identifier */
|
||||
};
|
||||
|
||||
/*
|
||||
* Internal routines
|
||||
*/
|
||||
char * virDomainGetVM (virDomainPtr domain);
|
||||
char * virDomainGetVMInfo (virDomainPtr domain,
|
||||
const char *vm,
|
||||
const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __VIR_INTERNAL_H__ */
|
||||
1205
src/libvirt.c
@@ -1,29 +0,0 @@
|
||||
{
|
||||
global:
|
||||
virConnectClose;
|
||||
virConnectGetType;
|
||||
virConnectGetVersion;
|
||||
virConnectListDomains;
|
||||
virConnectNumOfDomains;
|
||||
virConnectOpen;
|
||||
virConnectOpenReadOnly;
|
||||
virDomainCreateLinux;
|
||||
virDomainDestroy;
|
||||
virDomainFree;
|
||||
virDomainGetID;
|
||||
virDomainGetInfo;
|
||||
virDomainGetMaxMemory;
|
||||
virDomainGetName;
|
||||
virDomainGetOSType;
|
||||
virDomainGetXMLDesc;
|
||||
virDomainLookupByID;
|
||||
virDomainLookupByName;
|
||||
virDomainRestore;
|
||||
virDomainResume;
|
||||
virDomainSave;
|
||||
virDomainSetMaxMemory;
|
||||
virDomainShutdown;
|
||||
virDomainSuspend;
|
||||
virGetVersion;
|
||||
local: *;
|
||||
};
|
||||
76
src/libxen.c
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* libxen.h: Main interfaces for the libxen library to handle virtualization
|
||||
* domains from a process running in domain 0
|
||||
*
|
||||
* Copyright (C) 2005 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#include "libxen.h"
|
||||
|
||||
#include "memory.h"
|
||||
#include "internal.h"
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
* - use lock to protect against concurrent accesses ?
|
||||
* - use reference counting to garantee coherent pointer state ?
|
||||
*/
|
||||
|
||||
#define XEN_CONNECT_MAGIC 0x4F23DEAD
|
||||
/**
|
||||
* _xenConnect:
|
||||
*
|
||||
* Internal structure associated to a connection
|
||||
*/
|
||||
struct _xenConnect {
|
||||
unsigned int magic; /* specific value to check */
|
||||
int handle; /* internal handle used for hypercall */
|
||||
}
|
||||
|
||||
/**
|
||||
* xenGetConnect:
|
||||
* @name: optional argument currently unused, pass NULL
|
||||
*
|
||||
* This function should be called first to get a connection to the
|
||||
* Hypervisor
|
||||
*
|
||||
* Returns a pointer to the hypervisor connection or NULL in case of error
|
||||
*/
|
||||
xenConnectPtr
|
||||
xenOpenConnect(const char *name ATTRIBUTE_UNUSED) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenCloseConnect:
|
||||
* @conn: pointer to the hypervisor connection
|
||||
*
|
||||
* This function closes the connection to the Hypervisor. This should
|
||||
* not be called if further interaction with the Hypervisor are needed
|
||||
* especially if there is running domain which need further monitoring by
|
||||
* the application.
|
||||
*
|
||||
* Returns 0 in case of success or -1 in case of error.
|
||||
*/
|
||||
int
|
||||
xenCloseConnect(xenConnectPtr conn) {
|
||||
if ((conn == NULL) || (conn->magic != XEN_CONNECT_MAGIC))
|
||||
return(-1);
|
||||
/*
|
||||
* TODO:
|
||||
* Free the domain pointers associated to this connection
|
||||
*/
|
||||
conn->magic = -1;
|
||||
free(conn);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenGetVersion:
|
||||
* @conn: pointer to the hypervisor connection
|
||||
*
|
||||
* Get the version level of the Hypervisor running
|
||||
446
src/sexpr.c
@@ -1,446 +0,0 @@
|
||||
/*
|
||||
* sexpr.c : S-Expression routines to communicate with the Xen Daemon
|
||||
*
|
||||
* Copyright (C) 2005
|
||||
*
|
||||
* Anthony Liguori <aliguori@us.ibm.com>
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser General
|
||||
* Public License. See the file COPYING.LIB in the main directory of this
|
||||
* archive for more details.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include "sexpr.h"
|
||||
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
|
||||
/**
|
||||
* sexpr_new:
|
||||
*
|
||||
* Create a new S-Expression
|
||||
*
|
||||
* Returns the new node or NULL in case of memory allocation error
|
||||
*/
|
||||
static struct sexpr *
|
||||
sexpr_new(void)
|
||||
{
|
||||
struct sexpr *ret;
|
||||
|
||||
ret = (struct sexpr *) malloc(sizeof(*ret));
|
||||
if (ret == NULL) {
|
||||
return(NULL);
|
||||
}
|
||||
ret->kind = SEXPR_NIL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* sexpr_free:
|
||||
* @sexpr: the S-Expression pointer
|
||||
*
|
||||
* Free an S-Expression
|
||||
*/
|
||||
void
|
||||
sexpr_free(struct sexpr *sexpr)
|
||||
{
|
||||
int serrno = errno;
|
||||
|
||||
if (sexpr == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (sexpr->kind) {
|
||||
case SEXPR_CONS:
|
||||
sexpr_free(sexpr->car);
|
||||
sexpr_free(sexpr->cdr);
|
||||
break;
|
||||
case SEXPR_VALUE:
|
||||
free(sexpr->value);
|
||||
break;
|
||||
case SEXPR_NIL:
|
||||
break;
|
||||
}
|
||||
|
||||
free(sexpr);
|
||||
|
||||
errno = serrno;
|
||||
}
|
||||
|
||||
/**
|
||||
* sexpr_nil:
|
||||
*
|
||||
* Provide a NIL S-Expression (the pointer is not shared so NIL equality
|
||||
* testing won't work at the pointer level).
|
||||
*
|
||||
* Returns a new NIL S-Expression of NULL in case of error.
|
||||
*/
|
||||
struct sexpr *
|
||||
sexpr_nil(void)
|
||||
{
|
||||
return sexpr_new();
|
||||
}
|
||||
|
||||
/**
|
||||
* sexpr_string:
|
||||
* @str: the input string, assumed to be UTF-8
|
||||
* @len: the length in bytes of the input
|
||||
*
|
||||
* Parse the input S-Expression and return a pointer to the result
|
||||
*
|
||||
* Returns the S-Expression pointer or NULL in case of error
|
||||
*/
|
||||
struct sexpr *
|
||||
sexpr_string(const char *str, ssize_t len)
|
||||
{
|
||||
struct sexpr *ret = sexpr_new();
|
||||
|
||||
if (ret == NULL)
|
||||
return ret;
|
||||
ret->kind = SEXPR_VALUE;
|
||||
if (len > 0) {
|
||||
ret->value = strndup(str, len);
|
||||
} else {
|
||||
ret->value = strdup(str);
|
||||
}
|
||||
|
||||
if (ret->value == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* sexpr_cons:
|
||||
* @car: the left operand
|
||||
* @cdr: the right operand
|
||||
*
|
||||
* Implement the CONS operation assembling 2 existing S-Expressions.
|
||||
* Note that in case of error the input data are not freed.
|
||||
*
|
||||
* Returns the resulting S-Expression pointer or NULL in case of error.
|
||||
*/
|
||||
struct sexpr *
|
||||
sexpr_cons(struct sexpr *car, struct sexpr *cdr)
|
||||
{
|
||||
struct sexpr *ret = sexpr_new();
|
||||
|
||||
if (ret == NULL)
|
||||
return ret;
|
||||
ret->kind = SEXPR_CONS;
|
||||
ret->car = car;
|
||||
ret->cdr = cdr;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* append:
|
||||
* @lst: an existing list
|
||||
* @value: the value
|
||||
*
|
||||
* Internal operation appending a value at the end of an existing list
|
||||
*/
|
||||
static void
|
||||
append(struct sexpr *lst, struct sexpr *value)
|
||||
{
|
||||
while (lst->kind != SEXPR_NIL) {
|
||||
lst = lst->cdr;
|
||||
}
|
||||
|
||||
lst->kind = SEXPR_CONS;
|
||||
lst->car = value;
|
||||
lst->cdr = sexpr_nil();
|
||||
}
|
||||
|
||||
/**
|
||||
* @lst: an existing list
|
||||
* @value: the value
|
||||
*
|
||||
* Append a value at the end of an existing list
|
||||
*
|
||||
* Returns lst or NULL in case of error
|
||||
*/
|
||||
struct sexpr *
|
||||
sexpr_append(struct sexpr *lst, struct sexpr *value)
|
||||
{
|
||||
if (lst == NULL)
|
||||
return(NULL);
|
||||
if (value == NULL)
|
||||
return(lst);
|
||||
append(lst, value);
|
||||
return(lst);
|
||||
}
|
||||
|
||||
/**
|
||||
* sexpr2string:
|
||||
* @sexpr: an S-Expression pointer
|
||||
* @buffer: the output buffer
|
||||
* @n_buffer: the size of the buffer in bytes
|
||||
*
|
||||
* Serialize the S-Expression in the buffer.
|
||||
* Note that the output may be truncated if @n_buffer is too small
|
||||
* resulting in an unparseable value.
|
||||
*
|
||||
* Returns the number of bytes used by the serialization in the buffer or
|
||||
* 0 in case of error.
|
||||
*/
|
||||
size_t
|
||||
sexpr2string(struct sexpr * sexpr, char *buffer, size_t n_buffer)
|
||||
{
|
||||
size_t ret = 0, tmp;
|
||||
|
||||
if ((sexpr == NULL) || (buffer == NULL) || (n_buffer <= 0))
|
||||
return(0);
|
||||
|
||||
switch (sexpr->kind) {
|
||||
case SEXPR_CONS:
|
||||
tmp = snprintf(buffer + ret, n_buffer - ret, "(");
|
||||
if (tmp == 0)
|
||||
return(0);
|
||||
ret += tmp;
|
||||
tmp = sexpr2string(sexpr->car, buffer + ret, n_buffer - ret);
|
||||
if (tmp == 0)
|
||||
return(0);
|
||||
ret += tmp;
|
||||
while (sexpr->cdr->kind != SEXPR_NIL) {
|
||||
sexpr = sexpr->cdr;
|
||||
tmp = snprintf(buffer + ret, n_buffer - ret, " ");
|
||||
if (tmp == 0)
|
||||
return(0);
|
||||
ret += tmp;
|
||||
tmp = sexpr2string(sexpr->car, buffer + ret, n_buffer - ret);
|
||||
if (tmp == 0)
|
||||
return(0);
|
||||
ret += tmp;
|
||||
}
|
||||
tmp = snprintf(buffer + ret, n_buffer - ret, ")");
|
||||
if (tmp == 0)
|
||||
return(0);
|
||||
ret += tmp;
|
||||
break;
|
||||
case SEXPR_VALUE:
|
||||
if (strchr(sexpr->value, ' '))
|
||||
tmp = snprintf(buffer + ret, n_buffer - ret, "'%s'",
|
||||
sexpr->value);
|
||||
else
|
||||
tmp = snprintf(buffer + ret, n_buffer - ret, "%s",
|
||||
sexpr->value);
|
||||
if (tmp == 0)
|
||||
return(0);
|
||||
ret += tmp;
|
||||
break;
|
||||
case SEXPR_NIL:
|
||||
break;
|
||||
default:
|
||||
return(0);
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
#define IS_SPACE(c) ((c == 0x20) || (c == 0x9) || (c == 0xD) || (c == 0xA))
|
||||
|
||||
static const char *
|
||||
trim(const char *string)
|
||||
{
|
||||
while (IS_SPACE(*string))
|
||||
string++;
|
||||
return(string);
|
||||
}
|
||||
|
||||
/**
|
||||
* _string2sexpr:
|
||||
* @buffer: a zero terminated buffer containing an S-Expression in UTF-8
|
||||
* @end: pointer to an index in the buffer for the already parsed bytes
|
||||
*
|
||||
* Internal routine implementing the parse of S-Expression
|
||||
* Note that failure in this function is catrosphic. If it returns
|
||||
* NULL, you've leaked memory and you're currently OOM. It will always
|
||||
* parse an SEXPR given a buffer
|
||||
*
|
||||
* Returns a pointer to the resulting parsed S-Expression, or NULL in case of
|
||||
* hard error.
|
||||
*/
|
||||
static struct sexpr *
|
||||
_string2sexpr(const char *buffer, size_t * end)
|
||||
{
|
||||
const char *ptr = buffer + *end;
|
||||
struct sexpr *ret = sexpr_new();
|
||||
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
|
||||
ptr = trim(ptr);
|
||||
|
||||
if (ptr[0] == '(') {
|
||||
ret->kind = SEXPR_NIL;
|
||||
|
||||
ptr = trim(ptr + 1);
|
||||
while (*ptr && *ptr != ')') {
|
||||
struct sexpr *tmp;
|
||||
size_t tmp_len = 0;
|
||||
|
||||
tmp = _string2sexpr(ptr, &tmp_len);
|
||||
if (tmp == NULL)
|
||||
return NULL;
|
||||
append(ret, tmp);
|
||||
#if 0
|
||||
if (0) {
|
||||
char buf[4096];
|
||||
|
||||
sexpr2string(ret, buf, sizeof(buf));
|
||||
printf("%s\n", buffer);
|
||||
}
|
||||
#endif
|
||||
ptr = trim(ptr + tmp_len);
|
||||
}
|
||||
|
||||
if (*ptr == ')') {
|
||||
ptr++;
|
||||
}
|
||||
} else {
|
||||
const char *start;
|
||||
|
||||
if (*ptr == '\'') {
|
||||
ptr++;
|
||||
start = ptr;
|
||||
|
||||
while (*ptr && *ptr != '\'') {
|
||||
if (*ptr == '\\' && ptr[1])
|
||||
ptr++;
|
||||
ptr++;
|
||||
}
|
||||
|
||||
ret->value = strndup(start, ptr - start);
|
||||
|
||||
if (*ptr == '\'')
|
||||
ptr++;
|
||||
} else {
|
||||
start = ptr;
|
||||
|
||||
while (*ptr && !isspace(*ptr) && *ptr != ')' && *ptr != '(') {
|
||||
ptr++;
|
||||
}
|
||||
|
||||
ret->value = strndup(start, ptr - start);
|
||||
}
|
||||
|
||||
ret->kind = SEXPR_VALUE;
|
||||
}
|
||||
|
||||
*end = ptr - buffer;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* string2sexpr:
|
||||
* @buffer: a zero terminated buffer containing an S-Expression in UTF-8
|
||||
*
|
||||
* Parse the S-Expression in the buffer.
|
||||
* Note that failure in this function is catrosphic. If it returns
|
||||
* NULL, you've leaked memory and you're currently OOM. It will always
|
||||
* parse an SEXPR given a buffer
|
||||
*
|
||||
* Returns a pointer to the resulting parsed S-Expression, or NULL in case of
|
||||
* hard error.
|
||||
*/
|
||||
struct sexpr *
|
||||
string2sexpr(const char *buffer)
|
||||
{
|
||||
size_t dummy = 0;
|
||||
|
||||
return _string2sexpr(buffer, &dummy);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* sexpr_lookup:
|
||||
* @sexpr: a pointer to a parsed S-Expression
|
||||
* @node: a path for the sub expression to lookup in the S-Expression
|
||||
*
|
||||
* Search a sub expression in the S-Expression based on its path
|
||||
* NOTE: path are limited to 4096 bytes.
|
||||
*
|
||||
* Returns the pointer to the sub expression or NULL if not found.
|
||||
*/
|
||||
struct sexpr *
|
||||
sexpr_lookup(struct sexpr *sexpr, const char *node)
|
||||
{
|
||||
char buffer[4096], *ptr, *token;
|
||||
|
||||
if ((node == NULL) || (sexpr == NULL))
|
||||
return(NULL);
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "%s", node);
|
||||
|
||||
ptr = buffer;
|
||||
token = strsep(&ptr, "/");
|
||||
|
||||
if (sexpr->kind != SEXPR_CONS || sexpr->car->kind != SEXPR_VALUE) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (strcmp(sexpr->car->value, token) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (token = strsep(&ptr, "/"); token; token = strsep(&ptr, "/")) {
|
||||
struct sexpr *i;
|
||||
|
||||
if (token == NULL)
|
||||
continue;
|
||||
|
||||
sexpr = sexpr->cdr;
|
||||
for (i=sexpr; i->kind != SEXPR_NIL; i=i->cdr) {
|
||||
if (i->kind != SEXPR_CONS ||
|
||||
i->car->kind != SEXPR_CONS ||
|
||||
i->car->car->kind != SEXPR_VALUE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(i->car->car->value, token) == 0) {
|
||||
sexpr = i->car;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i->kind == SEXPR_NIL) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (token != NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (sexpr->kind != SEXPR_CONS || sexpr->cdr->kind != SEXPR_CONS)
|
||||
return NULL;
|
||||
|
||||
return sexpr->cdr;
|
||||
}
|
||||
|
||||
/**
|
||||
* sexpr_node:
|
||||
* @sexpr: a pointer to a parsed S-Expression
|
||||
* @node: a path for the node to lookup in the S-Expression
|
||||
*
|
||||
* Search a node value in the S-Expression based on its path
|
||||
* NOTE: path are limited to 4096 bytes.
|
||||
*
|
||||
* Returns the value of the node or NULL if not found.
|
||||
*/
|
||||
const char *
|
||||
sexpr_node(struct sexpr *sexpr, const char *node)
|
||||
{
|
||||
struct sexpr *n = sexpr_lookup(sexpr, node);
|
||||
|
||||
return (n && n->car->kind == SEXPR_VALUE) ? n->car->value : NULL;
|
||||
}
|
||||
56
src/sexpr.h
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* sexpr.h : S-Expression interfaces needed to communicate with the Xen Daemon
|
||||
*
|
||||
* Copyright (C) 2005
|
||||
*
|
||||
* Anthony Liguori <aliguori@us.ibm.com>
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU Lesser General
|
||||
* Public License. See the file COPYING.LIB in the main directory of this
|
||||
* archive for more details.
|
||||
*/
|
||||
|
||||
#ifndef _LIBVIR_SEXPR_H_
|
||||
#define _LIBVIR_SEXPR_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
enum sexpr_type {
|
||||
SEXPR_NIL,
|
||||
SEXPR_CONS,
|
||||
SEXPR_VALUE,
|
||||
};
|
||||
|
||||
struct sexpr {
|
||||
enum sexpr_type kind;
|
||||
union {
|
||||
struct {
|
||||
struct sexpr *car;
|
||||
struct sexpr *cdr;
|
||||
};
|
||||
char *value;
|
||||
};
|
||||
};
|
||||
|
||||
/* conversion to/from strings */
|
||||
size_t sexpr2string (struct sexpr *sexpr,
|
||||
char *buffer,
|
||||
size_t n_buffer);
|
||||
struct sexpr * string2sexpr (const char *buffer);
|
||||
|
||||
/* constructors and destructors */
|
||||
struct sexpr * sexpr_nil (void);
|
||||
struct sexpr * sexpr_string (const char *str,
|
||||
ssize_t len);
|
||||
struct sexpr * sexpr_cons (struct sexpr *car,
|
||||
struct sexpr *cdr);
|
||||
struct sexpr * sexpr_append (struct sexpr *lst,
|
||||
struct sexpr *item);
|
||||
void sexpr_free (struct sexpr *sexpr);
|
||||
|
||||
/* lookup in S-Expressions */
|
||||
const char * sexpr_node (struct sexpr *sexpr,
|
||||
const char *node);
|
||||
struct sexpr * sexpr_lookup (struct sexpr *sexpr,
|
||||
const char *node);
|
||||
#endif
|
||||
1817
src/virsh.c
@@ -1,276 +0,0 @@
|
||||
/*
|
||||
* xen_internal.c: direct access to Xen hypervisor level
|
||||
*
|
||||
* Copyright (C) 2005 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <xen/dom0_ops.h>
|
||||
#include <xen/version.h>
|
||||
#include <xen/xen.h>
|
||||
|
||||
#ifndef __LINUX_PUBLIC_PRIVCMD_H__
|
||||
typedef struct hypercall_struct
|
||||
{
|
||||
unsigned long op;
|
||||
unsigned long arg[5];
|
||||
} hypercall_t;
|
||||
#endif
|
||||
|
||||
|
||||
#include "internal.h"
|
||||
#include "xen_internal.h"
|
||||
|
||||
#define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd"
|
||||
|
||||
/**
|
||||
* xenHypervisorOpen:
|
||||
*
|
||||
* Connects to the Xen hypervisor.
|
||||
*
|
||||
* Returns the handle or -1 in case of error.
|
||||
*/
|
||||
int xenHypervisorOpen(void) {
|
||||
int ret;
|
||||
|
||||
ret = open(XEN_HYPERVISOR_SOCKET, O_RDWR);
|
||||
if (ret < 0)
|
||||
return(-1);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenHypervisorClose:
|
||||
* @handle: the handle to the Xen hypervisor
|
||||
*
|
||||
* Close the connection to the Xen hypervisor.
|
||||
*
|
||||
* Returns 0 in case of success or -1 in case of error.
|
||||
*/
|
||||
int xenHypervisorClose(int handle) {
|
||||
int ret;
|
||||
|
||||
if (handle < 0)
|
||||
return(-1);
|
||||
|
||||
ret = close(handle);
|
||||
if (ret < 0)
|
||||
return(-1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenHypervisorDoOp:
|
||||
* @handle: the handle to the Xen hypervisor
|
||||
* @op: pointer to the hyperviros operation structure
|
||||
*
|
||||
* Do an hypervisor operation, this leads to an hypervisor call through ioctl.
|
||||
*
|
||||
* Returns 0 in case of success and -1 in case of error.
|
||||
*/
|
||||
static int
|
||||
xenHypervisorDoOp(int handle, dom0_op_t *op) {
|
||||
int ret;
|
||||
unsigned int cmd;
|
||||
hypercall_t hc;
|
||||
|
||||
op->interface_version = DOM0_INTERFACE_VERSION;
|
||||
hc.op = __HYPERVISOR_dom0_op;
|
||||
hc.arg[0] = (unsigned long)op;
|
||||
|
||||
if (mlock(op, sizeof(dom0_op_t)) < 0)
|
||||
return(-1);
|
||||
|
||||
cmd = _IOC(_IOC_NONE, 'P', 0, sizeof(hc));
|
||||
ret = ioctl(handle, cmd, (unsigned long) &hc);
|
||||
|
||||
if (munlock(op, sizeof(dom0_op_t)) < 0)
|
||||
ret = -1;
|
||||
|
||||
if (ret < 0)
|
||||
return(-1);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenHypervisorGetVersion:
|
||||
* @handle: the handle to the Xen hypervisor
|
||||
*
|
||||
* Call the hypervisor to extracts his own internal API version
|
||||
*
|
||||
* Returns the hypervisor running version or 0 in case of error.
|
||||
*/
|
||||
unsigned long
|
||||
xenHypervisorGetVersion(int handle) {
|
||||
int ret;
|
||||
unsigned int cmd;
|
||||
hypercall_t hc;
|
||||
|
||||
hc.op = __HYPERVISOR_xen_version;
|
||||
hc.arg[0] = (unsigned long) XENVER_version;
|
||||
hc.arg[1] = 0;
|
||||
|
||||
cmd = _IOC(_IOC_NONE, 'P', 0, sizeof(hc));
|
||||
ret = ioctl(handle, cmd, (unsigned long) &hc);
|
||||
|
||||
if (ret < 0)
|
||||
return(0);
|
||||
/*
|
||||
* use unsigned long in case the version grows behind expectations
|
||||
* allowed by int
|
||||
*/
|
||||
return((unsigned long) ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenHypervisorGetDomainInfo:
|
||||
* @handle: the handle to the Xen hypervisor
|
||||
* @domain: the domain ID
|
||||
* @info: the place where informations should be stored
|
||||
*
|
||||
* Do an hypervisor call to get the related set of domain informations.
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
int
|
||||
xenHypervisorGetDomainInfo(int handle, int domain, dom0_getdomaininfo_t *info) {
|
||||
dom0_op_t op;
|
||||
int ret;
|
||||
|
||||
if (info == NULL)
|
||||
return(-1);
|
||||
|
||||
memset(info, 0, sizeof(dom0_getdomaininfo_t));
|
||||
|
||||
if (mlock(info, sizeof(dom0_getdomaininfo_t)) < 0)
|
||||
return(-1);
|
||||
|
||||
op.cmd = DOM0_GETDOMAININFOLIST;
|
||||
op.u.getdomaininfolist.first_domain = (domid_t) domain;
|
||||
op.u.getdomaininfolist.max_domains = 1;
|
||||
op.u.getdomaininfolist.buffer = info;
|
||||
op.u.getdomaininfolist.num_domains = 1;
|
||||
info->domain = domain;
|
||||
|
||||
ret = xenHypervisorDoOp(handle, &op);
|
||||
|
||||
if (munlock(info, sizeof(dom0_getdomaininfo_t)) < 0)
|
||||
ret = -1;
|
||||
|
||||
if (ret < 0)
|
||||
return(-1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenHypervisorPauseDomain:
|
||||
* @handle: the handle to the Xen hypervisor
|
||||
* @domain: the domain ID
|
||||
*
|
||||
* Do an hypervisor call to pause the given domain
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
int
|
||||
xenHypervisorPauseDomain(int handle, int domain) {
|
||||
dom0_op_t op;
|
||||
int ret;
|
||||
|
||||
op.cmd = DOM0_PAUSEDOMAIN;
|
||||
op.u.pausedomain.domain = (domid_t) domain;
|
||||
|
||||
ret = xenHypervisorDoOp(handle, &op);
|
||||
|
||||
if (ret < 0)
|
||||
return(-1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenHypervisorResumeDomain:
|
||||
* @handle: the handle to the Xen hypervisor
|
||||
* @domain: the domain ID
|
||||
*
|
||||
* Do an hypervisor call to resume the given domain
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
int
|
||||
xenHypervisorResumeDomain(int handle, int domain) {
|
||||
dom0_op_t op;
|
||||
int ret;
|
||||
|
||||
op.cmd = DOM0_UNPAUSEDOMAIN;
|
||||
op.u.unpausedomain.domain = (domid_t) domain;
|
||||
|
||||
ret = xenHypervisorDoOp(handle, &op);
|
||||
|
||||
if (ret < 0)
|
||||
return(-1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenHypervisorDestroyDomain:
|
||||
* @handle: the handle to the Xen hypervisor
|
||||
* @domain: the domain ID
|
||||
*
|
||||
* Do an hypervisor call to destroy the given domain
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
int
|
||||
xenHypervisorDestroyDomain(int handle, int domain) {
|
||||
dom0_op_t op;
|
||||
int ret;
|
||||
|
||||
op.cmd = DOM0_DESTROYDOMAIN;
|
||||
op.u.destroydomain.domain = (domid_t) domain;
|
||||
|
||||
ret = xenHypervisorDoOp(handle, &op);
|
||||
|
||||
if (ret < 0)
|
||||
return(-1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* xenHypervisorSetMaxMemory:
|
||||
* @handle: the handle to the Xen hypervisor
|
||||
* @domain: the domain ID
|
||||
* @memory: the max memory size in kilobytes.
|
||||
*
|
||||
* Do an hypervisor call to change the maximum amount of memory used
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
int
|
||||
xenHypervisorSetMaxMemory(int handle, int domain, unsigned long memory) {
|
||||
dom0_op_t op;
|
||||
int ret;
|
||||
|
||||
op.cmd = DOM0_SETDOMAINMAXMEM;
|
||||
op.u.setdomainmaxmem.domain = (domid_t) domain;
|
||||
op.u.setdomainmaxmem.max_memkb = memory;
|
||||
|
||||
ret = xenHypervisorDoOp(handle, &op);
|
||||
|
||||
if (ret < 0)
|
||||
return(-1);
|
||||
return(0);
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/*
|
||||
* xen_internal.h: internal API for direct access to Xen hypervisor level
|
||||
*
|
||||
* Copyright (C) 2005 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_XEN_INTERNAL_H__
|
||||
#define __VIR_XEN_INTERNAL_H__
|
||||
|
||||
/* required for uint8_t, uint32_t, etc ... */
|
||||
#include <stdint.h>
|
||||
/* required for dom0_getdomaininfo_t */
|
||||
#include <xen/dom0_ops.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int xenHypervisorOpen (void);
|
||||
int xenHypervisorClose (int handle);
|
||||
unsigned long xenHypervisorGetVersion (int handle);
|
||||
int xenHypervisorDestroyDomain (int handle,
|
||||
int domain);
|
||||
int xenHypervisorResumeDomain (int handle,
|
||||
int domain);
|
||||
int xenHypervisorPauseDomain (int handle,
|
||||
int domain);
|
||||
int xenHypervisorGetDomainInfo (int handle,
|
||||
int domain,
|
||||
dom0_getdomaininfo_t *info);
|
||||
int xenHypervisorSetMaxMemory (int handle,
|
||||
int domain,
|
||||
unsigned long memory);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __VIR_XEN_INTERNAL_H__ */
|
||||