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

Allow configuration of hidden network adapters #500

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

Conversation

gaelicWizard
Copy link
Contributor

@gaelicWizard gaelicWizard commented May 22, 2021

Pull Request (PR) description

NetAdapter module Cmdlets have an -IncludeHidden flag which allows access to adapters which are hidden; enable that flag by default except for NetAdapterName. Add IncludeHidden as configurable parameter to NetAdapterName.

NOTE: this is patch based off #496, so there's a lot of whitespace change. I made #496 specifically to make this diff much simpler.

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

Minor reformatting of code style.
Add -IncludeHidden parameter to helper function Find-NetworkAdapter with default to $true
Add IncludeHidden property to NetAdapterName resource, defaulting to $false
In Assert-ResourceProperty, use Find-NetworkAdapter instead of Get-NetAdapter.
Add -IncludeHidden:$true for all calls to *-NetAdapterAdvancedProperty
Add -IncludeHidden:$true to calls to *-NetAdapterBinding
In Get-Binding, use Find-NetworkAdapter instead of Get-NetAdapter.
Add -IncludeHidden:$true to calls of *-NetAdapterLso
Add -IncludeHidden:$true to calls of *-NetAdapterRdma
Add -IncludeHidden:$true on calls to *-NetAdapterRsc
Add -IncludeHidden:$true on calls to *-NetAdapterRss
In Get/Set-TargetResource, use Find-NetworkAdapter instead of Get-NetAdapter
Add -IncludeHidden:$true on calls to *-NetAdapter
In Assert-ResourceProperty, use Find-NetworkAdapter instead of Get-NetAdapter
In Assert-ResourceProperty, use Find-NetworkAdapter instead of Get-NetAdapter
In Assert-ResourceProperty, use Find-NetworkAdapter instead of Get-NetAdapter
@gaelicWizard
Copy link
Contributor Author

Seems Find-NetworkAdapter doesn't throw the same as Get-NetAdapter...so I'll go figure that out next

@johlju johlju added needs review The pull request needs a code review. waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author. and removed needs review The pull request needs a code review. labels Jun 12, 2021
@PlagueHO PlagueHO added abandoned The pull request has been abandoned. and removed waiting for code fix A review left open comments, and the pull request is waiting for changes to be pushed by the author. labels Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned The pull request has been abandoned.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include hidden adapters by default?
3 participants