Skip to content

Conversation

@KTokarze
Copy link
Contributor

@KTokarze KTokarze commented Jul 21, 2025

This pull request introduces a new set of VLAN management functionalities for Linux network interfaces in the LinuxVLAN class 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:

  • Added get_vlan_ids, get_vlan_id, add_vlan, and remove_vlan methods to the LinuxVLAN class 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:

  • Imported and integrated MFD_DEBUG logging level from mfd_common_libs.log_levels to 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:

  • Created a new test suite in tests/unit/test_mfd_network_adapter/test_network_interface/test_feature/test_vlan/test_vlan_linux.py to 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))**

Copilot AI review requested due to automatic review settings July 21, 2025 11:41

This comment was marked as outdated.

@KTokarze KTokarze force-pushed the linux_vlan_management branch from 2c85a00 to 7765603 Compare July 21, 2025 11:43
@KTokarze KTokarze requested a review from Copilot July 21, 2025 11:43

This comment was marked as outdated.

@KTokarze KTokarze force-pushed the linux_vlan_management branch from 7765603 to aa5fecc Compare July 22, 2025 08:58
@adrianlasota adrianlasota force-pushed the linux_vlan_management branch from aa5fecc to cf4f31f Compare July 22, 2025 09:06
@KTokarze KTokarze force-pushed the linux_vlan_management branch from cf4f31f to 3897a76 Compare July 22, 2025 09:19
@KTokarze KTokarze force-pushed the linux_vlan_management branch from 3897a76 to 33e23f7 Compare July 22, 2025 09:21
@KTokarze KTokarze force-pushed the linux_vlan_management branch from 33e23f7 to 97a5184 Compare July 23, 2025 12:06
@KTokarze KTokarze force-pushed the linux_vlan_management branch from 97a5184 to d7fc649 Compare July 24, 2025 13:44
Copy link

Copilot AI left a 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 the LinuxVLAN class
  • 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
hcymerys previously approved these changes Aug 21, 2025
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants