[change] Wireless: avoid unnecessary network config #289#298
Merged
nemesifier merged 2 commits intomasterfrom Jul 9, 2024
Merged
[change] Wireless: avoid unnecessary network config #289#298nemesifier merged 2 commits intomasterfrom
nemesifier merged 2 commits intomasterfrom
Conversation
nemesifier
commented
Jun 7, 2024
| self.assertEqual(o.config, self._wireless_interface_netjson) | ||
| self.assertDictEqual(o.config, self._wireless_interface_netjson) | ||
|
|
||
| _wireless_only_netjson = { |
Member
Author
There was a problem hiding this comment.
I added a couple of tests with the use case described by @thiagohflima in the original issue #289 (comment).
| if len(static.get('ip6addr', [])) == 1: | ||
| static['ip6addr'] = static['ip6addr'][0] | ||
| result.append(static) | ||
| result.append(self.__intermediate_static_address(static)) |
Member
Author
There was a problem hiding this comment.
I had to move the logic above to this method because flake8 was complaining about cyclomatic complexity due to the 2 lines I had to add above.
eb192a0 to
331a144
Compare
Avoid generating unnecessary config in /etc/config/network when defining wireless interfaces. Closes #289
There's no point in trying to attach a WiFi interface to itself. It's unnecessary and can cause issues in some situations.
1beb808 to
ba2f9b8
Compare
This was referenced Aug 30, 2024
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.
Avoid generating unnecessary config in /etc/config/network when defining wireless interfaces.
Closes #289