Skip to content

fix: Split check of interface name and VM name inside set_vm_interface_vlan function - #23

Merged
abaczek merged 1 commit into
intel:mainfrom
KTokarze:fix_set_vnic_vlan
Mar 20, 2026
Merged

abaczek merged 1 commit into
intel:mainfrom
KTokarze:fix_set_vnic_vlan

Conversation

@KTokarze

Copy link
Copy Markdown
Contributor

This pull request makes a minor update to the set_vm_interface_vlan method in mfd_hyperv/vm_network_interface_manager.py. The change improves the logic for constructing the PowerShell command by separating the checks for vm_name and interface_name, allowing each parameter to be added independently.

  • Improved argument handling in the PowerShell command construction within set_vm_interface_vlan, ensuring -VMName and -VMNetworkAdapterName are included only if their respective variables are set.

Copilot AI review requested due to automatic review settings March 20, 2026 12:57

Copilot AI left a comment

Copy link
Copy Markdown

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 updates set_vm_interface_vlan in the Hyper-V network interface manager to build the Set-VMNetworkAdapterVlan PowerShell command by appending -VMName and -VMNetworkAdapterName independently, rather than requiring both to be set together.

Changes:

  • Split the combined if interface_name and vm_name condition into separate checks.
  • Allow -VMName and -VMNetworkAdapterName to be included independently when their respective arguments are provided.

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

mchromin
mchromin previously approved these changes Mar 20, 2026
…e_vlan function

Signed-off-by: Kacper Tokarzewski <kacper.tokarzewski@intel.com>
@abaczek
abaczek merged commit a52bf04 into intel:main Mar 20, 2026
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.

5 participants