-
Simon Chopin authored
This would be a structure holding all the data used to define a complete network setup in Netplan. At this moment there are no guarantee of coherence or validation of the validation, though. We use some linker tricks to keep the previous globals `netdef`, `netdef_ordered` and `global_ovs_config` visible in the ABI, even though they now actually point to fields within a global state instance that is there only for this compatibility purpose. Note that the constructor, destructor and netdef accessors aren't implemented yet. This is mostly because there are no consumers for this API yet, and I'd like to get this commit into the mainline as is, which means retaining 100% code coverage... ¯\_(ツ)_/¯ V2: * rename the nps arguments to np_state * use a netplan_state_* naming scheme for all functions pertaining to the new structure * Add placeholder implementations for netplan_state_{new,clear} * Add a comment in netplan_state_reset regarding the ownership of netdef objects * Remove superfluous headers in abi_compat.c * Remove the dependency on the error-code-flow branch V3: * Disable LCOV coverage on the placeholder functions