Red Hat Bugzilla – Bug 1471503
Missing entry in virNetworkUpdateFlags documentation
Last modified: 2017-07-16 12:56:06 EDT
Libvirt documentation is missing an entry under virNetworkUpdateFlags.
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.
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.