-
Notifications
You must be signed in to change notification settings - Fork 9
feat: Add VLAN management for network_interface object #6
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
base: main
Are you sure you want to change the base?
Conversation
2c85a00 to
7765603
Compare
7765603 to
aa5fecc
Compare
aa5fecc to
cf4f31f
Compare
cf4f31f to
3897a76
Compare
3897a76 to
33e23f7
Compare
33e23f7 to
97a5184
Compare
97a5184 to
d7fc649
Compare
d7fc649 to
623714f
Compare
623714f to
9b62574
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
...it/test_mfd_network_adapter/test_network_interface/test_feature/test_vlan/test_vlan_linux.py
Outdated
Show resolved
Hide resolved
9b62574 to
249ce25
Compare
249ce25 to
eb08a07
Compare
eb08a07 to
49d41ad
Compare
49d41ad to
87fcbe9
Compare
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 <[email protected]>
3a30920 to
7b8578f
Compare
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))**