Daniel Veillard
737af2ea04
Adds the APIs for virNodeDeviceDettach , ReAttach and Reset
...
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/driver.h src/libvirt.c src/libvirt_public.syms
src/lxc_driver.c src/openvz_driver.c src/qemu_driver.c
src/test.c src/uml_driver.c: add the public APIs for
virNodeDeviceDettach virNodeDeviceReAttach and virNodeDeviceReset
and extends the driver structure accordingly.
Daniel
2009-03-02 16:25:13 +00:00
Jim Meyering
f98b9e05d8
test:///default driver: don't dereference NULL "def"
...
* src/test.c (testNetworkCreate, testNetworkDefine): Since "def" is
set to NULL immediately after any vir*AssignDef call (to indicate we
no longer own it and to ensure no clean-up path mistakenly frees it),
dereference via net->def->, not def->.
2009-02-13 18:11:03 +00:00
Jim Meyering
c18ccff446
cleanup: remove useless if-before-VIR_FREE
...
* Makefile.cfg (useless_free_options): Also check for VIR_FREE.
* src/iptables.c (iptRulesFree): Remove useless if-before-VIR_FREE.
* src/remote_internal.c (remoteAuthSASL): Likewise.
* src/test.c (testOpenFromFile): Likewise.
2009-02-03 13:08:07 +00:00
Daniel P. Berrange
a888b22cf9
Support domain events in test driver
2009-01-20 20:23:53 +00:00
Daniel P. Berrange
437ac354fc
Make error reporting threadsafe by avoiding strerror
2009-01-20 17:13:33 +00:00
Daniel P. Berrange
4dac0a1105
Generic internal threads API
2009-01-15 19:56:05 +00:00
Guido Günther
46971d5ed7
pass flags argument to all virDomain*DefParse* functions
2009-01-08 13:54:20 +00:00
Daniel Veillard
fbba4423e9
* src/libvirt_private.syms src/qemu_driver.c src/test.c
...
src/uml_driver.c src/util.c src/util.h src/xen_unified.c:
unify hostname lookup using virGetHostname convenience function,
patch by David Lutterkort
daniel
2009-01-07 10:43:16 +00:00
Daniel P. Berrange
37e72aa542
Fix misc mingw portability problems
2009-01-06 18:32:03 +00:00
Daniel P. Berrange
6313259ada
Fix test driver return value & disable nodeinfotest on non-linux (John Levon)
2008-12-18 12:08:05 +00:00
Daniel P. Berrange
e5fc0aad31
Fix return type for Xen open subdriver method impl (John Levon)
2008-12-17 21:26:16 +00:00
Cole Robinson
63efdb85c1
Fix locking issue in test driver VolLookupByPath
2008-12-11 15:04:09 +00:00
Daniel P. Berrange
73bc9c163c
Fix NULL crash & integer overflow
2008-12-07 20:45:28 +00:00
Daniel P. Berrange
5abce0805b
Fix test driver storage deadlock
2008-12-07 20:21:46 +00:00
Daniel P. Berrange
a2b2ada85c
Fix return value in testStoragePoolBuild for test driver
2008-12-07 14:08:37 +00:00
Daniel P. Berrange
8492cd2084
Stub out node device APIs in test driver
2008-12-04 21:00:50 +00:00
Daniel P. Berrange
2a23198886
Add locking for thread safety to test driver
2008-12-04 20:59:06 +00:00
Daniel P. Berrange
3540f6af23
Merge all return paths from test driver APIs
2008-12-04 20:57:47 +00:00
Daniel P. Berrange
069252f0e6
Remove macros for accessing test driver internal state
2008-12-04 20:56:10 +00:00
Guido Günther
1d7d2fae10
Differentiate between active and inactive configs by honoring the
...
VIR_DOMAIN_XML_INACTIVE flag.
2008-12-04 12:02:59 +00:00
Jim Meyering
fa4fc0321a
fix inadequate initialization in storage and test drivers
...
* src/storage_driver.c (storageListPools): Set all "names" entries to 0.
(storageListDefinedPools, storagePoolListVolumes): Likewise.
* src/test.c (testStoragePoolListVolumes): Likewise.
2008-12-02 15:59:14 +00:00
Daniel P. Berrange
d88d459d7b
Allow remote://hostname/ style URIs for automatic driver probe. Fix virGetVersion impl
2008-11-28 12:03:20 +00:00
Daniel P. Berrange
618276de19
Push URI probing logic down into individual drivers
2008-11-17 11:44:51 +00:00
Daniel Veillard
df285bdd8d
KVM/QEmu migration support
...
* qemud/remote.c qemud/remote_dispatch_localvars.h
qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h
qemud/remote_protocol.c qemud/remote_protocol.h
qemud/remote_protocol.x src/driver.h src/libvirt.c
src/libvirt_internal.h src/libvirt_sym.version src/lxc_driver.c
src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c
src/remote_internal.c src/test.c src/virsh.c: large patch to
add migration support for KVM/QEmu, based on the work of Rich Jones
and Chris Lalancette. This introduce a new version of the prepare
and finish steps of the migration, so changes the driver API and
a lot of code.
Daniel
2008-11-14 08:42:47 +00:00
Daniel P. Berrange
6ace5a39c3
Move some API declarations out of internal.h & hash.c into dedicated files
2008-11-04 23:22:06 +00:00
Daniel P. Berrange
d714b2afae
Move internal error APIs into virterror_internal.h & drop leading __ prefix
2008-11-04 22:30:33 +00:00
Cole Robinson
c5ee075dd9
Add a test storage driver.
2008-10-30 17:40:57 +00:00
Daniel Veillard
1509b8027f
Massive patch adding event APIs by Ben Guthro
...
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/libvirt.c src/libvirt_sym.version: new libvirt event entry
points, big patch provided by Ben Guthro
* Makefile.am configure.in src/driver.h src/event.c src/event.h
src/internal.h src/libvirt.c src/libvirt_sym.version src/lxc_driver.c
src/openvz_driver.c src/qemu_conf.h src/qemu_driver.c
src/remote_internal.c src/storage_backend_fs.c src/test.c
qemud/event.c qemud/event.h qemud/mdns.c qemud/qemud.c
qemud/qemud.h qemud/remote.c qemud/remote_dispatch_localvars.h
qemud/remote_dispatch_proc_switch.h qemud/remote_dispatch_prototypes.h
qemud/remote_protocol.c qemud/remote_protocol.h
qemud/remote_protocol.x proxy/Makefile.am python/generator.py:
Not much is left untouched by the patch adding the events support
* docs/libvirt-api.xml docs/libvirt-refs.xml
docs/html/libvirt-libvirt.html: regenerated the docs
* examples/domain-events/events-c/Makefile.am
examples/domain-events/events-c/event-test.c: a test example
* AUTHORS: added Ben Guthro
daniel
2008-10-23 13:18:18 +00:00
Jim Meyering
fd52c6ff67
avoid many format string warnings
...
Building with --disable-nls exposed many new warnings like these:
virsh.c:4952: warning: format not a string literal and no format ...
util.c:163: warning: format not a string literal and no format arguments
All but one of the following changes add a "%s" argument before
the offending _(...) argument.
This was the only manual change:
* src/lxc_driver.c (lxcVersion): Use %s and strerror(errno)
rather than %m, to avoid a warning from gcc -Wformat-security.
Add "%s" before each warned about format-string-with-no-%-directive:
* src/domain_conf.c (virDomainHostdevSubsysUsbDefParseXML)
(virDomainDefParseString, virDomainDefParseFile):
* src/hash.c (virGetConnect, __virGetDomain, virReleaseDomain)
(__virGetNetwork, virReleaseNetwork, __virGetStoragePool)
(virReleaseStoragePool, __virGetStorageVol, virReleaseStorageVol):
* src/lxc_container.c (lxcContainerChild):
* src/lxc_driver.c (lxcDomainDefine, lxcDomainUndefine)
(lxcDomainGetInfo, lxcGetOSType, lxcDomainDumpXML)
(lxcSetupInterfaces, lxcDomainStart, lxcDomainCreateAndStart)
(lxcVersion, lxcGetSchedulerParameters):
* src/network_conf.c (virNetworkDefParseString)
(virNetworkDefParseFile):
* src/openvz_conf.c (openvzReadNetworkConf, openvzLoadDomains):
* src/openvz_driver.c (openvzDomainDefineCmd)
(openvzDomainGetInfo, openvzDomainDumpXML, openvzDomainShutdown)
(openvzDomainReboot, ADD_ARG_LIT, openvzDomainDefineXML)
(openvzDomainCreateXML, openvzDomainCreate, openvzDomainUndefine)
(openvzDomainSetAutostart, openvzDomainGetAutostart)
(openvzDomainSetVcpus):
* src/qemu_driver.c (qemudDomainBlockPeek, qemudDomainMemoryPeek):
* src/remote_internal.c (remoteDomainBlockPeek)
(remoteDomainMemoryPeek, remoteAuthPolkit):
* src/sexpr.c (sexpr_new, _string2sexpr):
* src/storage_backend_disk.c (virStorageBackendDiskMakeDataVol)
(virStorageBackendDiskCreateVol):
* src/storage_backend_fs.c
(virStorageBackendFileSystemNetFindPoolSources):
* src/storage_backend_logical.c (virStorageBackendLogicalFindLVs)
(virStorageBackendLogicalFindPoolSources):
* src/test.c (testOpenDefault, testOpenFromFile, testOpen)
(testGetDomainInfo, testDomainRestore)
(testNodeGetCellsFreeMemory):
* src/util.c (virExec):
* src/virsh.c (cmdAttachDevice, cmdDetachDevice)
(cmdAttachInterface, cmdDetachInterface, cmdAttachDisk)
(cmdDetachDisk, cmdEdit):
* src/xend_internal.c (do_connect, wr_sync, xend_op_ext)
(urlencode, xenDaemonDomainCreateXML)
(xenDaemonDomainLookupByName_ids, xenDaemonDomainLookupByID)
(xenDaemonParseSxprOS, xend_parse_sexp_desc_char)
(xenDaemonParseSxprChar, xenDaemonParseSxprDisks)
(xenDaemonParseSxpr, sexpr_to_xend_topology, sexpr_to_domain)
(xenDaemonDomainFetch, xenDaemonDomainGetAutostart)
(xenDaemonDomainSetAutostart, xenDaemonDomainMigratePerform)
(xenDaemonDomainDefineXML, xenDaemonGetSchedulerType)
(xenDaemonGetSchedulerParameters)
(xenDaemonSetSchedulerParameters, xenDaemonDomainBlockPeek)
(xenDaemonFormatSxprChr, virDomainXMLDevID):
* src/xm_internal.c (xenXMConfigCacheRefresh, xenXMDomainPinVcpu)
(xenXMDomainCreate, xenXMDomainDefineXML)
(xenXMDomainAttachDevice, xenXMDomainDetachDevice):
* src/xml.c (virXPathString, virXPathNumber, virXPathLong)
(virXPathULong, virXPathBoolean, virXPathNode, virXPathNodeSet):
* src/xs_internal.c (xenStoreOpen):
2008-10-13 16:46:28 +00:00
Jim Meyering
6ac274673c
testError format strings: explicitly include domain and network names
...
This repairs the "make check" failure of tests/undefine.
* src/test.c (testResumeDomain, testPauseDomain): Likewise.
(testShutdownDomain, testGetDomainInfo, ): Likewise.
(testSetMemory, testSetVcpus, testDomainCreate, testDomainUndefine)
(testDomainGetSchedulerType, testDomainGetSchedulerParams): Likewise.
(testDomainSetSchedulerParams, testNetworkUndefine): Likewise.
(testNetworkStart, testNetworkGetBridgeName): Likewise.
(testDomainCoreDump, testDomainSave): Likewise, and...
Name the file upon failed open or write.
Use strerror(errno) in diagnostics.
* tests/undefine: Adjust expected output.
test.c (testError): Remove now-ignored dom and net parameters.
This is a sytnax-only change: removing the two unused parameters
and updating all callers:
* src/test.c (GET_DOMAIN, GET_NETWORK, testError)
(testBuildCapabilities, testOpenDefault, testOpenFromFile)
(testOpen, testGetHostname, testGetURI, testGetCapabilities)
(testLookupDomainByID, testLookupDomainByUUID)
(testLookupDomainByName, testResumeDomain, testPauseDomain)
(testShutdownDomain, testGetDomainInfo, testDomainSave)
(testDomainRestore, testDomainCoreDump, testGetOSType)
(testSetMemory, testSetVcpus, testListDefinedDomains)
(testNodeGetCellsFreeMemory, testDomainCreate)
(testDomainUndefine, testDomainGetSchedulerType)
(testDomainGetSchedulerParams, testDomainSetSchedulerParams)
(testLookupNetworkByUUID, testLookupNetworkByName)
(testListNetworks, testListDefinedNetworks, testNetworkUndefine)
(testNetworkStart, testNetworkGetBridgeName): Update callers.
2008-10-11 07:24:49 +00:00
Daniel P. Berrange
dd48e929c7
Switch network objects to array instead of linked list
2008-10-10 14:50:26 +00:00
Daniel P. Berrange
4789154063
Switch domain objects to array instead of linked list
2008-10-10 14:20:37 +00:00
Daniel Veillard
f6803c960f
virDomainDefineXML, and a few additional cleanups
...
* include/libvirt/libvirt.h[.in] include/libvirt/virterror.h
qemud/remote* src/driver.h src/libvirt.c src/libvirt_sym.version
src/lxc_driver.c src/openvz_driver.c src/proxy_internal.c
src/qemu_driver.c src/remote_internal.c src/test.c src/virsh.c
src/xen_internal.c src/xen_unified.c src/xen_unified.h
src/xend_internal.c src/xend_internal.h src/xm_internal.c
src/xs_internal.c docs/*: cleanup virDomainCreateLinux into
virDomainDefineXML, and a few additional cleanups
Daniel
2008-10-10 09:32:27 +00:00
Cole Robinson
02fc93d624
Centralize majority of error reporting logic.
2008-10-09 15:38:31 +00:00
Daniel P. Berrange
bb16f4a25d
Do conditional driver config in Makefile.am, not source files
2008-08-20 20:48:35 +00:00
Daniel P. Berrange
9351cb0ab0
Fix reporting of errors against virConnect object in XML apis
2008-07-25 14:27:25 +00:00
Daniel P. Berrange
73d021c5c1
Fix test driver inactive domains and domain ID allocation
2008-07-25 13:27:12 +00:00
Daniel P. Berrange
3de646a51d
Misc bug fixes
2008-07-25 09:31:24 +00:00
Jim Meyering
3ff5480d7b
remove unnecessary "V = NULL;" stmts after VIR_FREE(V)
...
* src/domain_conf.c (virDomainChrDefParseXML)
(virDomainNetDefParseXML): Likewise.
* src/iptables.c (iptRuleFree): Likewise.
* src/storage_backend.c (virStorageBackendRunProgRegex): Likewise.
* src/test.c (testOpenFromFile): Likewise.
* src/xmlrpc.c (xmlRpcCallRaw): Likewise.
2008-07-19 07:42:34 +00:00
Daniel P. Berrange
d78c0a6800
Convert test driver to new domain XML apis
2008-07-11 16:41:27 +00:00
Daniel P. Berrange
c422fd1240
Convert test driver to new network XML apis
2008-07-11 16:39:08 +00:00
Richard W.M. Jones
6bcf25017b
virDomainMemoryPeek API
...
* include/libvirt/libvirt.h.in, src/libvirt.c, src/driver.h,
src/libvirt_sym.version: New virDomainMemoryPeek API.
* qemud/remote.c, qemud/remote_protocol.x, src/remote_internal.c:
Support for remote.
* src/qemu_driver.c: QEMU driver implementation of API.
* src/test.c: Test driver (null) implementation of API.
* docs/hvsupport.html.in: Document API.
* libvirt.spec.in: New path /var/cache/libvirt for temporary
storage of memory images.
* qemud/libvirtd.init.in: Remove any old temp files in
/var/cache/libvirt on restarts.
* src/Makefile.am: make install creates /var/cache/libvirt.
* configure.in: Detect mkdir -p.
2008-06-10 10:43:28 +00:00
Richard W.M. Jones
8354895e68
virDomainBlockPeek call
...
* configure.in: Document AC_SYS_LARGEFILE.
* docs/hvsupport.html.in: Document HV support for virDomainBlockPeek.
* include/libvirt/libvirt.h.in, src/driver.h, src/libvirt.c,
src/libvirt_sym.version: Add virDomainBlockPeek infrastructure.
* src/qemu_driver.c, src/test.c: Null versions of this call.
* src/xen_unified.c, src/xend_internal.c, src/xend_internal.h,
src/xm_internal.c, src/xm_internal.h: Xen implementation.
* tests/sexpr2xmldata/sexpr2xml-curmem.xml,
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: XML output
has been reordered slightly in the Xen driver, but should be
functionally the same.
2008-06-05 13:17:45 +00:00
Daniel P. Berrange
895d0fdf5b
Convert to use new memory allocation APIs
2008-05-29 19:20:22 +00:00
Daniel P. Berrange
1d73398e8f
Remove all use of strcmp, strncmp in favour of STREQ, STREQLEN, STRPREFIX
2008-05-14 19:51:24 +00:00
Daniel P. Berrange
642b26fab2
Change virBuffer API to prevent common usage errors. Update all users of APIs
2008-04-28 15:14:59 +00:00
Jim Meyering
dc42a9d2de
remove Vim and Emacs variable settings from C source files
...
Done with these commands:
git grep -l Local.variab|xargs \
perl -0x3b -pi -e 's,\n+/\*\n \* vim:(.|\n)*,\n,'
git grep -l Local.variab|xargs \
perl -0x3b -pi -e 's,\n+/\*\n \* Local variables:\n(.|\n)*,\n,'
2008-04-10 16:53:29 +00:00
Daniel Veillard
801a8f2e7b
adds xen and hvm guest types to test driver capabilities
...
* src/test.c: patch from Cole Robinson adding xen and hvm guest types
to the test driver's capabilities.
Daniel
2008-04-08 09:26:24 +00:00
Daniel Veillard
7b72ef296f
virNodeGetCellsFreeMemory for test driver
...
* src/test.c: patch from Cole Robinson to add
virNodeGetCellsFreeMemory to the test driver
Daniel
2008-04-04 07:31:24 +00:00
Jim Meyering
76a7098407
testError: mark most string arguments for translation
...
* Makefile.maint (msg_gen_function): Add testError
* src/test.c (testDomainSave, testDomainRestore): Mark strings.
(testDomainCoreDump): Likewise.
2008-03-27 14:01:59 +00:00