Repository navigation
fix: Split check of interface name and VM name inside set_vm_interface_vlan function - #23
Merged
Merged
Conversation
mkwasile
approved these changes
Mar 20, 2026
There was a problem hiding this comment.
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_namecondition into separate checks. - Allow
-VMNameand-VMNetworkAdapterNameto be included independently when their respective arguments are provided.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mchromin
previously approved these changes
Mar 20, 2026
…e_vlan function Signed-off-by: Kacper Tokarzewski <kacper.tokarzewski@intel.com>
KTokarze
force-pushed
the
fix_set_vnic_vlan
branch
from
March 20, 2026 13:36
847ade1 to
05b3783
Compare
mchromin
approved these changes
Mar 20, 2026
abaczek
approved these changes
Mar 20, 2026
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 makes a minor update to the
set_vm_interface_vlanmethod inmfd_hyperv/vm_network_interface_manager.py. The change improves the logic for constructing the PowerShell command by separating the checks forvm_nameandinterface_name, allowing each parameter to be added independently.set_vm_interface_vlan, ensuring-VMNameand-VMNetworkAdapterNameare included only if their respective variables are set.