canonical / checkbox

Checkbox
https://checkbox.readthedocs.io
GNU General Public License v3.0
30 stars 44 forks source link

Support both networkd and NetworkManger in netplan (New) #1301

Open seankingyang opened 1 week ago

seankingyang commented 1 week ago

Description

Netplan serves as a network configuration abstraction renderer and was officially released in the 24.04 LTS version. Netplan functions as a configuration tool for back-end daemons managing network interfaces, such as NetworkManager or systemd-networkd. In essence, Netplan acts as a configuration tool for back-end daemons managing network interfaces, independent of specific technologies.

In this PR, modify the wifi_client_test_netplan.py script to make it support both networkd and NetworkManger.

When utilizing this script in a test job, the renderer cannot be retrieved as an input parameter. There is a limitation regarding checkbox usage: the outcome of the bootstrap resource job cannot be utilized in the command field.

An alternative approach is required until the following issues are resolved:

  • The resource job: net_if_management needs to be split into two parts, one for wireless and the other for ethernet.
  • The script: net_if_management.py should only output either wireless or ethernet information.
  • Revise all jobs that utilize the output from: net_if_management

WIFI jobs (nm and np) should avoid using device as the template-resource, instead opt for net_if_management_wireless (currently unavailable).

According to the above issue, it need to add the following action:

Resolved issues

1303 (Netplan missing the key-management: psk when wpa/wpa2)

Documentation

Tests

Run cmd on systemd-networkd machine 202405-34023

Run checkbox wireless test category on machine 202405-34023

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 91.57895% with 8 lines in your changes missing coverage. Please review.

Project coverage is 44.29%. Comparing base (ea9db5f) to head (ac16772). Report is 28 commits behind head on main.

Files Patch % Lines
providers/base/bin/wifi_client_test_netplan.py 91.57% 7 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1301 +/- ## ========================================== + Coverage 43.76% 44.29% +0.52% ========================================== Files 358 358 Lines 38734 38821 +87 Branches 6565 6590 +25 ========================================== + Hits 16951 17194 +243 + Misses 21118 20960 -158 - Partials 665 667 +2 ``` | [Flag](https://app.codecov.io/gh/canonical/checkbox/pull/1301/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | Coverage Δ | | |---|---|---| | [provider-base](https://app.codecov.io/gh/canonical/checkbox/pull/1301/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical) | `19.27% <91.57%> (+1.46%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=canonical#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.