netplan:slyon/routing-types

Last commit made on 2022-01-11
Get this branch:
git clone -b slyon/routing-types https://git.launchpad.net/netplan

Branch merges

Branch information

Name:
slyon/routing-types
Repository:
lp:netplan

Recent commits

df2a5f2... by Lukas Märdian

Update TODO with some ABI incompatible changes

e6d51fe... by Lukas Märdian

tests: additional routing checks

ae39fb1... by Lukas Märdian

doc: improve routes/type/scope documentation

d7d006f... by Lukas Märdian

test:errors: fix test case for type:unicast & scope:global routes

e4ba033... by Lukas Märdian

test:routing: add cases for default scope: link/host

50d910e... by Lukas Märdian

parse: set default scope according to route type

LP: #1805038
FR-1077

95a4eaa... by Lukas Märdian

parse: accept additional routing types

LP: #1892272
FR-1078

3e3c371... by Simon Chopin

YAML consolidation prelude: OVS handling (FR-702) (#249)

* 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.

Co-authored-by: Lukas Märdan <email address hidden>

519fb50... by Simon Chopin

Consolidate the YAML parsing into libnetplan: low-hanging fruits (FR-702) (#241)

* netplan:migrate: graceful error if PyYAML isn't available

* netplan:info: manually output the YAML instead of using the bindings

The data is simple enough that it's reasonable to format it by hand
rather than relying on an external dependency.

* info: don't hardcode the website info in the YAML string

Co-authored-by: Lukas Märdian <email address hidden>

e0a07bc... by Lukas Märdian

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>