mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-28 15:35:22 +00:00
snapshot: update rng to support full domain in xml
This patch will probably cause merge conflicts to those trying to do backports. The end goal is simple - domaincommon.rng should be the state of domain.rng pre-patch, with a few lines tweaked in the header, while domain.rng post-patch is now just a shell that includes domaincommon.rng and sets the <start>. * docs/schemas/domain.rng: Move guts... * docs/schemas/domaincommon.rng: ...to new file. * docs/schemas/domainsnapshot.rng: Allow new xml. * docs/schemas/Makefile.am (schema_DATA): Distribute new file. * tests/domainsnapshotxml2xmlout/full_domain.xml: New test. * libvirt.spec.in (%files client): Ship new file. Sort lines. * mingw32-libvirt.spec.in: Likewise.
This commit is contained in:
parent
8352e04d7e
commit
2a95a3e976
@ -6,6 +6,7 @@ schema_DATA = \
|
|||||||
basictypes.rng \
|
basictypes.rng \
|
||||||
capability.rng \
|
capability.rng \
|
||||||
domain.rng \
|
domain.rng \
|
||||||
|
domaincommon.rng \
|
||||||
domainsnapshot.rng \
|
domainsnapshot.rng \
|
||||||
interface.rng \
|
interface.rng \
|
||||||
network.rng \
|
network.rng \
|
||||||
|
File diff suppressed because it is too large
Load Diff
2631
docs/schemas/domaincommon.rng
Normal file
2631
docs/schemas/domaincommon.rng
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,12 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
<!-- A Relax NG schema for the libvirt domain snapshot properties XML format -->
|
<!-- A Relax NG schema for the libvirt domain snapshot properties XML format -->
|
||||||
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
||||||
<start>
|
<start>
|
||||||
<ref name='domainsnapshot'/>
|
<ref name='domainsnapshot'/>
|
||||||
</start>
|
</start>
|
||||||
|
|
||||||
|
<include href='domaincommon.rng'/>
|
||||||
|
|
||||||
<define name='domainsnapshot'>
|
<define name='domainsnapshot'>
|
||||||
<element name='domainsnapshot'>
|
<element name='domainsnapshot'>
|
||||||
<interleave>
|
<interleave>
|
||||||
@ -36,11 +39,14 @@
|
|||||||
</element>
|
</element>
|
||||||
</optional>
|
</optional>
|
||||||
<optional>
|
<optional>
|
||||||
|
<choice>
|
||||||
<element name='domain'>
|
<element name='domain'>
|
||||||
<element name='uuid'>
|
<element name='uuid'>
|
||||||
<text/>
|
<ref name="UUID"/>
|
||||||
</element>
|
</element>
|
||||||
</element>
|
</element>
|
||||||
|
<ref name='domain'/>
|
||||||
|
</choice>
|
||||||
</optional>
|
</optional>
|
||||||
<optional>
|
<optional>
|
||||||
<element name='parent'>
|
<element name='parent'>
|
||||||
|
@ -1080,19 +1080,20 @@ fi
|
|||||||
%dir %{_datadir}/libvirt/
|
%dir %{_datadir}/libvirt/
|
||||||
%dir %{_datadir}/libvirt/schemas/
|
%dir %{_datadir}/libvirt/schemas/
|
||||||
|
|
||||||
%{_datadir}/libvirt/schemas/domain.rng
|
%{_datadir}/libvirt/schemas/basictypes.rng
|
||||||
%{_datadir}/libvirt/schemas/domainsnapshot.rng
|
|
||||||
%{_datadir}/libvirt/schemas/network.rng
|
|
||||||
%{_datadir}/libvirt/schemas/storagepool.rng
|
|
||||||
%{_datadir}/libvirt/schemas/storagevol.rng
|
|
||||||
%{_datadir}/libvirt/schemas/nodedev.rng
|
|
||||||
%{_datadir}/libvirt/schemas/capability.rng
|
%{_datadir}/libvirt/schemas/capability.rng
|
||||||
|
%{_datadir}/libvirt/schemas/domain.rng
|
||||||
|
%{_datadir}/libvirt/schemas/domaincommon.rng
|
||||||
|
%{_datadir}/libvirt/schemas/domainsnapshot.rng
|
||||||
%{_datadir}/libvirt/schemas/interface.rng
|
%{_datadir}/libvirt/schemas/interface.rng
|
||||||
|
%{_datadir}/libvirt/schemas/network.rng
|
||||||
|
%{_datadir}/libvirt/schemas/networkcommon.rng
|
||||||
|
%{_datadir}/libvirt/schemas/nodedev.rng
|
||||||
|
%{_datadir}/libvirt/schemas/nwfilter.rng
|
||||||
%{_datadir}/libvirt/schemas/secret.rng
|
%{_datadir}/libvirt/schemas/secret.rng
|
||||||
%{_datadir}/libvirt/schemas/storageencryption.rng
|
%{_datadir}/libvirt/schemas/storageencryption.rng
|
||||||
%{_datadir}/libvirt/schemas/nwfilter.rng
|
%{_datadir}/libvirt/schemas/storagepool.rng
|
||||||
%{_datadir}/libvirt/schemas/basictypes.rng
|
%{_datadir}/libvirt/schemas/storagevol.rng
|
||||||
%{_datadir}/libvirt/schemas/networkcommon.rng
|
|
||||||
|
|
||||||
%{_datadir}/libvirt/cpu_map.xml
|
%{_datadir}/libvirt/cpu_map.xml
|
||||||
|
|
||||||
|
@ -97,19 +97,20 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%dir %{_mingw32_datadir}/libvirt/
|
%dir %{_mingw32_datadir}/libvirt/
|
||||||
%dir %{_mingw32_datadir}/libvirt/schemas/
|
%dir %{_mingw32_datadir}/libvirt/schemas/
|
||||||
%{_mingw32_datadir}/libvirt/schemas/domain.rng
|
%{_mingw32_datadir}/libvirt/schemas/basictypes.rng
|
||||||
%{_mingw32_datadir}/libvirt/schemas/domainsnapshot.rng
|
|
||||||
%{_mingw32_datadir}/libvirt/schemas/network.rng
|
|
||||||
%{_mingw32_datadir}/libvirt/schemas/storagepool.rng
|
|
||||||
%{_mingw32_datadir}/libvirt/schemas/storagevol.rng
|
|
||||||
%{_mingw32_datadir}/libvirt/schemas/nodedev.rng
|
|
||||||
%{_mingw32_datadir}/libvirt/schemas/capability.rng
|
%{_mingw32_datadir}/libvirt/schemas/capability.rng
|
||||||
|
%{_mingw32_datadir}/libvirt/schemas/domain.rng
|
||||||
|
%{_mingw32_datadir}/libvirt/schemas/domaincommon.rng
|
||||||
|
%{_mingw32_datadir}/libvirt/schemas/domainsnapshot.rng
|
||||||
%{_mingw32_datadir}/libvirt/schemas/interface.rng
|
%{_mingw32_datadir}/libvirt/schemas/interface.rng
|
||||||
|
%{_mingw32_datadir}/libvirt/schemas/network.rng
|
||||||
|
%{_mingw32_datadir}/libvirt/schemas/networkcommon.rng
|
||||||
|
%{_mingw32_datadir}/libvirt/schemas/nodedev.rng
|
||||||
%{_mingw32_datadir}/libvirt/schemas/nwfilter.rng
|
%{_mingw32_datadir}/libvirt/schemas/nwfilter.rng
|
||||||
%{_mingw32_datadir}/libvirt/schemas/secret.rng
|
%{_mingw32_datadir}/libvirt/schemas/secret.rng
|
||||||
%{_mingw32_datadir}/libvirt/schemas/storageencryption.rng
|
%{_mingw32_datadir}/libvirt/schemas/storageencryption.rng
|
||||||
%{_mingw32_datadir}/libvirt/schemas/basictypes.rng
|
%{_mingw32_datadir}/libvirt/schemas/storagepool.rng
|
||||||
%{_mingw32_datadir}/libvirt/schemas/networkcommon.rng
|
%{_mingw32_datadir}/libvirt/schemas/storagevol.rng
|
||||||
|
|
||||||
%{_mingw32_datadir}/libvirt/cpu_map.xml
|
%{_mingw32_datadir}/libvirt/cpu_map.xml
|
||||||
|
|
||||||
|
35
tests/domainsnapshotxml2xmlout/full_domain.xml
Normal file
35
tests/domainsnapshotxml2xmlout/full_domain.xml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<domainsnapshot>
|
||||||
|
<name>my snap name</name>
|
||||||
|
<description>!@#$%^</description>
|
||||||
|
<parent>
|
||||||
|
<name>earlier_snap</name>
|
||||||
|
</parent>
|
||||||
|
<state>running</state>
|
||||||
|
<creationTime>1272917631</creationTime>
|
||||||
|
<domain type='qemu'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
||||||
|
<memory>219100</memory>
|
||||||
|
<currentMemory>219100</currentMemory>
|
||||||
|
<vcpu cpuset='1-4,8-20,525'>1</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='i686' machine='pc'>hvm</type>
|
||||||
|
<boot dev='hd'/>
|
||||||
|
</os>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu</emulator>
|
||||||
|
<disk type='block' device='disk'>
|
||||||
|
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
<target dev='hda' bus='ide'/>
|
||||||
|
<address type='drive' controller='0' bus='0' unit='0'/>
|
||||||
|
</disk>
|
||||||
|
<controller type='ide' index='0'/>
|
||||||
|
<memballoon model='virtio'/>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
||||||
|
<active>1</active>
|
||||||
|
</domainsnapshot>
|
Loading…
x
Reference in New Issue
Block a user