mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-08-17 09:49:59 +03:00
Compare commits
52 Commits
Author | SHA1 | Date | |
---|---|---|---|
297a77f6da | |||
5533a01af3 | |||
321c24bb00 | |||
d9388dbfbd | |||
1da9cd13af | |||
16a65d1c93 | |||
a98ac28b16 | |||
8c5ce29411 | |||
18351e0ffc | |||
cce70e0132 | |||
ea541f83b9 | |||
2c32196a2f | |||
cc3697f722 | |||
47c23ba3e5 | |||
177cf2edee | |||
be13e2f45d | |||
26d1767317 | |||
01ae3678f1 | |||
2cb26d70d6 | |||
e8e5844089 | |||
870bf1cdbd | |||
546026a5be | |||
29182e995e | |||
4e7b9aa2e1 | |||
1ed4d29208 | |||
25786cc0db | |||
3708258fad | |||
786e029cd7 | |||
f247adc56c | |||
903c78f540 | |||
c63f08e06f | |||
184c0bba15 | |||
9302933f09 | |||
4028abe6b3 | |||
86247f2c23 | |||
6a0c75a7b3 | |||
941bce224b | |||
25726a0ff4 | |||
c0b1a946a6 | |||
5334a0fbcb | |||
3bbac7cdb6 | |||
55bf738483 | |||
61e8450f25 | |||
ea30f6aa24 | |||
fab8e90e6d | |||
18bb75eb84 | |||
b1ca7467f4 | |||
3c75dc33e4 | |||
441246297e | |||
0658b086cd | |||
129a24ea8c | |||
adec25590c |
@ -19,3 +19,8 @@ ltmain.sh
|
||||
update.log
|
||||
libvirt.pc
|
||||
libvirt.spec
|
||||
COPYING
|
||||
m4
|
||||
ABOUT-NLS
|
||||
config.rpath
|
||||
mkinstalldirs
|
||||
|
317
ChangeLog
317
ChangeLog
@ -1,6 +1,313 @@
|
||||
Mon Oct 16 17:10:15 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* config.h.in configure.in libvirt.spec.in docs/libvir.html
|
||||
docs/news.html include/libvirt/libvirt.h: preparing release of
|
||||
libvirt-0.1.8
|
||||
* src/xen_internal.c: fixed a compilation problem
|
||||
|
||||
Thu Oct 12 17:31:13 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: one of the fix for system with page size != 4k
|
||||
was missing
|
||||
|
||||
Thu Oct 12 13:37:24 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: applied patch from Philippe Berthault
|
||||
fixing the vcpu number initialization
|
||||
|
||||
Wed Oct 11 17:16:44 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: applied patch from Peter Vetere so that
|
||||
crashed domains ain't reported as shut off.
|
||||
|
||||
Wed Oct 11 16:23:58 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* virsh.1: fixed some typo and unclear language pointed out by
|
||||
Noriko Mizumoto
|
||||
|
||||
Mon Oct 9 09:34:42 EDT 2006 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xml.c, src/xend_internal.c: Added support for a <driver>
|
||||
element in disk specification, allowing use of alternate Xen
|
||||
drivers such as blktap.
|
||||
* tests/xml2sexprtest.c, tests/sexpr2xmltest.c: Added tests for
|
||||
new <driver> element, and blktap driver impl.
|
||||
* tests/xml2sexprdata/*, tests/sexpr2xmldata/*: New / updated
|
||||
data files for new <driver> element
|
||||
|
||||
Fri Oct 6 10:33:20 EDT 2006 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xend_internal.c: Fixed memory leak in xend_get_config_version
|
||||
routine.
|
||||
* src/xml.c: Fixed memory leaks in XML parsing routines relating
|
||||
to VNC port, HVM boot devices, HVM floppy & CDROM, HVM features,
|
||||
disk device type.
|
||||
* tests/Makefile.am: Use --leak-check=full when running valgrind
|
||||
to detect all leaks, in addition to memory corruption checks
|
||||
* tests/sexpr2xmltest.c, tests/xml2sexprtest.c: Fixed memory leaks
|
||||
in test harness leading to valgrind false-positives.
|
||||
|
||||
Mon Oct 2 23:16:06 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: Daniel Berrange fixed some mlock size problem
|
||||
doing a bit of cleanup too
|
||||
|
||||
Fri Sep 29 17:31:36 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/virsh.c: add #include <locale.h> to be able to compile without
|
||||
optimization
|
||||
|
||||
Fri Sep 29 17:16:40 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: fix for system with page size != 4k
|
||||
|
||||
Fri Sep 29 13:05:12 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/bugs.html docs/libvir.html: added pointers on how to report
|
||||
bugs in bugzilla as suggested by markmc
|
||||
* src/xend_internal.c: first step for #208545 raise an error at the
|
||||
libvirt level
|
||||
|
||||
Fri Sep 29 11:27:36 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/* libvirt.spec.in configure.in NEWS: preparing release of 0.1.7
|
||||
|
||||
Thu Sep 21 10:19:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xen_internal.c: Fork different version of getdomaininfo struct for
|
||||
Xen 3.0.2, and 3.0.3 because the shared_info_frame field is different
|
||||
size on between these versions on 32-bit platforms. Make callers use
|
||||
appropriate struct version matched to hypervisor version, hiding detail
|
||||
in macros to aid readability. Cleanup whitespace to remove tabs. Disable
|
||||
xenHypervisorGetVcpus completely in proxy since its not used.
|
||||
|
||||
Thu Sep 21 10:19:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xend_internal.c: Check if the physical CPU will fit in the maplen
|
||||
provided by the caller when populating VCPU<->CPU mapping. This is because
|
||||
XenD will return data for 32 physical CPUs, even if the box only has 4
|
||||
CPUs. The caller of course will only have allocated a map big enough for
|
||||
the actual number of physical CPUs. We simply check against maplen param
|
||||
supplied by caller & discard info about CPUs which don't fit. Also santise
|
||||
whitespace.
|
||||
|
||||
Fri Sep 22 11:02:48 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/* libvirt.spec.in configure.in NEWS: preparing release of 0.1.6
|
||||
|
||||
Thu Sep 21 10:19:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* Makefile.am: Added po directory
|
||||
* autogen.sh: Call autopoint to install the gettext infrastructure
|
||||
* src/*.c, proxy/*.c: Pass all strings through gettext for translation.
|
||||
Set up the text domains in libvirt, proxy & virsh at startup.
|
||||
* libvirt.spec.in: Include compiled .po files in distro
|
||||
* tests/virshdata/*.txt: Tweak expected data to take account of
|
||||
some text changes.
|
||||
|
||||
Thu Sep 21 10:19:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* docs/*.html: re-generated documentation to pull in latest
|
||||
APIs
|
||||
|
||||
Thu Sep 21 10:19:01 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/Makefile.am: add a tst target to ease building test progs
|
||||
* src/xend_internal.c: fix the reconnection problem to xend pointed
|
||||
by Philippe Berthault
|
||||
* tests/Makefile.am tests/reconnect.c: add a specific test case
|
||||
|
||||
Tue Sep 19 16:59:53 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: applied patch from Jim Fehlig, about
|
||||
one of the content of the hypercall structures in 3.0.2
|
||||
|
||||
Thu Sep 14 10:33:23 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xml.c: Append :disk for normal disk devices being created
|
||||
when Xen >= 3.0.3, even though its technically optional
|
||||
* src/xend_internal.c: Strip the :disk trailing component when
|
||||
generating XML when Xen >= 3.0.3. We don't want to expose
|
||||
that postfix in the <target> element, since its already set in
|
||||
the device attribute on <disk> element.
|
||||
* tests/sexpr2xmldata/*, tests/xml2sexprdata/*: Update to test
|
||||
for handling of :disk postfix in sexpr/XML
|
||||
* tests/virshtest.c, tests/sexpr2xmltest.c, tests/xml2sexprtest.c:
|
||||
Cast size_t arg to an int to avoid format warnings from printf
|
||||
|
||||
Tue Sep 11 20:37:28 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xml.c: Added support for setting VNC port when creating
|
||||
domains with new (version 2) style XenD config
|
||||
* tests/xml2sexprtest.c: Added test for setting VNC port
|
||||
* tests/xml2sexprdata/*vncunused*: Data files for new VNC test
|
||||
|
||||
Tue Sep 11 20:23:42 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* docs/Makefile.am: Added test XML files to EXTRA_DIST
|
||||
* tests/confdata/Makefile.am: Fix typo to ensure config
|
||||
files needed by test are distributed
|
||||
|
||||
Tue Sep 11 20:11:05 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xend_internal.c, src/xml.c: Added support for new 3.0.3
|
||||
style XenD cdrom configuration for HVM guests.
|
||||
* configure.in, tests/Makefile.am: Added new test directories
|
||||
* tests/xml2sexprdata*, tests/sexpr2xmldata*: Removed config files
|
||||
for test suite.
|
||||
* tests/xml2sexprdata/*, tests/sexpr2xmldata/*: New home for test
|
||||
suite config files
|
||||
|
||||
Tue Sep 5 13:50:05 MYT 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* NEWS configure.in docs//* include/libvirt/libvirt.h libvirt.specx.*:
|
||||
preparing release 0.1.5
|
||||
* proxy/libvirt_proxy.c src/xen_internal.c: tiny fixes
|
||||
|
||||
Tue Sep 5 13:24:30 MYT 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: finished to convert to the new hypervisor
|
||||
calls the xenHypervisorGetVcpus entry point, though it is untested
|
||||
|
||||
Mon Sep 4 14:13:24 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xen_internal.h: Added missing return(-1) statements
|
||||
in xenHypervisorGetVcpus and xenHypervisorPinVcpu methods.
|
||||
#ifndef out the pause/resume/etc methods from proxy code
|
||||
|
||||
Sun Sep 3 12:50:12 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/conf.c: Allow '_' in variable names, and don't fail if there
|
||||
is a trailing ',' at the end of a list.
|
||||
* tests/confdata/fc4.conf, tests/confdata/fc4.out: Expand test
|
||||
config to include a '_' in a name, and a trailing ',' in a list.
|
||||
|
||||
Sun Sep 3 12:47:42 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* tests/.cvsignore, tests/confdata/.cvsignore: Ignore autogenerated
|
||||
files from config data testsuite.
|
||||
|
||||
Sun Sep 3 12:34:23 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/virsh.c: use the return value of virConnectListDomains when
|
||||
iterating over list of ids/names, because it is not neccessarily
|
||||
the same as the value returned by virConnectNumOfDomains. Use qsort
|
||||
to sort active domains by Id, and inactive domains by name, since
|
||||
there is no guarenteed sort ordering when listing domains. For inactive
|
||||
domains display a '-' instead of '-1' to make it clear they have no
|
||||
sensible ID number.
|
||||
|
||||
Sat Sep 2 22:28:18 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: converting to handle the new incompatible
|
||||
hypercalls while still able to detect older versions, lot of
|
||||
work, seems okay, there is just one function not yet converted
|
||||
* src/xs_internal.c: dropping virConnectCheckStoreID()
|
||||
|
||||
Wed Aug 30 09:34:45 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/virsh.c: Added --all & --inactive flags to list command to control
|
||||
inclusion of inactive domains in listing. Added start, define, undefine
|
||||
commands to allow management of inactive domains.
|
||||
|
||||
Wed Aug 30 09:30:23 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/driver.h: Defined new driver entry points for ListDefinedDomains,
|
||||
NumOfDefinedDomains, DomainStart, DomainUndefine, DomainDefineXML.
|
||||
* src/xen_internal.c, src/xend_internal.c, src/xs_internal.h,
|
||||
src/test.c, src/proxy_internal.c: Added NULL entries for new driver
|
||||
backend APIs.
|
||||
* src/libvirt.c: Hook up new driver entry points to corresponding
|
||||
public API.
|
||||
* src/libvirt_sym.version: Added virConnectNumOfDefinedDomains and
|
||||
previously missing virConnectListDefinedDomains
|
||||
* include/libvirt/libvirt.h: Added virConnectNumOfDefinedDomains
|
||||
|
||||
Tue Aug 29 23:48:43 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/conf.c: add missing entry point virConfGetValue()
|
||||
|
||||
Tue Aug 29 23:28:31 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* TODO libvirt.spec.in: update
|
||||
* configure.in include/libvirt/virterror.h src/Makefile.am
|
||||
src/conf.c src/conf.h src/virterror.c src/xen_internal.c:
|
||||
adding a subset of Xen config file parser, and serializer
|
||||
* tests/Makefile.am tests/conftest.c tests/test_conf.sh
|
||||
tests/confdata/Makefile.am tests/confdata/fc4.conf
|
||||
tests/confdata/fc4.out: adding test program for config in and out
|
||||
|
||||
Tue Aug 29 13:14:20 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xend_internal.c: Add handling of HTTP 500 error code
|
||||
which can be returned by XenD do indicate failure error when
|
||||
performing the requested operation (Identified by Pete Vetere).
|
||||
|
||||
Tue Aug 29 15:41:46 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* python/libvir.c: Pete Vetere pointed out a bug in string cast
|
||||
when handling errors in Python
|
||||
|
||||
Sat Aug 26 16:36:15 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/sexpr.c src/sexpr.h src/xend_internal.c src/xml.c: applied
|
||||
patch from Jeremy Katz to add graphical console for PV Xen guests
|
||||
|
||||
Sat Aug 26 00:17:24 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* docs/site.xsl docs/*.html: add links to virt-manager
|
||||
|
||||
Fri Aug 25 17:42:12 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/virsh.c: Allow VIRSH_DEFAULT_CONNECT_URI to be set to
|
||||
override the default Xen connection attempt in favour of a
|
||||
different backend. Fix 'virsh list' so that it doesn't assume
|
||||
there is always a Domain-0 (a Xen-ism).
|
||||
|
||||
Thu Aug 24 16:43:47 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* tests/virshtest.c: Test suite for validating output / operation
|
||||
of various virsh commands.
|
||||
* tests/virshdata/*.txt: Known good output for validating results
|
||||
during testing
|
||||
* tests/testutils.h, tests/testutils.c: Added convenience method
|
||||
for forking a child process & capturing its output.
|
||||
* tests/Makefile.am: Enable POSIX / XOpen standards
|
||||
|
||||
Thu Aug 24 11:03:42 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* tests/Makefile.am: Added a 'valgrind' target which simply
|
||||
calls 'make check', but wrapping execution with valgrind to
|
||||
detect any errors
|
||||
|
||||
Thu Aug 24 10:04:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* tests/xml2sexpr.c, tests/sexpr2xml.c: New tests suites for
|
||||
validating the SEXPR<->XML conversion
|
||||
* tests/*.sexpr, tests/*.xml: Data files for test suite
|
||||
* src/xend_internal.h, src/xend_internal.c: Expose the method
|
||||
for converting SEXPR -> XML to allow use by unit tests
|
||||
* src/xs_internal.c: Check if connection is NULL before
|
||||
deferencing it - test suite passes in NULL.
|
||||
|
||||
Mon Aug 21 13:00:03 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/virsh.c: check return code of virConnectListDomains in case
|
||||
there was a failure, and stop the 'list' command immediately
|
||||
rather than continuing with bogus domain ID data.
|
||||
|
||||
Fri Aug 18 15:22:23 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xml.c: fix networking in paravirt guests - only set the
|
||||
'(type ioemu)' option for HVM.
|
||||
|
||||
Thu Aug 17 19:42:50 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xml.c: fix virParseUUID()
|
||||
|
||||
Wed Aug 16 19:07:52 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* NEWS configure.in doc//* include/libvirt/libvirt.h
|
||||
* NEWS configure.in doc//* include/libvirt/libvirt.h
|
||||
include/libvirt/libvirt.h.in: preparing release of 0.1.4,
|
||||
regenerated docs, fixed a few things
|
||||
* src/proxy_internal.c src/test.c src/xend_internal.c:
|
||||
@ -19,13 +326,13 @@ Wed Aug 16 11:38:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
setMemory, setMaxMemory, createLinux, dumpXML, setVcpus.
|
||||
* docs/testnode.xml, docs/testfc4.xml, docs/testfv0.xml:
|
||||
Example config for using with test driver
|
||||
|
||||
|
||||
Wed Aug 16 11:36:21 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xend_internal.c, src/xml.c, src/xml.h: Refactored the
|
||||
|
||||
* src/xend_internal.c, src/xml.c, src/xml.h: Refactored the
|
||||
sexpr_uuid method into a re-usable virParseUUID method which
|
||||
can be used by any backend
|
||||
|
||||
|
||||
Wed Aug 16 11:31:59 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/libvirt.c: Remove some duplicated changes for VIR_DOMAIN_RO
|
||||
|
@ -1,6 +1,8 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = src include docs @PYTHON_SUBDIR@ tests proxy
|
||||
SUBDIRS = src include docs @PYTHON_SUBDIR@ tests proxy po
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
EXTRA_DIST = libvirt.spec.in libvirt.spec COPYING.LIB \
|
||||
libvirt.pc.in libvirt.pc TODO AUTHORS ChangeLog \
|
||||
|
30
NEWS
30
NEWS
@ -5,6 +5,36 @@
|
||||
http://libvirt.org/news.html
|
||||
|
||||
Releases
|
||||
0.1.7: Sep 29 2006:
|
||||
- fix a memory bug on getting vcpu informations from xend (Daniel Berrange)
|
||||
- fix another problem in the hypercalls change in Xen changeset
|
||||
86d26e6ec89b when getting domain informations (Daniel Berrange)
|
||||
|
||||
|
||||
0.1.6: Sep 22 2006:
|
||||
- Support for localization of strings using gettext (Daniel Berrange)
|
||||
- Support for new Xen-3.0.3 cdrom and disk configuration (Daniel Berrange)
|
||||
- Support for setting VNC port when creating domains with new
|
||||
xend config files (Daniel Berrange)
|
||||
- Fix bug when running against xen-3.0.2 hypercalls (Jim Fehlig)
|
||||
- Fix reconnection problem when talking directly to http xend
|
||||
|
||||
|
||||
0.1.5: Sep 5 2006:
|
||||
- Support for new hypercalls change in Xen changeset 86d26e6ec89b
|
||||
- bug fixes: virParseUUID() was wrong, netwoking for paravirt guestsi
|
||||
(Daniel Berrange), virsh on non-existent domains (Daniel Berrange),
|
||||
string cast bug when handling error in python (Pete Vetere), HTTP
|
||||
500 xend error code handling (Pete Vetere and Daniel Berrange)
|
||||
- improvements: test suite for SEXPR <-> XML format conversions (Daniel
|
||||
Berrange), virsh output regression suite (Daniel Berrange), new environ
|
||||
variable VIRSH_DEFAULT_CONNECT_URI for the default URI when connecting
|
||||
(Daniel Berrange), graphical console support for paravirt guests
|
||||
(Jeremy Katz), parsing of simple Xen config files (with Daniel Berrange),
|
||||
early work on defined (not running) domains (Daniel Berrange),
|
||||
virsh output improvement (Daniel Berrange
|
||||
|
||||
|
||||
0.1.4: Aug 16 2006:
|
||||
- bug fixes: spec file fix (Mark McLoughlin), error report problem (with
|
||||
Hugh Brock), long integer in Python bindings (with Daniel Berrange), XML
|
||||
|
1
TODO
1
TODO
@ -1,4 +1,5 @@
|
||||
TODO:
|
||||
- libvirt-proxy dropping root priviledge after initialization.
|
||||
- check impact of HVM device rename
|
||||
http://lists.xensource.com/archives/html/xen-devel/2006-08/msg00369.html
|
||||
- Finish integration of vCPU and affinity APIs
|
||||
|
10
autogen.sh
10
autogen.sh
@ -8,6 +8,14 @@ THEDIR=`pwd`
|
||||
cd $srcdir
|
||||
DIE=0
|
||||
|
||||
(autopoint --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autopoint installed to compile libvirt."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or see http://www.gnu.org/software/gettext"
|
||||
DIE=1
|
||||
}
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile libvirt."
|
||||
@ -46,6 +54,8 @@ if test -z "$*"; then
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
autopoint --force
|
||||
#rm -rf m4
|
||||
libtoolize --copy --force
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
automake --add-missing
|
||||
|
14
config.h.in
14
config.h.in
@ -1,8 +1,22 @@
|
||||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
||||
*/
|
||||
#undef HAVE_DCGETTEXT
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||
#undef HAVE_GETTEXT
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
|
12
configure.in
12
configure.in
@ -5,7 +5,7 @@ AC_CANONICAL_HOST
|
||||
|
||||
LIBVIRT_MAJOR_VERSION=0
|
||||
LIBVIRT_MINOR_VERSION=1
|
||||
LIBVIRT_MICRO_VERSION=4
|
||||
LIBVIRT_MICRO_VERSION=8
|
||||
LIBVIRT_MICRO_VERSION_SUFFIX=
|
||||
LIBVIRT_VERSION=$LIBVIRT_MAJOR_VERSION.$LIBVIRT_MINOR_VERSION.$LIBVIRT_MICRO_VERSION$LIBVIRT_MICRO_VERSION_SUFFIX
|
||||
LIBVIRT_VERSION_INFO=`expr $LIBVIRT_MAJOR_VERSION + $LIBVIRT_MINOR_VERSION`:$LIBVIRT_MICRO_VERSION:$LIBVIRT_MINOR_VERSION
|
||||
@ -246,6 +246,10 @@ AC_SUBST(PYTHON_VERSION)
|
||||
AC_SUBST(PYTHON_INCLUDES)
|
||||
AC_SUBST(PYTHON_SITE_PACKAGES)
|
||||
|
||||
AM_GNU_GETTEXT_VERSION([0.14.1])
|
||||
AM_GNU_GETTEXT([external])
|
||||
ALL_LINGUAS=en_GB
|
||||
|
||||
# very annoying
|
||||
rm -f COPYING
|
||||
cp COPYING.LIB COPYING
|
||||
@ -254,6 +258,10 @@ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
|
||||
docs/examples/Makefile docs/devhelp/Makefile \
|
||||
docs/examples/python/Makefile \
|
||||
libvirt.pc libvirt.spec \
|
||||
po/Makefile.in \
|
||||
include/libvirt/Makefile include/libvirt/libvirt.h \
|
||||
python/Makefile python/tests/Makefile \
|
||||
tests/Makefile proxy/Makefile)
|
||||
tests/Makefile proxy/Makefile \
|
||||
tests/xml2sexprdata/Makefile \
|
||||
tests/sexpr2xmldata/Makefile \
|
||||
tests/virshdata/Makefile tests/confdata/Makefile)
|
||||
|
@ -90,7 +90,8 @@
|
||||
</dd></dl><h2>Letter P:</h2><dl><dt>Provide</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
|
||||
</dd><dt>Provides</dt><dd><a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
</dd><dt>Provides</dt><dd><a href="html/libvirt-libvirt.html#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a><br />
|
||||
<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>RFC4122</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
|
||||
</dd><dt>Read-Only</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
@ -173,6 +174,7 @@
|
||||
</dd><dt>active</dt><dd><a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</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#virDomainShutdown">virDomainShutdown</a><br />
|
||||
@ -232,4 +234,4 @@
|
||||
<a href="APIchunk2.html">g-n</a>
|
||||
<a href="APIchunk3.html">o-s</a>
|
||||
<a href="APIchunk4.html">t-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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -150,6 +150,7 @@
|
||||
<a href="html/libvirt-libvirt.html#virDomainUndefine">virDomainUndefine</a><br />
|
||||
</dd><dt>domains</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</a><br />
|
||||
@ -221,6 +222,7 @@
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>found</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
|
||||
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
|
||||
</dd><dt>free</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
|
||||
@ -261,4 +263,4 @@
|
||||
<a href="APIchunk2.html">g-n</a>
|
||||
<a href="APIchunk3.html">o-s</a>
|
||||
<a href="APIchunk4.html">t-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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -221,4 +221,4 @@
|
||||
<a href="APIchunk2.html">g-n</a>
|
||||
<a href="APIchunk3.html">o-s</a>
|
||||
<a href="APIchunk4.html">t-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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -273,4 +273,4 @@
|
||||
<a href="APIchunk2.html">g-n</a>
|
||||
<a href="APIchunk3.html">o-s</a>
|
||||
<a href="APIchunk4.html">t-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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
195
docs/APIchunk4.html
Normal file
195
docs/APIchunk4.html
Normal file
@ -0,0 +1,195 @@
|
||||
<?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 t-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 t-z for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-a</a>
|
||||
<a href="APIchunk1.html">b-f</a>
|
||||
<a href="APIchunk2.html">g-n</a>
|
||||
<a href="APIchunk3.html">o-s</a>
|
||||
<a href="APIchunk4.html">t-z</a>
|
||||
</h2><h2>Letter t:</h2><dl><dt>target</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</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-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</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#virDomainPinVcpu">virDomainPinVcpu</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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#virDomainGetVcpus">virDomainGetVcpus</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
|
||||
</dd><dt>there</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
|
||||
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</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-virterror.html#_virError">_virError</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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#virDomainSetMemory">virDomainSetMemory</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
|
||||
</dd><dt>those</dt><dd><a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
|
||||
</dd><dt>threads</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
|
||||
</dd><dt>time</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</a><br />
|
||||
</dd><dt>total</dt><dd><a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
|
||||
</dd><dt>true</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</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>undefine</dt><dd><a href="html/libvirt-libvirt.html#virDomainUndefine">virDomainUndefine</a><br />
|
||||
</dd><dt>underlying</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
|
||||
</dd><dt>uniform</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</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#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
|
||||
</dd><dt>use</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
|
||||
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
|
||||
</dd><dt>used</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</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#virDomainReboot">virDomainReboot</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
|
||||
</dd><dt>user</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
|
||||
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
|
||||
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
|
||||
</dd></dl><h2>Letter v:</h2><dl><dt>value</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</a><br />
|
||||
<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>vcpu</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
|
||||
</dd><dt>vcpus</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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>virConnCopyLastError</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
|
||||
</dd><dt>virCopyLastError</dt><dd><a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
|
||||
</dd><dt>virDomainCreateLinux</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</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>virDomainGetVcpus</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
|
||||
</dd><dt>virDomainGetXMLDesc</dt><dd><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>virDomainPinVcpu</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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>virError</dt><dd><a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
|
||||
</dd><dt>virErrorNumber</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
|
||||
</dd><dt>virNodeInfo</dt><dd><a href="">nodeinfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
|
||||
</dd><dt>virResetError</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
|
||||
</dd><dt>virSuspendDomain</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
</dd><dt>virVcpuInfo</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
|
||||
</dd><dt>virVcpuState</dt><dd><a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</a><br />
|
||||
</dd><dt>virtual</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</a><br />
|
||||
<a href="">vcpu</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
|
||||
</dd><dt>virtualization</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
|
||||
</dd></dl><h2>Letter w:</h2><dl><dt>was</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
</dd><dt>when</dt><dd><a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virInitialize">virInitialize</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 />
|
||||
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
|
||||
</dd><dt>which</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
|
||||
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
|
||||
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</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-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
|
||||
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
|
||||
<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 />
|
||||
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
|
||||
</dd><dt>with</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
|
||||
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
|
||||
<a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</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-virterror.html#virCopyLastError">virCopyLastError</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</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></dl><h2>Letter x:</h2><dl><dt>xen</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
|
||||
</dd></dl><h2>Letter y:</h2><dl><dt>yet</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
|
||||
</dd></dl><h2>Letter z:</h2><dl><dt>zero</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
|
||||
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-a</a>
|
||||
<a href="APIchunk1.html">b-f</a>
|
||||
<a href="APIchunk2.html">g-n</a>
|
||||
<a href="APIchunk3.html">o-s</a>
|
||||
<a href="APIchunk4.html">t-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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
@ -12,4 +12,4 @@
|
||||
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
|
||||
</p><h2>Type virErrorPtr:</h2><p><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</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 />
|
||||
@ -89,6 +90,7 @@
|
||||
<a href="html/libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virVcpuState">virVcpuState</a><br />
|
||||
</p><h2><a name="virterror" id="virterror">Module virterror</a>:</h2><p><a href="html/libvirt-virterror.html#VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_CONF_SYNTAX">VIR_ERR_CONF_SYNTAX</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_DOM_EXIST">VIR_ERR_DOM_EXIST</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_DRIVER_FULL">VIR_ERR_DRIVER_FULL</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_ERROR">VIR_ERR_ERROR</a><br />
|
||||
@ -112,15 +114,20 @@
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_NO_XEN">VIR_ERR_NO_XEN</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_NO_XENSTORE">VIR_ERR_NO_XENSTORE</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OK">VIR_ERR_OK</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OPEN_FAILED">VIR_ERR_OPEN_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OPERATION_DENIED">VIR_ERR_OPERATION_DENIED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OPERATION_FAILED">VIR_ERR_OPERATION_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OS_TYPE">VIR_ERR_OS_TYPE</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_PARSE_FAILED">VIR_ERR_PARSE_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_POST_FAILED">VIR_ERR_POST_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_READ_FAILED">VIR_ERR_READ_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_SEXPR_SERIAL">VIR_ERR_SEXPR_SERIAL</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_UNKNOWN_HOST">VIR_ERR_UNKNOWN_HOST</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_WARNING">VIR_ERR_WARNING</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_WRITE_FAILED">VIR_ERR_WRITE_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_XEN_CALL">VIR_ERR_XEN_CALL</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_XML_ERROR">VIR_ERR_XML_ERROR</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_FROM_CONF">VIR_FROM_CONF</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_FROM_DOM">VIR_FROM_DOM</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_FROM_NONE">VIR_FROM_NONE</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_FROM_PROXY">VIR_FROM_PROXY</a><br />
|
||||
@ -147,4 +154,4 @@
|
||||
<a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virResetLastError">virResetLastError</a><br />
|
||||
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -23,6 +23,7 @@
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</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#virDomainDefineXML">virDomainDefineXML</a><br />
|
||||
@ -67,4 +68,4 @@
|
||||
</p><h2>Type void *:</h2><p><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
|
||||
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
|
||||
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -21,6 +21,7 @@
|
||||
<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-virterror.html#VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_CONF_SYNTAX">VIR_ERR_CONF_SYNTAX</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_DOM_EXIST">VIR_ERR_DOM_EXIST</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_DRIVER_FULL">VIR_ERR_DRIVER_FULL</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_ERROR">VIR_ERR_ERROR</a><br />
|
||||
@ -44,15 +45,20 @@
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_NO_XEN">VIR_ERR_NO_XEN</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_NO_XENSTORE">VIR_ERR_NO_XENSTORE</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OK">VIR_ERR_OK</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OPEN_FAILED">VIR_ERR_OPEN_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OPERATION_DENIED">VIR_ERR_OPERATION_DENIED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OPERATION_FAILED">VIR_ERR_OPERATION_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_OS_TYPE">VIR_ERR_OS_TYPE</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_PARSE_FAILED">VIR_ERR_PARSE_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_POST_FAILED">VIR_ERR_POST_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_READ_FAILED">VIR_ERR_READ_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_SEXPR_SERIAL">VIR_ERR_SEXPR_SERIAL</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_UNKNOWN_HOST">VIR_ERR_UNKNOWN_HOST</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_WARNING">VIR_ERR_WARNING</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_WRITE_FAILED">VIR_ERR_WRITE_FAILED</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_XEN_CALL">VIR_ERR_XEN_CALL</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_ERR_XML_ERROR">VIR_ERR_XML_ERROR</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_FROM_CONF">VIR_FROM_CONF</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_FROM_DOM">VIR_FROM_DOM</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_FROM_NONE">VIR_FROM_NONE</a><br />
|
||||
<a href="html/libvirt-virterror.html#VIR_FROM_PROXY">VIR_FROM_PROXY</a><br />
|
||||
@ -84,6 +90,7 @@
|
||||
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</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 />
|
||||
@ -147,4 +154,4 @@
|
||||
<a href="html/libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a><br />
|
||||
<a href="html/libvirt-libvirt.html#virVcpuState">virVcpuState</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 href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -77,4 +77,4 @@
|
||||
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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -9,7 +9,8 @@ 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
|
||||
*.xsl *.html *.gif html/*.html html/*.png \
|
||||
test*.xml
|
||||
|
||||
|
||||
man_MANS=
|
||||
|
@ -39,6 +39,8 @@ ignored_files = {
|
||||
"xmlrpc.c": "internal code",
|
||||
"test.h": "test driver",
|
||||
"test.c": "test driver",
|
||||
"conf.h": "internal code",
|
||||
"conf.c": "internal code",
|
||||
}
|
||||
|
||||
ignored_words = {
|
||||
|
@ -42,4 +42,4 @@ drivers present in driver.h:</p><ul><li>xend_internal: implements the driver fun
|
||||
</ul><p>Note that a given driver may only implement a subset of those functions,
|
||||
for example saving a domain state to disk and restoring it is only possible
|
||||
though the Xen Daemon, on the other hand all interfaces allow to query the
|
||||
runtime state of a given domain.</p><p></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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
runtime state of a given domain.</p><p></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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -5,6 +5,8 @@ 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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
If possible generate the patches by using cvs diff -u in a CVS checkout.</p><p>We use Red Hat Bugzilla to track bugs to libvirt. If you want to report a
|
||||
bug, please check <a href="http://bugzilla.redhat.com/bugzilla/buglist.cgi?component=libvirt&component=libvirt-devel&component=libvirt-python&bug_status=ASSIGNED&bug_status=INVESTIGATE&bug_status=NEW&bug_status=REOPENED&bug_status=VERIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&Search=Search">the existing open bugs</a>, then if yours isn't a duplicate of
|
||||
an existing bug, <a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora%20Core&component=libvirt">log a new bug</a>. It may be good
|
||||
to post to the <a href="mailto:libvir-list@redhat.com">mailing-list</a>
|
||||
too if the issue looks serious, 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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
120
docs/devhelp/libvirt-conf.html
Normal file
120
docs/devhelp/libvirt-conf.html
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<title>conf: </title>
|
||||
<meta name="generator" content="Libvirt devhelp stylesheet"/>
|
||||
<link rel="start" href="index.html" title="libvirt Reference Manual"/>
|
||||
<link rel="up" href="general.html" title="API"/>
|
||||
<link rel="stylesheet" href="style.css" type="text/css"/>
|
||||
<link rel="chapter" href="general.html" title="API"/>
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
|
||||
<tr valign="middle">
|
||||
<td>
|
||||
<a accesskey="p" href="libvirt-virterror.html">
|
||||
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a accesskey="u" href="general.html">
|
||||
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a accesskey="h" href="index.html">
|
||||
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
|
||||
</a>
|
||||
</td>
|
||||
<th width="100%" align="center">libvirt Reference Manual</th>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>
|
||||
<span class="refentrytitle">conf</span>
|
||||
</h2>
|
||||
<p>conf - </p>
|
||||
<p></p>
|
||||
<p>Author(s): </p>
|
||||
<div class="refsynopsisdiv">
|
||||
<h2>Synopsis</h2>
|
||||
<pre class="synopsis">typedef <a href="libvirt-conf.html#virConfValue">virConfValue</a> * <a href="#virConfValuePtr">virConfValuePtr</a>;
|
||||
typedef enum <a href="#virConfType">virConfType</a>;
|
||||
typedef struct _virConfValue <a href="#virConfValue">virConfValue</a>;
|
||||
typedef struct _virConf <a href="#virConf">virConf</a>;
|
||||
typedef <a href="libvirt-conf.html#virConf">virConf</a> * <a href="#virConfPtr">virConfPtr</a>;
|
||||
int <a href="#virConfWriteFile">virConfWriteFile</a> (const char * filename, <br/> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf);
|
||||
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> <a href="#virConfGetValue">virConfGetValue</a> (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf, <br/> const char * setting);
|
||||
<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> <a href="#virConfReadMem">virConfReadMem</a> (const char * memory, <br/> int len);
|
||||
int <a href="#virConfFree">virConfFree</a> (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf);
|
||||
<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> <a href="#virConfReadFile">virConfReadFile</a> (const char * filename);
|
||||
int <a href="#virConfWriteMem">virConfWriteMem</a> (char * memory, <br/> int * len, <br/> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf);
|
||||
</pre>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<h2>Description</h2>
|
||||
</div>
|
||||
<div class="refsect1" lang="en">
|
||||
<h2>Details</h2>
|
||||
<div class="refsect2" lang="en">
|
||||
<div class="refsect2" lang="en"><h3><a name="virConf">Structure </a>virConf</h3><pre class="programlisting">struct _virConf {
|
||||
The content of this structure is not made public by the API.
|
||||
} virConf;
|
||||
</pre><p/>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfPtr">Typedef </a>virConfPtr</h3><pre class="programlisting"><a href="libvirt-conf.html#virConf">virConf</a> * virConfPtr;
|
||||
</pre><p>a pointer to a parsed configuration file</p>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfType">Enum </a>virConfType</h3><pre class="programlisting">enum <a href="#virConfType">virConfType</a> {
|
||||
<a name="VIR_CONF_NONE">VIR_CONF_NONE</a> = 0 /* undefined */
|
||||
<a name="VIR_CONF_LONG">VIR_CONF_LONG</a> = 1 /* a long int */
|
||||
<a name="VIR_CONF_STRING">VIR_CONF_STRING</a> = 2 /* a string */
|
||||
<a name="VIR_CONF_LIST">VIR_CONF_LIST</a> = 3 /* a list */
|
||||
};
|
||||
</pre><p/>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfValue">Structure </a>virConfValue</h3><pre class="programlisting">struct _virConfValue {
|
||||
<a href="libvirt-conf.html#virConfType">virConfType</a> type : the <a href="libvirt-conf.html#virConfType">virConfType</a>
|
||||
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> next : next element if in a list
|
||||
long l : long integer
|
||||
char * str : pointer to 0 terminated string
|
||||
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> list : list of a list
|
||||
} virConfValue;
|
||||
</pre><p/>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfValuePtr">Typedef </a>virConfValuePtr</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfValue">virConfValue</a> * virConfValuePtr;
|
||||
</pre><p/>
|
||||
</div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfFree"/>virConfFree ()</h3><pre class="programlisting">int virConfFree (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br/>
|
||||
</pre><p>Frees all data associated to the handle</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfGetValue"/>virConfGetValue ()</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> virConfGetValue (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf, <br/> const char * setting)<br/>
|
||||
</pre><p>Lookup the value associated to this entry in the configuration file</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><span class="term"><i><tt>setting</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the value or NULL if the lookup failed, the data associated will be freed when virConfFree() is called</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfReadFile"/>virConfReadFile ()</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadFile (const char * filename)<br/>
|
||||
</pre><p>Reads a configuration file.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to read or parse the file, use virConfFree() to free the data.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfReadMem"/>virConfReadMem ()</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadMem (const char * memory, <br/> int len)<br/>
|
||||
</pre><p>Reads a configuration file loaded in memory. The string can be zero terminated in which case @len can be 0</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the content of the configuration file</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>lenght in byte</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to parse the content, use virConfFree() to free the data.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfWriteFile"/>virConfWriteFile ()</h3><pre class="programlisting">int virConfWriteFile (const char * filename, <br/> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br/>
|
||||
</pre><p>Writes a configuration file back to a file.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConfWriteMem"/>virConfWriteMem ()</h3><pre class="programlisting">int virConfWriteMem (char * memory, <br/> int * len, <br/> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br/>
|
||||
</pre><p>Writes a configuration file back to a memory area. @len is an IN/OUT parameter, it indicates the size available in bytes, and on output the size required for the configuration file (even if the call fails due to insufficient space).</p>
|
||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the memory to store the config file</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the lenght in byte of the store, on output the size</td></tr><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</td></tr></tbody></table></div></div>
|
||||
<hr/>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -90,6 +90,7 @@ int <a href="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<a href="libvir
|
||||
int <a href="#virDomainFree">virDomainFree</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
|
||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name);
|
||||
int <a href="#virDomainSuspend">virDomainSuspend</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
|
||||
int <a href="#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
int <a href="#virConnectClose">virConnectClose</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
|
||||
int <a href="#virDomainReboot">virDomainReboot</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int flags);
|
||||
int <a href="#virInitialize">virInitialize</a> (void);
|
||||
@ -283,6 +284,10 @@ The content of this structure is not made public by the API.
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectListDomains"/>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></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectNumOfDefinedDomains"/>virConnectNumOfDefinedDomains ()</h3><pre class="programlisting">int virConnectNumOfDefinedDomains (<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></div>
|
||||
<hr/>
|
||||
<div class="refsect2" lang="en"><h3><a name="virConnectNumOfDomains"/>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>
|
||||
|
@ -87,7 +87,8 @@ void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvi
|
||||
<a name="VIR_FROM_XML">VIR_FROM_XML</a> = 5 /* Error in the XML code */
|
||||
<a name="VIR_FROM_DOM">VIR_FROM_DOM</a> = 6 /* Error when operating on a domain */
|
||||
<a name="VIR_FROM_RPC">VIR_FROM_RPC</a> = 7 /* Error in the XML-RPC code */
|
||||
<a name="VIR_FROM_PROXY">VIR_FROM_PROXY</a> = 8 /* Error in the proxy code */
|
||||
<a name="VIR_FROM_PROXY">VIR_FROM_PROXY</a> = 8 /* Error in the proxy code */
|
||||
<a name="VIR_FROM_CONF">VIR_FROM_CONF</a> = 9 /* Error in the configuration file handling */
|
||||
};
|
||||
</pre><p/>
|
||||
</div>
|
||||
@ -130,7 +131,12 @@ void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvi
|
||||
<a name="VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a> = 26 /* not supported by the drivers */
|
||||
<a name="VIR_ERR_XML_ERROR">VIR_ERR_XML_ERROR</a> = 27 /* an XML description is not well formed or broken */
|
||||
<a name="VIR_ERR_DOM_EXIST">VIR_ERR_DOM_EXIST</a> = 28 /* the domain already exist */
|
||||
<a name="VIR_ERR_OPERATION_DENIED">VIR_ERR_OPERATION_DENIED</a> = 29 /* operation forbidden on read-only connections */
|
||||
<a name="VIR_ERR_OPERATION_DENIED">VIR_ERR_OPERATION_DENIED</a> = 29 /* operation forbidden on read-only connections */
|
||||
<a name="VIR_ERR_OPEN_FAILED">VIR_ERR_OPEN_FAILED</a> = 30 /* failed to open a conf file */
|
||||
<a name="VIR_ERR_READ_FAILED">VIR_ERR_READ_FAILED</a> = 31 /* failed to read a conf file */
|
||||
<a name="VIR_ERR_PARSE_FAILED">VIR_ERR_PARSE_FAILED</a> = 32 /* failed to parse a conf file */
|
||||
<a name="VIR_ERR_CONF_SYNTAX">VIR_ERR_CONF_SYNTAX</a> = 33 /* failed to parse the syntax of a conf file */
|
||||
<a name="VIR_ERR_WRITE_FAILED">VIR_ERR_WRITE_FAILED</a> = 34 /* failed to write a conf file */
|
||||
};
|
||||
</pre><p/>
|
||||
</div>
|
||||
|
@ -7,4 +7,4 @@ available, first register onto the server:</p><p><code>cvs -d :pserver:anoncvs@l
|
||||
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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -66,4 +66,4 @@ this point, see the error.py example about it:</p><pre>def handler(ctxt, err):
|
||||
|
||||
libvirt.registerErrorHandler(handler, 'context') </pre><p>the second argument to the registerErrorHandler function is passed as the
|
||||
fist argument of the callback like in the C version. The error is a tuple
|
||||
containing the same field as a virError in C, but cast to Python.</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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
containing the same field as a virError in C, but cast to Python.</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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -175,4 +175,4 @@ systems:</p><pre><domain type='xen' id='3'>
|
||||
</ul><p>It is likely that the HVM description gets additional optional elements
|
||||
and attributes as the support for fully virtualized domain expands,
|
||||
especially for the variety of devices emulated and the graphic support
|
||||
options offered.</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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
options offered.</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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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 +1,3 @@
|
||||
<?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><li><a href="libvirt-virterror.html">virterror</a>: error handling 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 href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
<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><li><a href="libvirt-virterror.html">virterror</a>: error handling 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 href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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 +1,3 @@
|
||||
<?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><li><a href="libvirt-virterror.html">virterror</a>: error handling 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 href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
<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><li><a href="libvirt-virterror.html">virterror</a>: error handling 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 href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
44
docs/html/libvirt-conf.html
Normal file
44
docs/html/libvirt-conf.html
Normal file
@ -0,0 +1,44 @@
|
||||
<?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 conf 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 conf from libvirt</h1><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libvirt-virterror.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libvirt-virterror.html">virterror</a></th><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><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#virConf">virConf</a><br />struct _virConf
|
||||
The content of this structure is not made public by the API.
|
||||
</pre><pre class="programlisting">Typedef <a href="libvirt-conf.html#virConf">virConf</a> * <a name="virConfPtr" id="virConfPtr">virConfPtr</a>
|
||||
</pre><pre class="programlisting">Enum <a href="#virConfType">virConfType</a>
|
||||
</pre><pre class="programlisting">Structure <a href="#virConfValue">virConfValue</a><br />struct _virConfValue
|
||||
</pre><pre class="programlisting">Typedef <a href="libvirt-conf.html#virConfValue">virConfValue</a> * <a name="virConfValuePtr" id="virConfValuePtr">virConfValuePtr</a>
|
||||
</pre><pre class="programlisting">int <a href="#virConfFree">virConfFree</a> (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)</pre>
|
||||
<pre class="programlisting"><a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> <a href="#virConfGetValue">virConfGetValue</a> (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf, <br /> const char * setting)</pre>
|
||||
<pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> <a href="#virConfReadFile">virConfReadFile</a> (const char * filename)</pre>
|
||||
<pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> <a href="#virConfReadMem">virConfReadMem</a> (const char * memory, <br /> int len)</pre>
|
||||
<pre class="programlisting">int <a href="#virConfWriteFile">virConfWriteFile</a> (const char * filename, <br /> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)</pre>
|
||||
<pre class="programlisting">int <a href="#virConfWriteMem">virConfWriteMem</a> (char * memory, <br /> int * len, <br /> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)</pre>
|
||||
<h2>Description</h2>
|
||||
<h3><a name="virConf" id="virConf">Structure virConf</a></h3><pre class="programlisting">Structure virConf<br />struct _virConf {
|
||||
The content of this structure is not made public by the API.
|
||||
}</pre>
|
||||
a pointer to a parsed configuration file
|
||||
<h3>Enum <a name="virConfType" id="virConfType">virConfType</a></h3><pre class="programlisting">Enum virConfType {
|
||||
<a name="VIR_CONF_NONE" id="VIR_CONF_NONE">VIR_CONF_NONE</a> = 0 : undefined
|
||||
<a name="VIR_CONF_LONG" id="VIR_CONF_LONG">VIR_CONF_LONG</a> = 1 : a long int
|
||||
<a name="VIR_CONF_STRING" id="VIR_CONF_STRING">VIR_CONF_STRING</a> = 2 : a string
|
||||
<a name="VIR_CONF_LIST" id="VIR_CONF_LIST">VIR_CONF_LIST</a> = 3 : a list
|
||||
}
|
||||
</pre><h3><a name="virConfValue" id="virConfValue">Structure virConfValue</a></h3><pre class="programlisting">Structure virConfValue<br />struct _virConfValue {
|
||||
<a href="libvirt-conf.html#virConfType">virConfType</a> type : the <a href="libvirt-conf.html#virConfType">virConfType</a>
|
||||
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> next : next element if in a list
|
||||
long l : long integer
|
||||
char * str : pointer to 0 terminated string
|
||||
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> list : list of a list
|
||||
}</pre><h3><a name="virConfFree" id="virConfFree"></a>Function: virConfFree</h3><pre class="programlisting">int virConfFree (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br />
|
||||
</pre><p>Frees all data associated to the handle</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConfGetValue" id="virConfGetValue"></a>Function: virConfGetValue</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> virConfGetValue (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf, <br /> const char * setting)<br />
|
||||
</pre><p>Lookup the value associated to this entry in the configuration file</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><span class="term"><i><tt>setting</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the value or NULL if the lookup failed, the data associated will be freed when virConfFree() is called</td></tr></tbody></table></div><h3><a name="virConfReadFile" id="virConfReadFile"></a>Function: virConfReadFile</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadFile (const char * filename)<br />
|
||||
</pre><p>Reads a configuration file.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to read or parse the file, use virConfFree() to free the data.</td></tr></tbody></table></div><h3><a name="virConfReadMem" id="virConfReadMem"></a>Function: virConfReadMem</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadMem (const char * memory, <br /> int len)<br />
|
||||
</pre><p>Reads a configuration file loaded in memory. The string can be zero terminated in which case @len can be 0</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the content of the configuration file</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>lenght in byte</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to parse the content, use virConfFree() to free the data.</td></tr></tbody></table></div><h3><a name="virConfWriteFile" id="virConfWriteFile"></a>Function: virConfWriteFile</h3><pre class="programlisting">int virConfWriteFile (const char * filename, <br /> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br />
|
||||
</pre><p>Writes a configuration file back to a file.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConfWriteMem" id="virConfWriteMem"></a>Function: virConfWriteMem</h3><pre class="programlisting">int virConfWriteMem (char * memory, <br /> int * len, <br /> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br />
|
||||
</pre><p>Writes a configuration file back to a memory area. @len is an IN/OUT parameter, it indicates the size available in bytes, and on output the size required for the configuration file (even if the call fails due to insufficient space).</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the memory to store the config file</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the lenght in byte of the store, on output the size</td></tr><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</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 href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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 +1,3 @@
|
||||
<?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><li><a href="libvirt-virterror.html">virterror</a>: error handling 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 href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
<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><li><a href="libvirt-virterror.html">virterror</a>: error handling 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 href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -24,6 +24,7 @@ The content of this structure is not made public by the API.
|
||||
<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="#virConnectListDefinedDomains">virConnectListDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char ** names, <br /> int maxnames)</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="#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</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>
|
||||
@ -146,7 +147,9 @@ The content of this structure is not made public by the API.
|
||||
</pre><p>list the defined domains, stores the pointers to the names in @names</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>names</tt></i>:</span></td><td>pointer to an array to store the names</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of names provided in the array or -1 in case of error</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 />
|
||||
<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="virConnectNumOfDefinedDomains" id="virConnectNumOfDefinedDomains"></a>Function: virConnectNumOfDefinedDomains</h3><pre class="programlisting">int virConnectNumOfDefinedDomains (<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="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>
|
||||
@ -216,4 +219,4 @@ The content of this structure is not made public by the API.
|
||||
</pre><p>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNodeGetInfo" id="virNodeGetInfo"></a>Function: virNodeGetInfo</h3><pre class="programlisting">int virNodeGetInfo (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> info)<br />
|
||||
</pre><p>Extract hardware information about the node.</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>info</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</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></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="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
<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>info</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</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></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="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -41,6 +41,7 @@ void <a href="#virErrorFunc">virErrorFunc</a> (void * userData, <br /> <a
|
||||
<a name="VIR_FROM_DOM" id="VIR_FROM_DOM">VIR_FROM_DOM</a> = 6 : Error when operating on a domain
|
||||
<a name="VIR_FROM_RPC" id="VIR_FROM_RPC">VIR_FROM_RPC</a> = 7 : Error in the XML-RPC code
|
||||
<a name="VIR_FROM_PROXY" id="VIR_FROM_PROXY">VIR_FROM_PROXY</a> = 8 : Error in the proxy code
|
||||
<a name="VIR_FROM_CONF" id="VIR_FROM_CONF">VIR_FROM_CONF</a> = 9 : Error in the configuration file handling
|
||||
}
|
||||
</pre><h3>Enum <a name="virErrorLevel" id="virErrorLevel">virErrorLevel</a></h3><pre class="programlisting">Enum virErrorLevel {
|
||||
<a name="VIR_ERR_NONE" id="VIR_ERR_NONE">VIR_ERR_NONE</a> = 0
|
||||
@ -78,6 +79,11 @@ void <a href="#virErrorFunc">virErrorFunc</a> (void * userData, <br /> <a
|
||||
<a name="VIR_ERR_XML_ERROR" id="VIR_ERR_XML_ERROR">VIR_ERR_XML_ERROR</a> = 27 : an XML description is not well formed or broken
|
||||
<a name="VIR_ERR_DOM_EXIST" id="VIR_ERR_DOM_EXIST">VIR_ERR_DOM_EXIST</a> = 28 : the domain already exist
|
||||
<a name="VIR_ERR_OPERATION_DENIED" id="VIR_ERR_OPERATION_DENIED">VIR_ERR_OPERATION_DENIED</a> = 29 : operation forbidden on read-only connections
|
||||
<a name="VIR_ERR_OPEN_FAILED" id="VIR_ERR_OPEN_FAILED">VIR_ERR_OPEN_FAILED</a> = 30 : failed to open a conf file
|
||||
<a name="VIR_ERR_READ_FAILED" id="VIR_ERR_READ_FAILED">VIR_ERR_READ_FAILED</a> = 31 : failed to read a conf file
|
||||
<a name="VIR_ERR_PARSE_FAILED" id="VIR_ERR_PARSE_FAILED">VIR_ERR_PARSE_FAILED</a> = 32 : failed to parse a conf file
|
||||
<a name="VIR_ERR_CONF_SYNTAX" id="VIR_ERR_CONF_SYNTAX">VIR_ERR_CONF_SYNTAX</a> = 33 : failed to parse the syntax of a conf file
|
||||
<a name="VIR_ERR_WRITE_FAILED" id="VIR_ERR_WRITE_FAILED">VIR_ERR_WRITE_FAILED</a> = 34 : failed to write a conf file
|
||||
}
|
||||
</pre><h3><a name="virConnCopyLastError" id="virConnCopyLastError"></a>Function: virConnCopyLastError</h3><pre class="programlisting">int virConnCopyLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br />
|
||||
</pre><p>Copy the content of the last error caught on that connection One will need to free the result with virResetError()</p>
|
||||
@ -102,4 +108,4 @@ void virErrorFunc (void * userData, <br /> <a href="libvirt-virterror.htm
|
||||
</pre><p>Reset the last error caught at the library level.</p>
|
||||
<h3><a name="virSetErrorFunc" id="virSetErrorFunc"></a>Function: virSetErrorFunc</h3><pre class="programlisting">void virSetErrorFunc (void * userData, <br /> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)<br />
|
||||
</pre><p>Set a library global error handling function, if @handler is NULL, it will reset to default printing on stderr. The error raised there are those for which no handler at the connection level could caught.</p>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</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 href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</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 href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -83,6 +83,9 @@ mechanisms if needed.</p>
|
||||
<li>
|
||||
<a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://virt-manager.et.redhat.com/">virt-manager</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a>
|
||||
</li>
|
||||
|
@ -27,4 +27,4 @@ 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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -33,6 +33,49 @@ 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.1.8: Oct 16 2006</h3>
|
||||
<ul>
|
||||
<li> Bug for system with page size != 4k</li>
|
||||
<li> vcpu number initialization (Philippe Berthault)</li>
|
||||
<li> don't label crashed domains as shut off (Peter Vetere)</li>
|
||||
<li> fix virsh man page (Noriko Mizumoto)</li>
|
||||
<li> blktapdd support for alternate drivers like blktap (Daniel Berrange)</li>
|
||||
<li> memory leak fixes (xend interface and XML parsing) (Daniel Berrange)</li>
|
||||
<li> compile fix</li>
|
||||
<li> mlock/munlock size fixes (Daniel Berrange)</li>
|
||||
<li> improve error reporting</li>
|
||||
</ul>
|
||||
<h3>0.1.7: Sep 29 2006</h3>
|
||||
<ul>
|
||||
<li> fix a memory bug on getting vcpu informations from xend (Daniel Berrange)</li>
|
||||
<li> fix another problem in the hypercalls change in Xen changeset
|
||||
86d26e6ec89b when getting domain informations (Daniel Berrange)</li>
|
||||
</ul>
|
||||
<h3>0.1.6: Sep 22 2006</h3>
|
||||
<ul>
|
||||
<li>Support for localization of strings using gettext (Daniel Berrange)</li>
|
||||
<li>Support for new Xen-3.0.3 cdrom and disk configuration (Daniel Berrange)</li>
|
||||
<li>Support for setting VNC port when creating domains with new
|
||||
xend config files (Daniel Berrange) </li>
|
||||
<li>Fix bug when running against xen-3.0.2 hypercalls (Jim Fehlig)</li>
|
||||
<li>Fix reconnection problem when talking directly to http xend</li>
|
||||
</ul>
|
||||
<h3>0.1.5: Sep 5 2006</h3>
|
||||
<ul>
|
||||
<li>Support for new hypercalls change in Xen changeset 86d26e6ec89b</li>
|
||||
<li>bug fixes: virParseUUID() was wrong, netwoking for paravirt guestsi
|
||||
(Daniel Berrange), virsh on non-existent domains (Daniel Berrange),
|
||||
string cast bug when handling error in python (Pete Vetere), HTTP
|
||||
500 xend error code handling (Pete Vetere and Daniel Berrange)</li>
|
||||
<li>improvements: test suite for SEXPR <-> XML format conversions (Daniel
|
||||
Berrange), virsh output regression suite (Daniel Berrange), new environ
|
||||
variable VIRSH_DEFAULT_CONNECT_URI for the default URI when connecting
|
||||
(Daniel Berrange), graphical console support for paravirt guests
|
||||
(Jeremy Katz), parsing of simple Xen config files (with Daniel Berrange),
|
||||
early work on defined (not running) domains (Daniel Berrange),
|
||||
virsh output improvement (Daniel Berrange</li>
|
||||
</ul>
|
||||
|
||||
<h3>0.1.4: Aug 16 2006</h3>
|
||||
<ul>
|
||||
<li>bug fixes: spec file fix (Mark McLoughlin), error report problem (with
|
||||
@ -847,8 +890,10 @@ 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>
|
||||
<p>We use Red Hat Bugzilla to track bugs to libvirt. If you want to report a
|
||||
bug, please check <a href="http://bugzilla.redhat.com/bugzilla/buglist.cgi?component=libvirt&component=libvirt-devel&component=libvirt-python&bug_status=ASSIGNED&bug_status=INVESTIGATE&bug_status=NEW&bug_status=REOPENED&bug_status=VERIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&Search=Search">the existing open bugs</a>, then if yours isn't a duplicate of
|
||||
an existing bug, <a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora%20Core&component=libvirt">log a new bug</a>. It may be good
|
||||
to post to the <a href="mailto:libvir-list@redhat.com">mailing-list</a>
|
||||
too if the issue looks serious, thanks !</p>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -80,6 +80,7 @@
|
||||
<exports symbol='virDomainFree' type='function'/>
|
||||
<exports symbol='virConnectOpen' type='function'/>
|
||||
<exports symbol='virDomainSuspend' type='function'/>
|
||||
<exports symbol='virConnectNumOfDefinedDomains' type='function'/>
|
||||
<exports symbol='virConnectClose' type='function'/>
|
||||
<exports symbol='virDomainReboot' type='function'/>
|
||||
<exports symbol='virInitialize' type='function'/>
|
||||
@ -109,11 +110,13 @@
|
||||
<exports symbol='VIR_FROM_RPC' type='enum'/>
|
||||
<exports symbol='VIR_ERR_XML_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_FROM_NONE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_HTTP_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_DOM_EXIST' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_XENSTORE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_DOM' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INVALID_DOMAIN' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XML' type='enum'/>
|
||||
<exports symbol='VIR_FROM_CONF' type='enum'/>
|
||||
<exports symbol='VIR_ERR_PARSE_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_KERNEL' type='enum'/>
|
||||
<exports symbol='VIR_ERR_POST_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OS_TYPE' type='enum'/>
|
||||
@ -125,17 +128,21 @@
|
||||
<exports symbol='VIR_ERR_OPERATION_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_GET_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_DRIVER_FULL' type='enum'/>
|
||||
<exports symbol='VIR_ERR_DOM_EXIST' type='enum'/>
|
||||
<exports symbol='VIR_ERR_HTTP_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_SOURCE' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_TARGET' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OPERATION_DENIED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_WRITE_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_INTERNAL_ERROR' type='enum'/>
|
||||
<exports symbol='VIR_ERR_CONF_SYNTAX' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_SUPPORT' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XEND' type='enum'/>
|
||||
<exports symbol='VIR_FROM_PROXY' type='enum'/>
|
||||
<exports symbol='VIR_ERR_READ_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_SEXPR_SERIAL' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XENSTORE' type='enum'/>
|
||||
<exports symbol='VIR_FROM_XEN' type='enum'/>
|
||||
<exports symbol='VIR_ERR_OPEN_FAILED' type='enum'/>
|
||||
<exports symbol='VIR_ERR_XEN_CALL' type='enum'/>
|
||||
<exports symbol='VIR_ERR_UNKNOWN_HOST' type='enum'/>
|
||||
<exports symbol='VIR_ERR_NO_CONNECT' type='enum'/>
|
||||
@ -218,6 +225,7 @@
|
||||
<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'/>
|
||||
<enum name='VIR_ERR_CALL_FAILED' file='virterror' value='26' type='virErrorNumber' info='not supported by the drivers'/>
|
||||
<enum name='VIR_ERR_CONF_SYNTAX' file='virterror' value='33' type='virErrorNumber' info='failed to parse the syntax of a conf file'/>
|
||||
<enum name='VIR_ERR_DOM_EXIST' file='virterror' value='28' type='virErrorNumber' info='the domain already exist'/>
|
||||
<enum name='VIR_ERR_DRIVER_FULL' file='virterror' value='25' type='virErrorNumber' info='too many drivers registered'/>
|
||||
<enum name='VIR_ERR_ERROR' file='virterror' value='2' type='virErrorLevel' info=' An error'/>
|
||||
@ -241,18 +249,23 @@
|
||||
<enum name='VIR_ERR_NO_XEN' file='virterror' value='14' type='virErrorNumber' info='could not open Xen hypervisor control'/>
|
||||
<enum name='VIR_ERR_NO_XENSTORE' file='virterror' value='24' type='virErrorNumber' info='could not open Xen Store control'/>
|
||||
<enum name='VIR_ERR_OK' file='virterror' value='0' type='virErrorNumber'/>
|
||||
<enum name='VIR_ERR_OPERATION_DENIED' file='virterror' value='29' type='virErrorNumber' info=' operation forbidden on read-only connections'/>
|
||||
<enum name='VIR_ERR_OPEN_FAILED' file='virterror' value='30' type='virErrorNumber' info='failed to open a conf file'/>
|
||||
<enum name='VIR_ERR_OPERATION_DENIED' file='virterror' value='29' type='virErrorNumber' info='operation forbidden on read-only connections'/>
|
||||
<enum name='VIR_ERR_OPERATION_FAILED' file='virterror' value='9' type='virErrorNumber' info='a command to hypervisor failed'/>
|
||||
<enum name='VIR_ERR_OS_TYPE' file='virterror' value='16' type='virErrorNumber' info='unknown OS type'/>
|
||||
<enum name='VIR_ERR_PARSE_FAILED' file='virterror' value='32' type='virErrorNumber' info='failed to parse a conf file'/>
|
||||
<enum name='VIR_ERR_POST_FAILED' file='virterror' value='11' type='virErrorNumber' info='a HTTP POST command to failed'/>
|
||||
<enum name='VIR_ERR_READ_FAILED' file='virterror' value='31' type='virErrorNumber' info='failed to read a conf file'/>
|
||||
<enum name='VIR_ERR_SEXPR_SERIAL' file='virterror' value='13' type='virErrorNumber' info='failure to serialize an S-Expr'/>
|
||||
<enum name='VIR_ERR_UNKNOWN_HOST' file='virterror' value='4' type='virErrorNumber' info='could not resolve hostname'/>
|
||||
<enum name='VIR_ERR_WARNING' file='virterror' value='1' type='virErrorLevel' info='A simple warning'/>
|
||||
<enum name='VIR_ERR_WRITE_FAILED' file='virterror' value='34' type='virErrorNumber' info=' failed to write a conf file'/>
|
||||
<enum name='VIR_ERR_XEN_CALL' file='virterror' value='15' type='virErrorNumber' info='failure doing an hypervisor call'/>
|
||||
<enum name='VIR_ERR_XML_ERROR' file='virterror' value='27' type='virErrorNumber' info='an XML description is not well formed or broken'/>
|
||||
<enum name='VIR_FROM_CONF' file='virterror' value='9' type='virErrorDomain' info=' Error in the configuration file handling'/>
|
||||
<enum name='VIR_FROM_DOM' file='virterror' value='6' type='virErrorDomain' info='Error when operating on a domain'/>
|
||||
<enum name='VIR_FROM_NONE' file='virterror' value='0' type='virErrorDomain'/>
|
||||
<enum name='VIR_FROM_PROXY' file='virterror' value='8' type='virErrorDomain' info=' Error in the proxy code'/>
|
||||
<enum name='VIR_FROM_PROXY' file='virterror' value='8' type='virErrorDomain' info='Error in the proxy code'/>
|
||||
<enum name='VIR_FROM_RPC' file='virterror' value='7' type='virErrorDomain' info='Error in the XML-RPC code'/>
|
||||
<enum name='VIR_FROM_SEXPR' file='virterror' value='4' type='virErrorDomain' info='Error in the S-Epression code'/>
|
||||
<enum name='VIR_FROM_XEN' file='virterror' value='1' type='virErrorDomain' info='Error at Xen hypervisor layer'/>
|
||||
@ -384,6 +397,11 @@
|
||||
<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='virConnectNumOfDefinedDomains' 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='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'/>
|
||||
|
@ -22,6 +22,7 @@
|
||||
<reference name='VIR_DOMAIN_SHUTDOWN' href='html/libvirt-libvirt.html#VIR_DOMAIN_SHUTDOWN'/>
|
||||
<reference name='VIR_DOMAIN_SHUTOFF' href='html/libvirt-libvirt.html#VIR_DOMAIN_SHUTOFF'/>
|
||||
<reference name='VIR_ERR_CALL_FAILED' href='html/libvirt-virterror.html#VIR_ERR_CALL_FAILED'/>
|
||||
<reference name='VIR_ERR_CONF_SYNTAX' href='html/libvirt-virterror.html#VIR_ERR_CONF_SYNTAX'/>
|
||||
<reference name='VIR_ERR_DOM_EXIST' href='html/libvirt-virterror.html#VIR_ERR_DOM_EXIST'/>
|
||||
<reference name='VIR_ERR_DRIVER_FULL' href='html/libvirt-virterror.html#VIR_ERR_DRIVER_FULL'/>
|
||||
<reference name='VIR_ERR_ERROR' href='html/libvirt-virterror.html#VIR_ERR_ERROR'/>
|
||||
@ -45,15 +46,20 @@
|
||||
<reference name='VIR_ERR_NO_XEN' href='html/libvirt-virterror.html#VIR_ERR_NO_XEN'/>
|
||||
<reference name='VIR_ERR_NO_XENSTORE' href='html/libvirt-virterror.html#VIR_ERR_NO_XENSTORE'/>
|
||||
<reference name='VIR_ERR_OK' href='html/libvirt-virterror.html#VIR_ERR_OK'/>
|
||||
<reference name='VIR_ERR_OPEN_FAILED' href='html/libvirt-virterror.html#VIR_ERR_OPEN_FAILED'/>
|
||||
<reference name='VIR_ERR_OPERATION_DENIED' href='html/libvirt-virterror.html#VIR_ERR_OPERATION_DENIED'/>
|
||||
<reference name='VIR_ERR_OPERATION_FAILED' href='html/libvirt-virterror.html#VIR_ERR_OPERATION_FAILED'/>
|
||||
<reference name='VIR_ERR_OS_TYPE' href='html/libvirt-virterror.html#VIR_ERR_OS_TYPE'/>
|
||||
<reference name='VIR_ERR_PARSE_FAILED' href='html/libvirt-virterror.html#VIR_ERR_PARSE_FAILED'/>
|
||||
<reference name='VIR_ERR_POST_FAILED' href='html/libvirt-virterror.html#VIR_ERR_POST_FAILED'/>
|
||||
<reference name='VIR_ERR_READ_FAILED' href='html/libvirt-virterror.html#VIR_ERR_READ_FAILED'/>
|
||||
<reference name='VIR_ERR_SEXPR_SERIAL' href='html/libvirt-virterror.html#VIR_ERR_SEXPR_SERIAL'/>
|
||||
<reference name='VIR_ERR_UNKNOWN_HOST' href='html/libvirt-virterror.html#VIR_ERR_UNKNOWN_HOST'/>
|
||||
<reference name='VIR_ERR_WARNING' href='html/libvirt-virterror.html#VIR_ERR_WARNING'/>
|
||||
<reference name='VIR_ERR_WRITE_FAILED' href='html/libvirt-virterror.html#VIR_ERR_WRITE_FAILED'/>
|
||||
<reference name='VIR_ERR_XEN_CALL' href='html/libvirt-virterror.html#VIR_ERR_XEN_CALL'/>
|
||||
<reference name='VIR_ERR_XML_ERROR' href='html/libvirt-virterror.html#VIR_ERR_XML_ERROR'/>
|
||||
<reference name='VIR_FROM_CONF' href='html/libvirt-virterror.html#VIR_FROM_CONF'/>
|
||||
<reference name='VIR_FROM_DOM' href='html/libvirt-virterror.html#VIR_FROM_DOM'/>
|
||||
<reference name='VIR_FROM_NONE' href='html/libvirt-virterror.html#VIR_FROM_NONE'/>
|
||||
<reference name='VIR_FROM_PROXY' href='html/libvirt-virterror.html#VIR_FROM_PROXY'/>
|
||||
@ -85,6 +91,7 @@
|
||||
<reference name='virConnectGetVersion' href='html/libvirt-libvirt.html#virConnectGetVersion'/>
|
||||
<reference name='virConnectListDefinedDomains' href='html/libvirt-libvirt.html#virConnectListDefinedDomains'/>
|
||||
<reference name='virConnectListDomains' href='html/libvirt-libvirt.html#virConnectListDomains'/>
|
||||
<reference name='virConnectNumOfDefinedDomains' href='html/libvirt-libvirt.html#virConnectNumOfDefinedDomains'/>
|
||||
<reference name='virConnectNumOfDomains' href='html/libvirt-libvirt.html#virConnectNumOfDomains'/>
|
||||
<reference name='virConnectOpen' href='html/libvirt-libvirt.html#virConnectOpen'/>
|
||||
<reference name='virConnectOpenReadOnly' href='html/libvirt-libvirt.html#virConnectOpenReadOnly'/>
|
||||
@ -174,6 +181,7 @@
|
||||
<ref name='VIR_DOMAIN_SHUTDOWN'/>
|
||||
<ref name='VIR_DOMAIN_SHUTOFF'/>
|
||||
<ref name='VIR_ERR_CALL_FAILED'/>
|
||||
<ref name='VIR_ERR_CONF_SYNTAX'/>
|
||||
<ref name='VIR_ERR_DOM_EXIST'/>
|
||||
<ref name='VIR_ERR_DRIVER_FULL'/>
|
||||
<ref name='VIR_ERR_ERROR'/>
|
||||
@ -197,15 +205,20 @@
|
||||
<ref name='VIR_ERR_NO_XEN'/>
|
||||
<ref name='VIR_ERR_NO_XENSTORE'/>
|
||||
<ref name='VIR_ERR_OK'/>
|
||||
<ref name='VIR_ERR_OPEN_FAILED'/>
|
||||
<ref name='VIR_ERR_OPERATION_DENIED'/>
|
||||
<ref name='VIR_ERR_OPERATION_FAILED'/>
|
||||
<ref name='VIR_ERR_OS_TYPE'/>
|
||||
<ref name='VIR_ERR_PARSE_FAILED'/>
|
||||
<ref name='VIR_ERR_POST_FAILED'/>
|
||||
<ref name='VIR_ERR_READ_FAILED'/>
|
||||
<ref name='VIR_ERR_SEXPR_SERIAL'/>
|
||||
<ref name='VIR_ERR_UNKNOWN_HOST'/>
|
||||
<ref name='VIR_ERR_WARNING'/>
|
||||
<ref name='VIR_ERR_WRITE_FAILED'/>
|
||||
<ref name='VIR_ERR_XEN_CALL'/>
|
||||
<ref name='VIR_ERR_XML_ERROR'/>
|
||||
<ref name='VIR_FROM_CONF'/>
|
||||
<ref name='VIR_FROM_DOM'/>
|
||||
<ref name='VIR_FROM_NONE'/>
|
||||
<ref name='VIR_FROM_PROXY'/>
|
||||
@ -241,6 +254,7 @@
|
||||
<ref name='virConnectGetVersion'/>
|
||||
<ref name='virConnectListDefinedDomains'/>
|
||||
<ref name='virConnectListDomains'/>
|
||||
<ref name='virConnectNumOfDefinedDomains'/>
|
||||
<ref name='virConnectNumOfDomains'/>
|
||||
<ref name='virConnectOpen'/>
|
||||
<ref name='virConnectOpenReadOnly'/>
|
||||
@ -369,6 +383,7 @@
|
||||
<ref name='virConnectGetVersion'/>
|
||||
<ref name='virConnectListDefinedDomains'/>
|
||||
<ref name='virConnectListDomains'/>
|
||||
<ref name='virConnectNumOfDefinedDomains'/>
|
||||
<ref name='virConnectNumOfDomains'/>
|
||||
<ref name='virDomainCreateLinux'/>
|
||||
<ref name='virDomainDefineXML'/>
|
||||
@ -468,6 +483,7 @@
|
||||
<ref name='virConnectGetVersion'/>
|
||||
<ref name='virConnectListDefinedDomains'/>
|
||||
<ref name='virConnectListDomains'/>
|
||||
<ref name='virConnectNumOfDefinedDomains'/>
|
||||
<ref name='virConnectNumOfDomains'/>
|
||||
<ref name='virConnectOpen'/>
|
||||
<ref name='virConnectOpenReadOnly'/>
|
||||
@ -522,6 +538,7 @@
|
||||
</file>
|
||||
<file name='virterror'>
|
||||
<ref name='VIR_ERR_CALL_FAILED'/>
|
||||
<ref name='VIR_ERR_CONF_SYNTAX'/>
|
||||
<ref name='VIR_ERR_DOM_EXIST'/>
|
||||
<ref name='VIR_ERR_DRIVER_FULL'/>
|
||||
<ref name='VIR_ERR_ERROR'/>
|
||||
@ -545,15 +562,20 @@
|
||||
<ref name='VIR_ERR_NO_XEN'/>
|
||||
<ref name='VIR_ERR_NO_XENSTORE'/>
|
||||
<ref name='VIR_ERR_OK'/>
|
||||
<ref name='VIR_ERR_OPEN_FAILED'/>
|
||||
<ref name='VIR_ERR_OPERATION_DENIED'/>
|
||||
<ref name='VIR_ERR_OPERATION_FAILED'/>
|
||||
<ref name='VIR_ERR_OS_TYPE'/>
|
||||
<ref name='VIR_ERR_PARSE_FAILED'/>
|
||||
<ref name='VIR_ERR_POST_FAILED'/>
|
||||
<ref name='VIR_ERR_READ_FAILED'/>
|
||||
<ref name='VIR_ERR_SEXPR_SERIAL'/>
|
||||
<ref name='VIR_ERR_UNKNOWN_HOST'/>
|
||||
<ref name='VIR_ERR_WARNING'/>
|
||||
<ref name='VIR_ERR_WRITE_FAILED'/>
|
||||
<ref name='VIR_ERR_XEN_CALL'/>
|
||||
<ref name='VIR_ERR_XML_ERROR'/>
|
||||
<ref name='VIR_FROM_CONF'/>
|
||||
<ref name='VIR_FROM_DOM'/>
|
||||
<ref name='VIR_FROM_NONE'/>
|
||||
<ref name='VIR_FROM_PROXY'/>
|
||||
@ -759,6 +781,7 @@
|
||||
<ref name='virGetLastError'/>
|
||||
</word>
|
||||
<word name='Provides'>
|
||||
<ref name='virConnectNumOfDefinedDomains'/>
|
||||
<ref name='virConnectNumOfDomains'/>
|
||||
<ref name='virGetVersion'/>
|
||||
</word>
|
||||
@ -914,6 +937,7 @@
|
||||
<ref name='VIR_NODEINFO_MAXCPUS'/>
|
||||
<ref name='_virNodeInfo'/>
|
||||
<ref name='virConnectListDomains'/>
|
||||
<ref name='virConnectNumOfDefinedDomains'/>
|
||||
<ref name='virConnectNumOfDomains'/>
|
||||
<ref name='virDomainSuspend'/>
|
||||
</word>
|
||||
@ -1273,6 +1297,7 @@
|
||||
<word name='domains'>
|
||||
<ref name='virConnectListDefinedDomains'/>
|
||||
<ref name='virConnectListDomains'/>
|
||||
<ref name='virConnectNumOfDefinedDomains'/>
|
||||
<ref name='virConnectNumOfDomains'/>
|
||||
<ref name='virConnectOpenReadOnly'/>
|
||||
<ref name='virDomainCreate'/>
|
||||
@ -1390,6 +1415,7 @@
|
||||
<word name='found'>
|
||||
<ref name='virConnCopyLastError'/>
|
||||
<ref name='virConnectListDomains'/>
|
||||
<ref name='virConnectNumOfDefinedDomains'/>
|
||||
<ref name='virConnectNumOfDomains'/>
|
||||
<ref name='virCopyLastError'/>
|
||||
</word>
|
||||
|
@ -2,7 +2,37 @@
|
||||
<!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.1.4: Aug 16 2006</h3><ul><li>bug fixes: spec file fix (Mark McLoughlin), error report problem (with
|
||||
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3>0.1.8: Oct 16 2006</h3><ul><li> Bug for system with page size != 4k</li>
|
||||
<li> vcpu number initialization (Philippe Berthault)</li>
|
||||
<li> don't label crashed domains as shut off (Peter Vetere)</li>
|
||||
<li> fix virsh man page (Noriko Mizumoto)</li>
|
||||
<li> blktapdd support for alternate drivers like blktap (Daniel Berrange)</li>
|
||||
<li> memory leak fixes (xend interface and XML parsing) (Daniel Berrange)</li>
|
||||
<li> compile fix</li>
|
||||
<li> mlock/munlock size fixes (Daniel Berrange)</li>
|
||||
<li> improve error reporting</li>
|
||||
</ul><h3>0.1.7: Sep 29 2006</h3><ul><li> fix a memory bug on getting vcpu informations from xend (Daniel Berrange)</li>
|
||||
<li> fix another problem in the hypercalls change in Xen changeset
|
||||
86d26e6ec89b when getting domain informations (Daniel Berrange)</li>
|
||||
</ul><h3>0.1.6: Sep 22 2006</h3><ul><li>Support for localization of strings using gettext (Daniel Berrange)</li>
|
||||
<li>Support for new Xen-3.0.3 cdrom and disk configuration (Daniel Berrange)</li>
|
||||
<li>Support for setting VNC port when creating domains with new
|
||||
xend config files (Daniel Berrange) </li>
|
||||
<li>Fix bug when running against xen-3.0.2 hypercalls (Jim Fehlig)</li>
|
||||
<li>Fix reconnection problem when talking directly to http xend</li>
|
||||
</ul><h3>0.1.5: Sep 5 2006</h3><ul><li>Support for new hypercalls change in Xen changeset 86d26e6ec89b</li>
|
||||
<li>bug fixes: virParseUUID() was wrong, netwoking for paravirt guestsi
|
||||
(Daniel Berrange), virsh on non-existent domains (Daniel Berrange),
|
||||
string cast bug when handling error in python (Pete Vetere), HTTP
|
||||
500 xend error code handling (Pete Vetere and Daniel Berrange)</li>
|
||||
<li>improvements: test suite for SEXPR <-> XML format conversions (Daniel
|
||||
Berrange), virsh output regression suite (Daniel Berrange), new environ
|
||||
variable VIRSH_DEFAULT_CONNECT_URI for the default URI when connecting
|
||||
(Daniel Berrange), graphical console support for paravirt guests
|
||||
(Jeremy Katz), parsing of simple Xen config files (with Daniel Berrange),
|
||||
early work on defined (not running) domains (Daniel Berrange),
|
||||
virsh output improvement (Daniel Berrange</li>
|
||||
</ul><h3>0.1.4: Aug 16 2006</h3><ul><li>bug fixes: spec file fix (Mark McLoughlin), error report problem (with
|
||||
Hugh Brock), long integer in Python bindings (with Daniel Berrange), XML
|
||||
generation bug for CDRom (Daniel Berrange), bug whem using number() XPath
|
||||
function (Mark McLoughlin), fix python detection code, remove duplicate
|
||||
@ -83,4 +113,4 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3
|
||||
</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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -50,4 +50,4 @@ from the C API, the only points to notice are:</p><ul><li>the import of the modu
|
||||
<li>extracting and printing some informations about the domain using
|
||||
various <span style="color: #E50073; background-color: #FFFFFF">methods</span>
|
||||
associated to the virDomain class.</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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
</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="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</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="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
|
@ -104,6 +104,7 @@
|
||||
<ul>
|
||||
<li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li>
|
||||
<li> <a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li>
|
||||
<li> <a href="http://virt-manager.et.redhat.com/">virt-manager</a></li>
|
||||
<li> <a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li>
|
||||
<li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li>
|
||||
<li><form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">
|
||||
@ -152,6 +153,7 @@
|
||||
<ul>
|
||||
<li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li>
|
||||
<li> <a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li>
|
||||
<li> <a href="http://virt-manager.et.redhat.com/">virt-manager</a></li>
|
||||
<li> <a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li>
|
||||
<li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li>
|
||||
<li><form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">
|
||||
@ -193,6 +195,7 @@
|
||||
</div>
|
||||
<p><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></p>
|
||||
<p> <a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></p>
|
||||
<p> <a href="http://virt-manager.et.redhat.com/">virt-manager</a></p>
|
||||
<p> <a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</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>
|
||||
@ -221,6 +224,7 @@
|
||||
<ul>
|
||||
<li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li>
|
||||
<li> <a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&component=libvirt&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=MODIFIED&short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr">Open bugs</a></li>
|
||||
<li> <a href="http://virt-manager.et.redhat.com/">virt-manager</a></li>
|
||||
<li> <a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li>
|
||||
<li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li>
|
||||
<li><form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">
|
||||
|
@ -196,7 +196,7 @@ typedef virNodeInfo *virNodeInfoPtr;
|
||||
* version * 1,000,000 + minor * 1000 + micro
|
||||
*/
|
||||
|
||||
#define LIBVIR_VERSION_NUMBER 1004
|
||||
#define LIBVIR_VERSION_NUMBER 1008
|
||||
|
||||
int virGetVersion (unsigned long *libVer,
|
||||
const char *type,
|
||||
@ -297,7 +297,8 @@ char * virDomainGetXMLDesc (virDomainPtr domain,
|
||||
virDomainPtr virDomainDefineXML (virConnectPtr conn,
|
||||
const char *xml);
|
||||
int virDomainUndefine (virDomainPtr domain);
|
||||
int virConnectListDefinedDomains(virConnectPtr conn,
|
||||
int virConnectNumOfDefinedDomains (virConnectPtr conn);
|
||||
int virConnectListDefinedDomains (virConnectPtr conn,
|
||||
const char **names,
|
||||
int maxnames);
|
||||
int virDomainCreate (virDomainPtr domain);
|
||||
|
@ -297,7 +297,8 @@ char * virDomainGetXMLDesc (virDomainPtr domain,
|
||||
virDomainPtr virDomainDefineXML (virConnectPtr conn,
|
||||
const char *xml);
|
||||
int virDomainUndefine (virDomainPtr domain);
|
||||
int virConnectListDefinedDomains(virConnectPtr conn,
|
||||
int virConnectNumOfDefinedDomains (virConnectPtr conn);
|
||||
int virConnectListDefinedDomains (virConnectPtr conn,
|
||||
const char **names,
|
||||
int maxnames);
|
||||
int virDomainCreate (virDomainPtr domain);
|
||||
|
@ -45,7 +45,8 @@ typedef enum {
|
||||
VIR_FROM_XML, /* Error in the XML code */
|
||||
VIR_FROM_DOM, /* Error when operating on a domain */
|
||||
VIR_FROM_RPC, /* Error in the XML-RPC code */
|
||||
VIR_FROM_PROXY /* Error in the proxy code */
|
||||
VIR_FROM_PROXY, /* Error in the proxy code */
|
||||
VIR_FROM_CONF /* Error in the configuration file handling */
|
||||
} virErrorDomain;
|
||||
|
||||
|
||||
@ -106,7 +107,12 @@ typedef enum {
|
||||
VIR_ERR_CALL_FAILED, /* not supported by the drivers */
|
||||
VIR_ERR_XML_ERROR, /* an XML description is not well formed or broken */
|
||||
VIR_ERR_DOM_EXIST,/* the domain already exist */
|
||||
VIR_ERR_OPERATION_DENIED /* operation forbidden on read-only connections */
|
||||
VIR_ERR_OPERATION_DENIED, /* operation forbidden on read-only connections */
|
||||
VIR_ERR_OPEN_FAILED, /* failed to open a conf file */
|
||||
VIR_ERR_READ_FAILED, /* failed to read a conf file */
|
||||
VIR_ERR_PARSE_FAILED, /* failed to parse a conf file */
|
||||
VIR_ERR_CONF_SYNTAX, /* failed to parse the syntax of a conf file */
|
||||
VIR_ERR_WRITE_FAILED /* failed to write a conf file */
|
||||
} virErrorNumber;
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,5 @@
|
||||
# -*- rpm-spec -*-
|
||||
|
||||
Summary: Library providing an API to use the Xen virtualization
|
||||
Name: libvirt
|
||||
Version: @VERSION@
|
||||
@ -6,8 +8,8 @@ License: LGPL
|
||||
Group: Development/Libraries
|
||||
Source: libvirt-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
URL: http://libvir.org/
|
||||
BuildRequires: xen python python-devel
|
||||
URL: http://libvirt.org/
|
||||
BuildRequires: python python-devel
|
||||
Requires: xen
|
||||
Requires: libxml2
|
||||
Requires: readline
|
||||
@ -16,6 +18,7 @@ BuildRequires: xen-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gettext
|
||||
Obsoletes: libvir
|
||||
ExclusiveArch: i386 x86_64 ia64
|
||||
|
||||
@ -61,6 +64,7 @@ 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
|
||||
%find_lang %{name}
|
||||
|
||||
%clean
|
||||
rm -fr %{buildroot}
|
||||
@ -71,7 +75,7 @@ rm -fr %{buildroot}
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%files -f %{name}.lang
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS ChangeLog NEWS README COPYING.LIB TODO
|
||||
@ -107,6 +111,71 @@ rm -fr %{buildroot}
|
||||
%doc docs/examples/python
|
||||
|
||||
%changelog
|
||||
* Mon Oct 16 2006 Daniel Veillard <veillard@redhat.com> 0.1.8-1
|
||||
- fix missing page size detection code for ia64
|
||||
- fix mlock size when getting domain info list from hypervisor
|
||||
- vcpu number initialization
|
||||
- don't label crashed domains as shut off
|
||||
- fix virsh man page
|
||||
- blktapdd support for alternate drivers like blktap
|
||||
- memory leak fixes (xend interface and XML parsing)
|
||||
- compile fix
|
||||
- mlock/munlock size fixes
|
||||
|
||||
* Fri Sep 22 2006 Daniel Veillard <veillard@redhat.com> 0.1.7-1
|
||||
- Fix bug when running against xen-3.0.3 hypercalls
|
||||
- Fix memory bug when getting vcpus info from xend
|
||||
|
||||
* Fri Sep 22 2006 Daniel Veillard <veillard@redhat.com> 0.1.6-1
|
||||
- Support for localization
|
||||
- Support for new Xen-3.0.3 cdrom and disk configuration
|
||||
- Support for setting VNC port
|
||||
- Fix bug when running against xen-3.0.2 hypercalls
|
||||
- Fix reconnection problem when talking directly to http xend
|
||||
|
||||
* Tue Sep 5 2006 Jeremy Katz <katzj@redhat.com> - 0.1.5-3
|
||||
- patch from danpb to support new-format cd devices for HVM guests
|
||||
|
||||
* Tue Sep 5 2006 Daniel Veillard <veillard@redhat.com> 0.1.5-2
|
||||
- reactivating ia64 support
|
||||
|
||||
* Tue Sep 5 2006 Daniel Veillard <veillard@redhat.com> 0.1.5-1
|
||||
- new release
|
||||
- bug fixes
|
||||
- support for new hypervisor calls
|
||||
- early code for config files and defined domains
|
||||
|
||||
* Mon Sep 4 2006 Daniel Berrange <berrange@redhat.com> - 0.1.4-5
|
||||
- add patch to address dom0_ops API breakage in Xen 3.0.3 tree
|
||||
|
||||
* Mon Aug 28 2006 Jeremy Katz <katzj@redhat.com> - 0.1.4-4
|
||||
- add patch to support paravirt framebuffer in Xen
|
||||
|
||||
* Mon Aug 21 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-3
|
||||
- another patch to fix network handling in non-HVM guests
|
||||
|
||||
* Thu Aug 17 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-2
|
||||
- patch to fix virParseUUID()
|
||||
|
||||
* Wed Aug 16 2006 Daniel Veillard <veillard@redhat.com> 0.1.4-1
|
||||
- vCPUs and affinity support
|
||||
- more complete XML, console and boot options
|
||||
- specific features support
|
||||
- enforced read-only connections
|
||||
- various improvements, bug fixes
|
||||
|
||||
* Wed Aug 2 2006 Jeremy Katz <katzj@redhat.com> - 0.1.3-6
|
||||
- add patch from pvetere to allow getting uuid from libvirt
|
||||
|
||||
* Wed Aug 2 2006 Jeremy Katz <katzj@redhat.com> - 0.1.3-5
|
||||
- build on ia64 now
|
||||
|
||||
* Thu Jul 27 2006 Jeremy Katz <katzj@redhat.com> - 0.1.3-4
|
||||
- don't BR xen, we just need xen-devel
|
||||
|
||||
* Thu Jul 27 2006 Daniel Veillard <veillard@redhat.com> 0.1.3-3
|
||||
- need rebuild since libxenstore is now versionned
|
||||
|
||||
* Mon Jul 24 2006 Mark McLoughlin <markmc@redhat.com> - 0.1.3-2
|
||||
- Add BuildRequires: xen-devel
|
||||
|
||||
|
14
po/.cvsignore
Normal file
14
po/.cvsignore
Normal file
@ -0,0 +1,14 @@
|
||||
stamp-po
|
||||
remove-potcdate.sin
|
||||
quot.sed
|
||||
insert-header.sin
|
||||
*.gmo
|
||||
en@quot.header
|
||||
en@boldquot.header
|
||||
boldquot.sed
|
||||
Rules-quot
|
||||
POTFILES
|
||||
Makevars.template
|
||||
Makefile.in.in
|
||||
Makefile.in
|
||||
Makefile
|
41
po/Makevars
Normal file
41
po/Makevars
Normal file
@ -0,0 +1,41 @@
|
||||
# Makefile variables for PO directory in any package using GNU gettext.
|
||||
|
||||
# Usually the message domain is the same as the package name.
|
||||
DOMAIN = $(PACKAGE)
|
||||
|
||||
# These two variables depend on the location of this directory.
|
||||
subdir = po
|
||||
top_builddir = ..
|
||||
|
||||
# These options get passed to xgettext.
|
||||
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
|
||||
|
||||
# This is the copyright holder that gets inserted into the header of the
|
||||
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
|
||||
# package. (Note that the msgstr strings, extracted from the package's
|
||||
# sources, belong to the copyright holder of the package.) Translators are
|
||||
# expected to transfer the copyright for their translations to this person
|
||||
# or entity, or to disclaim their copyright. The empty string stands for
|
||||
# the public domain; in this case the translators are expected to disclaim
|
||||
# their copyright.
|
||||
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
|
||||
|
||||
# This is the email address or URL to which the translators shall report
|
||||
# bugs in the untranslated strings:
|
||||
# - Strings which are not entire sentences, see the maintainer guidelines
|
||||
# in the GNU gettext documentation, section 'Preparing Strings'.
|
||||
# - Strings which use unclear terms or require additional context to be
|
||||
# understood.
|
||||
# - Strings which make invalid assumptions about notation of date, time or
|
||||
# money.
|
||||
# - Pluralisation problems.
|
||||
# - Incorrect English spelling.
|
||||
# - Incorrect formatting.
|
||||
# It can be your email address, or a mailing list address where translators
|
||||
# can write to without being subscribed, or the URL of a web page through
|
||||
# which the translators can contact you.
|
||||
MSGID_BUGS_ADDRESS =
|
||||
|
||||
# This is the list of locale categories, beyond LC_MESSAGES, for which the
|
||||
# message catalogs shall be used. It is usually empty.
|
||||
EXTRA_LOCALE_CATEGORIES =
|
13
po/POTFILES.in
Normal file
13
po/POTFILES.in
Normal file
@ -0,0 +1,13 @@
|
||||
src/libvirt.c
|
||||
src/virterror.c
|
||||
src/xmlrpc.c
|
||||
src/hash.c
|
||||
src/test.c
|
||||
src/xml.c
|
||||
src/sexpr.c
|
||||
src/xend_internal.c
|
||||
src/virsh.c
|
||||
src/conf.c
|
||||
src/xs_internal.c
|
||||
src/proxy_internal.c
|
||||
src/xen_internal.c
|
1425
po/en_GB.po
Normal file
1425
po/en_GB.po
Normal file
File diff suppressed because it is too large
Load Diff
1425
po/libvirt.pot
Normal file
1425
po/libvirt.pot
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,8 +2,8 @@
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I@top_srcdir@/include \
|
||||
-I@top_srcdir@/proxy -I@top_srcdir@/src @LIBXML_CFLAGS@ \
|
||||
-DPROXY
|
||||
|
||||
-DPROXY -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-DGETTEXT_PACKAGE=\"$(PACKAGE)\"
|
||||
|
||||
libexec_PROGRAMS = libvirt_proxy
|
||||
|
||||
|
@ -576,7 +576,7 @@ retry2:
|
||||
req->len = sizeof(virProxyPacket);
|
||||
} else {
|
||||
int xmllen = strlen(xml);
|
||||
if (xmllen > sizeof(request.extra.str)) {
|
||||
if (xmllen > (int) sizeof(request.extra.str)) {
|
||||
req->data.arg = -2;
|
||||
req->len = sizeof(virProxyPacket);
|
||||
} else {
|
||||
@ -715,6 +715,19 @@ usage(const char *progname) {
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
|
||||
if (!setlocale(LC_ALL, "")) {
|
||||
perror("setlocale");
|
||||
return -1;
|
||||
}
|
||||
if (!bindtextdomain(GETTEXT_PACKAGE, LOCALEBASEDIR)) {
|
||||
perror("bindtextdomain");
|
||||
return -1;
|
||||
}
|
||||
if (!textdomain(GETTEXT_PACKAGE)) {
|
||||
perror("textdomain");
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (!strcmp(argv[i], "-v")) {
|
||||
debug++;
|
||||
@ -725,7 +738,8 @@ int main(int argc, char **argv) {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (geteuid() != 0) {
|
||||
fprintf(stderr, "%s must be run as root or suid\n", argv[0]);
|
||||
/* exit(1); */
|
||||
|
@ -51,11 +51,11 @@ libvirt_virErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, virErrorPtr err)
|
||||
Py_XINCREF(libvirt_virPythonErrorFuncCtxt);
|
||||
PyTuple_SetItem(info, 0, PyInt_FromLong((long) err->code));
|
||||
PyTuple_SetItem(info, 1, PyInt_FromLong((long) err->domain));
|
||||
PyTuple_SetItem(info, 2, libvirt_charPtrWrap(err->message));
|
||||
PyTuple_SetItem(info, 2, libvirt_constcharPtrWrap(err->message));
|
||||
PyTuple_SetItem(info, 3, PyInt_FromLong((long) err->level));
|
||||
PyTuple_SetItem(info, 4, libvirt_charPtrWrap(err->str1));
|
||||
PyTuple_SetItem(info, 5, libvirt_charPtrWrap(err->str2));
|
||||
PyTuple_SetItem(info, 6, libvirt_charPtrWrap(err->str3));
|
||||
PyTuple_SetItem(info, 4, libvirt_constcharPtrWrap(err->str1));
|
||||
PyTuple_SetItem(info, 5, libvirt_constcharPtrWrap(err->str2));
|
||||
PyTuple_SetItem(info, 6, libvirt_constcharPtrWrap(err->str3));
|
||||
PyTuple_SetItem(info, 7, PyInt_FromLong((long) err->int1));
|
||||
PyTuple_SetItem(info, 8, PyInt_FromLong((long) err->int2));
|
||||
/* TODO pass conn and dom if available */
|
||||
|
@ -1,7 +1,8 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
INCLUDES = -I$(top_builddir)/include -I@top_srcdir@/include @LIBXML_CFLAGS@ \
|
||||
-DBINDIR=\""$(libexecdir)"\"
|
||||
-DBINDIR=\""$(libexecdir)"\" -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
|
||||
-DGETTEXT_PACKAGE=\"$(PACKAGE)\"
|
||||
DEPS = libvirt.la
|
||||
LDADDS = @STATIC_BINARIES@ libvirt.la
|
||||
VIRSH_LIBS = @VIRSH_LIBS@
|
||||
@ -25,7 +26,8 @@ libvirt_la_SOURCES = \
|
||||
sexpr.c sexpr.h \
|
||||
virterror.c \
|
||||
driver.h \
|
||||
proxy_internal.c proxy_internal.h
|
||||
proxy_internal.c proxy_internal.h \
|
||||
conf.c conf.h
|
||||
|
||||
bin_PROGRAMS = virsh
|
||||
|
||||
@ -34,3 +36,8 @@ virsh_LDFLAGS =
|
||||
virsh_DEPENDENCIES = $(DEPS)
|
||||
virsh_LDADD = $(LDADDS) $(VIRSH_LIBS)
|
||||
|
||||
#
|
||||
# target to ease building test programs
|
||||
#
|
||||
tst: tst.c
|
||||
$(CC) $(CFLAGS) -I../include -o tst tst.c .libs/libvirt.a -lxml2 -lxenstore -lpthread
|
||||
|
880
src/conf.c
Normal file
880
src/conf.c
Normal file
@ -0,0 +1,880 @@
|
||||
/**
|
||||
* conf.c: parser for a subset of the Python encoded Xen configuration files
|
||||
*
|
||||
* Copyright (C) 2006 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE /* want strndup ! */
|
||||
#include <string.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "internal.h"
|
||||
#include "xml.h"
|
||||
#include "conf.h"
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Structures and macros used by the mini parser *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
typedef struct _virConfParserCtxt virConfParserCtxt;
|
||||
typedef virConfParserCtxt *virConfParserCtxtPtr;
|
||||
|
||||
struct _virConfParserCtxt {
|
||||
const char* filename;
|
||||
const char* base;
|
||||
const char* cur;
|
||||
const char *end;
|
||||
int line;
|
||||
|
||||
virConfPtr conf;
|
||||
};
|
||||
|
||||
#define CUR (*ctxt->cur)
|
||||
#define NEXT if (ctxt->cur < ctxt->end) ctxt->cur++;
|
||||
#define IS_EOL(c) (((c) == '\n') || ((c) == '\r'))
|
||||
#define IS_BLANK(c) (((c) == ' ') || ((c) == '\n') || ((c) == '\r') || \
|
||||
((c) == '\t'))
|
||||
#define SKIP_BLANKS {while ((ctxt->cur < ctxt->end) && (IS_BLANK(CUR))){\
|
||||
if (CUR == '\n') ctxt->line++; \
|
||||
ctxt->cur++;}}
|
||||
#define IS_SPACE(c) (((c) == ' ') || ((c) == '\t'))
|
||||
#define SKIP_SPACES {while ((ctxt->cur < ctxt->end) && (IS_SPACE(CUR))) \
|
||||
ctxt->cur++;}
|
||||
#define IS_CHAR(c) ((((c) >= 'a') && ((c) <= 'z')) || \
|
||||
(((c) >= 'A') && ((c) <= 'Z')))
|
||||
#define IS_DIGIT(c) (((c) >= '0') && ((c) <= '9'))
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Structures used by configuration data *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
typedef struct _virConfEntry virConfEntry;
|
||||
typedef virConfEntry *virConfEntryPtr;
|
||||
|
||||
struct _virConfEntry {
|
||||
virConfEntryPtr next;
|
||||
char* name;
|
||||
char* comment;
|
||||
virConfValuePtr value;
|
||||
};
|
||||
|
||||
struct _virConf {
|
||||
const char* filename;
|
||||
virConfEntryPtr entries;
|
||||
};
|
||||
|
||||
/**
|
||||
* virConfError:
|
||||
* @conf: the configuration if available
|
||||
* @error: the error number
|
||||
* @info: extra information string
|
||||
* @line: line for the error
|
||||
*
|
||||
* Handle an error at the xend daemon interface
|
||||
*/
|
||||
static void
|
||||
virConfError(virConfPtr conf ATTRIBUTE_UNUSED,
|
||||
virErrorNumber error, const char *info, int line)
|
||||
{
|
||||
const char *errmsg;
|
||||
|
||||
if (error == VIR_ERR_OK)
|
||||
return;
|
||||
|
||||
errmsg = __virErrorMsg(error, info);
|
||||
__virRaiseError(NULL, NULL, VIR_FROM_CONF, error, VIR_ERR_ERROR,
|
||||
errmsg, info, NULL, line, 0, errmsg, info, line);
|
||||
}
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Structures allocations and deallocations *
|
||||
* *
|
||||
************************************************************************/
|
||||
static void virConfFreeValue(virConfValuePtr val);
|
||||
|
||||
/**
|
||||
* virConfFreeList:
|
||||
* @list: the list to free
|
||||
*
|
||||
* Free a list
|
||||
*/
|
||||
static void
|
||||
virConfFreeList(virConfValuePtr list)
|
||||
{
|
||||
virConfValuePtr next;
|
||||
|
||||
while (list != NULL) {
|
||||
next = list->next;
|
||||
list->next = NULL;
|
||||
virConfFreeValue(list);
|
||||
list = next;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfFreeValue:
|
||||
* @val: the value to free
|
||||
*
|
||||
* Free a value
|
||||
*/
|
||||
static void
|
||||
virConfFreeValue(virConfValuePtr val)
|
||||
{
|
||||
if (val == NULL)
|
||||
return;
|
||||
if (val->str != NULL)
|
||||
free(val->str);
|
||||
if (val->list != NULL)
|
||||
virConfFreeList(val->list);
|
||||
free(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfCreate:
|
||||
* @filename: the name to report errors
|
||||
*
|
||||
* Create a configuration internal structure
|
||||
*
|
||||
* Returns a pointer or NULL in case of error.
|
||||
*/
|
||||
static virConfPtr
|
||||
virConfCreate(const char *filename)
|
||||
{
|
||||
virConfPtr ret;
|
||||
|
||||
ret = (virConfPtr) malloc(sizeof(virConf));
|
||||
if (ret == NULL) {
|
||||
virConfError(NULL, VIR_ERR_NO_MEMORY, _("allocating configuration"), 0);
|
||||
return(NULL);
|
||||
}
|
||||
memset(ret, 0, sizeof(virConf));
|
||||
|
||||
ret->filename = filename;
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfAddEntry:
|
||||
* @conf: the conf structure
|
||||
* @name: name of the entry or NULL for comment
|
||||
* @value: the value if any
|
||||
* @comm: extra comment for that entry if any
|
||||
*
|
||||
* add one entry to the conf, the parameters are included in the conf
|
||||
* if successful and freed on virConfFree()
|
||||
*
|
||||
* Returns a pointer to the entry or NULL in case of failure
|
||||
*/
|
||||
static virConfEntryPtr
|
||||
virConfAddEntry(virConfPtr conf, char *name, virConfValuePtr value, char *comm)
|
||||
{
|
||||
virConfEntryPtr ret, prev;
|
||||
|
||||
if (conf == NULL)
|
||||
return(NULL);
|
||||
if ((comm == NULL) && (name == NULL))
|
||||
return(NULL);
|
||||
|
||||
ret = (virConfEntryPtr) malloc(sizeof(virConfEntry));
|
||||
if (ret == NULL) {
|
||||
virConfError(NULL, VIR_ERR_NO_MEMORY, _("allocating configuration"), 0);
|
||||
return(NULL);
|
||||
}
|
||||
memset(ret, 0, sizeof(virConfEntry));
|
||||
ret->name = name;
|
||||
ret->value = value;
|
||||
ret->comment = comm;
|
||||
|
||||
if (conf->entries == NULL) {
|
||||
conf->entries = ret;
|
||||
} else {
|
||||
prev = conf->entries;
|
||||
while (prev->next != NULL)
|
||||
prev = prev->next;
|
||||
prev->next = ret;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Serialization *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* virConfSaveValue:
|
||||
* @buf: output buffer
|
||||
* @val: a value
|
||||
*
|
||||
* Serialize the value to the buffer
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
static int
|
||||
virConfSaveValue(virBufferPtr buf, virConfValuePtr val)
|
||||
{
|
||||
if (val == NULL)
|
||||
return(-1);
|
||||
switch (val->type) {
|
||||
case VIR_CONF_NONE:
|
||||
return(-1);
|
||||
case VIR_CONF_LONG:
|
||||
virBufferVSprintf(buf, "%ld", val->l);
|
||||
break;
|
||||
case VIR_CONF_STRING:
|
||||
if (strchr(val->str, '\n') != NULL) {
|
||||
virBufferVSprintf(buf, "\"\"\"%s\"\"\"", val->str);
|
||||
} else if (strchr(val->str, '"') == NULL) {
|
||||
virBufferVSprintf(buf, "\"%s\"", val->str);
|
||||
} else if (strchr(val->str, '\'') == NULL) {
|
||||
virBufferVSprintf(buf, "'%s'", val->str);
|
||||
} else {
|
||||
virBufferVSprintf(buf, "\"\"\"%s\"\"\"", val->str);
|
||||
}
|
||||
break;
|
||||
case VIR_CONF_LIST: {
|
||||
virConfValuePtr cur;
|
||||
|
||||
cur = val->list;
|
||||
virBufferAdd(buf, "[ ", 2);
|
||||
if (cur != NULL) {
|
||||
virConfSaveValue(buf, cur);
|
||||
cur = cur->next;
|
||||
while (cur != NULL) {
|
||||
virBufferAdd(buf, ", ", 2);
|
||||
virConfSaveValue(buf, cur);
|
||||
cur = cur->next;
|
||||
}
|
||||
}
|
||||
virBufferAdd(buf, " ]", 2);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return(-1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfSaveEntry:
|
||||
* @buf: output buffer
|
||||
* @cur: a conf entry
|
||||
*
|
||||
* Serialize the entry to the buffer
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
static int
|
||||
virConfSaveEntry(virBufferPtr buf, virConfEntryPtr cur)
|
||||
{
|
||||
if (cur->name != NULL) {
|
||||
virBufferAdd(buf, cur->name, -1);
|
||||
virBufferAdd(buf, " = ", 3);
|
||||
virConfSaveValue(buf, cur->value);
|
||||
if (cur->comment != NULL) {
|
||||
virBufferAdd(buf, " #", 2);
|
||||
virBufferAdd(buf, cur->comment, -1);
|
||||
}
|
||||
} else if (cur->comment != NULL) {
|
||||
virBufferAdd(buf, "#", 1);
|
||||
virBufferAdd(buf, cur->comment, -1);
|
||||
}
|
||||
virBufferAdd(buf, "\n", 1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* The parser core *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* virConfParseLong:
|
||||
* @ctxt: the parsing context
|
||||
* @val: the result
|
||||
*
|
||||
* Parse one long int value
|
||||
*
|
||||
* Returns 0 in case of success and -1 in case of error
|
||||
*/
|
||||
static int
|
||||
virConfParseLong(virConfParserCtxtPtr ctxt, long *val)
|
||||
{
|
||||
long l = 0;
|
||||
int neg = 0;
|
||||
|
||||
if (CUR == '-') {
|
||||
neg = 1;
|
||||
NEXT;
|
||||
} else if (CUR == '+') {
|
||||
NEXT;
|
||||
}
|
||||
if ((ctxt->cur >= ctxt->end) || (!IS_DIGIT(CUR))) {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX, _("unterminated number"),
|
||||
ctxt->line);
|
||||
return(-1);
|
||||
}
|
||||
while ((ctxt->cur < ctxt->end) && (IS_DIGIT(CUR))) {
|
||||
l = l * 10 + (CUR - '0');
|
||||
NEXT;
|
||||
}
|
||||
*val = l;
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfParseString:
|
||||
* @ctxt: the parsing context
|
||||
*
|
||||
* Parse one string
|
||||
*
|
||||
* Returns a pointer to the string or NULL in case of error
|
||||
*/
|
||||
static char *
|
||||
virConfParseString(virConfParserCtxtPtr ctxt)
|
||||
{
|
||||
const char *base;
|
||||
char *ret = NULL;
|
||||
|
||||
if (CUR == '\'') {
|
||||
NEXT;
|
||||
base = ctxt->cur;
|
||||
while ((ctxt->cur < ctxt->end) && (CUR != '\'') && (!IS_EOL(CUR)))
|
||||
NEXT;
|
||||
if (CUR != '\'') {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX, _("unterminated string"),
|
||||
ctxt->line);
|
||||
return(NULL);
|
||||
}
|
||||
ret = strndup(base, ctxt->cur - base);
|
||||
NEXT;
|
||||
} else if ((ctxt->cur + 6 < ctxt->end) && (ctxt->cur[0] == '"') &&
|
||||
(ctxt->cur[1] == '"') && (ctxt->cur[2] == '"')) {
|
||||
ctxt->cur += 3;
|
||||
base = ctxt->cur;
|
||||
while ((ctxt->cur + 2 < ctxt->end) && (ctxt->cur[0] == '"') &&
|
||||
(ctxt->cur[1] == '"') && (ctxt->cur[2] == '"')) {
|
||||
if (CUR == '\n') ctxt->line++;
|
||||
NEXT;
|
||||
}
|
||||
if ((ctxt->cur[0] != '"') || (ctxt->cur[1] != '"') ||
|
||||
(ctxt->cur[2] != '"')) {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX, _("unterminated string"),
|
||||
ctxt->line);
|
||||
return(NULL);
|
||||
}
|
||||
ret = strndup(base, ctxt->cur - base);
|
||||
ctxt->cur += 3;
|
||||
} else if (CUR == '"') {
|
||||
NEXT;
|
||||
base = ctxt->cur;
|
||||
while ((ctxt->cur < ctxt->end) && (CUR != '"') && (!IS_EOL(CUR)))
|
||||
NEXT;
|
||||
if (CUR != '"') {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX, _("unterminated string"),
|
||||
ctxt->line);
|
||||
return(NULL);
|
||||
}
|
||||
ret = strndup(base, ctxt->cur - base);
|
||||
NEXT;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfParseValue:
|
||||
* @ctxt: the parsing context
|
||||
*
|
||||
* Parse one value
|
||||
*
|
||||
* Returns a pointer to the value or NULL in case of error
|
||||
*/
|
||||
static virConfValuePtr
|
||||
virConfParseValue(virConfParserCtxtPtr ctxt)
|
||||
{
|
||||
virConfValuePtr ret, lst = NULL, tmp, prev;
|
||||
virConfType type = VIR_CONF_NONE;
|
||||
char *str = NULL;
|
||||
long l = 0;
|
||||
|
||||
SKIP_SPACES;
|
||||
if (ctxt->cur >= ctxt->end) {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX, _("expecting a value"),
|
||||
ctxt->line);
|
||||
return(NULL);
|
||||
}
|
||||
if ((CUR == '"') || (CUR == '\'')) {
|
||||
type = VIR_CONF_STRING;
|
||||
str = virConfParseString(ctxt);
|
||||
if (str == NULL)
|
||||
return(NULL);
|
||||
} else if (CUR == '[') {
|
||||
type = VIR_CONF_LIST;
|
||||
NEXT;
|
||||
SKIP_BLANKS;
|
||||
if ((ctxt->cur < ctxt->end) && (CUR != ']')) {
|
||||
lst = virConfParseValue(ctxt);
|
||||
SKIP_BLANKS;
|
||||
}
|
||||
while ((ctxt->cur < ctxt->end) && (CUR != ']')) {
|
||||
if (CUR != ',') {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX,
|
||||
_("expecting a separator in list"), ctxt->line);
|
||||
virConfFreeList(lst);
|
||||
return(NULL);
|
||||
}
|
||||
NEXT;
|
||||
SKIP_BLANKS;
|
||||
if (CUR == ']') {
|
||||
break;
|
||||
}
|
||||
tmp = virConfParseValue(ctxt);
|
||||
if (tmp == NULL) {
|
||||
virConfFreeList(lst);
|
||||
return(NULL);
|
||||
}
|
||||
prev = lst;
|
||||
while (prev->next != NULL) prev = prev->next;
|
||||
prev->next = tmp;
|
||||
SKIP_BLANKS;
|
||||
}
|
||||
if (CUR == ']') {
|
||||
NEXT;
|
||||
} else {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX,
|
||||
_("list is not closed with ] "), ctxt->line);
|
||||
virConfFreeList(lst);
|
||||
return(NULL);
|
||||
}
|
||||
} else if (IS_DIGIT(CUR) || (CUR == '-') || (CUR == '+')) {
|
||||
if (virConfParseLong(ctxt, &l) < 0) {
|
||||
return(NULL);
|
||||
}
|
||||
type = VIR_CONF_LONG;
|
||||
} else {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX, _("expecting a value"),
|
||||
ctxt->line);
|
||||
return(NULL);
|
||||
}
|
||||
ret = (virConfValuePtr) malloc(sizeof(virConfValue));
|
||||
if (ret == NULL) {
|
||||
virConfError(NULL, VIR_ERR_NO_MEMORY, _("allocating configuration"), 0);
|
||||
if (str != NULL)
|
||||
free(str);
|
||||
return(NULL);
|
||||
}
|
||||
memset(ret, 0, sizeof(virConfValue));
|
||||
ret->type = type;
|
||||
ret->l = l;
|
||||
ret->str = str;
|
||||
ret->list = lst;
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfParseName:
|
||||
* @ctxt: the parsing context
|
||||
*
|
||||
* Parse one name
|
||||
*
|
||||
* Returns a copy of the new string, NULL in case of error
|
||||
*/
|
||||
static char *
|
||||
virConfParseName(virConfParserCtxtPtr ctxt)
|
||||
{
|
||||
const char *base;
|
||||
char *ret;
|
||||
|
||||
SKIP_SPACES;
|
||||
base = ctxt->cur;
|
||||
/* TODO: probably need encoding support and UTF-8 parsing ! */
|
||||
if (!IS_CHAR(CUR)) {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX, _("expecting a name"), ctxt->line);
|
||||
return(NULL);
|
||||
}
|
||||
while ((ctxt->cur < ctxt->end) && ((IS_CHAR(CUR)) || (IS_DIGIT(CUR)) || (CUR == '_')))
|
||||
NEXT;
|
||||
ret = strndup(base, ctxt->cur - base);
|
||||
if (ret == NULL) {
|
||||
virConfError(NULL, VIR_ERR_NO_MEMORY, _("allocating configuration"),
|
||||
ctxt->line);
|
||||
return(NULL);
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfParseComment:
|
||||
* @ctxt: the parsing context
|
||||
*
|
||||
* Parse one standalone comment in the configuration file
|
||||
*
|
||||
* Returns 0 in case of success and -1 in case of error
|
||||
*/
|
||||
static int
|
||||
virConfParseComment(virConfParserCtxtPtr ctxt)
|
||||
{
|
||||
const char *base;
|
||||
char *comm;
|
||||
|
||||
if (CUR != '#')
|
||||
return(-1);
|
||||
NEXT;
|
||||
base = ctxt->cur;
|
||||
while ((ctxt->cur < ctxt->end) && (!IS_EOL(CUR))) NEXT;
|
||||
comm = strndup(base, ctxt->cur - base);
|
||||
if (comm == NULL) {
|
||||
virConfError(NULL, VIR_ERR_NO_MEMORY, _("allocating configuration"),
|
||||
ctxt->line);
|
||||
return(-1);
|
||||
}
|
||||
virConfAddEntry(ctxt->conf, NULL, NULL, comm);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfParseSeparator:
|
||||
* @ctxt: the parsing context
|
||||
*
|
||||
* Parse one separator between statement if not at the end.
|
||||
*
|
||||
* Returns 0 in case of success and -1 in case of error
|
||||
*/
|
||||
static int
|
||||
virConfParseSeparator(virConfParserCtxtPtr ctxt)
|
||||
{
|
||||
SKIP_SPACES;
|
||||
if (ctxt->cur >= ctxt->end)
|
||||
return(0);
|
||||
if (IS_EOL(CUR)) {
|
||||
SKIP_BLANKS
|
||||
} else if (CUR == ';') {
|
||||
NEXT;
|
||||
SKIP_BLANKS;
|
||||
} else {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX, _("expecting a separator"),
|
||||
ctxt->line);
|
||||
return(-1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfParseStatement:
|
||||
* @ctxt: the parsing context
|
||||
*
|
||||
* Parse one statement in the conf file
|
||||
*
|
||||
* Returns 0 in case of success and -1 in case of error
|
||||
*/
|
||||
static int
|
||||
virConfParseStatement(virConfParserCtxtPtr ctxt)
|
||||
{
|
||||
const char *base;
|
||||
char *name;
|
||||
virConfValuePtr value;
|
||||
char *comm = NULL;
|
||||
|
||||
SKIP_BLANKS;
|
||||
if (CUR == '#') {
|
||||
return(virConfParseComment(ctxt));
|
||||
}
|
||||
name = virConfParseName(ctxt);
|
||||
if (name == NULL)
|
||||
return(-1);
|
||||
SKIP_SPACES;
|
||||
if (CUR != '=') {
|
||||
virConfError(NULL, VIR_ERR_CONF_SYNTAX, _("expecting an assignment"),
|
||||
ctxt->line);
|
||||
return(-1);
|
||||
}
|
||||
NEXT;
|
||||
SKIP_SPACES;
|
||||
value = virConfParseValue(ctxt);
|
||||
if (value == NULL) {
|
||||
free(name);
|
||||
return(-1);
|
||||
}
|
||||
SKIP_SPACES;
|
||||
if (CUR == '#') {
|
||||
NEXT;
|
||||
base = ctxt->cur;
|
||||
while ((ctxt->cur < ctxt->end) && (!IS_EOL(CUR))) NEXT;
|
||||
comm = strndup(base, ctxt->cur - base);
|
||||
if (comm == NULL) {
|
||||
virConfError(NULL, VIR_ERR_NO_MEMORY, _("allocating configuration"),
|
||||
ctxt->line);
|
||||
free(name);
|
||||
virConfFreeValue(value);
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
if (virConfAddEntry(ctxt->conf, name, value, comm) == NULL) {
|
||||
free(name);
|
||||
virConfFreeValue(value);
|
||||
if (comm != NULL)
|
||||
free(comm);
|
||||
return(-1);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfParse:
|
||||
* @filename: the name to report errors
|
||||
* @content: the configuration content in memory
|
||||
* @len: the length in bytes
|
||||
*
|
||||
* Parse the subset of the Python language needed to handle simple
|
||||
* Xen configuration files.
|
||||
*
|
||||
* Returns an handle to lookup settings or NULL if it failed to
|
||||
* read or parse the file, use virConfFree() to free the data.
|
||||
*/
|
||||
static virConfPtr
|
||||
virConfParse(const char *filename, const char *content, int len) {
|
||||
virConfParserCtxt ctxt;
|
||||
|
||||
ctxt.filename = filename;
|
||||
ctxt.base = ctxt.cur = content;
|
||||
ctxt.end = content + len - 1;
|
||||
ctxt.line = 1;
|
||||
|
||||
ctxt.conf = virConfCreate(filename);
|
||||
if (ctxt.conf == NULL)
|
||||
return(NULL);
|
||||
|
||||
while (ctxt.cur < ctxt.end) {
|
||||
if (virConfParseStatement(&ctxt) < 0)
|
||||
goto error;
|
||||
if (virConfParseSeparator(&ctxt) < 0)
|
||||
goto error;
|
||||
}
|
||||
|
||||
return(ctxt.conf);
|
||||
|
||||
error:
|
||||
virConfFree(ctxt.conf);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* The module entry points *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* virConfReadFile:
|
||||
* @filename: the path to the configuration file.
|
||||
*
|
||||
* Reads a configuration file.
|
||||
*
|
||||
* Returns an handle to lookup settings or NULL if it failed to
|
||||
* read or parse the file, use virConfFree() to free the data.
|
||||
*/
|
||||
virConfPtr
|
||||
virConfReadFile(const char *filename)
|
||||
{
|
||||
char content[4096];
|
||||
int fd;
|
||||
int len;
|
||||
|
||||
if (filename == NULL) {
|
||||
virConfError(NULL, VIR_ERR_INVALID_ARG, __FUNCTION__, 0);
|
||||
return(NULL);
|
||||
}
|
||||
fd = open(filename, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
virConfError(NULL, VIR_ERR_OPEN_FAILED, filename, 0);
|
||||
return(NULL);
|
||||
}
|
||||
len = read(fd, content, sizeof(content));
|
||||
close(fd);
|
||||
if (len <= 0) {
|
||||
virConfError(NULL, VIR_ERR_READ_FAILED, filename, 0);
|
||||
return(NULL);
|
||||
}
|
||||
return(virConfParse(filename, content, len));
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfReadMem:
|
||||
* @memory: pointer to the content of the configuration file
|
||||
* @len: lenght in byte
|
||||
*
|
||||
* Reads a configuration file loaded in memory. The string can be
|
||||
* zero terminated in which case @len can be 0
|
||||
*
|
||||
* Returns an handle to lookup settings or NULL if it failed to
|
||||
* parse the content, use virConfFree() to free the data.
|
||||
*/
|
||||
virConfPtr
|
||||
virConfReadMem(const char *memory, int len)
|
||||
{
|
||||
if ((memory == NULL) || (len < 0)) {
|
||||
virConfError(NULL, VIR_ERR_INVALID_ARG, __FUNCTION__, 0);
|
||||
return(NULL);
|
||||
}
|
||||
if (len == 0)
|
||||
len = strlen(memory);
|
||||
|
||||
return(virConfParse("memory conf", memory, len));
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfFree:
|
||||
* @conf: a configuration file handle
|
||||
*
|
||||
* Frees all data associated to the handle
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
int
|
||||
virConfFree(virConfPtr conf)
|
||||
{
|
||||
if (conf == NULL) {
|
||||
virConfError(NULL, VIR_ERR_INVALID_ARG, __FUNCTION__, 0);
|
||||
return(-1);
|
||||
}
|
||||
free(conf);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfGetValue:
|
||||
* @conf: a configuration file handle
|
||||
* @entry: the name of the entry
|
||||
*
|
||||
* Lookup the value associated to this entry in the configuration file
|
||||
*
|
||||
* Returns a pointer to the value or NULL if the lookup failed, the data
|
||||
* associated will be freed when virConfFree() is called
|
||||
*/
|
||||
virConfValuePtr
|
||||
virConfGetValue(virConfPtr conf, const char *setting)
|
||||
{
|
||||
virConfEntryPtr cur;
|
||||
|
||||
cur = conf->entries;
|
||||
while (cur != NULL) {
|
||||
if ((cur->name != NULL) && (!strcmp(cur->name, setting)))
|
||||
return(cur->value);
|
||||
cur = cur->next;
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfWriteFile:
|
||||
* @filename: the path to the configuration file.
|
||||
* @conf: the conf
|
||||
*
|
||||
* Writes a configuration file back to a file.
|
||||
*
|
||||
* Returns the number of bytes written or -1 in case of error.
|
||||
*/
|
||||
int
|
||||
virConfWriteFile(const char *filename, virConfPtr conf)
|
||||
{
|
||||
virBufferPtr buf;
|
||||
virConfEntryPtr cur;
|
||||
int ret;
|
||||
int fd;
|
||||
|
||||
if (conf == NULL)
|
||||
return(-1);
|
||||
|
||||
buf = virBufferNew(500);
|
||||
if (buf == NULL)
|
||||
return(-1);
|
||||
|
||||
cur = conf->entries;
|
||||
while (cur != NULL) {
|
||||
virConfSaveEntry(buf, cur);
|
||||
cur = cur->next;
|
||||
}
|
||||
|
||||
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR );
|
||||
if (fd < 0) {
|
||||
virConfError(NULL, VIR_ERR_WRITE_FAILED, _("failed to open file"), 0);
|
||||
ret = -1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = write(fd, buf->content, buf->use);
|
||||
close(fd);
|
||||
if (ret != (int) buf->use) {
|
||||
virConfError(NULL, VIR_ERR_WRITE_FAILED, _("failed to save content"), 0);
|
||||
ret = -1;
|
||||
goto error;
|
||||
}
|
||||
error:
|
||||
virBufferFree(buf);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConfWriteMem:
|
||||
* @memory: pointer to the memory to store the config file
|
||||
* @len: pointer to the lenght in byte of the store, on output the size
|
||||
* @conf: the conf
|
||||
*
|
||||
* Writes a configuration file back to a memory area. @len is an IN/OUT
|
||||
* parameter, it indicates the size available in bytes, and on output the
|
||||
* size required for the configuration file (even if the call fails due to
|
||||
* insufficient space).
|
||||
*
|
||||
* Returns the number of bytes written or -1 in case of error.
|
||||
*/
|
||||
int
|
||||
virConfWriteMem(char *memory, int *len, virConfPtr conf)
|
||||
{
|
||||
virBufferPtr buf;
|
||||
virConfEntryPtr cur;
|
||||
int ret;
|
||||
|
||||
if ((memory == NULL) || (len == NULL) || (*len <= 0) || (conf == NULL))
|
||||
return(-1);
|
||||
|
||||
buf = virBufferNew(500);
|
||||
if (buf == NULL)
|
||||
return(-1);
|
||||
|
||||
cur = conf->entries;
|
||||
while (cur != NULL) {
|
||||
virConfSaveEntry(buf, cur);
|
||||
cur = cur->next;
|
||||
}
|
||||
|
||||
if ((int) buf->use >= *len) {
|
||||
*len = buf->use;
|
||||
ret = -1;
|
||||
goto error;
|
||||
}
|
||||
memcpy(memory, buf->content, buf->use);
|
||||
ret = buf->use;
|
||||
|
||||
error:
|
||||
virBufferFree(buf);
|
||||
return(ret);
|
||||
}
|
69
src/conf.h
Normal file
69
src/conf.h
Normal file
@ -0,0 +1,69 @@
|
||||
/**
|
||||
* conf.h: parser for a subset of the Python encoded Xen configuration files
|
||||
*
|
||||
* Copyright (C) 2006 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
* Daniel Veillard <veillard@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef __VIR_CONF_H__
|
||||
#define __VIR_CONF_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* virConfType:
|
||||
* one of the possible type for a value from the configuration file
|
||||
*
|
||||
* TODO: we probably need a float too.
|
||||
*/
|
||||
typedef enum {
|
||||
VIR_CONF_NONE = 0, /* undefined */
|
||||
VIR_CONF_LONG = 1, /* a long int */
|
||||
VIR_CONF_STRING = 2, /* a string */
|
||||
VIR_CONF_LIST = 3 /* a list */
|
||||
} virConfType;
|
||||
|
||||
/**
|
||||
* virConfValue:
|
||||
* a value from the configuration file
|
||||
*/
|
||||
typedef struct _virConfValue virConfValue;
|
||||
typedef virConfValue *virConfValuePtr;
|
||||
|
||||
struct _virConfValue {
|
||||
virConfType type; /* the virConfType */
|
||||
virConfValuePtr next; /* next element if in a list */
|
||||
long l; /* long integer */
|
||||
char *str; /* pointer to 0 terminated string */
|
||||
virConfValuePtr list; /* list of a list */
|
||||
};
|
||||
|
||||
/**
|
||||
* virConfPtr:
|
||||
* a pointer to a parsed configuration file
|
||||
*/
|
||||
typedef struct _virConf virConf;
|
||||
typedef virConf *virConfPtr;
|
||||
|
||||
virConfPtr virConfReadFile (const char *filename);
|
||||
virConfPtr virConfReadMem (const char *memory,
|
||||
int len);
|
||||
int virConfFree (virConfPtr conf);
|
||||
|
||||
virConfValuePtr virConfGetValue (virConfPtr conf,
|
||||
const char *setting);
|
||||
int virConfWriteFile (const char *filename,
|
||||
virConfPtr conf);
|
||||
int virConfWriteMem (char *memory,
|
||||
int *len,
|
||||
virConfPtr conf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __VIR_CONF_H__ */
|
18
src/driver.h
18
src/driver.h
@ -107,7 +107,18 @@ typedef int
|
||||
typedef char *
|
||||
(*virDrvDomainDumpXML) (virDomainPtr dom,
|
||||
int flags);
|
||||
|
||||
typedef int
|
||||
(*virDrvListDefinedDomains) (virConnectPtr conn,
|
||||
const char **names,
|
||||
int maxnames);
|
||||
typedef int
|
||||
(*virDrvNumOfDefinedDomains) (virConnectPtr conn);
|
||||
typedef int
|
||||
(*virDrvDomainCreate) (virDomainPtr dom);
|
||||
typedef virDomainPtr
|
||||
(*virDrvDomainDefineXML)(virConnectPtr conn, const char *xml);
|
||||
typedef int
|
||||
(*virDrvDomainUndefine) (virDomainPtr dom);
|
||||
typedef int
|
||||
(*virDrvDomainSetVcpus) (virDomainPtr domain,
|
||||
unsigned int nvcpus);
|
||||
@ -168,6 +179,11 @@ struct _virDriver {
|
||||
virDrvDomainPinVcpu domainPinVcpu;
|
||||
virDrvDomainGetVcpus domainGetVcpus;
|
||||
virDrvDomainDumpXML domainDumpXML;
|
||||
virDrvListDefinedDomains listDefinedDomains;
|
||||
virDrvNumOfDefinedDomains numOfDefinedDomains;
|
||||
virDrvDomainCreate domainCreate;
|
||||
virDrvDomainDefineXML domainDefineXML;
|
||||
virDrvDomainUndefine domainUndefine;
|
||||
};
|
||||
|
||||
|
||||
|
10
src/hash.c
10
src/hash.c
@ -528,7 +528,7 @@ virGetConnect(void) {
|
||||
|
||||
ret = (virConnectPtr) malloc(sizeof(virConnect));
|
||||
if (ret == NULL) {
|
||||
virHashError(NULL, VIR_ERR_NO_MEMORY, "Allocating connection");
|
||||
virHashError(NULL, VIR_ERR_NO_MEMORY, _("allocating connection"));
|
||||
goto failed;
|
||||
}
|
||||
memset(ret, 0, sizeof(virConnect));
|
||||
@ -625,13 +625,13 @@ virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||
*/
|
||||
ret = (virDomainPtr) malloc(sizeof(virDomain));
|
||||
if (ret == NULL) {
|
||||
virHashError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
virHashError(conn, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
goto error;
|
||||
}
|
||||
memset(ret, 0, sizeof(virDomain));
|
||||
ret->name = strdup(name);
|
||||
if (ret->name == NULL) {
|
||||
virHashError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
virHashError(conn, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
goto error;
|
||||
}
|
||||
ret->magic = VIR_DOMAIN_MAGIC;
|
||||
@ -642,7 +642,7 @@ virGetDomain(virConnectPtr conn, const char *name, const unsigned char *uuid) {
|
||||
|
||||
if (virHashAddEntry(conn->domains, name, ret) < 0) {
|
||||
virHashError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
"Failed to add domain to connectio hash table");
|
||||
_("failed to add domain to connection hash table"));
|
||||
goto error;
|
||||
}
|
||||
conn->uses++;
|
||||
@ -694,7 +694,7 @@ virFreeDomain(virConnectPtr conn, virDomainPtr domain) {
|
||||
|
||||
if (virHashRemoveEntry(conn->domains, domain->name, NULL) < 0) {
|
||||
virHashError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain missing from connection hash table");
|
||||
_("domain missing from connection hash table"));
|
||||
goto done;
|
||||
}
|
||||
domain->magic = -1;
|
||||
|
@ -16,11 +16,16 @@
|
||||
#include "libvirt/libvirt.h"
|
||||
#include "libvirt/virterror.h"
|
||||
#include "driver.h"
|
||||
#include <libintl.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _(str) dgettext(GETTEXT_PACKAGE, (str))
|
||||
#define _N(str) dgettext(GETTEXT_PACKAGE, (str))
|
||||
#define gettext_noop(str) (str)
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
|
200
src/libvirt.c
200
src/libvirt.c
@ -60,10 +60,13 @@ virInitialize(void)
|
||||
return(0);
|
||||
initialized = 1;
|
||||
|
||||
if (!bindtextdomain(GETTEXT_PACKAGE, LOCALEBASEDIR))
|
||||
return (-1);
|
||||
|
||||
/*
|
||||
* should not be needed but...
|
||||
*/
|
||||
for (i = 0;i < MAX_DRIVERS;i++)
|
||||
for (i = 0;i < MAX_DRIVERS;i++)
|
||||
virDriverTab[i] = NULL;
|
||||
|
||||
/*
|
||||
@ -140,7 +143,8 @@ virRegisterDriver(virDriverPtr driver)
|
||||
int i;
|
||||
|
||||
if (!initialized)
|
||||
virInitialize();
|
||||
if (virInitialize() < 0)
|
||||
return -1;
|
||||
|
||||
if (driver == NULL) {
|
||||
virLibConnError(NULL, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
@ -182,7 +186,8 @@ virGetVersion(unsigned long *libVer, const char *type,
|
||||
int i;
|
||||
|
||||
if (!initialized)
|
||||
virInitialize();
|
||||
if (virInitialize() < 0)
|
||||
return -1;
|
||||
|
||||
if (libVer == NULL)
|
||||
return (-1);
|
||||
@ -223,7 +228,8 @@ virConnectOpen(const char *name)
|
||||
virConnectPtr ret = NULL;
|
||||
|
||||
if (!initialized)
|
||||
virInitialize();
|
||||
if (virInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (name == NULL) {
|
||||
name = "Xen";
|
||||
@ -234,7 +240,7 @@ virConnectOpen(const char *name)
|
||||
|
||||
ret = virGetConnect();
|
||||
if (ret == NULL) {
|
||||
virLibConnError(NULL, VIR_ERR_NO_MEMORY, "Allocating connection");
|
||||
virLibConnError(NULL, VIR_ERR_NO_MEMORY, _("allocating connection"));
|
||||
goto failed;
|
||||
}
|
||||
|
||||
@ -290,14 +296,15 @@ virConnectOpenReadOnly(const char *name)
|
||||
virConnectPtr ret = NULL;
|
||||
|
||||
if (!initialized)
|
||||
virInitialize();
|
||||
if (virInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (name == NULL)
|
||||
name = "Xen";
|
||||
|
||||
ret = virGetConnect();
|
||||
if (ret == NULL) {
|
||||
virLibConnError(NULL, VIR_ERR_NO_MEMORY, "Allocating connection");
|
||||
virLibConnError(NULL, VIR_ERR_NO_MEMORY, _("allocating connection"));
|
||||
goto failed;
|
||||
}
|
||||
|
||||
@ -313,7 +320,7 @@ virConnectOpenReadOnly(const char *name)
|
||||
if (ret->nb_drivers == 0) {
|
||||
if (name == NULL)
|
||||
virLibConnError(NULL, VIR_ERR_NO_CONNECT,
|
||||
"could not connect to Xen Daemon nor Xen Store");
|
||||
_("Xen Daemon or Xen Store"));
|
||||
else
|
||||
/* we failed to find an adequate driver */
|
||||
virLibConnError(NULL, VIR_ERR_NO_SUPPORT, name);
|
||||
@ -1533,10 +1540,7 @@ virNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) {
|
||||
virDomainPtr
|
||||
virDomainDefineXML(virConnectPtr conn, const char *xml) {
|
||||
virDomainPtr ret = NULL;
|
||||
const char *name = NULL;
|
||||
xmlDocPtr doc = NULL;
|
||||
xmlXPathObjectPtr obj = NULL;
|
||||
xmlXPathContextPtr ctxt = NULL;
|
||||
int i;
|
||||
|
||||
if (!VIR_IS_CONNECT(conn)) {
|
||||
virLibConnError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
|
||||
@ -1551,72 +1555,16 @@ virDomainDefineXML(virConnectPtr conn, const char *xml) {
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the XML description is at least well formed and extract the
|
||||
* name.
|
||||
* TODO: a full validation based on RNG for example should be done there
|
||||
*/
|
||||
doc = xmlReadMemory(xml, strlen(xml), "domain_define.xml", NULL, 0);
|
||||
if (doc == NULL) {
|
||||
virLibConnError(conn, VIR_ERR_XML_ERROR, __FUNCTION__);
|
||||
goto done;
|
||||
/* Go though the driver registered entry points */
|
||||
for (i = 0;i < conn->nb_drivers;i++) {
|
||||
if ((conn->drivers[i] != NULL) &&
|
||||
(conn->drivers[i]->domainDefineXML != NULL)) {
|
||||
ret = conn->drivers[i]->domainDefineXML(conn, xml);
|
||||
if (ret)
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
ctxt = xmlXPathNewContext(doc);
|
||||
if (ctxt == NULL) {
|
||||
goto done;
|
||||
}
|
||||
obj = xmlXPathEval(BAD_CAST "string(/domain/name[1])", ctxt);
|
||||
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
|
||||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
|
||||
virLibConnError(conn, VIR_ERR_NO_NAME, xml);
|
||||
goto done;
|
||||
}
|
||||
name = (const char *) obj->stringval;
|
||||
|
||||
/*
|
||||
* Now look it up in the domain pool and check it's not an already run
|
||||
* domain.
|
||||
*/
|
||||
ret = virGetDomain(conn, name, NULL);
|
||||
if (ret == NULL) {
|
||||
goto done;
|
||||
}
|
||||
/*
|
||||
* TODO: the lifecycle of domains, especially predefined ones need to be
|
||||
* explicitely written down
|
||||
*/
|
||||
if (ret->handle != -1) {
|
||||
virLibConnError(conn, VIR_ERR_DOM_EXIST, name);
|
||||
virFreeDomain(conn, ret);
|
||||
ret = NULL;
|
||||
goto done;
|
||||
}
|
||||
if ((ret->uses > 1) && (!(ret->flags & DOMAIN_IS_DEFINED))) {
|
||||
virLibConnError(conn, VIR_ERR_DOM_EXIST, name);
|
||||
virFreeDomain(conn, ret);
|
||||
ret = NULL;
|
||||
goto done;
|
||||
}
|
||||
ret->flags |= DOMAIN_IS_DEFINED;
|
||||
if (ret->xml != NULL) {
|
||||
free(ret->xml);
|
||||
}
|
||||
ret->xml = strdup(xml);
|
||||
if (ret->xml == NULL) {
|
||||
virLibConnError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
|
||||
virFreeDomain(conn, ret);
|
||||
ret = NULL;
|
||||
goto done;
|
||||
}
|
||||
/* TODO shall we keep a list of defined domains there ? */
|
||||
|
||||
done:
|
||||
if (obj != NULL)
|
||||
xmlXPathFreeObject(obj);
|
||||
if (ctxt != NULL)
|
||||
xmlXPathFreeContext(ctxt);
|
||||
if (doc != NULL)
|
||||
xmlFreeDoc(doc);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@ -1630,23 +1578,62 @@ done:
|
||||
*/
|
||||
int
|
||||
virDomainUndefine(virDomainPtr domain) {
|
||||
int ret;
|
||||
int ret, i;
|
||||
virConnectPtr conn;
|
||||
|
||||
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
|
||||
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
if (domain->conn->flags & VIR_CONNECT_RO) {
|
||||
conn = domain->conn;
|
||||
if (conn->flags & VIR_CONNECT_RO) {
|
||||
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* TODO shall we keep a list of defined domains there ? */
|
||||
/* Go though the driver registered entry points */
|
||||
for (i = 0;i < conn->nb_drivers;i++) {
|
||||
if ((conn->drivers[i] != NULL) &&
|
||||
(conn->drivers[i]->domainUndefine != NULL)) {
|
||||
ret = conn->drivers[i]->domainUndefine(domain);
|
||||
if (ret >= 0)
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
|
||||
ret = virFreeDomain(domain->conn, domain);
|
||||
if (ret < 0)
|
||||
return(-1);
|
||||
return(0);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* virConnectNumOfDefinedDomains:
|
||||
* @conn: pointer to the hypervisor connection
|
||||
*
|
||||
* Provides the number of active domains.
|
||||
*
|
||||
* Returns the number of domain found or -1 in case of error
|
||||
*/
|
||||
int
|
||||
virConnectNumOfDefinedDomains(virConnectPtr conn)
|
||||
{
|
||||
int ret = -1;
|
||||
int i;
|
||||
|
||||
if (!VIR_IS_CONNECT(conn)) {
|
||||
virLibConnError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* Go though the driver registered entry points */
|
||||
for (i = 0;i < conn->nb_drivers;i++) {
|
||||
if ((conn->drivers[i] != NULL) &&
|
||||
(conn->drivers[i]->numOfDefinedDomains != NULL)) {
|
||||
ret = conn->drivers[i]->numOfDefinedDomains(conn);
|
||||
if (ret >= 0)
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1662,8 +1649,30 @@ virDomainUndefine(virDomainPtr domain) {
|
||||
int
|
||||
virConnectListDefinedDomains(virConnectPtr conn, const char **names,
|
||||
int maxnames) {
|
||||
TODO
|
||||
return(-1);
|
||||
int ret = -1;
|
||||
int i;
|
||||
|
||||
if (!VIR_IS_CONNECT(conn)) {
|
||||
virLibConnError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
if ((names == NULL) || (maxnames <= 0)) {
|
||||
virLibConnError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* Go though the driver registered entry points */
|
||||
for (i = 0;i < conn->nb_drivers;i++) {
|
||||
if ((conn->drivers[i] != NULL) &&
|
||||
(conn->drivers[i]->listDefinedDomains != NULL)) {
|
||||
ret = conn->drivers[i]->listDefinedDomains(conn, names, maxnames);
|
||||
if (ret >= 0)
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1677,16 +1686,31 @@ virConnectListDefinedDomains(virConnectPtr conn, const char **names,
|
||||
*/
|
||||
int
|
||||
virDomainCreate(virDomainPtr domain) {
|
||||
|
||||
int i, ret = -1;
|
||||
virConnectPtr conn;
|
||||
if (domain == NULL) {
|
||||
TODO
|
||||
return (-1);
|
||||
}
|
||||
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
|
||||
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
if (domain->conn->flags & VIR_CONNECT_RO) {
|
||||
conn = domain->conn;
|
||||
if (conn->flags & VIR_CONNECT_RO) {
|
||||
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
return(-1);
|
||||
|
||||
for (i = 0;i < conn->nb_drivers;i++) {
|
||||
if ((conn->drivers[i] != NULL) &&
|
||||
(conn->drivers[i]->domainCreate != NULL)) {
|
||||
ret = conn->drivers[i]->domainCreate(domain);
|
||||
if (ret == 0)
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,7 +33,9 @@
|
||||
virDomainShutdown;
|
||||
virDomainReboot;
|
||||
virDomainSuspend;
|
||||
virDomainUndefine;
|
||||
virConnectListDefinedDomains;
|
||||
virConnectNumOfDefinedDomains;
|
||||
virDomainUndefine;
|
||||
virGetVersion;
|
||||
virCopyLastError;
|
||||
virConnSetErrorFunc;
|
||||
|
@ -77,6 +77,11 @@ static virDriver xenProxyDriver = {
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
xenProxyDomainDumpXML, /* domainDumpXML */
|
||||
NULL, /* listDefinedDomains */
|
||||
NULL, /* numOfDefinedDomains */
|
||||
NULL, /* domainCreate */
|
||||
NULL, /* domainDefineXML */
|
||||
NULL, /* domainUndefine */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -185,7 +190,7 @@ virProxyForkServer(void)
|
||||
setsid();
|
||||
if (fork() == 0) {
|
||||
execl(proxyPath, proxyPath, NULL);
|
||||
fprintf(stderr, "failed to exec %s\n", proxyPath);
|
||||
fprintf(stderr, _("failed to exec %s\n"), proxyPath);
|
||||
}
|
||||
/*
|
||||
* calling exit() generate troubles for termination handlers
|
||||
@ -279,7 +284,7 @@ virProxyCloseClientSocket(int fd) {
|
||||
|
||||
ret = close(fd);
|
||||
if (ret != 0)
|
||||
fprintf(stderr, "Failed to close socket %d\n", fd);
|
||||
fprintf(stderr, _("Failed to close socket %d\n"), fd);
|
||||
else if (debug > 0)
|
||||
fprintf(stderr, "Closed socket %d\n", fd);
|
||||
return(ret);
|
||||
@ -312,7 +317,7 @@ retry:
|
||||
goto retry;
|
||||
}
|
||||
if (!quiet)
|
||||
fprintf(stderr, "Failed to read socket %d\n", fd);
|
||||
fprintf(stderr, _("Failed to read socket %d\n"), fd);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
@ -346,7 +351,7 @@ retry:
|
||||
fd, len);
|
||||
goto retry;
|
||||
}
|
||||
fprintf(stderr, "Failed to write to socket %d\n", fd);
|
||||
fprintf(stderr, _("Failed to write to socket %d\n"), fd);
|
||||
return(-1);
|
||||
}
|
||||
if (debug)
|
||||
@ -408,7 +413,7 @@ retry:
|
||||
return(-1);
|
||||
if (ret != sizeof(virProxyPacket)) {
|
||||
fprintf(stderr,
|
||||
"Communication error with proxy: got %d bytes of %d\n",
|
||||
_("Communication error with proxy: got %d bytes of %d\n"),
|
||||
ret, (int) sizeof(virProxyPacket));
|
||||
xenProxyClose(conn);
|
||||
return(-1);
|
||||
@ -416,7 +421,7 @@ retry:
|
||||
res = request;
|
||||
if (res->len != sizeof(virProxyPacket)) {
|
||||
fprintf(stderr,
|
||||
"Communication error with proxy: expected %d bytes got %d\n",
|
||||
_("Communication error with proxy: expected %d bytes got %d\n"),
|
||||
(int) sizeof(virProxyPacket), res->len);
|
||||
xenProxyClose(conn);
|
||||
return(-1);
|
||||
@ -429,7 +434,7 @@ retry:
|
||||
return(-1);
|
||||
if (ret != sizeof(virProxyPacket)) {
|
||||
fprintf(stderr,
|
||||
"Communication error with proxy: got %d bytes of %d\n",
|
||||
_("Communication error with proxy: got %d bytes of %d\n"),
|
||||
ret, (int) sizeof(virProxyPacket));
|
||||
xenProxyClose(conn);
|
||||
return(-1);
|
||||
@ -438,7 +443,7 @@ retry:
|
||||
if ((res->len < sizeof(virProxyPacket)) ||
|
||||
(res->len > sizeof(virProxyFullPacket))) {
|
||||
fprintf(stderr,
|
||||
"Communication error with proxy: got %d bytes packet\n",
|
||||
_("Communication error with proxy: got %d bytes packet\n"),
|
||||
res->len);
|
||||
xenProxyClose(conn);
|
||||
return(-1);
|
||||
@ -449,7 +454,7 @@ retry:
|
||||
res->len - ret, quiet);
|
||||
if (ret != (int) (res->len - sizeof(virProxyPacket))) {
|
||||
fprintf(stderr,
|
||||
"Communication error with proxy: got %d bytes of %d\n",
|
||||
_("Communication error with proxy: got %d bytes of %d\n"),
|
||||
ret, (int) sizeof(virProxyPacket));
|
||||
xenProxyClose(conn);
|
||||
return(-1);
|
||||
@ -462,13 +467,13 @@ retry:
|
||||
if ((res == NULL) || (res->version != PROXY_PROTO_VERSION) ||
|
||||
(res->len < sizeof(virProxyPacket))) {
|
||||
fprintf(stderr,
|
||||
"Communication error with proxy: malformed packet\n");
|
||||
_("Communication error with proxy: malformed packet\n"));
|
||||
xenProxyClose(conn);
|
||||
return(-1);
|
||||
}
|
||||
if (res->serial != serial) {
|
||||
TODO /* Asynchronous communication */
|
||||
fprintf(stderr, "gor asynchronous packet number %d\n", res->serial);
|
||||
fprintf(stderr, _("got asynchronous packet number %d\n"), res->serial);
|
||||
goto retry;
|
||||
}
|
||||
return(0);
|
||||
@ -782,7 +787,7 @@ xenProxyLookupByID(virConnectPtr conn, int id)
|
||||
res = virGetDomain(conn, name, uuid);
|
||||
|
||||
if (res == NULL)
|
||||
virProxyError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
virProxyError(conn, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
else
|
||||
res->handle = id;
|
||||
|
||||
@ -829,7 +834,7 @@ xenProxyLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
|
||||
res = virGetDomain(conn, name, uuid);
|
||||
|
||||
if (res == NULL)
|
||||
virProxyError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
virProxyError(conn, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
else
|
||||
res->handle = req.data.arg;
|
||||
|
||||
@ -880,7 +885,7 @@ xenProxyDomainLookupByName(virConnectPtr conn, const char *name)
|
||||
res = virGetDomain(conn, name, (const unsigned char *)&req.extra.str[0]);
|
||||
|
||||
if (res == NULL)
|
||||
virProxyError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
virProxyError(conn, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
else
|
||||
res->handle = req.data.arg;
|
||||
|
||||
|
30
src/sexpr.c
30
src/sexpr.c
@ -56,7 +56,7 @@ sexpr_new(void)
|
||||
|
||||
ret = (struct sexpr *) malloc(sizeof(*ret));
|
||||
if (ret == NULL) {
|
||||
virSexprError(VIR_ERR_NO_MEMORY, "failed to allocate a node");
|
||||
virSexprError(VIR_ERR_NO_MEMORY, _("failed to allocate a node"));
|
||||
return (NULL);
|
||||
}
|
||||
ret->kind = SEXPR_NIL;
|
||||
@ -349,7 +349,7 @@ _string2sexpr(const char *buffer, size_t * end)
|
||||
ret->value = strndup(start, ptr - start);
|
||||
if (ret->value == NULL) {
|
||||
virSexprError(VIR_ERR_NO_MEMORY,
|
||||
"failed to copy a string");
|
||||
_("failed to copy a string"));
|
||||
}
|
||||
|
||||
if (*ptr == '\'')
|
||||
@ -364,7 +364,7 @@ _string2sexpr(const char *buffer, size_t * end)
|
||||
ret->value = strndup(start, ptr - start);
|
||||
if (ret->value == NULL) {
|
||||
virSexprError(VIR_ERR_NO_MEMORY,
|
||||
"failed to copy a string");
|
||||
_("failed to copy a string"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -486,3 +486,27 @@ sexpr_node(struct sexpr *sexpr, const char *node)
|
||||
|
||||
return (n && n->car->kind == SEXPR_VALUE) ? n->car->value : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* sexpr_fmt_node:
|
||||
* @sexpr: a pointer to a parsed S-Expression
|
||||
* @fmt: a path for the node to lookup in the S-Expression
|
||||
* @... extra data to build the path
|
||||
*
|
||||
* 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_fmt_node(struct sexpr *sexpr, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char node[4096];
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(node, sizeof(node), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
return sexpr_node(sexpr, node);
|
||||
}
|
||||
|
@ -45,5 +45,6 @@ void sexpr_free(struct sexpr *sexpr);
|
||||
|
||||
/* lookup in S-Expressions */
|
||||
const char *sexpr_node(struct sexpr *sexpr, const char *node);
|
||||
const char *sexpr_fmt_node(struct sexpr *sexpr, const char *fmt, ...);
|
||||
struct sexpr *sexpr_lookup(struct sexpr *sexpr, const char *node);
|
||||
#endif
|
||||
|
87
src/test.c
87
src/test.c
@ -58,6 +58,11 @@ static virDriver testDriver = {
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
testDomainDumpXML, /* domainDumpXML */
|
||||
NULL, /* listDefinedDomains */
|
||||
NULL, /* numOfDefinedDomains */
|
||||
NULL, /* domainCreate */
|
||||
NULL, /* domainDefineXML */
|
||||
NULL, /* domainUndefine */
|
||||
};
|
||||
|
||||
/* Amount of time it takes to shutdown */
|
||||
@ -192,26 +197,26 @@ static int testLoadDomain(virConnectPtr conn,
|
||||
virDomainRestart onCrash = VIR_DOMAIN_RENAME_RESTART;
|
||||
|
||||
if (gettimeofday(&tv, NULL) < 0) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, _("getting time of day"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
root = xmlDocGetRootElement(xml);
|
||||
if ((root == NULL) || (!xmlStrEqual(root->name, BAD_CAST "domain"))) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed root element");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("domain"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
ctxt = xmlXPathNewContext(xml);
|
||||
if (ctxt == NULL) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "cannot create xpath context");
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, _("creating xpath context"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
obj = xmlXPathEval(BAD_CAST "string(/domain/name[1])", ctxt);
|
||||
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
|
||||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "missing name element on domain");
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, _("domain name"));
|
||||
goto error;
|
||||
}
|
||||
name = strdup((const char *)obj->stringval);
|
||||
@ -220,12 +225,12 @@ static int testLoadDomain(virConnectPtr conn,
|
||||
obj = xmlXPathEval(BAD_CAST "string(/domain/uuid[1])", ctxt);
|
||||
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
|
||||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "missing uuid element on domain");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("domain uuid"));
|
||||
goto error;
|
||||
}
|
||||
dst_uuid = (char *) &rawuuid[0];
|
||||
if (!(virParseUUID((char **)&dst_uuid, (const char *)obj->stringval))) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed uuid data in domain");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("domain uuid"));
|
||||
goto error;
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
@ -233,12 +238,12 @@ static int testLoadDomain(virConnectPtr conn,
|
||||
obj = xmlXPathEval(BAD_CAST "string(/domain/memory[1])", ctxt);
|
||||
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
|
||||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "missing memory element on domain");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("domain memory"));
|
||||
goto error;
|
||||
}
|
||||
memory = strtoll((const char*)obj->stringval, &conv, 10);
|
||||
if (conv == (const char*)obj->stringval) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed memory value for domain");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("domain memory"));
|
||||
goto error;
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
@ -250,7 +255,7 @@ static int testLoadDomain(virConnectPtr conn,
|
||||
} else {
|
||||
nrVirtCpu = strtoll((const char*)obj->stringval, &conv, 10);
|
||||
if (conv == (const char*)obj->stringval) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed vcpus value for domain");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("domain vcpus"));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -261,7 +266,7 @@ static int testLoadDomain(virConnectPtr conn,
|
||||
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
|
||||
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
|
||||
if (!(onReboot = testRestartStringToFlag((const char *)obj->stringval))) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed on_reboot value for domain");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("domain reboot behaviour"));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -272,7 +277,7 @@ static int testLoadDomain(virConnectPtr conn,
|
||||
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
|
||||
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
|
||||
if (!(onReboot = testRestartStringToFlag((const char *)obj->stringval))) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed on_poweroff value for domain");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("domain poweroff behaviour"));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -283,7 +288,7 @@ static int testLoadDomain(virConnectPtr conn,
|
||||
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
|
||||
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
|
||||
if (!(onReboot = testRestartStringToFlag((const char *)obj->stringval))) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed on_crash value for domain");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("domain crash behaviour"));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -326,7 +331,7 @@ static int testLoadDomainFromDoc(virConnectPtr conn,
|
||||
if (!(xml = xmlReadDoc(BAD_CAST doc, "domain.xml", NULL,
|
||||
XML_PARSE_NOENT | XML_PARSE_NONET |
|
||||
XML_PARSE_NOERROR | XML_PARSE_NOWARNING))) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot parse domain definition");
|
||||
testError(NULL, NULL, VIR_ERR_XML_ERROR, _("domain"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -344,14 +349,14 @@ static int testLoadDomainFromFile(virConnectPtr conn,
|
||||
xmlDocPtr xml;
|
||||
|
||||
if ((fd = open(file, O_RDONLY)) < 0) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot load domain definition");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("load domain definition file"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(xml = xmlReadFd(fd, file, NULL,
|
||||
XML_PARSE_NOENT | XML_PARSE_NONET |
|
||||
XML_PARSE_NOERROR | XML_PARSE_NOWARNING))) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot parse domain definition");
|
||||
testError(NULL, NULL, VIR_ERR_XML_ERROR, _("domain"));
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
@ -371,7 +376,7 @@ static int testOpenDefault(virConnectPtr conn,
|
||||
struct timeval tv;
|
||||
|
||||
if (gettimeofday(&tv, NULL) < 0) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("getting time of day"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -426,14 +431,14 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
virNodeInfoPtr nodeInfo;
|
||||
|
||||
if ((fd = open(file, O_RDONLY)) < 0) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot load host definition");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("loading host definition file"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(xml = xmlReadFd(fd, file, NULL,
|
||||
XML_PARSE_NOENT | XML_PARSE_NONET |
|
||||
XML_PARSE_NOERROR | XML_PARSE_NOWARNING))) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot parse host definition");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("host"));
|
||||
goto error;
|
||||
}
|
||||
close(fd);
|
||||
@ -441,13 +446,13 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
|
||||
root = xmlDocGetRootElement(xml);
|
||||
if ((root == NULL) || (!xmlStrEqual(root->name, BAD_CAST "node"))) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "malformed root element");
|
||||
testError(NULL, NULL, VIR_ERR_XML_ERROR, _("node"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
ctxt = xmlXPathNewContext(xml);
|
||||
if (ctxt == NULL) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot create xpath context");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("creating xpath context"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -463,7 +468,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
char *conv = NULL;
|
||||
nodeInfo->nodes = strtol((const char*)obj->stringval, &conv, 10);
|
||||
if (conv == (const char*)obj->stringval) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed nodes value for node cpu");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("node cpu numa nodes"));
|
||||
goto error;
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
@ -475,7 +480,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
char *conv = NULL;
|
||||
nodeInfo->sockets = strtol((const char*)obj->stringval, &conv, 10);
|
||||
if (conv == (const char*)obj->stringval) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed sockets value for node cpu");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("node cpu sockets"));
|
||||
goto error;
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
@ -487,7 +492,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
char *conv = NULL;
|
||||
nodeInfo->cores = strtol((const char*)obj->stringval, &conv, 10);
|
||||
if (conv == (const char*)obj->stringval) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed cores value for node cpu");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("node cpu cores"));
|
||||
goto error;
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
@ -499,7 +504,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
char *conv = NULL;
|
||||
nodeInfo->threads = strtol((const char*)obj->stringval, &conv, 10);
|
||||
if (conv == (const char*)obj->stringval) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed threads value for node cpu");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("node cpu threads"));
|
||||
goto error;
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
@ -511,7 +516,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
char *conv = NULL;
|
||||
unsigned int active = strtol((const char*)obj->stringval, &conv, 10);
|
||||
if (conv == (const char*)obj->stringval) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed active value for node cpu");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("node active cpu"));
|
||||
goto error;
|
||||
}
|
||||
if (active < nodeInfo->cpus) {
|
||||
@ -525,7 +530,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
char *conv = NULL;
|
||||
nodeInfo->mhz = strtol((const char*)obj->stringval, &conv, 10);
|
||||
if (conv == (const char*)obj->stringval) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed threads value for node cpu");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("node cpu mhz"));
|
||||
goto error;
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
@ -544,7 +549,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
char *conv = NULL;
|
||||
nodeInfo->memory = strtol((const char*)obj->stringval, &conv, 10);
|
||||
if (conv == (const char*)obj->stringval) {
|
||||
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed memory value for node");
|
||||
testError(conn, NULL, VIR_ERR_XML_ERROR, _("node memory"));
|
||||
goto error;
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
@ -553,7 +558,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
obj = xmlXPathEval(BAD_CAST "/node/domain", ctxt);
|
||||
if ((obj == NULL) || (obj->type != XPATH_NODESET) ||
|
||||
(obj->nodesetval == NULL)) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot extract domain list");
|
||||
testError(NULL, NULL, VIR_ERR_XML_ERROR, _("node domain list"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -562,7 +567,7 @@ static int testOpenFromFile(virConnectPtr conn,
|
||||
char *absFile = testBuildFilename(file, (const char *)domFile);
|
||||
free(domFile);
|
||||
if (!absFile) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot resolve filename");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("resolving domain filename"));
|
||||
goto error;
|
||||
}
|
||||
if (testLoadDomainFromFile(conn, i, absFile) != 0) {
|
||||
@ -600,7 +605,7 @@ static int getNextConnection(void) {
|
||||
if (node == NULL) {
|
||||
node = calloc(1, sizeof(testNode));
|
||||
if (!node) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot allocate memory");
|
||||
testError(NULL, NULL, VIR_ERR_NO_MEMORY, _("allocating node"));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -640,7 +645,7 @@ int testOpen(virConnectPtr conn,
|
||||
|
||||
|
||||
if ((connid = getNextConnection()) < 0) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "too many connections");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("too many connections"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -717,7 +722,7 @@ testDomainCreateLinux(virConnectPtr conn, const char *xmlDesc,
|
||||
return NULL;
|
||||
dom = virGetDomain(conn, con->domains[i].name, con->domains[i].uuid);
|
||||
if (dom == NULL) {
|
||||
testError(conn, NULL, VIR_ERR_NO_MEMORY, "allocating domain");
|
||||
testError(conn, NULL, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
return NULL;
|
||||
}
|
||||
con->numDomains++;
|
||||
@ -725,7 +730,7 @@ testDomainCreateLinux(virConnectPtr conn, const char *xmlDesc,
|
||||
}
|
||||
}
|
||||
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "too many domains");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("too many domains"));
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
@ -742,7 +747,7 @@ virDomainPtr testLookupDomainByID(virConnectPtr conn,
|
||||
|
||||
dom = virGetDomain(conn, con->domains[id].name, con->domains[id].uuid);
|
||||
if (dom == NULL) {
|
||||
testError(conn, NULL, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
testError(conn, NULL, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
return(NULL);
|
||||
}
|
||||
dom->handle = id;
|
||||
@ -765,7 +770,7 @@ virDomainPtr testLookupDomainByUUID(virConnectPtr conn,
|
||||
if (id >= 0) {
|
||||
dom = virGetDomain(conn, con->domains[id].name, con->domains[id].uuid);
|
||||
if (dom == NULL) {
|
||||
testError(conn, NULL, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
testError(conn, NULL, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
return(NULL);
|
||||
}
|
||||
dom->handle = id;
|
||||
@ -789,7 +794,7 @@ virDomainPtr testLookupDomainByName(virConnectPtr conn,
|
||||
if (id >= 0) {
|
||||
dom = virGetDomain(conn, con->domains[id].name, con->domains[id].uuid);
|
||||
if (dom == NULL) {
|
||||
testError(conn, NULL, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
testError(conn, NULL, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
return(NULL);
|
||||
}
|
||||
dom->handle = id;
|
||||
@ -887,7 +892,7 @@ int testShutdownDomain (virDomainPtr domain)
|
||||
con = &node->connections[domain->conn->handle];
|
||||
|
||||
if (gettimeofday(&tv, NULL) < 0) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("getting time of day"));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@ -915,7 +920,7 @@ int testRebootDomain (virDomainPtr domain, virDomainRestart action)
|
||||
con = &node->connections[domain->conn->handle];
|
||||
|
||||
if (gettimeofday(&tv, NULL) < 0) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("getting time of day"));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@ -942,7 +947,7 @@ int testGetDomainInfo (virDomainPtr domain,
|
||||
con = &node->connections[domain->conn->handle];
|
||||
|
||||
if (gettimeofday(&tv, NULL) < 0) {
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
|
||||
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, _("getting time of day"));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@ -1033,7 +1038,7 @@ int testSetMemory (virDomainPtr domain,
|
||||
con = &node->connections[domain->conn->handle];
|
||||
|
||||
if (memory > con->domains[domain->handle].info.maxMem) {
|
||||
testError(domain->conn, domain, VIR_ERR_INVALID_ARG, "memory over maximum limit");
|
||||
testError(domain->conn, domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@ -1059,7 +1064,7 @@ int testSetVcpus(virDomainPtr domain,
|
||||
|
||||
/* We allow more cpus in guest than host */
|
||||
if (nrCpus > 32) {
|
||||
testError(domain->conn, domain, VIR_ERR_INVALID_ARG, "too many virtual cpus");
|
||||
testError(domain->conn, domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
684
src/virsh.c
684
src/virsh.c
File diff suppressed because it is too large
Load Diff
144
src/virterror.c
144
src/virterror.c
@ -240,10 +240,10 @@ virDefaultErrorFunc(virErrorPtr err)
|
||||
lvl = "";
|
||||
break;
|
||||
case VIR_ERR_WARNING:
|
||||
lvl = "warning";
|
||||
lvl = _("warning");
|
||||
break;
|
||||
case VIR_ERR_ERROR:
|
||||
lvl = "error";
|
||||
lvl = _("error");
|
||||
break;
|
||||
}
|
||||
switch (err->domain) {
|
||||
@ -325,7 +325,7 @@ __virRaiseError(virConnectPtr conn, virDomainPtr dom,
|
||||
* formats the message
|
||||
*/
|
||||
if (msg == NULL) {
|
||||
str = strdup("No error message provided");
|
||||
str = strdup(_("No error message provided"));
|
||||
} else {
|
||||
VIR_GET_VAR_STR(msg, str);
|
||||
}
|
||||
@ -379,165 +379,195 @@ __virErrorMsg(virErrorNumber error, const char *info)
|
||||
return (NULL);
|
||||
case VIR_ERR_INTERNAL_ERROR:
|
||||
if (info != NULL)
|
||||
errmsg = "internal error %s";
|
||||
errmsg = _("internal error %s");
|
||||
else
|
||||
errmsg = "internal error";
|
||||
errmsg = _("internal error");
|
||||
break;
|
||||
case VIR_ERR_NO_MEMORY:
|
||||
errmsg = "out of memory";
|
||||
errmsg = _("out of memory");
|
||||
break;
|
||||
case VIR_ERR_NO_SUPPORT:
|
||||
if (info != NULL)
|
||||
errmsg = "no support for hypervisor";
|
||||
errmsg = _("no support for hypervisor");
|
||||
else
|
||||
errmsg = "no support for hypervisor %s";
|
||||
errmsg = _("no support for hypervisor %s");
|
||||
break;
|
||||
case VIR_ERR_NO_CONNECT:
|
||||
if (info == NULL)
|
||||
errmsg = "could not connect to hypervisor";
|
||||
errmsg = _("could not connect to hypervisor");
|
||||
else
|
||||
errmsg = "could not connect to %s";
|
||||
errmsg = _("could not connect to %s");
|
||||
break;
|
||||
case VIR_ERR_INVALID_CONN:
|
||||
if (info == NULL)
|
||||
errmsg = "invalid connection pointer in";
|
||||
errmsg = _("invalid connection pointer in");
|
||||
else
|
||||
errmsg = "invalid connection pointer in %s";
|
||||
errmsg = _("invalid connection pointer in %s");
|
||||
break;
|
||||
case VIR_ERR_INVALID_DOMAIN:
|
||||
if (info == NULL)
|
||||
errmsg = "invalid domain pointer in";
|
||||
errmsg = _("invalid domain pointer in");
|
||||
else
|
||||
errmsg = "invalid domain pointer in %s";
|
||||
errmsg = _("invalid domain pointer in %s");
|
||||
break;
|
||||
case VIR_ERR_INVALID_ARG:
|
||||
if (info == NULL)
|
||||
errmsg = "invalid argument in";
|
||||
errmsg = _("invalid argument in");
|
||||
else
|
||||
errmsg = "invalid argument in %s";
|
||||
errmsg = _("invalid argument in %s");
|
||||
break;
|
||||
case VIR_ERR_OPERATION_FAILED:
|
||||
if (info != NULL)
|
||||
errmsg = "operation failed: %s";
|
||||
errmsg = _("operation failed: %s");
|
||||
else
|
||||
errmsg = "operation failed";
|
||||
errmsg = _("operation failed");
|
||||
break;
|
||||
case VIR_ERR_GET_FAILED:
|
||||
if (info != NULL)
|
||||
errmsg = "GET operation failed: %s";
|
||||
errmsg = _("GET operation failed: %s");
|
||||
else
|
||||
errmsg = "GET operation failed";
|
||||
errmsg = _("GET operation failed");
|
||||
break;
|
||||
case VIR_ERR_POST_FAILED:
|
||||
if (info != NULL)
|
||||
errmsg = "POST operation failed: %s";
|
||||
errmsg = _("POST operation failed: %s");
|
||||
else
|
||||
errmsg = "POST operation failed";
|
||||
errmsg = _("POST operation failed");
|
||||
break;
|
||||
case VIR_ERR_HTTP_ERROR:
|
||||
errmsg = "got unknown HTTP error code %d";
|
||||
errmsg = _("got unknown HTTP error code %d");
|
||||
break;
|
||||
case VIR_ERR_UNKNOWN_HOST:
|
||||
if (info != NULL)
|
||||
errmsg = "unknown host %s";
|
||||
errmsg = _("unknown host %s");
|
||||
else
|
||||
errmsg = "unknown host";
|
||||
errmsg = _("unknown host");
|
||||
break;
|
||||
case VIR_ERR_SEXPR_SERIAL:
|
||||
if (info != NULL)
|
||||
errmsg = "failed to serialize S-Expr: %s";
|
||||
errmsg = _("failed to serialize S-Expr: %s");
|
||||
else
|
||||
errmsg = "failed to serialize S-Expr";
|
||||
errmsg = _("failed to serialize S-Expr");
|
||||
break;
|
||||
case VIR_ERR_NO_XEN:
|
||||
if (info == NULL)
|
||||
errmsg = "could not use Xen hypervisor entry";
|
||||
errmsg = _("could not use Xen hypervisor entry");
|
||||
else
|
||||
errmsg = "could not use Xen hypervisor entry %s";
|
||||
errmsg = _("could not use Xen hypervisor entry %s");
|
||||
break;
|
||||
case VIR_ERR_NO_XENSTORE:
|
||||
if (info == NULL)
|
||||
errmsg = "could not connect to Xen Store";
|
||||
errmsg = _("could not connect to Xen Store");
|
||||
else
|
||||
errmsg = "could not connect to Xen Store %s";
|
||||
errmsg = _("could not connect to Xen Store %s");
|
||||
break;
|
||||
case VIR_ERR_XEN_CALL:
|
||||
errmsg = "failed Xen syscall %s %d";
|
||||
errmsg = _("failed Xen syscall %s %d");
|
||||
break;
|
||||
case VIR_ERR_OS_TYPE:
|
||||
if (info == NULL)
|
||||
errmsg = "unknown OS type";
|
||||
errmsg = _("unknown OS type");
|
||||
else
|
||||
errmsg = "unknown OS type %s";
|
||||
errmsg = _("unknown OS type %s");
|
||||
break;
|
||||
case VIR_ERR_NO_KERNEL:
|
||||
errmsg = "missing kernel information";
|
||||
errmsg = _("missing kernel information");
|
||||
break;
|
||||
case VIR_ERR_NO_ROOT:
|
||||
if (info == NULL)
|
||||
errmsg = "missing root device information";
|
||||
errmsg = _("missing root device information");
|
||||
else
|
||||
errmsg = "missing root device information in %s";
|
||||
errmsg = _("missing root device information in %s");
|
||||
break;
|
||||
case VIR_ERR_NO_SOURCE:
|
||||
if (info == NULL)
|
||||
errmsg = "missing source information for device";
|
||||
errmsg = _("missing source information for device");
|
||||
else
|
||||
errmsg = "missing source information for device %s";
|
||||
errmsg = _("missing source information for device %s");
|
||||
break;
|
||||
case VIR_ERR_NO_TARGET:
|
||||
if (info == NULL)
|
||||
errmsg = "missing target information for device";
|
||||
errmsg = _("missing target information for device");
|
||||
else
|
||||
errmsg = "missing target information for device %s";
|
||||
errmsg = _("missing target information for device %s");
|
||||
break;
|
||||
case VIR_ERR_NO_NAME:
|
||||
if (info == NULL)
|
||||
errmsg = "missing domain name information";
|
||||
errmsg = _("missing domain name information");
|
||||
else
|
||||
errmsg = "missing domain name information in %s";
|
||||
errmsg = _("missing domain name information in %s");
|
||||
break;
|
||||
case VIR_ERR_NO_OS:
|
||||
if (info == NULL)
|
||||
errmsg = "missing operating system information";
|
||||
errmsg = _("missing operating system information");
|
||||
else
|
||||
errmsg = "missing operating system information for %s";
|
||||
errmsg = _("missing operating system information for %s");
|
||||
break;
|
||||
case VIR_ERR_NO_DEVICE:
|
||||
if (info == NULL)
|
||||
errmsg = "missing devices information";
|
||||
errmsg = _("missing devices information");
|
||||
else
|
||||
errmsg = "missing devices information for %s";
|
||||
errmsg = _("missing devices information for %s");
|
||||
break;
|
||||
case VIR_ERR_DRIVER_FULL:
|
||||
if (info == NULL)
|
||||
errmsg = "too many drivers registered";
|
||||
errmsg = _("too many drivers registered");
|
||||
else
|
||||
errmsg = "too many drivers registered in %s";
|
||||
errmsg = _("too many drivers registered in %s");
|
||||
break;
|
||||
case VIR_ERR_CALL_FAILED:
|
||||
if (info == NULL)
|
||||
errmsg = "library call failed, possibly not supported";
|
||||
errmsg = _("library call failed, possibly not supported");
|
||||
else
|
||||
errmsg = "library call %s failed, possibly not supported";
|
||||
errmsg = _("library call %s failed, possibly not supported");
|
||||
break;
|
||||
case VIR_ERR_XML_ERROR:
|
||||
if (info == NULL)
|
||||
errmsg = "XML description not well formed or invalid";
|
||||
errmsg = _("XML description not well formed or invalid");
|
||||
else
|
||||
errmsg = "XML description for %s is not well formed or invalid";
|
||||
errmsg = _("XML description for %s is not well formed or invalid");
|
||||
break;
|
||||
case VIR_ERR_DOM_EXIST:
|
||||
if (info == NULL)
|
||||
errmsg = "this domain exists already";
|
||||
errmsg = _("this domain exists already");
|
||||
else
|
||||
errmsg = "domain %s exists already";
|
||||
errmsg = _("domain %s exists already");
|
||||
break;
|
||||
case VIR_ERR_OPERATION_DENIED:
|
||||
if (info == NULL)
|
||||
errmsg = "operation forbidden for read only access";
|
||||
errmsg = _("operation forbidden for read only access");
|
||||
else
|
||||
errmsg = "operation %s forbidden for read only access";
|
||||
errmsg = _("operation %s forbidden for read only access");
|
||||
break;
|
||||
case VIR_ERR_OPEN_FAILED:
|
||||
if (info == NULL)
|
||||
errmsg = _("failed to open configuration file for reading");
|
||||
else
|
||||
errmsg = _("failed to open %s for reading");
|
||||
break;
|
||||
case VIR_ERR_READ_FAILED:
|
||||
if (info == NULL)
|
||||
errmsg = _("failed to read configuration file");
|
||||
else
|
||||
errmsg = _("failed to read configuration file %s");
|
||||
break;
|
||||
case VIR_ERR_PARSE_FAILED:
|
||||
if (info == NULL)
|
||||
errmsg = _("failed to parse configuration file");
|
||||
else
|
||||
errmsg = _("failed to parse configuration file %s");
|
||||
break;
|
||||
case VIR_ERR_CONF_SYNTAX:
|
||||
if (info == NULL)
|
||||
errmsg = _("configuration file syntax error");
|
||||
else
|
||||
errmsg = _("configuration file syntax error: %s");
|
||||
break;
|
||||
case VIR_ERR_WRITE_FAILED:
|
||||
if (info == NULL)
|
||||
errmsg = _("failed to write configuration file");
|
||||
else
|
||||
errmsg = _("failed to write configuration file: %s");
|
||||
break;
|
||||
}
|
||||
return (errmsg);
|
||||
|
1593
src/xen_internal.c
1593
src/xen_internal.c
File diff suppressed because it is too large
Load Diff
@ -88,6 +88,11 @@ static virDriver xenDaemonDriver = {
|
||||
xenDaemonDomainPinVcpu, /* domainPinVcpu */
|
||||
xenDaemonDomainGetVcpus, /* domainGetVcpus */
|
||||
xenDaemonDomainDumpXML, /* domainDumpXML */
|
||||
NULL, /* listDefinedDomains */
|
||||
NULL, /* numOfDefinedDomains */
|
||||
NULL, /* domainCreate */
|
||||
NULL, /* domainDefineXML */
|
||||
NULL, /* domainUndefine */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -256,10 +261,10 @@ wr_sync(int fd, void *buffer, size_t size, int do_read)
|
||||
if (len == -1) {
|
||||
if (do_read)
|
||||
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
"faid to read from Xen Daemon");
|
||||
_("failed to read from Xen Daemon"));
|
||||
else
|
||||
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
"faid to read from Xen Daemon");
|
||||
_("failed to read from Xen Daemon"));
|
||||
|
||||
return (-1);
|
||||
}
|
||||
@ -521,6 +526,9 @@ http2unix(int ret)
|
||||
case 404:
|
||||
errno = ESRCH;
|
||||
break;
|
||||
case 500:
|
||||
errno = EIO;
|
||||
break;
|
||||
default:
|
||||
virXendErrorInt(NULL, VIR_ERR_HTTP_ERROR, ret);
|
||||
errno = EINVAL;
|
||||
@ -1045,7 +1053,7 @@ xenDaemonDomainCreateLinux(virConnectPtr xend, const char *sexpr)
|
||||
if (ptr == NULL) {
|
||||
/* this should be caught at the interface but ... */
|
||||
virXendError(xend, VIR_ERR_INTERNAL_ERROR,
|
||||
"Failed to urlencode the create S-Expr");
|
||||
_("failed to urlencode the create S-Expr"));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
@ -1086,20 +1094,20 @@ xenDaemonDomainLookupByName_ids(virConnectPtr xend, const char *domname,
|
||||
value = sexpr_node(root, "domain/domid");
|
||||
if (value == NULL) {
|
||||
virXendError(xend, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incomplete, missing domid");
|
||||
_("domain information incomplete, missing domid"));
|
||||
goto error;
|
||||
}
|
||||
ret = strtol(value, NULL, 0);
|
||||
if ((ret == 0) && (value[0] != '0')) {
|
||||
virXendError(xend, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incorrect domid not numberic");
|
||||
_("domain information incorrect domid not numeric"));
|
||||
ret = -1;
|
||||
} else if (uuid != NULL) {
|
||||
char **ptr = (char **) &uuid;
|
||||
|
||||
if (sexpr_uuid(ptr, root, "domain/uuid") == NULL) {
|
||||
virXendError(xend, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incomplete, missing uuid");
|
||||
_("domain information incomplete, missing uuid"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1139,7 +1147,7 @@ xenDaemonDomainLookupByID(virConnectPtr xend,
|
||||
name = sexpr_node(root, "domain/name");
|
||||
if (name == NULL) {
|
||||
virXendError(xend, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incomplete, missing name");
|
||||
_("domain information incomplete, missing name"));
|
||||
goto error;
|
||||
}
|
||||
if (domname)
|
||||
@ -1148,7 +1156,7 @@ xenDaemonDomainLookupByID(virConnectPtr xend,
|
||||
dst_uuid = (char *)&uuid[0];
|
||||
if (sexpr_uuid(&dst_uuid, root, "domain/uuid") == NULL) {
|
||||
virXendError(xend, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incomplete, missing uuid");
|
||||
_("domain information incomplete, missing uuid"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1250,6 +1258,36 @@ xend_get_node(virConnectPtr xend)
|
||||
return node;
|
||||
}
|
||||
|
||||
static int
|
||||
xend_get_config_version(virConnectPtr conn) {
|
||||
struct sexpr *root;
|
||||
const char *value;
|
||||
|
||||
if (!VIR_IS_CONNECT(conn)) {
|
||||
virXendError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
root = sexpr_get(conn, "/xend/node/");
|
||||
if (root == NULL)
|
||||
return (-1);
|
||||
|
||||
value = sexpr_node(root, "node/xend_config_format");
|
||||
|
||||
if (value) {
|
||||
int version = strtol(value, NULL, 10);
|
||||
sexpr_free(root);
|
||||
return version;
|
||||
}
|
||||
|
||||
sexpr_free(root);
|
||||
|
||||
/* Xen prior to 3.0.3 did not have the xend_config_format
|
||||
field, and is implicitly version 1. */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#ifndef PROXY
|
||||
/**
|
||||
* xend_node_shutdown:
|
||||
@ -1367,7 +1405,7 @@ xend_parse_sexp_desc_os(struct sexpr *node, virBufferPtr buf, int hvm)
|
||||
tmp = sexpr_node(node, "domain/image/hvm/kernel");
|
||||
if (tmp == NULL) {
|
||||
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incomplete, missing kernel");
|
||||
_("domain information incomplete, missing kernel"));
|
||||
return(-1);
|
||||
}
|
||||
virBufferVSprintf(buf, " <loader>%s</loader>\n", tmp);
|
||||
@ -1392,7 +1430,7 @@ xend_parse_sexp_desc_os(struct sexpr *node, virBufferPtr buf, int hvm)
|
||||
tmp = sexpr_node(node, "domain/image/linux/kernel");
|
||||
if (tmp == NULL) {
|
||||
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incomplete, missing kernel");
|
||||
_("domain information incomplete, missing kernel"));
|
||||
return(-1);
|
||||
}
|
||||
virBufferVSprintf(buf, " <kernel>%s</kernel>\n", tmp);
|
||||
@ -1413,7 +1451,7 @@ xend_parse_sexp_desc_os(struct sexpr *node, virBufferPtr buf, int hvm)
|
||||
|
||||
/**
|
||||
* xend_parse_sexp_desc:
|
||||
* @domain: the domain associated with the XML
|
||||
* @conn: the connection associated with the XML
|
||||
* @root: the root of the parsed S-Expression
|
||||
*
|
||||
* Parse the xend sexp description and turn it into the XML format similar
|
||||
@ -1423,7 +1461,7 @@ xend_parse_sexp_desc_os(struct sexpr *node, virBufferPtr buf, int hvm)
|
||||
* the caller must free() the returned value.
|
||||
*/
|
||||
static char *
|
||||
xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root)
|
||||
xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersion)
|
||||
{
|
||||
char *ret;
|
||||
struct sexpr *cur, *node;
|
||||
@ -1446,11 +1484,11 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root)
|
||||
|
||||
domid = sexpr_int(root, "domain/domid");
|
||||
virBufferVSprintf(&buf, "<domain type='xen' id='%d'>\n", domid);
|
||||
|
||||
|
||||
tmp = sexpr_node(root, "domain/name");
|
||||
if (tmp == NULL) {
|
||||
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incomplete, missing name");
|
||||
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
_("domain information incomplete, missing name"));
|
||||
goto error;
|
||||
}
|
||||
virBufferVSprintf(&buf, " <name>%s</name>\n", tmp);
|
||||
@ -1460,10 +1498,11 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root)
|
||||
int i, j;
|
||||
for (i = 0, j = 0;(i < 32) && (tmp[j] != 0);j++) {
|
||||
if (((tmp[j] >= '0') && (tmp[j] <= '9')) ||
|
||||
((tmp[j] >= 'a') && (tmp[j] <= 'f')))
|
||||
compact[i++] = tmp[j];
|
||||
else if ((tmp[j] >= 'A') && (tmp[j] <= 'F'))
|
||||
((tmp[j] >= 'a') && (tmp[j] <= 'f'))) {
|
||||
compact[i++] = tmp[j];
|
||||
} else if ((tmp[j] >= 'A') && (tmp[j] <= 'F')) {
|
||||
compact[i++] = tmp[j] + 'a' - 'A';
|
||||
}
|
||||
}
|
||||
compact[i] = 0;
|
||||
if (i > 0)
|
||||
@ -1471,7 +1510,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root)
|
||||
}
|
||||
tmp = sexpr_node(root, "domain/bootloader");
|
||||
if (tmp != NULL)
|
||||
virBufferVSprintf(&buf, " <bootloader>%s</bootloader>\n", tmp);
|
||||
virBufferVSprintf(&buf, " <bootloader>%s</bootloader>\n", tmp);
|
||||
|
||||
if (sexpr_lookup(root, "domain/image")) {
|
||||
hvm = sexpr_lookup(root, "domain/image/hvm") ? 1 : 0;
|
||||
@ -1484,13 +1523,13 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root)
|
||||
sexpr_int(root, "domain/vcpus"));
|
||||
tmp = sexpr_node(root, "domain/on_poweroff");
|
||||
if (tmp != NULL)
|
||||
virBufferVSprintf(&buf, " <on_poweroff>%s</on_poweroff>\n", tmp);
|
||||
virBufferVSprintf(&buf, " <on_poweroff>%s</on_poweroff>\n", tmp);
|
||||
tmp = sexpr_node(root, "domain/on_reboot");
|
||||
if (tmp != NULL)
|
||||
virBufferVSprintf(&buf, " <on_reboot>%s</on_reboot>\n", tmp);
|
||||
virBufferVSprintf(&buf, " <on_reboot>%s</on_reboot>\n", tmp);
|
||||
tmp = sexpr_node(root, "domain/on_crash");
|
||||
if (tmp != NULL)
|
||||
virBufferVSprintf(&buf, " <on_crash>%s</on_crash>\n", tmp);
|
||||
virBufferVSprintf(&buf, " <on_crash>%s</on_crash>\n", tmp);
|
||||
|
||||
if (hvm) {
|
||||
virBufferAdd(&buf, " <features>\n", 13);
|
||||
@ -1502,72 +1541,156 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root)
|
||||
virBufferAdd(&buf, " <pae/>\n", 11);
|
||||
virBufferAdd(&buf, " </features>\n", 14);
|
||||
}
|
||||
|
||||
|
||||
virBufferAdd(&buf, " <devices>\n", 12);
|
||||
|
||||
/* in case of HVM we have devices emulation */
|
||||
tmp = sexpr_node(root, "domain/image/hvm/device_model");
|
||||
if ((tmp != NULL) && (tmp[0] != 0))
|
||||
virBufferVSprintf(&buf, " <emulator>%s</emulator>\n", tmp);
|
||||
virBufferVSprintf(&buf, " <emulator>%s</emulator>\n", tmp);
|
||||
|
||||
for (cur = root; cur->kind == SEXPR_CONS; cur = cur->cdr) {
|
||||
node = cur->car;
|
||||
if (sexpr_lookup(node, "device/vbd")) {
|
||||
tmp = sexpr_node(node, "device/vbd/uname");
|
||||
if (tmp == NULL)
|
||||
continue;
|
||||
if (!memcmp(tmp, "file:", 5)) {
|
||||
tmp += 5;
|
||||
virBufferVSprintf(&buf, " <disk type='file' device='disk'>\n");
|
||||
virBufferVSprintf(&buf, " <source file='%s'/>\n",
|
||||
tmp);
|
||||
tmp = sexpr_node(node, "device/vbd/dev");
|
||||
if (tmp == NULL) {
|
||||
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incomplete, vbd has no dev");
|
||||
goto error;
|
||||
}
|
||||
if (!strncmp(tmp, "ioemu:", 6))
|
||||
tmp += 6;
|
||||
virBufferVSprintf(&buf, " <target dev='%s'/>\n", tmp);
|
||||
tmp = sexpr_node(node, "device/vbd/mode");
|
||||
if ((tmp != NULL) && (!strcmp(tmp, "r")))
|
||||
virBufferVSprintf(&buf, " <readonly/>\n");
|
||||
virBufferAdd(&buf, " </disk>\n", 12);
|
||||
} else if (!memcmp(tmp, "phy:", 4)) {
|
||||
tmp += 4;
|
||||
virBufferVSprintf(&buf, " <disk type='block' device='disk'>\n");
|
||||
virBufferVSprintf(&buf, " <source dev='%s'/>\n", tmp);
|
||||
tmp = sexpr_node(node, "device/vbd/dev");
|
||||
if (tmp == NULL) {
|
||||
virXendError(NULL, VIR_ERR_INTERNAL_ERROR,
|
||||
"domain information incomplete, vbd has no dev");
|
||||
goto error;
|
||||
}
|
||||
if (!strncmp(tmp, "ioemu:", 6))
|
||||
tmp += 6;
|
||||
virBufferVSprintf(&buf, " <target dev='%s'/>\n", tmp);
|
||||
tmp = sexpr_node(node, "device/vbd/mode");
|
||||
if ((tmp != NULL) && (!strcmp(tmp, "r")))
|
||||
virBufferVSprintf(&buf, " <readonly/>\n");
|
||||
virBufferAdd(&buf, " </disk>\n", 12);
|
||||
} else {
|
||||
char serial[1000];
|
||||
/* Normally disks are in a (device (vbd ...)) block
|
||||
but blktap disks ended up in a differently named
|
||||
(device (tap ....)) block.... */
|
||||
if (sexpr_lookup(node, "device/vbd") ||
|
||||
sexpr_lookup(node, "device/tap")) {
|
||||
char *offset;
|
||||
int isBlock = 0;
|
||||
int cdrom = 0;
|
||||
char *drvName = NULL;
|
||||
char *drvType = NULL;
|
||||
const char *src = NULL;
|
||||
const char *dst = NULL;
|
||||
const char *mode = NULL;
|
||||
|
||||
TODO sexpr2string(node, serial, 1000);
|
||||
virBufferVSprintf(&buf, "<!-- Failed to parse %s -->\n",
|
||||
serial);
|
||||
TODO}
|
||||
/* Again dealing with (vbd...) vs (tap ...) differences */
|
||||
if (sexpr_lookup(node, "device/vbd")) {
|
||||
src = sexpr_node(node, "device/vbd/uname");
|
||||
dst = sexpr_node(node, "device/vbd/dev");
|
||||
mode = sexpr_node(node, "device/vbd/mode");
|
||||
} else {
|
||||
src = sexpr_node(node, "device/tap/uname");
|
||||
dst = sexpr_node(node, "device/tap/dev");
|
||||
mode = sexpr_node(node, "device/tap/mode");
|
||||
}
|
||||
|
||||
if (src == NULL) {
|
||||
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
_("domain information incomplete, vbd has no src"));
|
||||
goto bad_parse;
|
||||
}
|
||||
|
||||
if (dst == NULL) {
|
||||
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
_("domain information incomplete, vbd has no dev"));
|
||||
goto bad_parse;
|
||||
}
|
||||
|
||||
|
||||
offset = strchr(src, ':');
|
||||
if (!offset) {
|
||||
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
_("cannot parse vbd filename, missing driver name"));
|
||||
goto bad_parse;
|
||||
}
|
||||
|
||||
drvName = malloc((offset-src)+1);
|
||||
if (!drvName) {
|
||||
virXendError(conn, VIR_ERR_NO_MEMORY,
|
||||
_("allocate new buffer"));
|
||||
goto bad_parse;
|
||||
}
|
||||
strncpy(drvName, src, (offset-src));
|
||||
drvName[offset-src] = '\0';
|
||||
|
||||
src = offset + 1;
|
||||
|
||||
if (!strcmp(drvName, "tap")) {
|
||||
offset = strchr(src, ':');
|
||||
if (!offset) {
|
||||
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
_("cannot parse vbd filename, missing driver type"));
|
||||
goto bad_parse;
|
||||
}
|
||||
|
||||
drvType = malloc((offset-src)+1);
|
||||
if (!drvType) {
|
||||
virXendError(conn, VIR_ERR_NO_MEMORY,
|
||||
_("allocate new buffer"));
|
||||
goto bad_parse;
|
||||
}
|
||||
strncpy(drvType, src, (offset-src));
|
||||
drvType[offset-src] = '\0';
|
||||
src = offset + 1;
|
||||
/* Its possible to use blktap driver for block devs
|
||||
too, but kinda pointless because blkback is better,
|
||||
so we assume common case here. If blktap becomes
|
||||
omnipotent, we can revisit this, perhaps stat()'ing
|
||||
the src file in question */
|
||||
isBlock = 0;
|
||||
} else if (!strcmp(drvName, "phy")) {
|
||||
isBlock = 1;
|
||||
} else if (!strcmp(drvName, "file")) {
|
||||
isBlock = 0;
|
||||
}
|
||||
|
||||
if (!strncmp(dst, "ioemu:", 6))
|
||||
dst += 6;
|
||||
|
||||
/* New style disk config from Xen >= 3.0.3 */
|
||||
if (xendConfigVersion > 1) {
|
||||
offset = rindex(dst, ':');
|
||||
if (offset) {
|
||||
if (!strcmp(offset, ":cdrom")) {
|
||||
cdrom = 1;
|
||||
} else if (!strcmp(offset, ":disk")) {
|
||||
/* The default anyway */
|
||||
} else {
|
||||
/* Unknown, lets pretend its a disk too */
|
||||
}
|
||||
offset[0] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
virBufferVSprintf(&buf, " <disk type='%s' device='%s'>\n",
|
||||
isBlock ? "block" : "file",
|
||||
cdrom ? "cdrom" : "disk");
|
||||
if (drvType) {
|
||||
virBufferVSprintf(&buf, " <driver name='%s' type='%s'/>\n", drvName, drvType);
|
||||
} else {
|
||||
virBufferVSprintf(&buf, " <driver name='%s'/>\n", drvName);
|
||||
}
|
||||
if (isBlock) {
|
||||
virBufferVSprintf(&buf, " <source dev='%s'/>\n", src);
|
||||
} else {
|
||||
virBufferVSprintf(&buf, " <source file='%s'/>\n", src);
|
||||
}
|
||||
virBufferVSprintf(&buf, " <target dev='%s'/>\n", dst);
|
||||
|
||||
|
||||
/* XXX should we force mode == r, if cdrom==1, or assume
|
||||
xend has already done this ? */
|
||||
if ((mode != NULL) && (!strcmp(mode, "r")))
|
||||
virBufferVSprintf(&buf, " <readonly/>\n");
|
||||
virBufferAdd(&buf, " </disk>\n", 12);
|
||||
|
||||
bad_parse:
|
||||
if (drvName)
|
||||
free(drvName);
|
||||
if (drvType)
|
||||
free(drvType);
|
||||
} else if (sexpr_lookup(node, "device/vif")) {
|
||||
const char *tmp2;
|
||||
const char *tmp2;
|
||||
|
||||
tmp = sexpr_node(node, "device/vif/bridge");
|
||||
tmp2 = sexpr_node(node, "device/vif/script");
|
||||
tmp2 = sexpr_node(node, "device/vif/script");
|
||||
if ((tmp != NULL) || (strstr(tmp2, "bridge"))) {
|
||||
virBufferVSprintf(&buf, " <interface type='bridge'>\n");
|
||||
if (tmp != NULL)
|
||||
virBufferVSprintf(&buf, " <source bridge='%s'/>\n",
|
||||
tmp);
|
||||
if (tmp != NULL)
|
||||
virBufferVSprintf(&buf, " <source bridge='%s'/>\n",
|
||||
tmp);
|
||||
tmp = sexpr_node(node, "device/vif/vifname");
|
||||
if (tmp != NULL)
|
||||
virBufferVSprintf(&buf, " <target dev='%s'/>\n",
|
||||
@ -1609,34 +1732,38 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root)
|
||||
virBufferAdd(&buf, " <target dev='fdb'/>\n", 26);
|
||||
virBufferAdd(&buf, " </disk>\n", 12);
|
||||
}
|
||||
/* XXX new (3.0.3) Xend puts cdrom devs in usual (devices) block */
|
||||
tmp = sexpr_node(root, "domain/image/hvm/cdrom");
|
||||
if ((tmp != NULL) && (tmp[0] != 0)) {
|
||||
virBufferAdd(&buf, " <disk type='file' device='cdrom'>\n", 38);
|
||||
virBufferVSprintf(&buf, " <source file='%s'/>\n", tmp);
|
||||
virBufferAdd(&buf, " <target dev='hdc'/>\n", 26);
|
||||
virBufferAdd(&buf, " <readonly/>\n", 18);
|
||||
virBufferAdd(&buf, " </disk>\n", 12);
|
||||
}
|
||||
|
||||
/* Graphics device */
|
||||
tmp = sexpr_node(root, "domain/image/hvm/vnc");
|
||||
if (tmp != NULL) {
|
||||
if (tmp[0] == '1') {
|
||||
int port = xenStoreDomainGetVNCPort(conn, domid);
|
||||
if (port == -1)
|
||||
port = 5900 + domid;
|
||||
virBufferVSprintf(&buf, " <graphics type='vnc' port='%d'/>\n", port);
|
||||
|
||||
/* Old style cdrom config from Xen <= 3.0.2 */
|
||||
if (xendConfigVersion == 1) {
|
||||
tmp = sexpr_node(root, "domain/image/hvm/cdrom");
|
||||
if ((tmp != NULL) && (tmp[0] != 0)) {
|
||||
virBufferAdd(&buf, " <disk type='file' device='cdrom'>\n", 38);
|
||||
virBufferAdd(&buf, " <driver name='file'/>\n", 28);
|
||||
virBufferVSprintf(&buf, " <source file='%s'/>\n", tmp);
|
||||
virBufferAdd(&buf, " <target dev='hdc'/>\n", 26);
|
||||
virBufferAdd(&buf, " <readonly/>\n", 18);
|
||||
virBufferAdd(&buf, " </disk>\n", 12);
|
||||
}
|
||||
}
|
||||
|
||||
tmp = sexpr_node(root, "domain/image/hvm/sdl");
|
||||
if (tmp != NULL) {
|
||||
if (tmp[0] == '1')
|
||||
virBufferAdd(&buf, " <graphics type='sdl'/>\n", 27 );
|
||||
}
|
||||
|
||||
/* Graphics device */
|
||||
tmp = sexpr_fmt_node(root, "domain/image/%s/vnc", hvm ? "hvm" : "linux");
|
||||
if (tmp != NULL) {
|
||||
if (tmp[0] == '1') {
|
||||
int port = xenStoreDomainGetVNCPort(conn, domid);
|
||||
if (port == -1)
|
||||
port = 5900 + domid;
|
||||
virBufferVSprintf(&buf, " <graphics type='vnc' port='%d'/>\n", port);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
tmp = sexpr_fmt_node(root, "domain/image/%s/sdl", hvm ? "hvm" : "linux");
|
||||
if (tmp != NULL) {
|
||||
if (tmp[0] == '1')
|
||||
virBufferAdd(&buf, " <graphics type='sdl'/>\n", 27 );
|
||||
}
|
||||
|
||||
tty = xenStoreDomainGetConsolePath(conn, domid);
|
||||
if (tty) {
|
||||
virBufferVSprintf(&buf, " <console tty='%s'/>\n", tty);
|
||||
@ -1655,6 +1782,20 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
char *
|
||||
xend_parse_domain_sexp(virConnectPtr conn, char *sexpr, int xendConfigVersion) {
|
||||
struct sexpr *root = string2sexpr(sexpr);
|
||||
char *data;
|
||||
|
||||
if (!root)
|
||||
return NULL;
|
||||
|
||||
data = xend_parse_sexp_desc(conn, root, xendConfigVersion);
|
||||
|
||||
sexpr_free(root);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* sexpr_to_xend_domain_info:
|
||||
@ -1767,7 +1908,7 @@ sexpr_to_domain(virConnectPtr conn, struct sexpr *root)
|
||||
|
||||
ret = virGetDomain(conn, name, (const unsigned char *) &uuid[0]);
|
||||
if (ret == NULL) {
|
||||
virXendError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
virXendError(conn, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
return(NULL);
|
||||
}
|
||||
ret->handle = sexpr_int(root, "domain/domid");
|
||||
@ -1778,7 +1919,7 @@ sexpr_to_domain(virConnectPtr conn, struct sexpr *root)
|
||||
|
||||
error:
|
||||
virXendError(conn, VIR_ERR_INTERNAL_ERROR,
|
||||
"failed to parse Xend domain information");
|
||||
_("failed to parse Xend domain information"));
|
||||
if (ret != NULL)
|
||||
virFreeDomain(conn, ret);
|
||||
return(NULL);
|
||||
@ -1857,7 +1998,7 @@ try_http:
|
||||
ret = xenDaemonOpen_unix(conn, uri->path);
|
||||
if (ret < 0)
|
||||
goto failed;
|
||||
|
||||
|
||||
ret = xenDaemonGetVersion(conn, &version);
|
||||
if (ret < 0)
|
||||
goto failed;
|
||||
@ -2153,12 +2294,18 @@ xenDaemonDomainDumpXMLByID(virConnectPtr conn, int domid)
|
||||
{
|
||||
char *ret = NULL;
|
||||
struct sexpr *root;
|
||||
int xendConfigVersion;
|
||||
|
||||
root = sexpr_get(conn, "/xend/domain/%d?detail=1", domid);
|
||||
if (root == NULL)
|
||||
return (NULL);
|
||||
|
||||
ret = xend_parse_sexp_desc(conn, root);
|
||||
if ((xendConfigVersion = xend_get_config_version(conn)) < 0) {
|
||||
virXendError(conn, VIR_ERR_INTERNAL_ERROR, "cannot determine xend config version");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
ret = xend_parse_sexp_desc(conn, root, xendConfigVersion);
|
||||
sexpr_free(root);
|
||||
|
||||
return (ret);
|
||||
@ -2323,8 +2470,11 @@ xenDaemonGetType(virConnectPtr conn)
|
||||
int
|
||||
xenDaemonGetVersion(virConnectPtr conn, unsigned long *hvVer)
|
||||
{
|
||||
static unsigned long version = 0;
|
||||
|
||||
struct sexpr *root;
|
||||
const char *extra;
|
||||
int major, minor, release = 0;
|
||||
unsigned long version;
|
||||
|
||||
if (!VIR_IS_CONNECT(conn)) {
|
||||
virXendError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
|
||||
return (-1);
|
||||
@ -2333,28 +2483,22 @@ xenDaemonGetVersion(virConnectPtr conn, unsigned long *hvVer)
|
||||
virXendError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
if (version == 0) {
|
||||
struct sexpr *root;
|
||||
const char *extra;
|
||||
int major, minor, release = 0;
|
||||
|
||||
root = sexpr_get(conn, "/xend/node/");
|
||||
if (root == NULL)
|
||||
return(-1);
|
||||
root = sexpr_get(conn, "/xend/node/");
|
||||
if (root == NULL)
|
||||
return(-1);
|
||||
|
||||
major = sexpr_int(root, "node/xen_major");
|
||||
minor = sexpr_int(root, "node/xen_minor");
|
||||
extra = sexpr_node(root, "node/xen_extra");
|
||||
if (extra != NULL) {
|
||||
while (*extra != 0) {
|
||||
if ((*extra >= '0') && (*extra <= '9'))
|
||||
release = release * 10 + (*extra - '0');
|
||||
extra++;
|
||||
}
|
||||
major = sexpr_int(root, "node/xen_major");
|
||||
minor = sexpr_int(root, "node/xen_minor");
|
||||
extra = sexpr_node(root, "node/xen_extra");
|
||||
if (extra != NULL) {
|
||||
while (*extra != 0) {
|
||||
if ((*extra >= '0') && (*extra <= '9'))
|
||||
release = release * 10 + (*extra - '0');
|
||||
extra++;
|
||||
}
|
||||
sexpr_free(root);
|
||||
version = major * 1000000 + minor * 1000 + release;
|
||||
}
|
||||
sexpr_free(root);
|
||||
version = major * 1000000 + minor * 1000 + release;
|
||||
*hvVer = version;
|
||||
return(0);
|
||||
}
|
||||
@ -2460,7 +2604,7 @@ xenDaemonLookupByID(virConnectPtr conn, int id) {
|
||||
|
||||
ret = virGetDomain(conn, name, uuid);
|
||||
if (ret == NULL) {
|
||||
virXendError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
virXendError(conn, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
goto error;
|
||||
}
|
||||
ret->handle = id;
|
||||
@ -2556,7 +2700,7 @@ xenDaemonDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
|
||||
*/
|
||||
int
|
||||
xenDaemonDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
|
||||
unsigned char *cpumaps, int maplen)
|
||||
unsigned char *cpumaps, int maplen)
|
||||
{
|
||||
struct sexpr *root, *s, *t;
|
||||
virVcpuInfoPtr ipt = info;
|
||||
@ -2565,14 +2709,14 @@ xenDaemonDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
|
||||
int vcpu, cpu;
|
||||
|
||||
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)
|
||||
|| (info == NULL) || (maxinfo < 1)) {
|
||||
|| (info == NULL) || (maxinfo < 1)) {
|
||||
virXendError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG,
|
||||
__FUNCTION__);
|
||||
__FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
if (cpumaps != NULL && maplen < 1) {
|
||||
virXendError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG,
|
||||
__FUNCTION__);
|
||||
__FUNCTION__);
|
||||
return (-1);
|
||||
}
|
||||
root = sexpr_get(domain->conn, "/xend/domain/%s?op=vcpuinfo", domain->name);
|
||||
@ -2580,46 +2724,49 @@ xenDaemonDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
|
||||
return (-1);
|
||||
|
||||
if (cpumaps != NULL)
|
||||
memset(cpumaps, 0, maxinfo * maplen);
|
||||
memset(cpumaps, 0, maxinfo * maplen);
|
||||
|
||||
/* scan the sexprs from "(vcpu (number x)...)" and get parameter values */
|
||||
for (s = root; s->kind == SEXPR_CONS; s = s->cdr)
|
||||
if ((s->car->kind == SEXPR_CONS) &&
|
||||
(s->car->car->kind == SEXPR_VALUE) &&
|
||||
!strcmp(s->car->car->value, "vcpu")) {
|
||||
t = s->car;
|
||||
vcpu = ipt->number = sexpr_int(t, "vcpu/number");
|
||||
if ((oln = sexpr_int(t, "vcpu/online")) != 0) {
|
||||
if (sexpr_int(t, "vcpu/running")) ipt->state = VIR_VCPU_RUNNING;
|
||||
if (sexpr_int(t, "vcpu/blocked")) ipt->state = VIR_VCPU_BLOCKED;
|
||||
}
|
||||
else ipt->state = VIR_VCPU_OFFLINE;
|
||||
ipt->cpuTime = sexpr_float(t, "vcpu/cpu_time") * 1000000000;
|
||||
ipt->cpu = oln ? sexpr_int(t, "vcpu/cpu") : -1;
|
||||
|
||||
if (cpumaps != NULL && vcpu >= 0 && vcpu < maxinfo) {
|
||||
cpumap = (unsigned char *) VIR_GET_CPUMAP(cpumaps, maplen, vcpu);
|
||||
/*
|
||||
* get sexpr from "(cpumap (x y z...))" and convert values
|
||||
* to bitmap
|
||||
*/
|
||||
for (t = t->cdr; t->kind == SEXPR_CONS; t = t->cdr)
|
||||
if ((t->car->kind == SEXPR_CONS) &&
|
||||
(t->car->car->kind == SEXPR_VALUE) &&
|
||||
!strcmp(t->car->car->value, "cpumap") &&
|
||||
(t->car->cdr->kind == SEXPR_CONS)) {
|
||||
for (t = t->car->cdr->car; t->kind == SEXPR_CONS; t = t->cdr)
|
||||
if (t->car->kind == SEXPR_VALUE) {
|
||||
cpu = strtol(t->car->value, NULL, 0);
|
||||
if (cpu >= 0)
|
||||
VIR_USE_CPU(cpumap, cpu);
|
||||
}
|
||||
break;
|
||||
for (s = root; s->kind == SEXPR_CONS; s = s->cdr) {
|
||||
if ((s->car->kind == SEXPR_CONS) &&
|
||||
(s->car->car->kind == SEXPR_VALUE) &&
|
||||
!strcmp(s->car->car->value, "vcpu")) {
|
||||
t = s->car;
|
||||
vcpu = ipt->number = sexpr_int(t, "vcpu/number");
|
||||
if ((oln = sexpr_int(t, "vcpu/online")) != 0) {
|
||||
if (sexpr_int(t, "vcpu/running")) ipt->state = VIR_VCPU_RUNNING;
|
||||
if (sexpr_int(t, "vcpu/blocked")) ipt->state = VIR_VCPU_BLOCKED;
|
||||
}
|
||||
}
|
||||
else
|
||||
ipt->state = VIR_VCPU_OFFLINE;
|
||||
ipt->cpuTime = sexpr_float(t, "vcpu/cpu_time") * 1000000000;
|
||||
ipt->cpu = oln ? sexpr_int(t, "vcpu/cpu") : -1;
|
||||
|
||||
if (++nbinfo == maxinfo) break;
|
||||
ipt++;
|
||||
if (cpumaps != NULL && vcpu >= 0 && vcpu < maxinfo) {
|
||||
cpumap = (unsigned char *) VIR_GET_CPUMAP(cpumaps, maplen, vcpu);
|
||||
/*
|
||||
* get sexpr from "(cpumap (x y z...))" and convert values
|
||||
* to bitmap
|
||||
*/
|
||||
for (t = t->cdr; t->kind == SEXPR_CONS; t = t->cdr)
|
||||
if ((t->car->kind == SEXPR_CONS) &&
|
||||
(t->car->car->kind == SEXPR_VALUE) &&
|
||||
!strcmp(t->car->car->value, "cpumap") &&
|
||||
(t->car->cdr->kind == SEXPR_CONS)) {
|
||||
for (t = t->car->cdr->car; t->kind == SEXPR_CONS; t = t->cdr)
|
||||
if (t->car->kind == SEXPR_VALUE) {
|
||||
cpu = strtol(t->car->value, NULL, 0);
|
||||
if (cpu >= 0 && (VIR_CPU_MAPLEN(cpu+1) <= maplen)) {
|
||||
VIR_USE_CPU(cpumap, cpu);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (++nbinfo == maxinfo) break;
|
||||
ipt++;
|
||||
}
|
||||
}
|
||||
sexpr_free(root);
|
||||
return(nbinfo);
|
||||
@ -2668,7 +2815,7 @@ xenDaemonLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
|
||||
|
||||
ret = virGetDomain(conn, name, uuid);
|
||||
if (ret == NULL) {
|
||||
virXendError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
virXendError(conn, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
goto error;
|
||||
}
|
||||
ret->handle = id;
|
||||
@ -2702,6 +2849,7 @@ xenDaemonCreateLinux(virConnectPtr conn, const char *xmlDesc,
|
||||
char *sexpr;
|
||||
char *name = NULL;
|
||||
virDomainPtr dom;
|
||||
int xendConfigVersion;
|
||||
|
||||
if (!VIR_IS_CONNECT(conn)) {
|
||||
virXendError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
|
||||
@ -2712,8 +2860,14 @@ xenDaemonCreateLinux(virConnectPtr conn, const char *xmlDesc,
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
sexpr = virDomainParseXMLDesc(xmlDesc, &name);
|
||||
if ((xendConfigVersion = xend_get_config_version(conn)) < 0) {
|
||||
virXendError(conn, VIR_ERR_INTERNAL_ERROR, "cannot determine xend config version");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
sexpr = virDomainParseXMLDesc(xmlDesc, &name, xendConfigVersion);
|
||||
if ((sexpr == NULL) || (name == NULL)) {
|
||||
virXendError(conn, VIR_ERR_XML_ERROR, "Failed to parse the XML domain description");
|
||||
if (sexpr != NULL)
|
||||
free(sexpr);
|
||||
if (name != NULL)
|
||||
@ -2725,13 +2879,13 @@ xenDaemonCreateLinux(virConnectPtr conn, const char *xmlDesc,
|
||||
ret = xenDaemonDomainCreateLinux(conn, sexpr);
|
||||
free(sexpr);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Failed to create domain %s\n", name);
|
||||
fprintf(stderr, _("Failed to create domain %s\n"), name);
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = xend_wait_for_devices(conn, name);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Failed to get devices for domain %s\n", name);
|
||||
fprintf(stderr, _("Failed to get devices for domain %s\n"), name);
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -2742,7 +2896,7 @@ xenDaemonCreateLinux(virConnectPtr conn, const char *xmlDesc,
|
||||
|
||||
ret = xenDaemonDomainResume(dom);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "Failed to resume new domain %s\n", name);
|
||||
fprintf(stderr, _("Failed to resume new domain %s\n"), name);
|
||||
xenDaemonDomainDestroy(dom);
|
||||
goto error;
|
||||
}
|
||||
@ -2758,3 +2912,11 @@ xenDaemonCreateLinux(virConnectPtr conn, const char *xmlDesc,
|
||||
}
|
||||
#endif /* ! PROXY */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* indent-tabs-mode: nil
|
||||
* c-indent-level: 4
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 4
|
||||
* End:
|
||||
*/
|
||||
|
@ -613,6 +613,8 @@ char *xenDaemonDomainDumpXMLByID(virConnectPtr xend,
|
||||
*/
|
||||
int xend_log(virConnectPtr xend, char *buffer, size_t n_buffer);
|
||||
|
||||
char *xend_parse_domain_sexp(virConnectPtr conn, char *root, int xendConfigVersion);
|
||||
|
||||
/* refactored ones */
|
||||
void xenDaemonRegister(void);
|
||||
int xenDaemonOpen(virConnectPtr conn, const char *name, int flags);
|
||||
|
391
src/xml.c
391
src/xml.c
@ -61,7 +61,7 @@ virBufferGrow(virBufferPtr buf, unsigned int len)
|
||||
|
||||
newbuf = (char *) realloc(buf->content, size);
|
||||
if (newbuf == NULL) {
|
||||
virXMLError(VIR_ERR_NO_MEMORY, "growing buffer", size);
|
||||
virXMLError(VIR_ERR_NO_MEMORY, _("growing buffer"), size);
|
||||
return (-1);
|
||||
}
|
||||
buf->content = newbuf;
|
||||
@ -113,11 +113,11 @@ virBufferNew(unsigned int size)
|
||||
virBufferPtr buf;
|
||||
|
||||
if (!(buf = malloc(sizeof(*buf)))) {
|
||||
virXMLError(VIR_ERR_NO_MEMORY, "allocate new buffer", sizeof(*buf));
|
||||
virXMLError(VIR_ERR_NO_MEMORY, _("allocate new buffer"), sizeof(*buf));
|
||||
return NULL;
|
||||
}
|
||||
if (size && (buf->content = malloc(size))==NULL) {
|
||||
virXMLError(VIR_ERR_NO_MEMORY, "allocate buffer content", size);
|
||||
virXMLError(VIR_ERR_NO_MEMORY, _("allocate buffer content"), size);
|
||||
free(buf);
|
||||
return NULL;
|
||||
}
|
||||
@ -570,11 +570,59 @@ virDomainGetXMLDesc(virDomainPtr domain, int flags)
|
||||
#endif /* 0 - UNUSED */
|
||||
|
||||
#ifndef PROXY
|
||||
/**
|
||||
* virtDomainParseXMLGraphicsDesc:
|
||||
* @node: node containing graphics description
|
||||
* @buf: a buffer for the result S-Expr
|
||||
* @xendConfigVersion: xend configuration file format
|
||||
*
|
||||
* Parse the graphics part of the XML description and add it to the S-Expr
|
||||
* in buf. This is a temporary interface as the S-Expr interface will be
|
||||
* replaced by XML-RPC in the future. However the XML format should stay
|
||||
* valid over time.
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of error
|
||||
*/
|
||||
static int virDomainParseXMLGraphicsDesc(xmlNodePtr node, virBufferPtr buf, int xendConfigVersion)
|
||||
{
|
||||
xmlChar *graphics_type = NULL;
|
||||
|
||||
graphics_type = xmlGetProp(node, BAD_CAST "type");
|
||||
if (graphics_type != NULL) {
|
||||
if (xmlStrEqual(graphics_type, BAD_CAST "sdl")) {
|
||||
virBufferAdd(buf, "(sdl 1)", 7);
|
||||
// TODO:
|
||||
// Need to understand sdl options
|
||||
//
|
||||
//virBufferAdd(buf, "(display localhost:10.0)", 24);
|
||||
//virBufferAdd(buf, "(xauthority /root/.Xauthority)", 30);
|
||||
}
|
||||
else if (xmlStrEqual(graphics_type, BAD_CAST "vnc")) {
|
||||
virBufferAdd(buf, "(vnc 1)", 7);
|
||||
if (xendConfigVersion >= 2) {
|
||||
xmlChar *vncport = xmlGetProp(node, BAD_CAST "port");
|
||||
if (vncport != NULL) {
|
||||
long port = strtol((const char *)vncport, NULL, 10);
|
||||
if (port == -1)
|
||||
virBufferAdd(buf, "(vncunused 1)", 13);
|
||||
else if (port > 5900)
|
||||
virBufferVSprintf(buf, "(vncdisplay %d)", port - 5900);
|
||||
xmlFree(vncport);
|
||||
}
|
||||
}
|
||||
}
|
||||
xmlFree(graphics_type);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virDomainParseXMLOSDescHVM:
|
||||
* @node: node containing HVM OS description
|
||||
* @buf: a buffer for the result S-Expr
|
||||
* @ctxt: a path context representing the XML description
|
||||
* @xendConfigVersion: xend configuration file format
|
||||
*
|
||||
* Parse the OS part of the XML description for an HVM domain and add it to
|
||||
* the S-Expr in buf. This is a temporary interface as the S-Expr interface
|
||||
@ -584,14 +632,14 @@ virDomainGetXMLDesc(virDomainPtr domain, int flags)
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
static int
|
||||
virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr ctxt)
|
||||
virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr ctxt, int xendConfigVersion)
|
||||
{
|
||||
xmlXPathObjectPtr obj = NULL;
|
||||
xmlNodePtr cur, txt;
|
||||
const xmlChar *type = NULL;
|
||||
const xmlChar *loader = NULL;
|
||||
const xmlChar *boot_dev = NULL;
|
||||
xmlChar *graphics_type = NULL;
|
||||
xmlChar *type = NULL;
|
||||
xmlChar *loader = NULL;
|
||||
xmlChar *boot_dev = NULL;
|
||||
int res;
|
||||
|
||||
cur = node->children;
|
||||
while (cur != NULL) {
|
||||
@ -656,67 +704,76 @@ virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk[@device='floppy' and target/@dev='fda']/source", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
cur = obj->nodesetval->nodeTab[0];
|
||||
virBufferVSprintf(buf, "(fda '%s')",
|
||||
(const char *) xmlGetProp(cur, BAD_CAST "file"));
|
||||
cur = NULL;
|
||||
cur = obj->nodesetval->nodeTab[0];
|
||||
virBufferVSprintf(buf, "(fda '%s')",
|
||||
(const char *) xmlGetProp(cur, BAD_CAST "file"));
|
||||
cur = NULL;
|
||||
}
|
||||
if (obj) {
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
}
|
||||
|
||||
/* get the 2nd floppy device file */
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk[@device='floppy' and target/@dev='fdb']/source", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
cur = obj->nodesetval->nodeTab[0];
|
||||
virBufferVSprintf(buf, "(fdb '%s')",
|
||||
(const char *) xmlGetProp(cur, BAD_CAST "file"));
|
||||
cur = NULL;
|
||||
xmlChar *fdfile = NULL;
|
||||
cur = obj->nodesetval->nodeTab[0];
|
||||
fdfile = xmlGetProp(cur, BAD_CAST "file");
|
||||
virBufferVSprintf(buf, "(fdb '%s')",
|
||||
(const char *) fdfile);
|
||||
xmlFree(fdfile);
|
||||
cur = NULL;
|
||||
}
|
||||
if (obj) {
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
}
|
||||
|
||||
|
||||
/* get the cdrom device file */
|
||||
/* XXX new (3.0.3) Xend puts cdrom devs in usual (devices) block */
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk[@device='cdrom' and target/@dev='hdc']/source", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
cur = obj->nodesetval->nodeTab[0];
|
||||
virBufferVSprintf(buf, "(cdrom '%s')",
|
||||
(const char *) xmlGetProp(cur, BAD_CAST "file"));
|
||||
cur = NULL;
|
||||
}
|
||||
if (obj) {
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
/* Only XenD <= 3.0.2 wants cdrom config here */
|
||||
if (xendConfigVersion == 1) {
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk[@device='cdrom' and target/@dev='hdc']/source", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
xmlChar *cdfile = NULL;
|
||||
cur = obj->nodesetval->nodeTab[0];
|
||||
cdfile = xmlGetProp(cur, BAD_CAST "file");
|
||||
virBufferVSprintf(buf, "(cdrom '%s')",
|
||||
(const char *)cdfile);
|
||||
xmlFree(cdfile);
|
||||
cur = NULL;
|
||||
}
|
||||
if (obj) {
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/features/acpi", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
virBufferAdd(buf, "(acpi 1)", 8);
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
}
|
||||
if (obj)
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/features/apic", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
virBufferAdd(buf, "(apic 1)", 8);
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
}
|
||||
if (obj)
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/features/pae", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
|
||||
virBufferAdd(buf, "(pae 1)", 7);
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
}
|
||||
if (obj)
|
||||
xmlXPathFreeObject(obj);
|
||||
obj = NULL;
|
||||
}
|
||||
|
||||
obj = xmlXPathEval(BAD_CAST "count(domain/devices/console) > 0", ctxt);
|
||||
@ -733,31 +790,23 @@ virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr
|
||||
/* Is a graphics device specified? */
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/graphics[1]", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr = 0)) {
|
||||
virXMLError(VIR_ERR_NO_OS, "", 0); /* TODO: error */
|
||||
goto error;
|
||||
}
|
||||
|
||||
graphics_type = xmlGetProp(obj->nodesetval->nodeTab[0], BAD_CAST "type");
|
||||
if (graphics_type != NULL) {
|
||||
if (xmlStrEqual(graphics_type, BAD_CAST "sdl")) {
|
||||
virBufferAdd(buf, "(sdl 1)", 7);
|
||||
// TODO:
|
||||
// Need to understand sdl options
|
||||
//
|
||||
//virBufferAdd(buf, "(display localhost:10.0)", 24);
|
||||
//virBufferAdd(buf, "(xauthority /root/.Xauthority)", 30);
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr > 0)) {
|
||||
res = virDomainParseXMLGraphicsDesc(obj->nodesetval->nodeTab[0], buf, xendConfigVersion);
|
||||
if (res != 0) {
|
||||
goto error;
|
||||
}
|
||||
else if (xmlStrEqual(graphics_type, BAD_CAST "vnc"))
|
||||
virBufferAdd(buf, "(vnc 1)", 7);
|
||||
xmlFree(graphics_type);
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
|
||||
virBufferAdd(buf, "))", 2);
|
||||
|
||||
if (boot_dev)
|
||||
xmlFree(boot_dev);
|
||||
|
||||
return (0);
|
||||
error:
|
||||
if (boot_dev)
|
||||
xmlFree(boot_dev);
|
||||
if (obj != NULL)
|
||||
xmlXPathFreeObject(obj);
|
||||
return(-1);
|
||||
@ -767,6 +816,8 @@ error:
|
||||
* virDomainParseXMLOSDescPV:
|
||||
* @node: node containing PV OS description
|
||||
* @buf: a buffer for the result S-Expr
|
||||
* @ctxt: a path context representing the XML description
|
||||
* @xendConfigVersion: xend configuration file format
|
||||
*
|
||||
* Parse the OS part of the XML description for a paravirtualized domain
|
||||
* and add it to the S-Expr in buf. This is a temporary interface as the
|
||||
@ -776,14 +827,16 @@ error:
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
static int
|
||||
virDomainParseXMLOSDescPV(xmlNodePtr node, virBufferPtr buf)
|
||||
virDomainParseXMLOSDescPV(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr ctxt, int xendConfigVersion)
|
||||
{
|
||||
xmlNodePtr cur, txt;
|
||||
xmlXPathObjectPtr obj = NULL;
|
||||
const xmlChar *type = NULL;
|
||||
const xmlChar *root = NULL;
|
||||
const xmlChar *kernel = NULL;
|
||||
const xmlChar *initrd = NULL;
|
||||
const xmlChar *cmdline = NULL;
|
||||
int res;
|
||||
|
||||
cur = node->children;
|
||||
while (cur != NULL) {
|
||||
@ -840,6 +893,19 @@ virDomainParseXMLOSDescPV(xmlNodePtr node, virBufferPtr buf)
|
||||
virBufferVSprintf(buf, "(root '%s')", (const char *) root);
|
||||
if (cmdline != NULL)
|
||||
virBufferVSprintf(buf, "(args '%s')", (const char *) cmdline);
|
||||
|
||||
/* Is a graphics device specified? */
|
||||
obj = xmlXPathEval(BAD_CAST "/domain/devices/graphics[1]", ctxt);
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr > 0)) {
|
||||
res = virDomainParseXMLGraphicsDesc(obj->nodesetval->nodeTab[0], buf, xendConfigVersion);
|
||||
if (res != 0) {
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
xmlXPathFreeObject(obj);
|
||||
|
||||
error:
|
||||
virBufferAdd(buf, "))", 2);
|
||||
return (0);
|
||||
}
|
||||
@ -848,6 +914,7 @@ virDomainParseXMLOSDescPV(xmlNodePtr node, virBufferPtr buf)
|
||||
* virDomainParseXMLDiskDesc:
|
||||
* @node: node containing disk description
|
||||
* @buf: a buffer for the result S-Expr
|
||||
* @xendConfigVersion: xend configuration file format
|
||||
*
|
||||
* Parse the one disk in the XML description and add it to the S-Expr in buf
|
||||
* This is a temporary interface as the S-Expr interface
|
||||
@ -857,15 +924,18 @@ virDomainParseXMLOSDescPV(xmlNodePtr node, virBufferPtr buf)
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
static int
|
||||
virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
|
||||
virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm, int xendConfigVersion)
|
||||
{
|
||||
xmlNodePtr cur;
|
||||
xmlChar *type = NULL;
|
||||
xmlChar *device = NULL;
|
||||
xmlChar *source = NULL;
|
||||
xmlChar *target = NULL;
|
||||
xmlChar *drvName = NULL;
|
||||
xmlChar *drvType = NULL;
|
||||
int ro = 0;
|
||||
int typ = 0;
|
||||
int cdrom = 0;
|
||||
|
||||
type = xmlGetProp(node, BAD_CAST "type");
|
||||
if (type != NULL) {
|
||||
@ -876,7 +946,7 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
|
||||
xmlFree(type);
|
||||
}
|
||||
device = xmlGetProp(node, BAD_CAST "device");
|
||||
|
||||
|
||||
cur = node->children;
|
||||
while (cur != NULL) {
|
||||
if (cur->type == XML_ELEMENT_NODE) {
|
||||
@ -890,6 +960,11 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
|
||||
} else if ((target == NULL) &&
|
||||
(xmlStrEqual(cur->name, BAD_CAST "target"))) {
|
||||
target = xmlGetProp(cur, BAD_CAST "dev");
|
||||
} else if ((drvName == NULL) &&
|
||||
(xmlStrEqual(cur->name, BAD_CAST "driver"))) {
|
||||
drvName = xmlGetProp(cur, BAD_CAST "name");
|
||||
if (drvName && !strcmp((const char *)drvName, "tap"))
|
||||
drvType = xmlGetProp(cur, BAD_CAST "type");
|
||||
} else if (xmlStrEqual(cur->name, BAD_CAST "readonly")) {
|
||||
ro = 1;
|
||||
}
|
||||
@ -902,45 +977,83 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
|
||||
|
||||
if (target != NULL)
|
||||
xmlFree(target);
|
||||
if (device != NULL)
|
||||
xmlFree(device);
|
||||
return (-1);
|
||||
}
|
||||
if (target == NULL) {
|
||||
virXMLError(VIR_ERR_NO_TARGET, (const char *) source, 0);
|
||||
if (source != NULL)
|
||||
xmlFree(source);
|
||||
if (device != NULL)
|
||||
xmlFree(device);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/* Skip floppy/cdrom disk used as the boot device
|
||||
* since that's incorporated into the HVM kernel
|
||||
* (image (hvm..)) part of the sexpr, rather than
|
||||
* the (devices...) bit. Odd Xend HVM config :-(
|
||||
* XXX This will have to change in Xen 3.0.3
|
||||
/* Xend (all versions) put the floppy device config
|
||||
* under the hvm (image (os)) block
|
||||
*/
|
||||
if (hvm && device &&
|
||||
(!strcmp((const char *)device, "floppy") ||
|
||||
!strcmp((const char *)device, "cdrom"))) {
|
||||
return 0;
|
||||
if (hvm &&
|
||||
device &&
|
||||
!strcmp((const char *)device, "floppy")) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Xend <= 3.0.2 doesn't include cdrom config here */
|
||||
if (hvm &&
|
||||
device &&
|
||||
!strcmp((const char *)device, "cdrom")) {
|
||||
if (xendConfigVersion == 1)
|
||||
goto cleanup;
|
||||
else
|
||||
cdrom = 1;
|
||||
}
|
||||
|
||||
|
||||
virBufferAdd(buf, "(device ", 8);
|
||||
virBufferAdd(buf, "(vbd ", 5);
|
||||
/* XXX ioemu prefix is going away in Xen 3.0.3 */
|
||||
/* Normally disks are in a (device (vbd ...)) block
|
||||
but blktap disks ended up in a differently named
|
||||
(device (tap ....)) block.... */
|
||||
if (drvName && !strcmp((const char *)drvName, "tap")) {
|
||||
virBufferAdd(buf, "(tap ", 5);
|
||||
} else {
|
||||
virBufferAdd(buf, "(vbd ", 5);
|
||||
}
|
||||
|
||||
if (hvm) {
|
||||
char *tmp = (char *)target;
|
||||
/* Just in case user mistakenly still puts ioemu: in their XML */
|
||||
if (!strncmp((const char *) tmp, "ioemu:", 6))
|
||||
tmp += 6;
|
||||
virBufferVSprintf(buf, "(dev 'ioemu:%s')", (const char *) tmp);
|
||||
|
||||
/* Xend <= 3.0.2 wants a ioemu: prefix on devices for HVM */
|
||||
if (xendConfigVersion == 1)
|
||||
virBufferVSprintf(buf, "(dev 'ioemu:%s')", (const char *)tmp);
|
||||
else /* But newer does not */
|
||||
virBufferVSprintf(buf, "(dev '%s%s')", (const char *)tmp, cdrom ? ":cdrom" : ":disk");
|
||||
} else
|
||||
virBufferVSprintf(buf, "(dev '%s')", (const char *) target);
|
||||
if (typ == 0)
|
||||
virBufferVSprintf(buf, "(uname 'file:%s')", source);
|
||||
else if (typ == 1) {
|
||||
if (source[0] == '/')
|
||||
virBufferVSprintf(buf, "(uname 'phy:%s')", source);
|
||||
else
|
||||
virBufferVSprintf(buf, "(uname 'phy:/dev/%s')", source);
|
||||
virBufferVSprintf(buf, "(dev '%s')", (const char *)target);
|
||||
|
||||
if (drvName) {
|
||||
if (!strcmp((const char *)drvName, "tap")) {
|
||||
virBufferVSprintf(buf, "(uname '%s:%s:%s')",
|
||||
(const char *)drvName,
|
||||
(drvType ? (const char *)drvType : "aio"),
|
||||
(const char *)source);
|
||||
} else {
|
||||
virBufferVSprintf(buf, "(uname '%s:%s')",
|
||||
(const char *)drvName,
|
||||
(const char *)source);
|
||||
}
|
||||
} else {
|
||||
if (typ == 0)
|
||||
virBufferVSprintf(buf, "(uname 'file:%s')", source);
|
||||
else if (typ == 1) {
|
||||
if (source[0] == '/')
|
||||
virBufferVSprintf(buf, "(uname 'phy:%s')", source);
|
||||
else
|
||||
virBufferVSprintf(buf, "(uname 'phy:/dev/%s')", source);
|
||||
}
|
||||
}
|
||||
if (ro == 0)
|
||||
virBufferVSprintf(buf, "(mode 'w')");
|
||||
@ -949,6 +1062,11 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
|
||||
|
||||
virBufferAdd(buf, ")", 1);
|
||||
virBufferAdd(buf, ")", 1);
|
||||
|
||||
cleanup:
|
||||
xmlFree(drvType);
|
||||
xmlFree(drvName);
|
||||
xmlFree(device);
|
||||
xmlFree(target);
|
||||
xmlFree(source);
|
||||
return (0);
|
||||
@ -967,7 +1085,7 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
|
||||
* Returns 0 in case of success, -1 in case of error.
|
||||
*/
|
||||
static int
|
||||
virDomainParseXMLIfDesc(xmlNodePtr node, virBufferPtr buf)
|
||||
virDomainParseXMLIfDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
|
||||
{
|
||||
xmlNodePtr cur;
|
||||
xmlChar *type = NULL;
|
||||
@ -1016,7 +1134,8 @@ virDomainParseXMLIfDesc(xmlNodePtr node, virBufferPtr buf)
|
||||
}
|
||||
if (script != NULL)
|
||||
virBufferVSprintf(buf, "(script '%s')", script);
|
||||
virBufferAdd(buf, "(type ioemu)", 12);
|
||||
if (hvm)
|
||||
virBufferAdd(buf, "(type ioemu)", 12);
|
||||
|
||||
virBufferAdd(buf, ")", 1);
|
||||
if (mac != NULL)
|
||||
@ -1031,6 +1150,7 @@ virDomainParseXMLIfDesc(xmlNodePtr node, virBufferPtr buf)
|
||||
/**
|
||||
* virDomainParseXMLDesc:
|
||||
* @xmldesc: string with the XML description
|
||||
* @xendConfigVersion: xend configuration file format
|
||||
*
|
||||
* Parse the XML description and turn it into the xend sexp needed to
|
||||
* create the comain. This is a temporary interface as the S-Expr interface
|
||||
@ -1041,7 +1161,7 @@ virDomainParseXMLIfDesc(xmlNodePtr node, virBufferPtr buf)
|
||||
* the caller must free() the returned value.
|
||||
*/
|
||||
char *
|
||||
virDomainParseXMLDesc(const char *xmldesc, char **name)
|
||||
virDomainParseXMLDesc(const char *xmldesc, char **name, int xendConfigVersion)
|
||||
{
|
||||
xmlDocPtr xml = NULL;
|
||||
xmlNodePtr node;
|
||||
@ -1176,10 +1296,10 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
|
||||
}
|
||||
|
||||
if ((tmpobj == NULL) || !xmlStrEqual(tmpobj->stringval, BAD_CAST "hvm")) {
|
||||
res = virDomainParseXMLOSDescPV(obj->nodesetval->nodeTab[0], &buf);
|
||||
res = virDomainParseXMLOSDescPV(obj->nodesetval->nodeTab[0], &buf, ctxt, xendConfigVersion);
|
||||
} else {
|
||||
hvm = 1;
|
||||
res = virDomainParseXMLOSDescHVM(obj->nodesetval->nodeTab[0], &buf, ctxt);
|
||||
res = virDomainParseXMLOSDescHVM(obj->nodesetval->nodeTab[0], &buf, ctxt, xendConfigVersion);
|
||||
}
|
||||
|
||||
xmlXPathFreeObject(tmpobj);
|
||||
@ -1197,7 +1317,7 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
|
||||
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
|
||||
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
|
||||
res = virDomainParseXMLDiskDesc(obj->nodesetval->nodeTab[i], &buf, hvm);
|
||||
res = virDomainParseXMLDiskDesc(obj->nodesetval->nodeTab[i], &buf, hvm, xendConfigVersion);
|
||||
if (res != 0) {
|
||||
goto error;
|
||||
}
|
||||
@ -1210,8 +1330,7 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
|
||||
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
|
||||
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
|
||||
virBufferAdd(&buf, "(device ", 8);
|
||||
res =
|
||||
virDomainParseXMLIfDesc(obj->nodesetval->nodeTab[i], &buf);
|
||||
res = virDomainParseXMLIfDesc(obj->nodesetval->nodeTab[i], &buf, hvm);
|
||||
if (res != 0) {
|
||||
goto error;
|
||||
}
|
||||
@ -1229,6 +1348,8 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
|
||||
|
||||
if (name != NULL)
|
||||
*name = nam;
|
||||
else
|
||||
free(nam);
|
||||
|
||||
return (ret);
|
||||
|
||||
@ -1254,59 +1375,65 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
|
||||
|
||||
unsigned char *virParseUUID(char **ptr, const char *uuid) {
|
||||
int rawuuid[16];
|
||||
const char *cur;
|
||||
unsigned char *dst_uuid = NULL;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
memset(rawuuid, 0xFF, sizeof(rawuuid));
|
||||
|
||||
if (uuid == NULL)
|
||||
goto error;
|
||||
|
||||
ret = sscanf(uuid,
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x"
|
||||
"%02x%02x%02x%02x",
|
||||
rawuuid + 0, rawuuid + 1, rawuuid + 2, rawuuid + 3,
|
||||
rawuuid + 4, rawuuid + 5, rawuuid + 6, rawuuid + 7,
|
||||
rawuuid + 8, rawuuid + 9, rawuuid + 10, rawuuid + 11,
|
||||
rawuuid + 12, rawuuid + 13, rawuuid + 14, rawuuid + 15);
|
||||
if (ret == 16)
|
||||
goto done;
|
||||
/*
|
||||
* do a liberal scan allowing '-' and ' ' anywhere between character
|
||||
* pairs as long as there is 32 of them in the end.
|
||||
*/
|
||||
cur = uuid;
|
||||
for (i = 0;i < 16;) {
|
||||
rawuuid[i] = 0;
|
||||
if (*cur == 0)
|
||||
goto error;
|
||||
if ((*cur == '-') || (*cur == ' ')) {
|
||||
cur++;
|
||||
continue;
|
||||
}
|
||||
if ((*cur >= '0') && (*cur <= '9'))
|
||||
rawuuid[i] = *cur - '0';
|
||||
else if ((*cur >= 'a') && (*cur <= 'f'))
|
||||
rawuuid[i] = *cur - 'a' + 10;
|
||||
else if ((*cur >= 'A') && (*cur <= 'F'))
|
||||
rawuuid[i] = *cur - 'A' + 10;
|
||||
else
|
||||
goto error;
|
||||
rawuuid[i] *= 16;
|
||||
cur++;
|
||||
if (*cur == 0)
|
||||
goto error;
|
||||
if ((*cur >= '0') && (*cur <= '9'))
|
||||
rawuuid[i] += *cur - '0';
|
||||
else if ((*cur >= 'a') && (*cur <= 'f'))
|
||||
rawuuid[i] += *cur - 'a' + 10;
|
||||
else if ((*cur >= 'A') && (*cur <= 'F'))
|
||||
rawuuid[i] += *cur - 'A' + 10;
|
||||
else
|
||||
goto error;
|
||||
i++;
|
||||
cur++;
|
||||
}
|
||||
|
||||
ret = sscanf(uuid,
|
||||
"%02x%02x%02x%02x-"
|
||||
"%02x%02x-"
|
||||
"%02x%02x-"
|
||||
"%02x%02x-"
|
||||
"%02x%02x%02x%02x%02x%02x",
|
||||
rawuuid + 0, rawuuid + 1, rawuuid + 2, rawuuid + 3,
|
||||
rawuuid + 4, rawuuid + 5, rawuuid + 6, rawuuid + 7,
|
||||
rawuuid + 8, rawuuid + 9, rawuuid + 10, rawuuid + 11,
|
||||
rawuuid + 12, rawuuid + 13, rawuuid + 14, rawuuid + 15);
|
||||
if (ret == 16)
|
||||
goto done;
|
||||
|
||||
ret = sscanf(uuid,
|
||||
"%02x%02x%02x%02x-"
|
||||
"%02x%02x%02x%02x-"
|
||||
"%02x%02x%02x%02x-"
|
||||
"%02x%02x%02x%02x",
|
||||
rawuuid + 0, rawuuid + 1, rawuuid + 2, rawuuid + 3,
|
||||
rawuuid + 4, rawuuid + 5, rawuuid + 6, rawuuid + 7,
|
||||
rawuuid + 8, rawuuid + 9, rawuuid + 10, rawuuid + 11,
|
||||
rawuuid + 12, rawuuid + 13, rawuuid + 14, rawuuid + 15);
|
||||
if (ret != 16)
|
||||
goto error;
|
||||
|
||||
done:
|
||||
dst_uuid = (unsigned char *) *ptr;
|
||||
*ptr += 16;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
dst_uuid[i] = rawuuid[i] & 0xFF;
|
||||
|
||||
error:
|
||||
return dst_uuid;
|
||||
error:
|
||||
return(dst_uuid);
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* indent-tabs-mode: nil
|
||||
* c-indent-level: 4
|
||||
* c-basic-offset: 4
|
||||
* tab-width: 4
|
||||
* End:
|
||||
*/
|
||||
|
@ -29,7 +29,7 @@ void virBufferFree(virBufferPtr buf);
|
||||
int virBufferAdd(virBufferPtr buf, const char *str, int len);
|
||||
int virBufferVSprintf(virBufferPtr buf, const char *format, ...);
|
||||
int virBufferStrcat(virBufferPtr buf, ...);
|
||||
char *virDomainParseXMLDesc(const char *xmldesc, char **name);
|
||||
char *virDomainParseXMLDesc(const char *xmldesc, char **name, int xendConfigVersion);
|
||||
unsigned char *virParseUUID(char **ptr, const char *uuid);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
32
src/xmlrpc.c
32
src/xmlrpc.c
@ -60,8 +60,8 @@ static char *xmlGetText(xmlNodePtr node)
|
||||
if (node->type == XML_TEXT_NODE) {
|
||||
char *x = strdup((const char *)node->content);
|
||||
if (!x)
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, "copying node content",
|
||||
strlen((const char *)node->content));
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, _("copying node content"),
|
||||
strlen((const char *)node->content));
|
||||
return x;
|
||||
}
|
||||
return NULL;
|
||||
@ -154,14 +154,14 @@ static xmlRpcValuePtr xmlRpcValueUnmarshalArray(xmlNodePtr node)
|
||||
|
||||
if (!ret)
|
||||
return NULL;
|
||||
|
||||
|
||||
for (cur = xmlFirstElement(node); cur; cur = xmlNextElement(cur))
|
||||
n_elements += 1;
|
||||
|
||||
ret->value.array.elements = malloc(n_elements * sizeof(xmlRpcValue));
|
||||
if (!ret->value.array.elements) {
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, "allocate value array",
|
||||
n_elements * sizeof(xmlRpcValue));
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, _("allocate value array"),
|
||||
n_elements * sizeof(xmlRpcValue));
|
||||
free(ret);
|
||||
return NULL;
|
||||
}
|
||||
@ -193,7 +193,7 @@ static xmlRpcValueDictElementPtr xmlRpcValueUnmarshalDictElement(xmlNodePtr node
|
||||
} else if (xmlStrEqual(cur->name, BAD_CAST "value")) {
|
||||
ret->value = xmlRpcValueUnmarshal(cur);
|
||||
} else {
|
||||
xmlRpcError(VIR_ERR_XML_ERROR, "unexpected dict node", 0);
|
||||
xmlRpcError(VIR_ERR_XML_ERROR, _("unexpected dict node"), 0);
|
||||
if (ret->name)
|
||||
free(ret->name);
|
||||
if (ret->value)
|
||||
@ -265,7 +265,7 @@ xmlRpcValuePtr xmlRpcValueUnmarshal(xmlNodePtr node)
|
||||
} else if (xmlStrEqual(node->name, BAD_CAST "nil")) {
|
||||
ret = xmlRpcValueNew(XML_RPC_NIL);
|
||||
} else {
|
||||
xmlRpcError(VIR_ERR_XML_ERROR, "unexpected value node", 0);
|
||||
xmlRpcError(VIR_ERR_XML_ERROR, _("unexpected value node"), 0);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@ -426,22 +426,22 @@ static char *xmlRpcCallRaw(const char *url, const char *request)
|
||||
&contentType,
|
||||
NULL,
|
||||
strlen(request));
|
||||
|
||||
|
||||
if (cxt == NULL) {
|
||||
xmlRpcError(VIR_ERR_POST_FAILED, "send request", 0);
|
||||
xmlRpcError(VIR_ERR_POST_FAILED, _("send request"), 0);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (contentType && strcmp(contentType, "text/xml") != 0) {
|
||||
errno = EINVAL;
|
||||
xmlRpcError(VIR_ERR_POST_FAILED, "unexpected mime type", 0);
|
||||
xmlRpcError(VIR_ERR_POST_FAILED, _("unexpected mime type"), 0);
|
||||
goto error;
|
||||
}
|
||||
|
||||
len = xmlNanoHTTPContentLength(cxt);
|
||||
response = malloc(len + 1);
|
||||
if (response == NULL) {
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, "allocate response", len);
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, _("allocate response"), len);
|
||||
goto error;
|
||||
}
|
||||
ret = xmlNanoHTTPRead(cxt, response, len);
|
||||
@ -449,7 +449,7 @@ static char *xmlRpcCallRaw(const char *url, const char *request)
|
||||
errno = EINVAL;
|
||||
free(response);
|
||||
response = NULL;
|
||||
xmlRpcError(VIR_ERR_POST_FAILED, "read response", 0);
|
||||
xmlRpcError(VIR_ERR_POST_FAILED, _("read response"), 0);
|
||||
}
|
||||
|
||||
response[len] = 0;
|
||||
@ -481,7 +481,7 @@ static char **xmlRpcStringArray(xmlRpcValuePtr value)
|
||||
size += strlen(value->value.array.elements[i]->value.string) + 1;
|
||||
|
||||
if (!(ptr = malloc(size))) {
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, "allocate string array", size);
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, _("allocate string array"), size);
|
||||
return NULL;
|
||||
}
|
||||
ret = (char **)ptr;
|
||||
@ -511,7 +511,7 @@ xmlRpcArgvNew(const char *fmt, va_list ap, int *argc)
|
||||
|
||||
*argc = strlen(fmt);
|
||||
if (!(argv = malloc(sizeof(*argv) * *argc))) {
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, "read response", sizeof(*argv) * *argc);
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, _("read response"), sizeof(*argv) * *argc);
|
||||
return NULL;
|
||||
}
|
||||
i = 0;
|
||||
@ -603,7 +603,7 @@ int xmlRpcCall(xmlRpcContextPtr context, const char *method,
|
||||
|
||||
if (xml == NULL) {
|
||||
errno = EINVAL;
|
||||
xmlRpcError(VIR_ERR_XML_ERROR, "parse server response failed", 0);
|
||||
xmlRpcError(VIR_ERR_XML_ERROR, _("parse server response failed"), 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -667,7 +667,7 @@ xmlRpcContextPtr xmlRpcContextNew(const char *uri)
|
||||
ret->uri = strdup(uri);
|
||||
ret->faultMessage = NULL;
|
||||
} else
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, "allocate new context", sizeof(*ret));
|
||||
xmlRpcError(VIR_ERR_NO_MEMORY, _("allocate new context"), sizeof(*ret));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -70,6 +70,11 @@ static virDriver xenStoreDriver = {
|
||||
NULL, /* domainPinVcpu */
|
||||
NULL, /* domainGetVcpus */
|
||||
NULL, /* domainDumpXML */
|
||||
NULL, /* listDefinedDomains */
|
||||
NULL, /* numOfDefinedDomains */
|
||||
NULL, /* domainCreate */
|
||||
NULL, /* domainDefineXML */
|
||||
NULL, /* domainUndefine */
|
||||
};
|
||||
|
||||
/**
|
||||
@ -148,7 +153,7 @@ virDomainDoStoreQuery(virConnectPtr conn, int domid, const char *path)
|
||||
char s[256];
|
||||
unsigned int len = 0;
|
||||
|
||||
if (conn->xshandle == NULL)
|
||||
if (!conn || conn->xshandle == NULL)
|
||||
return (NULL);
|
||||
|
||||
snprintf(s, 255, "/local/domain/%d/%s", domid, path);
|
||||
@ -251,6 +256,7 @@ virDomainGetVMInfo(virDomainPtr domain, const char *vm, const char *name)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* virConnectCheckStoreID:
|
||||
* @conn: pointer to the hypervisor connection
|
||||
@ -273,6 +279,7 @@ virConnectCheckStoreID(virConnectPtr conn, int id)
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
#endif /* ! PROXY */
|
||||
|
||||
/************************************************************************
|
||||
@ -308,7 +315,7 @@ xenStoreOpen(virConnectPtr conn, const char *name, int flags)
|
||||
if (conn->xshandle == NULL) {
|
||||
if (!(flags & VIR_DRV_OPEN_QUIET))
|
||||
virXenStoreError(conn, VIR_ERR_NO_XEN,
|
||||
"failed to connect to Xen Store");
|
||||
_("failed to connect to Xen Store"));
|
||||
return (-1);
|
||||
}
|
||||
return (0);
|
||||
@ -516,8 +523,10 @@ xenStoreListDomains(virConnectPtr conn, int *ids, int maxids)
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
if (virConnectCheckStoreID(conn, (int) id) < 0)
|
||||
continue;
|
||||
#endif
|
||||
ids[ret++] = (int) id;
|
||||
}
|
||||
return(ret);
|
||||
@ -559,8 +568,10 @@ xenStoreDomainLookupByName(virConnectPtr conn, const char *name)
|
||||
if ((endptr == idlist[i]) || (*endptr != 0)) {
|
||||
goto done;
|
||||
}
|
||||
#if 0
|
||||
if (virConnectCheckStoreID(conn, (int) id) < 0)
|
||||
continue;
|
||||
#endif
|
||||
snprintf(prop, 199, "/local/domain/%s/name", idlist[i]);
|
||||
prop[199] = 0;
|
||||
tmp = xs_read(conn->xshandle, 0, prop, &len);
|
||||
@ -578,7 +589,7 @@ xenStoreDomainLookupByName(virConnectPtr conn, const char *name)
|
||||
|
||||
ret = virGetDomain(conn, name, NULL);
|
||||
if (ret == NULL) {
|
||||
virXenStoreError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
|
||||
virXenStoreError(conn, VIR_ERR_NO_MEMORY, _("allocating domain"));
|
||||
if (path != NULL)
|
||||
free(path);
|
||||
goto done;
|
||||
|
@ -3,3 +3,7 @@ Makefile.in
|
||||
.deps
|
||||
.libs
|
||||
xmlrpctest
|
||||
sexpr2xmltest
|
||||
xml2sexprtest
|
||||
virshtest
|
||||
conftest
|
||||
|
@ -1,5 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = virshdata confdata sexpr2xmldata xml2sexprdata
|
||||
|
||||
LIBVIRT = $(top_builddir)/src/.libs/libvirt.a
|
||||
|
||||
INCLUDES = \
|
||||
@ -7,16 +9,23 @@ INCLUDES = \
|
||||
-I$(top_builddir)/src \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src \
|
||||
@LIBXML_CFLAGS@
|
||||
|
||||
@LIBXML_CFLAGS@ \
|
||||
-D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199506L \
|
||||
-DGETTEXT_PACKAGE=\"$(PACKAGE)\"
|
||||
LDADDS = \
|
||||
@STATIC_BINARIES@ \
|
||||
@LIBXML_LIBS@ \
|
||||
$(LIBVIRT)
|
||||
|
||||
EXTRA_DIST = xmlrpcserver.py
|
||||
EXTRA_DIST = xmlrpcserver.py test_conf.sh
|
||||
|
||||
noinst_PROGRAMS = xmlrpctest
|
||||
noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
|
||||
reconnect
|
||||
|
||||
TESTS = xml2sexprtest sexpr2xmltest virshtest test_conf.sh reconnect
|
||||
|
||||
valgrind:
|
||||
$(MAKE) check TESTS_ENVIRONMENT="valgrind --quiet --leak-check=full"
|
||||
|
||||
# Note: xmlrpc.[c|h] is not in libvirt yet
|
||||
xmlrpctest_SOURCES = \
|
||||
@ -28,5 +37,33 @@ xmlrpctest_SOURCES = \
|
||||
xmlrpctest_LDFLAGS =
|
||||
xmlrpctest_LDADD = $(LDADDS)
|
||||
|
||||
xml2sexprtest_SOURCES = \
|
||||
xml2sexprtest.c \
|
||||
testutils.c testutils.h
|
||||
xml2sexprtest_LDFLAGS =
|
||||
xml2sexprtest_LDADD = $(LDADDS)
|
||||
|
||||
sexpr2xmltest_SOURCES = \
|
||||
sexpr2xmltest.c \
|
||||
testutils.c testutils.h
|
||||
sexpr2xmltest_LDFLAGS =
|
||||
sexpr2xmltest_LDADD = $(LDADDS)
|
||||
|
||||
virshtest_SOURCES = \
|
||||
virshtest.c \
|
||||
testutils.c testutils.h
|
||||
virshtest_LDFLAGS =
|
||||
virshtest_LDADD = $(LDADDS)
|
||||
|
||||
conftest_SOURCES = \
|
||||
conftest.c
|
||||
conftest_LDFLAGS =
|
||||
conftest_LDADD = $(LDADDS)
|
||||
|
||||
reconnect_SOURCES = \
|
||||
reconnect.c
|
||||
reconnect_LDFLAGS =
|
||||
reconnect_LDADD = $(LDADDS)
|
||||
|
||||
$(LIBVIRT):
|
||||
-@(cd $(top_builddir)/src && $(MAKE) MAKEFLAGS+=--silent)
|
||||
|
2
tests/confdata/.cvsignore
Normal file
2
tests/confdata/.cvsignore
Normal file
@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
2
tests/confdata/Makefile.am
Normal file
2
tests/confdata/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
EXTRA_DIST = $(wildcard *.conf) $(wildcard *.out)
|
11
tests/confdata/fc4.conf
Normal file
11
tests/confdata/fc4.conf
Normal file
@ -0,0 +1,11 @@
|
||||
kernel="/boot/vmlinuz-2.6.15-1.2054_FC5xenU"
|
||||
ramdisk="/boot/initrd-2.6.15-1.2054_FC5xenU.img"
|
||||
memory=128 # should be enough
|
||||
name="fc4"
|
||||
vif = [ 'mac=aa:00:00:00:00:11, bridge=xenbr0', ]
|
||||
disk = ['file:/xen/fc4.img,sda1,w']
|
||||
root = "/dev/sda1"
|
||||
extra = "ro selinux=0 3"
|
||||
on_reboot = 'restart'
|
||||
# just for testing ...
|
||||
tst = [ 1, 2, [ 3, 4 ], 5]
|
11
tests/confdata/fc4.out
Normal file
11
tests/confdata/fc4.out
Normal file
@ -0,0 +1,11 @@
|
||||
kernel = "/boot/vmlinuz-2.6.15-1.2054_FC5xenU"
|
||||
ramdisk = "/boot/initrd-2.6.15-1.2054_FC5xenU.img"
|
||||
memory = 128 # should be enough
|
||||
name = "fc4"
|
||||
vif = [ "mac=aa:00:00:00:00:11, bridge=xenbr0" ]
|
||||
disk = [ "file:/xen/fc4.img,sda1,w" ]
|
||||
root = "/dev/sda1"
|
||||
extra = "ro selinux=0 3"
|
||||
on_reboot = "restart"
|
||||
# just for testing ...
|
||||
tst = [ 1, 2, [ 3, 4 ], 5 ]
|
30
tests/conftest.c
Normal file
30
tests/conftest.c
Normal file
@ -0,0 +1,30 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "conf.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int ret;
|
||||
virConfPtr conf;
|
||||
int len = 10000;
|
||||
char buffer[10000];
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "Usage: %s conf_file\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
conf = virConfReadFile(argv[1]);
|
||||
if (conf == NULL) {
|
||||
fprintf(stderr, "Failed to process %s\n", argv[1]);
|
||||
exit(2);
|
||||
}
|
||||
ret = virConfWriteMem(&buffer[0], &len, conf);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "Failed to serialize %s back\n", argv[1]);
|
||||
exit(3);
|
||||
}
|
||||
printf("%s", buffer);
|
||||
virConfFree(conf);
|
||||
exit(0);
|
||||
}
|
38
tests/reconnect.c
Normal file
38
tests/reconnect.c
Normal file
@ -0,0 +1,38 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libvirt/libvirt.h>
|
||||
|
||||
int main(void) {
|
||||
int id = 0;
|
||||
virConnectPtr conn;
|
||||
virDomainPtr dom;
|
||||
|
||||
conn = virConnectOpen("");
|
||||
if (conn == NULL) {
|
||||
fprintf(stderr, "First virConnectOpen() failed\n");
|
||||
exit(1);
|
||||
}
|
||||
dom = virDomainLookupByID(conn, id);
|
||||
if (dom == NULL) {
|
||||
fprintf(stderr, "First lookup for domain %d failed\n", id);
|
||||
exit(1);
|
||||
}
|
||||
virDomainFree(dom);
|
||||
virConnectClose(conn);
|
||||
conn = virConnectOpen("");
|
||||
if (conn == NULL) {
|
||||
fprintf(stderr, "Second virConnectOpen() failed\n");
|
||||
exit(1);
|
||||
}
|
||||
dom = virDomainLookupByID(conn, id);
|
||||
if (dom == NULL) {
|
||||
fprintf(stderr, "Second lookup for domain %d failed\n", id);
|
||||
exit(1);
|
||||
}
|
||||
virDomainFree(dom);
|
||||
virConnectClose(conn);
|
||||
printf("OK\n");
|
||||
exit(0);
|
||||
|
||||
}
|
||||
|
2
tests/sexpr2xmldata/.cvsignore
Normal file
2
tests/sexpr2xmldata/.cvsignore
Normal file
@ -0,0 +1,2 @@
|
||||
Makefile
|
||||
Makefile.in
|
2
tests/sexpr2xmldata/Makefile.am
Normal file
2
tests/sexpr2xmldata/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
EXTRA_DIST = $(wildcard *.xml) $(wildcard *.sexpr)
|
2
tests/sexpr2xmldata/sexpr2xml-disk-block.sexpr
Normal file
2
tests/sexpr2xmldata/sexpr2xml-disk-block.sexpr
Normal file
@ -0,0 +1,2 @@
|
||||
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'phy:/dev/MainVG/GuestVG')(mode 'w'))))
|
||||
|
22
tests/sexpr2xmldata/sexpr2xml-disk-block.xml
Normal file
22
tests/sexpr2xmldata/sexpr2xml-disk-block.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='xen' id='6'>
|
||||
<name>pvtest</name>
|
||||
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
|
||||
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
|
||||
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
|
||||
</os>
|
||||
<memory>430080</memory>
|
||||
<vcpu>2</vcpu>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>destroy</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<disk type='block' device='disk'>
|
||||
<driver name='phy'/>
|
||||
<source dev='/dev/MainVG/GuestVG'/>
|
||||
<target dev='xvda'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
2
tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.sexpr
Normal file
2
tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.sexpr
Normal file
@ -0,0 +1,2 @@
|
||||
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')(uname 'tap:qcow:/root/some.img')(mode 'w'))))
|
||||
|
22
tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml
Normal file
22
tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='xen' id='6'>
|
||||
<name>pvtest</name>
|
||||
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
|
||||
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
|
||||
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
|
||||
</os>
|
||||
<memory>430080</memory>
|
||||
<vcpu>2</vcpu>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>destroy</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='tap' type='qcow'/>
|
||||
<source file='/root/some.img'/>
|
||||
<target dev='xvda'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
2
tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.sexpr
Normal file
2
tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.sexpr
Normal file
@ -0,0 +1,2 @@
|
||||
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (tap (dev 'xvda')(uname 'tap:aio:/root/some.img')(mode 'w'))))
|
||||
|
22
tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml
Normal file
22
tests/sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='xen' id='6'>
|
||||
<name>pvtest</name>
|
||||
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
|
||||
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
|
||||
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
|
||||
</os>
|
||||
<memory>430080</memory>
|
||||
<vcpu>2</vcpu>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>destroy</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='tap' type='aio'/>
|
||||
<source file='/root/some.img'/>
|
||||
<target dev='xvda'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
2
tests/sexpr2xmldata/sexpr2xml-disk-file.sexpr
Normal file
2
tests/sexpr2xmldata/sexpr2xml-disk-file.sexpr
Normal file
@ -0,0 +1,2 @@
|
||||
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
|
||||
|
22
tests/sexpr2xmldata/sexpr2xml-disk-file.xml
Normal file
22
tests/sexpr2xmldata/sexpr2xml-disk-file.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='xen' id='6'>
|
||||
<name>pvtest</name>
|
||||
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
|
||||
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
|
||||
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
|
||||
</os>
|
||||
<memory>430080</memory>
|
||||
<vcpu>2</vcpu>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>destroy</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/some.img'/>
|
||||
<target dev='xvda'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
1
tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr
Normal file
1
tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr
Normal file
@ -0,0 +1 @@
|
||||
(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(acpi 1)(vnc 1)))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
|
37
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
Normal file
37
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<domain type='xen' id='3'>
|
||||
<name>fvtest</name>
|
||||
<uuid>b5d70dd275cdaca517769660b059d8bc</uuid>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<memory>409600</memory>
|
||||
<vcpu>1</vcpu>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<features>
|
||||
<acpi/>
|
||||
</features>
|
||||
<devices>
|
||||
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/boot.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/foo.img'/>
|
||||
<target dev='hda'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<source bridge='xenbr0'/>
|
||||
<mac address='00:16:3e:1b:b1:47'/>
|
||||
<script path='vif-bridge'/>
|
||||
</interface>
|
||||
<graphics type='vnc' port='5903'/>
|
||||
</devices>
|
||||
</domain>
|
1
tests/sexpr2xmldata/sexpr2xml-fv.sexpr
Normal file
1
tests/sexpr2xmldata/sexpr2xml-fv.sexpr
Normal file
@ -0,0 +1 @@
|
||||
(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
|
37
tests/sexpr2xmldata/sexpr2xml-fv.xml
Normal file
37
tests/sexpr2xmldata/sexpr2xml-fv.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<domain type='xen' id='3'>
|
||||
<name>fvtest</name>
|
||||
<uuid>b5d70dd275cdaca517769660b059d8bc</uuid>
|
||||
<os>
|
||||
<type>hvm</type>
|
||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<memory>409600</memory>
|
||||
<vcpu>1</vcpu>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>restart</on_reboot>
|
||||
<on_crash>restart</on_crash>
|
||||
<features>
|
||||
<acpi/>
|
||||
</features>
|
||||
<devices>
|
||||
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/foo.img'/>
|
||||
<target dev='hda'/>
|
||||
</disk>
|
||||
<interface type='bridge'>
|
||||
<source bridge='xenbr0'/>
|
||||
<mac address='00:16:3e:1b:b1:47'/>
|
||||
<script path='vif-bridge'/>
|
||||
</interface>
|
||||
<disk type='file' device='cdrom'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/boot.iso'/>
|
||||
<target dev='hdc'/>
|
||||
<readonly/>
|
||||
</disk>
|
||||
<graphics type='vnc' port='5903'/>
|
||||
</devices>
|
||||
</domain>
|
2
tests/sexpr2xmldata/sexpr2xml-pv.sexpr
Normal file
2
tests/sexpr2xmldata/sexpr2xml-pv.sexpr
Normal file
@ -0,0 +1,2 @@
|
||||
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
|
||||
|
22
tests/sexpr2xmldata/sexpr2xml-pv.xml
Normal file
22
tests/sexpr2xmldata/sexpr2xml-pv.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<domain type='xen' id='6'>
|
||||
<name>pvtest</name>
|
||||
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
|
||||
<os>
|
||||
<type>linux</type>
|
||||
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
|
||||
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
|
||||
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
|
||||
</os>
|
||||
<memory>430080</memory>
|
||||
<vcpu>2</vcpu>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
<on_reboot>destroy</on_reboot>
|
||||
<on_crash>destroy</on_crash>
|
||||
<devices>
|
||||
<disk type='file' device='disk'>
|
||||
<driver name='file'/>
|
||||
<source file='/root/some.img'/>
|
||||
<target dev='xvda'/>
|
||||
</disk>
|
||||
</devices>
|
||||
</domain>
|
139
tests/sexpr2xmltest.c
Normal file
139
tests/sexpr2xmltest.c
Normal file
@ -0,0 +1,139 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "xml.h"
|
||||
#include "xend_internal.h"
|
||||
#include "testutils.h"
|
||||
#include "internal.h"
|
||||
|
||||
static char *progname;
|
||||
|
||||
#define MAX_FILE 4096
|
||||
|
||||
static int testCompareFiles(const char *xml, const char *sexpr, int xendConfigVersion) {
|
||||
char xmlData[MAX_FILE];
|
||||
char sexprData[MAX_FILE];
|
||||
char *gotxml = NULL;
|
||||
char *xmlPtr = &(xmlData[0]);
|
||||
char *sexprPtr = &(sexprData[0]);
|
||||
int ret = -1;
|
||||
|
||||
if (virtTestLoadFile(xml, &xmlPtr, MAX_FILE) < 0)
|
||||
goto fail;
|
||||
|
||||
if (virtTestLoadFile(sexpr, &sexprPtr, MAX_FILE) < 0)
|
||||
goto fail;
|
||||
|
||||
if (!(gotxml = xend_parse_domain_sexp(NULL, sexprData, xendConfigVersion)))
|
||||
goto fail;
|
||||
|
||||
if (getenv("DEBUG_TESTS")) {
|
||||
printf("Expect %d '%s'\n", (int)strlen(xmlData), xmlData);
|
||||
printf("Actual %d '%s'\n", (int)strlen(gotxml), gotxml);
|
||||
}
|
||||
if (strcmp(xmlData, gotxml))
|
||||
goto fail;
|
||||
|
||||
ret = 0;
|
||||
|
||||
fail:
|
||||
free(gotxml);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testComparePVversion1(void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-pv.xml",
|
||||
"sexpr2xmldata/sexpr2xml-pv.sexpr",
|
||||
1);
|
||||
}
|
||||
|
||||
static int testCompareFVversion1(void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-fv.xml",
|
||||
"sexpr2xmldata/sexpr2xml-fv.sexpr",
|
||||
1);
|
||||
}
|
||||
|
||||
static int testComparePVversion2(void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-pv.xml",
|
||||
"sexpr2xmldata/sexpr2xml-pv.sexpr",
|
||||
2);
|
||||
}
|
||||
|
||||
static int testCompareFVversion2(void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-fv-v2.xml",
|
||||
"sexpr2xmldata/sexpr2xml-fv-v2.sexpr",
|
||||
2);
|
||||
}
|
||||
|
||||
static int testCompareDiskFile(void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-file.xml",
|
||||
"sexpr2xmldata/sexpr2xml-disk-file.sexpr",
|
||||
1);
|
||||
}
|
||||
|
||||
static int testCompareDiskBlock(void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-block.xml",
|
||||
"sexpr2xmldata/sexpr2xml-disk-block.sexpr",
|
||||
1);
|
||||
}
|
||||
|
||||
static int testCompareDiskDrvBlktapQcow(void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.xml",
|
||||
"sexpr2xmldata/sexpr2xml-disk-drv-blktap-qcow.sexpr",
|
||||
1);
|
||||
}
|
||||
|
||||
static int testCompareDiskDrvBlktapRaw(void *data ATTRIBUTE_UNUSED) {
|
||||
return testCompareFiles("sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.xml",
|
||||
"sexpr2xmldata/sexpr2xml-disk-drv-blktap-raw.sexpr",
|
||||
1);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
progname = argv[0];
|
||||
|
||||
if (argc > 1) {
|
||||
fprintf(stderr, "Usage: %s\n", progname);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML PV config (version 1)",
|
||||
1, testComparePVversion1, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML FV config (version 1)",
|
||||
1, testCompareFVversion1, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML PV config (version 2)",
|
||||
1, testComparePVversion2, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML FV config (version 2)",
|
||||
1, testCompareFVversion2, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML Disk File config",
|
||||
1, testCompareDiskFile, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML Disk Block config",
|
||||
1, testCompareDiskBlock, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML Disk Driver blktap qcow config",
|
||||
1, testCompareDiskDrvBlktapQcow, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
if (virtTestRun("SEXPR-2-XML Disk Driver blktap raw config",
|
||||
1, testCompareDiskDrvBlktapRaw, NULL) != 0)
|
||||
ret = -1;
|
||||
|
||||
exit(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user