Add support to assign an interface or match settings to a connection#723
Merged
Add support to assign an interface or match settings to a connection#723
Conversation
baa4bfb to
e4f7d5c
Compare
imobachgs
reviewed
Sep 5, 2023
imobachgs
approved these changes
Sep 12, 2023
2e8e962 to
3de5288
Compare
imobachgs
requested changes
Sep 13, 2023
Contributor
imobachgs
left a comment
There was a problem hiding this comment.
In general, it looks good. Just a few suggestions.
|
|
||
| match_config_dbus.insert("interface-name", interfaces); | ||
|
|
||
| match_config_dbus |
Contributor
There was a problem hiding this comment.
You can do:
HashMap::from([
("driver", drivers),
("kernel-command-line", kernels),
("path", paths),
("interface-name", interfaces),
])It looks more readable to me and it is easy to find out what is included in the HashMap.
Contributor
Author
There was a problem hiding this comment.
Yep, originally did so, then added some logic to inserting only the key if it was not empty but as we are inserting it always now it makes sense to do so. Thanks
4b60739 to
ed83dad
Compare
Co-authored-by: Imobach González Sosa <igonzalezsosa@suse.com>
ed83dad to
c3f1bd9
Compare
imobachgs
approved these changes
Sep 13, 2023
Merged
This file contains hidden or 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.
Problem
Agama allows to add/update network connections. However, it relies on NetworkManager to decide which interface to use. Alternatively, Agama should allow the user to assign a connection to an specific interface.
Instead of using just an interface name, Agama should offer some matching capabilities, just like NetworkManager. How the API should look like is up to who implements the feature but the interface-name, the path and the driver should be supported.
Solution
It has been added support to specify to which interfaces the connection should be bond to supporting it directly through the interface name attribute or through a set of match settings as them are supported by NetworkManager.
Testing