-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(nm): add NetworkManagerDbusWrapper and ModemManagerDbusWrapper objects #4757
Merged
mattdibi
merged 29 commits into
eclipse-kura:develop
from
mattdibi:refactor/dbus_conn_wrappers
Jul 19, 2023
Merged
refactor(nm): add NetworkManagerDbusWrapper and ModemManagerDbusWrapper objects #4757
mattdibi
merged 29 commits into
eclipse-kura:develop
from
mattdibi:refactor/dbus_conn_wrappers
Jul 19, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds two new objects to the
org.eclipse.kura.nm
bundle that abstract the two main services to which theNMDbusConnector
interfaces: NetworkManager and ModemManager.This refactoring was necessary since the
NMDbusConnector
, initially dedicated to interfacing only with NetworkManager, grew too much and started touching other services (ModemManager, soon WPA Supplicant) as features were added.The introduction of these two new objects should increase the readability of the code since it is now clear to which dbus service the
NMDbusConnector
is talking to.Additional notes:
getModemDeviceHwPath
method fromNMStatusConverter
to the ModemManager wrapper.Things I don't particularly like:
NetworkManagerDbusWrapper
and theModemManagerDbusWrapper
have adbusConnection
as private member, but the sole owner of thedbusConnection
isNMDbusConnector
(which is why we modeled it as a singleton). Another way to avoid confusion would be to always pass thedbusConnection
as parameter of the method. Any suggestion is welcome.ModemManagerDbusWrapper
since ModemManager is responsible for managing the Modem but to decide whether we need to reset the modem or not we monitor a NetworkManager signal. The reset handlers are a "bridge" between the two services but I decided to move them in the ModemManager anyway.NMDbusConnector
tests but a set of dedicated tests for the wrappers would be a great idea.Test performed on Raspberry Pi 4:
Any additional test is welcome