[PATCH v2 5/8] Update XML schema to support network backed NVRAM

Peter Krempa pkrempa at redhat.com
Thu Apr 21 15:01:50 UTC 2022


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 at nutanix.com>
> Signed-off-by: Florian Schmidt <flosch at nutanix.com>
> Signed-off-by: Rohit Kumar <rohit.kumar3 at 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 @@
>                </attribute>
>              </optional>
>              <optional>
> -              <ref name="absFilePath"/>
> +              <attribute name="type">
> +                <choice>
> +                  <value>file</value>
> +                  <value>network</value>

So this schema would e.g. allow a type='network' nvram ...

> +                </choice>
> +              </attribute>
> +            </optional>
> +            <optional>
> +              <choice>
> +                <group>
> +                  <ref name="absFilePath"/>
> +                </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.

> +                </group>
> +                <group>
> +                  <ref name="diskSourceNetworkElement"/>
> +                </group>
> +              </choice>
>              </optional>
>            </element>
>          </optional>
> -- 
> 2.25.1
> 


More information about the libvir-list mailing list