diff options
author | Laine Stump <laine@laine.org> | 2011-07-04 02:27:12 -0400 |
---|---|---|
committer | Laine Stump <laine@laine.org> | 2011-07-21 14:47:19 -0400 |
commit | 04711a0f32ac2e9c44081911295b436b2c0a11cf (patch) | |
tree | 8c845e717ae69909ee51f46050007d5fea3cbcb7 /tests/Makefile.am | |
parent | qemu: use virDomainNetGetActual*() in qemuDomainXMLToNative (diff) | |
download | libvirt-04711a0f32ac2e9c44081911295b436b2c0a11cf.tar.gz libvirt-04711a0f32ac2e9c44081911295b436b2c0a11cf.tar.bz2 libvirt-04711a0f32ac2e9c44081911295b436b2c0a11cf.zip |
network: internal API functions to manage assignment of physdev to guest
The network driver needs to assign physical devices for use by modes
that use macvtap, keeping track of which physical devices are in use
(and how many instances, when the devices can be shared). Three calls
are added:
networkAllocateActualDevice - finds a physical device for use by the
domain, and sets up the virDomainActualNetDef accordingly.
networkNotifyActualDevice - assumes that the domain was already
running, but libvirtd was restarted, and needs to be notified by each
already-running domain about what interfaces they are using.
networkReleaseActualDevice - decrements the usage count of the
allocated physical device, and frees the virDomainActualNetDef to
avoid later accidentally using the device.
bridge_driver.[hc] - the new APIs. When WITH_NETWORK is false, these
functions are all #defined to be "0" in the .h file (effectively
becoming a NOP) to prevent link errors.
qemu_(command|driver|hotplug|process).c - add calls to the above APIs
in the appropriate places.
tests/Makefile.am - we need to include libvirt_driver_network.la
whenever libvirt_driver_qemu.la is linked, to avoid unreferenced
symbols (in functions that are never called by the test
programs...)
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index e9a445ed7..971ab706e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -314,23 +314,30 @@ EXTRA_DIST += xml2sexprtest.c sexpr2xmltest.c xmconfigtest.c \ endif if WITH_QEMU + +qemu_LDADDS = ../src/libvirt_driver_qemu.la + +if WITH_NETWORK +qemu_LDADDS += ../src/libvirt_driver_network.la +endif + qemuxml2argvtest_SOURCES = \ qemuxml2argvtest.c testutilsqemu.c testutilsqemu.h \ testutils.c testutils.h -qemuxml2argvtest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS) +qemuxml2argvtest_LDADD = $(qemu_LDADDS) $(LDADDS) qemuxml2xmltest_SOURCES = \ qemuxml2xmltest.c testutilsqemu.c testutilsqemu.h \ testutils.c testutils.h -qemuxml2xmltest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS) +qemuxml2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS) qemuargv2xmltest_SOURCES = \ qemuargv2xmltest.c testutilsqemu.c testutilsqemu.h \ testutils.c testutils.h -qemuargv2xmltest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS) +qemuargv2xmltest_LDADD = $(qemu_LDADDS) $(LDADDS) qemuhelptest_SOURCES = qemuhelptest.c testutils.c testutils.h -qemuhelptest_LDADD = ../src/libvirt_driver_qemu.la $(LDADDS) +qemuhelptest_LDADD = $(qemu_LDADDS) $(LDADDS) else EXTRA_DIST += qemuxml2argvtest.c qemuxml2xmltest.c qemuargv2xmltest.c qemuhelptest.c testutilsqemu.c testutilsqemu.h endif |