[PATCH v2 18/21] schema: domain: Accept VMWARE disk sources for the disk

Pino Toscano ptoscano at redhat.com
Thu Oct 8 09:17:31 UTC 2020


On Thursday, 8 October 2020 10:47:16 CEST Peter Krempa wrote:
> Our vmware driver chose to format disk paths starting with a square
> bracket. This would not conform to the RNG schema for disk source.
> Modify the schema to allow these since it's around for some time.

s/VMWARE/VMware/ in the first line of the commit message.

Also, the format is not a real path: it's the datastore where the VM
is stored, followed by the relative path in it. This is also
documented: https://libvirt.org/drvesx.html#datastore

> diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng
> index b1fb939aff..42e94c40e9 100644
> --- a/docs/schemas/basictypes.rng
> +++ b/docs/schemas/basictypes.rng
> @@ -303,6 +303,12 @@
>      </data>
>    </define>
> 
> +  <define name="vmwarePath">
> +    <data type="string">
> +      <param name="pattern">\[.+\] .+</param>

Let's make the datastore part slightly more strict:

     <param name="pattern">\[[^\]+\] .+</param>

So it should work also with a greedy validator.

With the above changes:

Reviewed-by: Pino Toscano <ptoscano at redhat.com>

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20201008/cf6f011b/attachment-0001.sig>


More information about the libvir-list mailing list