* lib: ensure consistency in OVS port input/output
The previous implementation relied on the order of traversal of a
hashtable, which isn't exactly reliable. It wasn't problematic because
the semantics of the port pair are symetrical, but since we're planing
on using the YAML netplan generator backend as a passthrough for
`netplan set`, we want to preserve the user's input as pristinely as
possible.
The new implementation uses the ordered list of netdefs to determine the
order in which netdefs are processed, which is both deterministic and
sensible, since it respects the order in which the user fed us the info
(modulo the grouping by devtype).
* netplan:names: give a proper name to the OVS port pseudo-deftype
Later in the patchset we expose this data to Python, and are using the
names rather than the integers to represent the netdef types. As a
result, we need a proper name for this type to distinguish it from the
default value.
* lib:ovs: change the ovs-port name to mark it as "special"
Contrary to all other def types, this one is "virtual", as it doesn't have a YAML key matching it. Prefixing it with an underscore should make it obvious that *something* is different there.
keyfile: do not try to write out unvalidated YAML (LP: #1952967) (#247)
netplan's keyfile parser can handle certain device types and settings from NM's keyfile format. But we should try to avoid writing out partial YAML where some (essential) fields are missing, as they cannot (yet) be properly parsed.
We need to check that during testing and ideally also at runtime, in order to fall back to the full passthrough mode, using the generic nm-devices type.
FR-1898
COMMITS:
* test:keyfile: add test case for tunnel regression
* test:parser:base: check if 'netplan generate' was successful
* parse-nm: Tunnels are not fully supported and generation might fail due to missing fields
Fall back to using full passthrough mode ('nm-devices:') for now.
* test:keyfile: avoid conflict with mutually exclusive ipv6-address-token/generation
* abi-compat: add some debugging output during tests
* test:parser:base: clear original file after being parsed
* parse-nm: test-keyfile: do not try to parse vlans (implementation incomplete)
* test-keyfile: increase coverage for non-standard keyfile filename
* parse-nm: test-keyfile: validate config at after keyfile parsing
return FALSE and fill the passed GError if it does not succeed
* tests:parser:base: improve coverage comment
Co-authored-by: Simon Chopin <email address hidden>