[libvirt] [PATCH v2] schema: Allow multiple machines for VMs

Use the same pattern for all OS types. Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- docs/schemas/domaincommon.rng | 160 ++---------------------------------------- 1 file changed, 4 insertions(+), 156 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 03fd541..cb21df7 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -328,152 +328,17 @@ <define name="ostypehvm"> <element name="type"> <optional> - <choice> - <ref name="hvmx86"/> - <ref name="hvmmips"/> - <ref name="hvmsparc"/> - <ref name="hvmppc"/> - <ref name="hvmppc64"/> - <ref name="hvms390"/> - <ref name="hvmarm"/> - <ref name="hvmaarch64"/> - </choice> - </optional> - <value>hvm</value> - </element> - </define> - <define name="hvmx86"> - <group> - <optional> <attribute name="arch"> <choice> <value>i686</value> <value>x86_64</value> - </choice> - </attribute> - </optional> - <optional> - <attribute name="machine"> - <data type="string"> - <param name="pattern">[a-zA-Z0-9_\.\-]+</param> - </data> - </attribute> - </optional> - </group> - </define> - <define name="hvmmips"> - <group> - <optional> - <attribute name="arch"> - <value>mips</value> - </attribute> - </optional> - <optional> - <attribute name="machine"> - <value>mips</value> - </attribute> - </optional> - </group> - </define> - <define name="hvmsparc"> - <group> - <optional> - <attribute name="arch"> - <value>sparc</value> - </attribute> - </optional> - <optional> - <attribute name="machine"> - <value>sun4m</value> - </attribute> - </optional> - </group> - </define> - <define name="hvmppc"> - <group> - <optional> - <attribute name="arch"> - <value>ppc</value> - </attribute> - </optional> - <optional> - <attribute name="machine"> - <choice> - <value>g3beige</value> - <value>mac99</value> - <value>prep</value> - <value>ppce500</value> - </choice> - </attribute> - </optional> - </group> - </define> - <define name="hvmppc64"> - <group> - <optional> - <attribute name="arch"> - <choice> + <value>mips</value> + <value>ppc</value> <value>ppc64</value> <value>ppc64le</value> - </choice> - </attribute> - </optional> - <optional> - <attribute name="machine"> - <choice> - <value>pseries</value> - <value>pseries-2.1</value> - <value>pseries-2.2</value> - </choice> - </attribute> - </optional> - </group> - </define> - <define name="hvms390"> - <group> - <optional> - <attribute name="arch"> - <choice> <value>s390</value> <value>s390x</value> - </choice> - </attribute> - </optional> - <optional> - <attribute name="machine"> - <choice> - <value>s390</value> - <value>s390-virtio</value> - <value>s390-ccw</value> - <value>s390-ccw-virtio</value> - </choice> - </attribute> - </optional> - </group> - </define> - <define name="hvmarm"> - <group> - <optional> - <attribute name="arch"> - <choice> <value>armv7l</value> - </choice> - </attribute> - </optional> - <optional> - <attribute name="machine"> - <data type="string"> - <param name="pattern">[a-zA-Z0-9_\.\-]+</param> - </data> - </attribute> - </optional> - </group> - </define> - <define name="hvmaarch64"> - <group> - <optional> - <attribute name="arch"> - <choice> <value>aarch64</value> </choice> </attribute> @@ -485,25 +350,6 @@ </data> </attribute> </optional> - </group> - </define> - <define name="osexe"> - <element name="os"> - <element name="type"> - <optional> - <attribute name="arch"> - <choice> - <value>i686</value> - <value>x86_64</value> - <value>ppc</value> - <value>ppc64</value> - <value>mips</value> - <value>sparc</value> - </choice> - </attribute> - </optional> - <value>exe</value> - </element> <interleave> <optional> <element name="init"> @@ -516,8 +362,10 @@ </element> </zeroOrMore> </interleave> + <value>hvm</value> </element> </define> + <!-- The Identifiers can be: - an optional id attribute with a number on the domain element -- 2.3.5

On Mon, Apr 13, 2015 at 04:53:53PM +0200, Martin Kletzander wrote:
Use the same pattern for all OS types.
Did you mean to do it for all architectures for os type='hvm'? Because I only see that this patch touches hvm and exe OS types.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- docs/schemas/domaincommon.rng | 160 ++---------------------------------------- 1 file changed, 4 insertions(+), 156 deletions(-)
The patch fails 'make check' for me: docs/schemas/domaincommon.rng:209: element ref: Relax-NG parser error : Reference osexe has no matching definition Jan

On Wed, Apr 15, 2015 at 12:18:15PM +0200, Ján Tomko wrote:
On Mon, Apr 13, 2015 at 04:53:53PM +0200, Martin Kletzander wrote:
Use the same pattern for all OS types.
Did you mean to do it for all architectures for os type='hvm'? Because I only see that this patch touches hvm and exe OS types.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com> --- docs/schemas/domaincommon.rng | 160 ++---------------------------------------- 1 file changed, 4 insertions(+), 156 deletions(-)
The patch fails 'make check' for me: docs/schemas/domaincommon.rng:209: element ref: Relax-NG parser error : Reference osexe has no matching definition
Yes, because I removed few too many lines. Fixing this I realized we can drop another few lines, this time even without make check failing. I'll send it as a v3.
participants (2)
-
Ján Tomko
-
Martin Kletzander