[libvirt] [PATCH] Allow custom metadata in network configuration XML

Laine Stump laine at laine.org
Thu Jun 23 19:34:43 UTC 2016


On 06/22/2016 06:05 PM, Brnadon Bennett wrote:
> From: Brandon Bennett <bbennett at fb.com>
>
>      This replicates the metadata field found in the domain configuration
>      and adds it to the network configuration XML.
> ---
>   docs/formatnetwork.html.in           | 13 +++++++++++++
>   docs/schemas/basictypes.rng          | 23 +++++++++++++++++++++++
>   docs/schemas/domaincommon.rng        | 23 -----------------------
>   docs/schemas/network.rng             |  5 +++++
>   src/conf/network_conf.c              | 35 ++++++++++++++++++++++++++++++++++-
>   src/conf/network_conf.h              |  3 +++
>   tests/networkxml2xmlin/metadata.xml  | 10 ++++++++++
>   tests/networkxml2xmlout/metadata.xml | 10 ++++++++++
>   tests/networkxml2xmltest.c           |  1 +
>   9 files changed, 99 insertions(+), 24 deletions(-)
>   create mode 100644 tests/networkxml2xmlin/metadata.xml
>   create mode 100644 tests/networkxml2xmlout/metadata.xml
>
> diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in
> index 1cea931..15ebf0c 100644
> --- a/docs/formatnetwork.html.in
> +++ b/docs/formatnetwork.html.in
> @@ -38,6 +38,10 @@
>         <network ipv6='yes' trustGuestRxFilters='no'>
>           <name>default</name>
>           <uuid>3e3fce45-4f53-4fa7-bb32-11f34168b82b</uuid>
> +	    <metadata>

You used a space rather than a tab in the line just above here. If you 
run "make syntax-check", style errors like that will be pointed out.

Other than that, this is a very faithful reproduction of commit 
fa981fc94, which added metada support to the domain and passes make 
syntax-check and make check.

ACK to the patch. Unless someone has a specific reason why networks 
shouldn't have the same ability to store metadata as domains, I'll push 
this tomorrow (so that it makes it into the release).

Thanks for putting your money where your mouth is and coming up with 
this patch in such a short time (we discussed it briefly on IRC 
yesterday)., and congratulations on your first libvirt patch!




More information about the libvir-list mailing list