summaryrefslogtreecommitdiff
path: root/tests/networkxml2xmlin
diff options
context:
space:
mode:
authorLaine Stump <laine@laine.org>2013-04-26 16:23:27 -0400
committerLaine Stump <laine@laine.org>2013-04-26 21:51:12 -0400
commitd64e114f1415f15737fb902b4e5aada8e50d1a6d (patch)
tree752195ad75fd86b5e0a177f3d001f092d14810c9 /tests/networkxml2xmlin
parent2d80fbb14dffa45fe3fcd2c3f29ce54857bb766c (diff)
downloadlibvirt-d64e114f1415f15737fb902b4e5aada8e50d1a6d.tar.gz
network: support <driver name='vfio'/> in network definitions
I remembered to document this bit, but somehow forgot to implement it. This adds <driver name='kvm|vfio'/> as a subelement to the <forward> element of a network (this puts it parallel to the match between mode='hostdev' attribute in a network and type='hostdev' in an <interface>). Since it's already documented, only the parser, formatter, backend driver recognition (it just translates/moves the flag into the <interface> at the appropriate time), and a test case were needed. (I used a separate enum for the values both because the original is defined in domain_conf.h, which is unavailable from network_conf.h, and because in the future it's possible that we may want to support other non-hostdev oriented driver names in the network parser; this makes sure that one can be expanded without the other).
Diffstat (limited to 'tests/networkxml2xmlin')
-rw-r--r--tests/networkxml2xmlin/hostdev-pf.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/networkxml2xmlin/hostdev-pf.xml b/tests/networkxml2xmlin/hostdev-pf.xml
index 7bf857d3a1..5b8f59858c 100644
--- a/tests/networkxml2xmlin/hostdev-pf.xml
+++ b/tests/networkxml2xmlin/hostdev-pf.xml
@@ -2,6 +2,7 @@
<name>hostdev</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward mode='hostdev' managed='yes'>
+ <driver name='vfio'/>
<pf dev='eth2'/>
</forward>
</network>