[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] schema: Allow multiple machines for sparc VMs



On Mon, Apr 13, 2015 at 04:14:53PM +0200, Martin Kletzander wrote:
> Use the same pattern as there is for x86 machines.
> 
> Signed-off-by: Martin Kletzander <mkletzan redhat com>
> ---
>  docs/schemas/domaincommon.rng | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> index 03fd541..80b30df 100644
> --- a/docs/schemas/domaincommon.rng
> +++ b/docs/schemas/domaincommon.rng
> @@ -384,7 +384,9 @@
>        </optional>
>        <optional>
>          <attribute name="machine">
> -          <value>sun4m</value>
> +          <data type="string">
> +            <param name="pattern">[a-zA-Z0-9_\.\-]+</param>
> +          </data>
>          </attribute>
>        </optional>
>      </group>

I think you could probably simplify this all much more. All these
architecture  specific blocks of machine type names should just be
deleted and so this:

  <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>

Would simplify to just

  <define name="ostypehvm">
    <element name="type">
      <optional>
        <attribute name="arch">
          <choice>
            <value>i686</value>
	    ....others...
          </choice>
        </attribute>
      </optional>
      <optional>
        <attribute name="machine">
          <data type="string">
            <param name="pattern">[a-zA-Z0-9_\.\-]+</param>
          </data>
        </attribute>
      </optional>
    </element>
  </define>


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]