aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorShradha Shah <sshah@solarflare.com>2012-08-16 16:41:41 +0100
committerLaine Stump <laine@laine.org>2012-08-17 15:43:26 -0400
commit1446003419c25c87b6ef8561706e043254d8c6ff (patch)
treeaf80280a9d750847551fe27e9e7c8b063ba51f4f /docs
parentnetwork: helper function to create interface pool from PF (diff)
downloadlibvirt-1446003419c25c87b6ef8561706e043254d8c6ff.tar.gz
libvirt-1446003419c25c87b6ef8561706e043254d8c6ff.tar.bz2
libvirt-1446003419c25c87b6ef8561706e043254d8c6ff.zip
conf: parser/formatter/rng for <forward mode='hostdev'>
This patch introduces the new forward mode='hostdev' along with attribute managed. Includes updates to the network RNG and new xml parser/formatter code. Signed-off-by: Shradha Shah <sshah@solarflare.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/schemas/basictypes.rng46
-rw-r--r--docs/schemas/domaincommon.rng44
-rw-r--r--docs/schemas/network.rng53
3 files changed, 87 insertions, 56 deletions
diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng
index 9dbda4a6c..766f9a08f 100644
--- a/docs/schemas/basictypes.rng
+++ b/docs/schemas/basictypes.rng
@@ -54,6 +54,31 @@
</choice>
</define>
+ <define name="pciaddress">
+ <optional>
+ <attribute name="domain">
+ <ref name="pciDomain"/>
+ </attribute>
+ </optional>
+ <attribute name="bus">
+ <ref name="pciBus"/>
+ </attribute>
+ <attribute name="slot">
+ <ref name="pciSlot"/>
+ </attribute>
+ <attribute name="function">
+ <ref name="pciFunc"/>
+ </attribute>
+ <optional>
+ <attribute name="multifunction">
+ <choice>
+ <value>on</value>
+ <value>off</value>
+ </choice>
+ </attribute>
+ </optional>
+ </define>
+
<!-- a 6 byte MAC address in ASCII-hex format, eg "12:34:56:78:9A:BC" -->
<!-- The lowest bit of the 1st byte is the "multicast" bit. a -->
<!-- uniMacAddr requires that bit to be 0, and a multiMacAddr -->
@@ -167,4 +192,25 @@
<ref name='unsignedLong'/>
</define>
+ <define name="pciDomain">
+ <data type="string">
+ <param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
+ </data>
+ </define>
+ <define name="pciBus">
+ <data type="string">
+ <param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
+ </data>
+ </define>
+ <define name="pciSlot">
+ <data type="string">
+ <param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
+ </data>
+ </define>
+ <define name="pciFunc">
+ <data type="string">
+ <param name="pattern">(0x)?[0-7]</param>
+ </data>
+ </define>
+
</grammar>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 4903ca69e..35e9f8256 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2652,30 +2652,6 @@
</attribute>
</optional>
</define>
- <define name="pciaddress">
- <optional>
- <attribute name="domain">
- <ref name="pciDomain"/>
- </attribute>
- </optional>
- <attribute name="bus">
- <ref name="pciBus"/>
- </attribute>
- <attribute name="slot">
- <ref name="pciSlot"/>
- </attribute>
- <attribute name="function">
- <ref name="pciFunc"/>
- </attribute>
- <optional>
- <attribute name="multifunction">
- <choice>
- <value>on</value>
- <value>off</value>
- </choice>
- </attribute>
- </optional>
- </define>
<define name="driveaddress">
<optional>
<attribute name="controller">
@@ -3376,26 +3352,6 @@
<param name="pattern">((0x)?[0-9a-fA-F]{1,3}\.){0,3}(0x)?[0-9a-fA-F]{1,3}</param>
</data>
</define>
- <define name="pciDomain">
- <data type="string">
- <param name="pattern">(0x)?[0-9a-fA-F]{1,4}</param>
- </data>
- </define>
- <define name="pciBus">
- <data type="string">
- <param name="pattern">(0x)?[0-9a-fA-F]{1,2}</param>
- </data>
- </define>
- <define name="pciSlot">
- <data type="string">
- <param name="pattern">(0x)?[0-1]?[0-9a-fA-F]</param>
- </data>
- </define>
- <define name="pciFunc">
- <data type="string">
- <param name="pattern">(0x)?[0-7]</param>
- </data>
- </define>
<define name="driveController">
<data type="string">
<param name="pattern">[0-9]{1,2}</param>
diff --git a/docs/schemas/network.rng b/docs/schemas/network.rng
index e55105a14..4abfd915d 100644
--- a/docs/schemas/network.rng
+++ b/docs/schemas/network.rng
@@ -87,22 +87,51 @@
<value>passthrough</value>
<value>private</value>
<value>vepa</value>
+ <value>hostdev</value>
+ </choice>
+ </attribute>
+ </optional>
+
+ <optional>
+ <attribute name="managed">
+ <choice>
+ <value>yes</value>
+ <value>no</value>
</choice>
</attribute>
</optional>
<interleave>
- <zeroOrMore>
- <element name='interface'>
- <attribute name='dev'>
- <ref name='deviceName'/>
- </attribute>
- <optional>
- <attribute name="connections">
- <data type="unsignedInt"/>
- </attribute>
- </optional>
- </element>
- </zeroOrMore>
+ <choice>
+ <group>
+ <zeroOrMore>
+ <element name='interface'>
+ <attribute name='dev'>
+ <ref name='deviceName'/>
+ </attribute>
+ <optional>
+ <attribute name="connections">
+ <data type="unsignedInt"/>
+ </attribute>
+ </optional>
+ </element>
+ </zeroOrMore>
+ </group>
+ <group>
+ <zeroOrMore>
+ <element name='address'>
+ <attribute name='type'>
+ <value>pci</value>
+ </attribute>
+ <ref name="pciaddress"/>
+ <optional>
+ <attribute name="connections">
+ <data type="unsignedInt"/>
+ </attribute>
+ </optional>
+ </element>
+ </zeroOrMore>
+ </group>
+ </choice>
<optional>
<element name='pf'>
<attribute name='dev'>