Bug 1471503

Summary: Missing entry in virNetworkUpdateFlags documentation
Product: [Community] Virtualization Tools Reporter: Onmeac <sebastiaan>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: laine, libvirt-maint, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-16 16:56:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Onmeac 2017-07-16 13:28:58 UTC
Libvirt documentation is missing an entry under virNetworkUpdateFlags.

Current options:
VIR_NETWORK_UPDATE_AFFECT_CURRENT = 0
VIR_NETWORK_UPDATE_AFFECT_LIVE = 1
VIR_NETWORK_UPDATE_AFFECT_CONFIG = 2

A fourth one is missing:
<name> = 3
For updating both live and config.

Comment 1 Laine Stump 2017-07-16 16:56:06 UTC
the values of the enum virNetworkUpdateFlags are eash a single bit, and are intended to be bitwise-ORed together. This is already stated in the places where an API has a flags argument that uses virNetworkUpdateFlags. For example, this is what it says in the documentation for the virNetworkUpdate() function:

  flags:   bitwise OR of virNetworkUpdateFlags.

So if you want the update to affect both the live state of the network and the persistent config, you would send

   VIR_NETWORK_UPDATE_AFFECT_LIVE | VIR_NETWORK_UPDATE_AFFECT_CONFIG

The documentation for enums is auto-generated a single line is automatically generated for each enum value; there is no provision for adding extra lines to document combinations of values.