feat: Add VLAN management for network_interface object - #6
Open
KTokarze wants to merge 1 commit into
Open
Conversation
KTokarze
force-pushed
the
linux_vlan_management
branch
from
July 21, 2025 11:43
2c85a00 to
7765603
Compare
KTokarze
force-pushed
the
linux_vlan_management
branch
from
July 22, 2025 08:58
7765603 to
aa5fecc
Compare
adrianlasota
force-pushed
the
linux_vlan_management
branch
from
July 22, 2025 09:06
aa5fecc to
cf4f31f
Compare
KTokarze
force-pushed
the
linux_vlan_management
branch
from
July 22, 2025 09:19
cf4f31f to
3897a76
Compare
KTokarze
force-pushed
the
linux_vlan_management
branch
from
July 22, 2025 09:21
3897a76 to
33e23f7
Compare
KTokarze
force-pushed
the
linux_vlan_management
branch
from
July 23, 2025 12:06
33e23f7 to
97a5184
Compare
KTokarze
force-pushed
the
linux_vlan_management
branch
from
July 24, 2025 13:44
97a5184 to
d7fc649
Compare
hcymerys
requested changes
Jul 29, 2025
KTokarze
force-pushed
the
linux_vlan_management
branch
from
July 30, 2025 05:32
d7fc649 to
623714f
Compare
KTokarze
force-pushed
the
linux_vlan_management
branch
from
July 30, 2025 05:45
623714f to
9b62574
Compare
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces comprehensive VLAN management functionality for Linux network interfaces by implementing the LinuxVLAN class with methods for creating, removing, and querying VLANs. The changes include adding four core VLAN operations, integrating custom debug logging, and providing extensive unit test coverage.
Key changes:
- Implementation of VLAN management methods (
get_vlan_ids,get_vlan_id,add_vlan,remove_vlan) in theLinuxVLANclass - Addition of new VLAN-specific exceptions (
VlanAlreadyExistsException,VlanNotFoundException) - Comprehensive unit test suite covering all VLAN operations and edge cases
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| mfd_network_adapter/network_interface/feature/vlan/linux.py | Core VLAN management implementation with methods for adding, removing, and querying VLANs |
| mfd_network_adapter/exceptions.py | Addition of VlanAlreadyExistsException for VLAN conflict handling |
| tests/unit/test_mfd_network_adapter/test_network_interface/test_feature/test_vlan/test_vlan_linux.py | Complete unit test suite validating VLAN functionality and error conditions |
| README.md | Documentation updates describing the new VLAN management API |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
hcymerys
previously approved these changes
Aug 21, 2025
KTokarze
force-pushed
the
linux_vlan_management
branch
from
August 21, 2025 08:34
9b62574 to
249ce25
Compare
KTokarze
force-pushed
the
linux_vlan_management
branch
from
August 21, 2025 08:36
249ce25 to
eb08a07
Compare
KTokarze
force-pushed
the
linux_vlan_management
branch
from
August 21, 2025 08:37
eb08a07 to
49d41ad
Compare
KTokarze
force-pushed
the
linux_vlan_management
branch
from
August 21, 2025 08:39
49d41ad to
87fcbe9
Compare
hcymerys
approved these changes
Aug 21, 2025
KTokarze
force-pushed
the
linux_vlan_management
branch
from
August 22, 2025 13:34
87fcbe9 to
3a30920
Compare
Add functions add_vlan, remove_vlan, get_vlan_id, get_vlan_ids for Linux VLAN management. Fixes intel#5 Signed-off-by: Kacper Tokarzewski <kacper.tokarzewski@intel.com>
KTokarze
force-pushed
the
linux_vlan_management
branch
from
September 1, 2025 08:15
3a30920 to
7b8578f
Compare
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.
This pull request introduces a new set of VLAN management functionalities for Linux network interfaces in the
LinuxVLANclass and corresponding unit tests to ensure their correctness. The most important changes include adding methods for VLAN operations, integrating a custom debug logging level, and implementing comprehensive unit tests for these features.New VLAN Management Features:
get_vlan_ids,get_vlan_id,add_vlan, andremove_vlanmethods to theLinuxVLANclass for managing VLANs on Linux network interfaces. These methods use terminal commands to retrieve, add, or remove VLANs and include logging at a custom debug level (MFD_DEBUG). ([mfd_network_adapter/network_interface/feature/vlan/linux.pyR18-R105](https://github.com/intel/mfd-network-adapter/pull/6/files#diff-5d4dc140cc93d93c5a6ae3daf2804afa691e7d49f21d27ddf668708b1c67d25fR18-R105))Logging Enhancements:
MFD_DEBUGlogging level frommfd_common_libs.log_levelsto provide detailed debug logs for VLAN operations. ([mfd_network_adapter/network_interface/feature/vlan/linux.pyR8-R9](https://github.com/intel/mfd-network-adapter/pull/6/files#diff-5d4dc140cc93d93c5a6ae3daf2804afa691e7d49f21d27ddf668708b1c67d25fR8-R9))Unit Tests for VLAN Features:
tests/unit/test_mfd_network_adapter/test_network_interface/test_feature/test_vlan/test_vlan_linux.pyto validate the functionality of VLAN methods. Tests cover scenarios such as adding, removing, and retrieving VLANs, including edge cases like no VLANs being present. ([tests/unit/test_mfd_network_adapter/test_network_interface/test_feature/test_vlan/test_vlan_linux.pyR1-R117](https://github.com/intel/mfd-network-adapter/pull/6/files#diff-39cadbe91660cc9cf2b65aa52068fd76cb7d9bdc83c8ff9689261b9b83bfc17dR1-R117))**