mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
Domain snapshot RNG and tests.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
This commit is contained in:
parent
8749256d0b
commit
54971d9170
53
docs/schemas/domainsnapshot.rng
Normal file
53
docs/schemas/domainsnapshot.rng
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<!-- 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 \
|
nwfilterxml2xmlout \
|
||||||
nwfilterxml2xmlin \
|
nwfilterxml2xmlin \
|
||||||
nwfilterschematest \
|
nwfilterschematest \
|
||||||
|
domainsnapshotschematest \
|
||||||
|
domainsnapshotxml2xmlout \
|
||||||
|
domainsnapshotxml2xmlin \
|
||||||
$(patsubst %,qemuhelpdata/%,$(qemuhelpdata))
|
$(patsubst %,qemuhelpdata/%,$(qemuhelpdata))
|
||||||
|
|
||||||
noinst_PROGRAMS = virshtest conftest \
|
noinst_PROGRAMS = virshtest conftest \
|
||||||
@ -123,7 +126,8 @@ test_scripts = \
|
|||||||
storagevolschematest \
|
storagevolschematest \
|
||||||
domainschematest \
|
domainschematest \
|
||||||
nodedevschematest \
|
nodedevschematest \
|
||||||
nwfilterschematest
|
nwfilterschematest \
|
||||||
|
domainsnapshotschematest
|
||||||
|
|
||||||
if WITH_LIBVIRTD
|
if WITH_LIBVIRTD
|
||||||
test_scripts += \
|
test_scripts += \
|
||||||
|
10
tests/domainsnapshotschematest
Executable file
10
tests/domainsnapshotschematest
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
: ${srcdir=.}
|
||||||
|
. $srcdir/test-lib.sh
|
||||||
|
. $abs_srcdir/schematestutils.sh
|
||||||
|
|
||||||
|
DIRS="domainsnapshotxml2xmlin domainsnapshotxml2xmlout"
|
||||||
|
SCHEMA="domainsnapshot.rng"
|
||||||
|
|
||||||
|
check_schema "$DIRS" "$SCHEMA"
|
3
tests/domainsnapshotxml2xmlin/description_only.xml
Normal file
3
tests/domainsnapshotxml2xmlin/description_only.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<description>My description</description>
|
||||||
|
</domainsnapshot>
|
1
tests/domainsnapshotxml2xmlin/empty.xml
Normal file
1
tests/domainsnapshotxml2xmlin/empty.xml
Normal file
@ -0,0 +1 @@
|
|||||||
|
<domainsnapshot/>
|
4
tests/domainsnapshotxml2xmlin/name_and_description.xml
Normal file
4
tests/domainsnapshotxml2xmlin/name_and_description.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>snap1</name>
|
||||||
|
<description>A longer description!</description>
|
||||||
|
</domainsnapshot>
|
3
tests/domainsnapshotxml2xmlin/name_only.xml
Normal file
3
tests/domainsnapshotxml2xmlin/name_only.xml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>snapshot1</name>
|
||||||
|
</domainsnapshot>
|
13
tests/domainsnapshotxml2xmlout/all_parameters.xml
Normal file
13
tests/domainsnapshotxml2xmlout/all_parameters.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<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>
|
9
tests/domainsnapshotxml2xmlout/noparent.xml
Normal file
9
tests/domainsnapshotxml2xmlout/noparent.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>my snap name</name>
|
||||||
|
<description>!@#$%^</description>
|
||||||
|
<state>running</state>
|
||||||
|
<creationTime>1272917631</creationTime>
|
||||||
|
<domain>
|
||||||
|
<uuid>9d37b878-a7cc-9f9a-b78f-49b3abad25a8</uuid>
|
||||||
|
</domain>
|
||||||
|
</domainsnapshot>
|
@ -0,0 +1,7 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>my snap name</name>
|
||||||
|
<description>!@#$%^</description>
|
||||||
|
<state>running</state>
|
||||||
|
<creationTime>1272917631</creationTime>
|
||||||
|
<active>1</active>
|
||||||
|
</domainsnapshot>
|
@ -0,0 +1,6 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>my snap name</name>
|
||||||
|
<description>!@#$%^</description>
|
||||||
|
<state>running</state>
|
||||||
|
<creationTime>1272917631</creationTime>
|
||||||
|
</domainsnapshot>
|
Loading…
Reference in New Issue
Block a user