schema: require target path in storage pool xml

Make target path mandatory for pool types that require target,
since we refuse to parse a target without a path.

https://bugzilla.redhat.com/show_bug.cgi?id=893273
This commit is contained in:
Ján Tomko 2013-05-16 15:37:14 +02:00
parent 9049d6a8c7
commit a07b88ee03
4 changed files with 17 additions and 6 deletions

View File

@ -200,11 +200,9 @@
<define name='target'>
<element name='target'>
<optional>
<element name='path'>
<ref name='absFilePath'/>
</element>
</optional>
<ref name='permissions'/>
</element>
</define>

View File

@ -73,6 +73,7 @@ EXTRA_DIST = \
securityselinuxlabeldata \
schematestutils.sh \
sexpr2xmldata \
storagepoolschemadata \
storagepoolschematest \
storagepoolxml2xmlin \
storagepoolxml2xmlout \

View File

@ -0,0 +1,12 @@
<pool type='dir'>
<name>test</name>
<source>
</source>
<target>
<permissions>
<mode>0700</mode>
<owner>-1</owner>
<group>-1</group>
</permissions>
</target>
</pool>

View File

@ -4,7 +4,7 @@
. $srcdir/test-lib.sh
. $abs_srcdir/schematestutils.sh
DIRS="storagepoolxml2xmlin storagepoolxml2xmlout"
DIRS="storagepoolxml2xmlin storagepoolxml2xmlout storagepoolschemadata"
SCHEMA="storagepool.rng"
check_schema "$DIRS" "$SCHEMA"