[libvirt] [PATCH] network: fully support/use VIR_NETWORK_XML_INACTIVE flag

Eric Blake eblake at redhat.com
Mon Jun 11 21:06:32 UTC 2012


On 06/11/2012 02:54 PM, Laine Stump wrote:
> commit 52d064f42dbc857f4096dc60c0335395ffac73aa added
> VIR_NETWORK_XML_INACTIVE in order to allow suppressing the
> auto-generated list of VFs in network definitions, and a --inactive
> flag to virsh net-dumpxml to take advantage of the flag. However, it
> missed out on two oppurtunities:

s/oppurtunities/opportunities/

> 
> 1) Use INACTIVE to get the current config of the network as it
>    exists on disk, rather than the currently active config.
> 
> 2) Add INACTIVE to the flags used for the virsh net-edit command, so
>    that it won't include the forward-pool interfaces that were
>    autogenerated, and so that a re-edit of the network prior to
>    restarting it will show any other edits made since the last restart
>    of the network. (prior to this patch, if you edited a network a 2nd
>    time without restarting, all of the previous edits would magically
>    disappear).
> 
> In order to fit with the new #define-based generic edit function in
> virsh.c, a new function vshNetworkGetXMLDesc() was added. This
> function first tries to call virNetworkGetXMLDesc with the INACTIVE
> flag added, then retries without if the first attempt fails (in the
> manner expected when the server doesn't support it).,

s/,$//

Incomplete: virsh.pod should mention that 'net-edit' behaves like
'net-dumpxml --inactive' (see how we documented 'edit').

ACK with that addition.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120611/e2472dac/attachment-0001.sig>


More information about the libvir-list mailing list