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

Expose -IncludeHidden parameter #495

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gaelicWizard
Copy link
Contributor

@gaelicWizard gaelicWizard commented May 18, 2021

Pull Request (PR) description

NetAdapter module Cmdlets have an -IncludeHidden flag which allows access to adapters which are hidden; expose that flag here.

This Pull Request (PR) fixes the following issues

Task list

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

This change is Reviewable

@gaelicWizard gaelicWizard force-pushed the IncludeHidden branch 8 times, most recently from 5b92e69 to e7848d9 Compare May 20, 2021 06:47
gaelicWizard and others added 2 commits May 20, 2021 03:04
NetAdapter module Cmdlets have an -IncludeHidden flag which allows access to adapters which are hidden; expose that flag here.

- Add flag to MOF schemas
- Add function parameter and comment based help

- NetAdapterName should now be working
- NetAdapterRdma should now be working
- NetAdapterRss should now be working
- NetAdapterState should now be working
Add [Switch]IncludeHidden to mocked Rename-NetAdapter in unit tests
Add [Switch]IncludeHidden to mocked Set-NetAdapterRdma in unit tests
@codecov
Copy link

codecov bot commented May 20, 2021

Codecov Report

Merging #495 (7b94cba) into main (983c54b) will increase coverage by 0%.
The diff coverage is 96%.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #495   +/-   ##
===================================
  Coverage    97%    97%           
===================================
  Files        28     28           
  Lines      2070   2071    +1     
===================================
+ Hits       2021   2023    +2     
+ Misses       49     48    -1     
Impacted Files Coverage Δ
...vancedProperty/DSC_NetAdapterAdvancedProperty.psm1 100% <ø> (ø)
...Resources/DSC_NetAdapterRsc/DSC_NetAdapterRsc.psm1 100% <ø> (ø)
source/DSCResources/DSC_NetBios/DSC_NetBios.psm1 97% <ø> (ø)
...s/DSC_WinsServerAddress/DSC_WinsServerAddress.psm1 77% <75%> (ø)
...faultGatewayAddress/DSC_DefaultGatewayAddress.psm1 95% <100%> (ø)
...s/DSC_NetAdapterBinding/DSC_NetAdapterBinding.psm1 98% <100%> (ø)
...Resources/DSC_NetAdapterLso/DSC_NetAdapterLso.psm1 100% <100%> (ø)
...sources/DSC_NetAdapterName/DSC_NetAdapterName.psm1 100% <100%> (ø)
...sources/DSC_NetAdapterRdma/DSC_NetAdapterRdma.psm1 100% <100%> (ø)
...Resources/DSC_NetAdapterRss/DSC_NetAdapterRss.psm1 100% <100%> (ø)
... and 5 more

@PlagueHO PlagueHO added the needs review The pull request needs a code review. label May 21, 2021
@PlagueHO
Copy link
Member

@gaelicWizard - this is quite an interesting one. Could you raise an issue for us to discuss it?

What I'd like to think about (and open for discussion) is should we just switch the -hidden flag on and not bother with the parameter? If you can raise an issue we can get some thoughts on this because I'm trying to find a good reason why if you know the adapter name and want to configure it in some way, why should it matter if it is hidden or not?

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.

Include hidden adapters by default?
2 participants