On Tue, Apr 26, 2022 at 16:17:05 +0530, Rohit Kumar wrote:
On 21/04/22 8:31 pm, Peter Krempa wrote:
> On Fri, Apr 08, 2022 at 10:48:48 -0700, Rohit Kumar wrote:
> > This patch updates NVRAM element schema to support
> > network backed NVRAM. It introduces 'type' attribute
> > to NVRAM element.
> >
> > Signed-off-by: Prerna Saxena <prerna.saxena(a)nutanix.com>
> > Signed-off-by: Florian Schmidt <flosch(a)nutanix.com>
> > Signed-off-by: Rohit Kumar <rohit.kumar3(a)nutanix.com>
> > ---
> > src/conf/schemas/domaincommon.rng | 20 +++++++++++++++++++-
> > 1 file changed, 19 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/conf/schemas/domaincommon.rng
b/src/conf/schemas/domaincommon.rng
> > index 58eb9670d4..cd61d00b33 100644
> > --- a/src/conf/schemas/domaincommon.rng
> > +++ b/src/conf/schemas/domaincommon.rng
> > @@ -333,7 +333,25 @@
[...]
> > + </group>
> > + <group>
> > + <ref name="diskSourceFileElement"/>
> ... with a 'file' source. These will need to be re-grouped differently
> so that only the corresponding attribute value is allowed with
> appropriate contents.
Thanks for pointing this. I will re-group these.
Also, having this grouping in schema is enough ? or do we need to validation
for this as well ?
As I've mentioned in my previous reply, libvirt unfortunately does not
validate the XML against the schema unless requested by the user, thus
you need to reject in the code anything that is parsed but not inteded
to be actually supported.
This is an unfortunate historic decision we've made which can't be
changed as quirks in the schema could lead to rejection of previously
working configs.