Skip to content
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

VMNetworkAdapter: Device Naming and MAC Address Spoofing #208

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

nyanhp
Copy link

@nyanhp nyanhp commented Jan 17, 2023

Pull Request (PR) description

This PR implements the additional parameters DeviceNaming and MacAddressSpoofing to expose more virtual NIC settings.

This Pull Request (PR) fixes the following issues

Task list

  • Added an entry to the change log under the Unreleased section of the file CHANGELOG.md.
    Entry should say what was changed and how that affects users (if applicable), and
    reference the issue being resolved (if applicable).
  • Resource documentation updated in the resource's README.md.
  • Resource parameter descriptions updated in schema.mof.
  • Comment-based help updated, including parameter descriptions.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Community Testing Guidelines.
  • Integration tests added/updated (where possible). See DSC Community Testing Guidelines.
  • New/changed code adheres to DSC Community Style Guidelines.

This change is Reviewable

@nyanhp
Copy link
Author

nyanhp commented Feb 6, 2023

Build fails due to dsccommunity/DscResource.DocGenerator#131

@johlju johlju added the needs review The pull request needs a code review. label Feb 6, 2023
@nyanhp
Copy link
Author

nyanhp commented Feb 7, 2023

To whoever owns this module, the build will not work on an Ubuntu worker due to this line:

Add-Type -IgnoreWarnings -ReferencedAssemblies 'C:\Program Files (x86)\Reference Assemblies\Microsoft\WMI\v1.0\Microsoft.Management.Infrastructure.dll' -TypeDefinition @'

The error that occurs with every test is similar to this one:

Executing script /home/jhp/HyperVDsc/tests/Unit/HyperVDsc.Common.Tests.ps1
  [-] Error occurred in test script '/home/jhp/HyperVDsc/tests/Unit/HyperVDsc.Common.Tests.ps1' 0ms
    DriveNotFoundException: Cannot find drive. A drive with the name 'C' does not exist.
    at <ScriptBlock>, /home/jhp/HyperVDsc/tests/Unit/Stubs/Hyper-V.stubs.psm1: line 4
    at <ScriptBlock>, /home/jhp/HyperVDsc/tests/Unit/HyperVDsc.Common.Tests.ps1: line 27
    at <ScriptBlock>, /home/jhp/HyperVDsc/output/RequiredModules/Pester/4.10.1/Pester.psm1: line 1111
    at Invoke-Pester<End>, /home/jhp/HyperVDsc/output/RequiredModules/Pester/4.10.1/Pester.psm1: line 1137
    at <ScriptBlock>, /home/jhp/HyperVDsc/output/RequiredModules/Sampler/0.116.1/tasks/Invoke-Pester.pester.build.ps1: line 351
    at *Task, /home/jhp/HyperVDsc/output/RequiredModules/InvokeBuild/5.10.1/Invoke-Build.ps1: line 590
    at *Task, /home/jhp/HyperVDsc/output/RequiredModules/InvokeBuild/5.10.1/Invoke-Build.ps1: line 562
    at *Task, /home/jhp/HyperVDsc/output/RequiredModules/InvokeBuild/5.10.1/Invoke-Build.ps1: line 562
    at *Task, /home/jhp/HyperVDsc/output/RequiredModules/InvokeBuild/5.10.1/Invoke-Build.ps1: line 562
    at <ScriptBlock><End>, /home/jhp/HyperVDsc/output/RequiredModules/InvokeBuild/5.10.1/Invoke-Build.ps1: line 748
    at <ScriptBlock><Begin>, /home/jhp/HyperVDsc/build.ps1: line 506

Can we use a Windows build worker for this repository?

@nyanhp
Copy link
Author

nyanhp commented Apr 18, 2023

All tests were successful, code coverage could not be uploaded.

This reverts commit 4346d6f.
@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Merging #208 (517cf60) into main (6c0e583) will increase coverage by 2%.
The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #208   +/-   ##
===================================
+ Coverage    83%    85%   +2%     
===================================
  Files        11     11           
  Lines      1441   1455   +14     
===================================
+ Hits       1203   1245   +42     
+ Misses      238    210   -28     
Impacted Files Coverage Δ
source/DSCResources/DSC_VMHyperV/DSC_VMHyperV.psm1 85% <100%> (ø)
...ces/DSC_VMNetworkAdapter/DSC_VMNetworkAdapter.psm1 61% <100%> (+14%) ⬆️

@nyanhp
Copy link
Author

nyanhp commented Apr 21, 2023

Apologies in advance for multiple pushes to update my tests, but the local builds fail 8 out of 10 times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review The pull request needs a code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VMNetworkAdapter: Should support Device Naming and possibly other advanced options
2 participants