rng: Add definition for network disk source

It's long enough to have a independant definition.
This commit is contained in:
Osier Yang 2013-04-03 20:14:05 +08:00
parent ad42b34b1b
commit ad5298e177

View File

@ -1084,54 +1084,7 @@
<interleave>
<optional>
<element name="source">
<attribute name="protocol">
<choice>
<value>nbd</value>
<value>rbd</value>
<value>sheepdog</value>
<value>gluster</value>
<value>iscsi</value>
</choice>
</attribute>
<optional>
<attribute name="name"/>
</optional>
<zeroOrMore>
<element name="host">
<choice>
<group>
<optional>
<attribute name="transport">
<choice>
<value>tcp</value>
<value>rdma</value>
</choice>
</attribute>
</optional>
<attribute name="name">
<choice>
<ref name="dnsName"/>
<ref name="ipAddr"/>
</choice>
</attribute>
<optional>
<attribute name="port">
<ref name="unsignedInt"/>
</attribute>
</optional>
</group>
<group>
<attribute name="transport">
<value>unix</value>
</attribute>
<attribute name="socket">
<ref name="absFilePath"/>
</attribute>
</group>
</choice>
</element>
</zeroOrMore>
<empty/>
<ref name='diskSourceNetwork'/>
</element>
</optional>
<ref name="diskspec"/>
@ -1141,6 +1094,56 @@
</choice>
</element>
</define>
<define name="diskSourceNetwork">
<attribute name="protocol">
<choice>
<value>nbd</value>
<value>rbd</value>
<value>sheepdog</value>
<value>gluster</value>
<value>iscsi</value>
</choice>
</attribute>
<optional>
<attribute name="name"/>
</optional>
<zeroOrMore>
<element name="host">
<choice>
<group>
<optional>
<attribute name="transport">
<choice>
<value>tcp</value>
<value>rdma</value>
</choice>
</attribute>
</optional>
<attribute name="name">
<choice>
<ref name="dnsName"/>
<ref name="ipAddr"/>
</choice>
</attribute>
<optional>
<attribute name="port">
<ref name="unsignedInt"/>
</attribute>
</optional>
</group>
<group>
<attribute name="transport">
<value>unix</value>
</attribute>
<attribute name="socket">
<ref name="absFilePath"/>
</attribute>
</group>
</choice>
</element>
</zeroOrMore>
<empty/>
</define>
<define name="diskTarget">
<data type="string">
<param name="pattern">(ioemu:)?(fd|hd|sd|vd|xvd|ubd)[a-zA-Z0-9_]+</param>