Update netplan integration for v0.104 compatibility
netplan_clear_netdefs() is being called to early, therefore netdef_id is
undefined/garbage and can not be used to calculate a path.
This did work in netplan <= 0.103 as there was a memory leak and netdef_id
was not actually cleared, starting with 0.104 the memory leak is fixed and
we need to adopt the NetworkManager integration accordingly.
This change is compatible with old and new versions of libnetplan.
859f160...
by
System Enablement CI Bot <email address hidden>
Open development for 1.22.10-11-dev
0b9bcdf...
by
System Enablement CI Bot <email address hidden>
Bump version to 1.22.10-10
9addaf2...
by
System Enablement CI Bot <email address hidden>
Update manifests to 1.22.10-10
81a1c2e...
by
System Enablement CI Bot <email address hidden>
Update ChangeLog for 1.22.10-10
ecc97ba...
by
System Enablement CI Bot <email address hidden>
netplan 0.103 compat changes are now integrated with the original patch, as
that version landed in UC20, changes to NM's unit-tests are not needed anymore.
Also, avoid calling into the netplan_generate() libnetplan API, this would just
execute the 'netplan generate' CLI, which would then call the
io.netplan.Netplan.Generate() DBus API in snap environments.
We can avoid this additional redirection and be independent from deprecation
or changes that are incompatible with the snap environment in the
netplan_generate() API, by calling the 'netplan generate' CLI directly.
Ideally, in the future we would avoid this redirection as well and call into
the io.netplan.Netplan.Generate() DBus method directly. But we need to pass a
--root-dir argument during the execution of NM's unit-tests, that is currently
not supported by the DBus method, so let's stick with the CLI for now.
This depends on the snapd snap to be >= 2.53.2+git864.g5823952 (currently in snapd/edge).
netplan 0.103 compat changes are now integrated with the original patch, as
that version landed in UC20, changes to NM's unit-tests are not needed anymore.
Also, avoid calling into the netplan_generate() libnetplan API, this would just
execute the 'netplan generate' CLI, which would then call the
io.netplan.Netplan.Generate() DBus API in snap environments.
We can avoid this additional redirection and be independent from deprecation
or changes that are incompatible with the snap environment in the
netplan_generate() API, by calling the 'netplan generate' CLI directly.
Ideally, in the future we would avoid this redirection as well and call into
the io.netplan.Netplan.Generate() DBus method directly. But we need to pass a
--root-dir argument during the execution of NM's unit-tests, that is currently
not supported by the DBus method, so let's stick with the CLI for now.