提交 2a95a3e9 编写于 作者: E Eric Blake

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.
上级 8352e04d
......@@ -6,6 +6,7 @@ schema_DATA = \
basictypes.rng \
capability.rng \
domain.rng \
domaincommon.rng \
domainsnapshot.rng \
interface.rng \
network.rng \
......
此差异已折叠。
此差异已折叠。
<?xml version="1.0"?>
<!-- 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>
<include href='domaincommon.rng'/>
<define name='domainsnapshot'>
<element name='domainsnapshot'>
<interleave>
......@@ -36,11 +39,14 @@
</element>
</optional>
<optional>
<choice>
<element name='domain'>
<element name='uuid'>
<text/>
<ref name="UUID"/>
</element>
</element>
<ref name='domain'/>
</choice>
</optional>
<optional>
<element name='parent'>
......
......@@ -1080,19 +1080,20 @@ fi
%dir %{_datadir}/libvirt/
%dir %{_datadir}/libvirt/schemas/
%{_datadir}/libvirt/schemas/basictypes.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/network.rng
%{_datadir}/libvirt/schemas/storagepool.rng
%{_datadir}/libvirt/schemas/storagevol.rng
%{_datadir}/libvirt/schemas/networkcommon.rng
%{_datadir}/libvirt/schemas/nodedev.rng
%{_datadir}/libvirt/schemas/capability.rng
%{_datadir}/libvirt/schemas/interface.rng
%{_datadir}/libvirt/schemas/nwfilter.rng
%{_datadir}/libvirt/schemas/secret.rng
%{_datadir}/libvirt/schemas/storageencryption.rng
%{_datadir}/libvirt/schemas/nwfilter.rng
%{_datadir}/libvirt/schemas/basictypes.rng
%{_datadir}/libvirt/schemas/networkcommon.rng
%{_datadir}/libvirt/schemas/storagepool.rng
%{_datadir}/libvirt/schemas/storagevol.rng
%{_datadir}/libvirt/cpu_map.xml
......
......@@ -97,19 +97,20 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_mingw32_datadir}/libvirt/
%dir %{_mingw32_datadir}/libvirt/schemas/
%{_mingw32_datadir}/libvirt/schemas/basictypes.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/network.rng
%{_mingw32_datadir}/libvirt/schemas/storagepool.rng
%{_mingw32_datadir}/libvirt/schemas/storagevol.rng
%{_mingw32_datadir}/libvirt/schemas/networkcommon.rng
%{_mingw32_datadir}/libvirt/schemas/nodedev.rng
%{_mingw32_datadir}/libvirt/schemas/capability.rng
%{_mingw32_datadir}/libvirt/schemas/interface.rng
%{_mingw32_datadir}/libvirt/schemas/nwfilter.rng
%{_mingw32_datadir}/libvirt/schemas/secret.rng
%{_mingw32_datadir}/libvirt/schemas/storageencryption.rng
%{_mingw32_datadir}/libvirt/schemas/basictypes.rng
%{_mingw32_datadir}/libvirt/schemas/networkcommon.rng
%{_mingw32_datadir}/libvirt/schemas/storagepool.rng
%{_mingw32_datadir}/libvirt/schemas/storagevol.rng
%{_mingw32_datadir}/libvirt/cpu_map.xml
......
<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>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册