Skip to content

Conversation

@adrianlasota
Copy link
Contributor

This pull request adds support for filtering and retrieving network interfaces by MAC address in the network adapter owner classes, extends the relevant APIs, and updates tests and examples accordingly. The changes ensure that both the base and ESXi-specific implementations can now handle MAC address-based queries for network interfaces.

API and Filtering Enhancements:

  • Added a mac_address parameter to the get_interfaces, get_interface, and internal _filter_interfaces_info methods in both the base and ESXi network adapter owner classes, enabling filtering of interfaces by MAC address. [1] [2] [3] [4] [5]
  • Updated the filtering logic in _filter_interfaces_info (base and ESXi) to select interfaces matching the specified MAC address. [1] [2]

Documentation and Typing:

  • Extended docstrings and type annotations throughout the affected methods to document the new mac_address parameter and its usage. [1] [2] [3] [4] [5] [6] [7]

Validation and Logging:

  • Updated argument validation and logging to include the new mac_address parameter, ensuring correct combinations and improved traceability. [1] [2] [3]

Testing and Examples:

  • Added a unit test for filtering ESXi interfaces by MAC address and updated test data to include a unique MAC address for vmnic9. [1] [2]
  • Updated the Linux owner example to demonstrate retrieving interfaces by MAC address. [1] [2]

Copilot AI review requested due to automatic review settings October 6, 2025 10:50
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 PR adds MAC address support for filtering and retrieving network interfaces in the network adapter owner classes. The enhancement enables users to query network interfaces by MAC address across both base and ESXi-specific implementations.

Key changes:

  • Extended API methods to accept a mac_address parameter for interface filtering
  • Updated filtering logic to support MAC address-based queries
  • Added comprehensive test coverage and updated examples

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
mfd_network_adapter/network_adapter_owner/base.py Added MAC address parameter to core filtering methods and updated validation logic
mfd_network_adapter/network_adapter_owner/esxi.py Extended ESXi-specific implementation with MAC address filtering support
tests/unit/test_mfd_network_adapter/test_network_adapter_owner/test_esxi_network_owner.py Added test case for MAC address filtering and updated test data
examples/linux_owner_example.py Added example demonstrating MAC address-based interface retrieval

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@mfd-intel-bot
Copy link
Contributor

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://intel/mfd-network-adapter@mac_address'

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adrianlasota adrianlasota requested a review from Copilot October 30, 2025 13:51
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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor Author

@adrianlasota adrianlasota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

readme update :P

done

@adrianlasota adrianlasota merged commit 109b74e into main Nov 12, 2025
23 checks passed
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.

6 participants