提交 54971d91 编写于 作者: C Chris Lalancette

Domain snapshot RNG and tests.

Signed-off-by: NChris Lalancette <clalance@redhat.com>
上级 8749256d
<!-- A Relax NG schema for the libvirt domain snapshot properties XML format -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<ref name='domainsnapshot'/>
</start>
<define name='domainsnapshot'>
<element name='domainsnapshot'>
<interleave>
<optional>
<element name='name'>
<text/>
</element>
</optional>
<optional>
<element name='description'>
<text/>
</element>
</optional>
<optional>
<element name='state'>
<text/>
</element>
</optional>
<optional>
<element name='creationTime'>
<text/>
</element>
</optional>
<optional>
<element name='active'>
<text/>
</element>
</optional>
<optional>
<element name='domain'>
<element name='uuid'>
<text/>
</element>
</element>
</optional>
<optional>
<element name='parent'>
<element name='name'>
<text/>
</element>
</element>
</optional>
</interleave>
</element>
</define>
</grammar>
......@@ -76,6 +76,9 @@ EXTRA_DIST = \
nwfilterxml2xmlout \
nwfilterxml2xmlin \
nwfilterschematest \
domainsnapshotschematest \
domainsnapshotxml2xmlout \
domainsnapshotxml2xmlin \
$(patsubst %,qemuhelpdata/%,$(qemuhelpdata))
noinst_PROGRAMS = virshtest conftest \
......@@ -123,7 +126,8 @@ test_scripts = \
storagevolschematest \
domainschematest \
nodedevschematest \
nwfilterschematest
nwfilterschematest \
domainsnapshotschematest
if WITH_LIBVIRTD
test_scripts += \
......
#!/bin/sh
: ${srcdir=.}
. $srcdir/test-lib.sh
. $abs_srcdir/schematestutils.sh
DIRS="domainsnapshotxml2xmlin domainsnapshotxml2xmlout"
SCHEMA="domainsnapshot.rng"
check_schema "$DIRS" "$SCHEMA"
<domainsnapshot>
<description>My description</description>
</domainsnapshot>
<domainsnapshot>
<name>snap1</name>
<description>A longer description!</description>
</domainsnapshot>
<domainsnapshot>
<name>snapshot1</name>
</domainsnapshot>
<domainsnapshot>
<name>my snap name</name>
<description>!@#$%^</description>
<parent>
<name>earlier_snap</name>
</parent>
<state>running</state>
<creationTime>1272917631</creationTime>
<domain>
<uuid>9d37b878-a7cc-9f9a-b78f-49b3abad25a8</uuid>
</domain>
<active>1</active>
</domainsnapshot>
<domainsnapshot>
<name>my snap name</name>
<description>!@#$%^</description>
<state>running</state>
<creationTime>1272917631</creationTime>
<domain>
<uuid>9d37b878-a7cc-9f9a-b78f-49b3abad25a8</uuid>
</domain>
</domainsnapshot>
<domainsnapshot>
<name>my snap name</name>
<description>!@#$%^</description>
<state>running</state>
<creationTime>1272917631</creationTime>
<active>1</active>
</domainsnapshot>
<domainsnapshot>
<name>my snap name</name>
<description>!@#$%^</description>
<state>running</state>
<creationTime>1272917631</creationTime>
</domainsnapshot>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册