Skip to content

Use .NET to gather NIC information on newer systems#51372

Merged
twangboy merged 15 commits intosaltstack:developfrom
twangboy:dotnet_interfaces
Jun 4, 2019
Merged

Use .NET to gather NIC information on newer systems#51372
twangboy merged 15 commits intosaltstack:developfrom
twangboy:dotnet_interfaces

Conversation

@twangboy
Copy link
Copy Markdown
Contributor

@twangboy twangboy commented Jan 28, 2019

What does this PR do?

Uses .NET to gather Network Interface Information. Maintains old code that uses WMI to gather that information for use on Windows 7/2008R2 which has .NET 3.5 which is incompatible with the pythonnet library. Though you can install .NET 4 on Windows 7, it's not there out of the box.

What issues does this PR fix or reference?

This should fix some issues with slowness in Windows as this code is used in generating grains. Where the average run for doing so is 3.5 seconds with WMI, it is ~1 second with .NET.

Also adds the gateway in the return for Windows, which is present on other systems:
#51128

Tests written?

Not yet, hence the WIP

Commits signed with GPG?

Yes

I don't know why the linter is asking for this import
@twangboy twangboy changed the title [WIP] Use .NET to gather NIC information on newer systems Use .NET to gather NIC information on newer systems Mar 28, 2019
@twangboy twangboy self-assigned this May 10, 2019
@twangboy twangboy added the Neon label May 20, 2019
@twangboy twangboy merged commit 110fce8 into saltstack:develop Jun 4, 2019
@s0undt3ch
Copy link
Copy Markdown
Contributor

This actually broke develop under Linux
fded9da

@aplanas
Copy link
Copy Markdown
Contributor

aplanas commented Jun 5, 2019

yep: #53381

@aplanas
Copy link
Copy Markdown
Contributor

aplanas commented Jun 5, 2019

@s0undt3ch where is the PR where this commit is living?

@s0undt3ch
Copy link
Copy Markdown
Contributor

#53362

@s0undt3ch
Copy link
Copy Markdown
Contributor

This also brings in another python dep pythonnet. Please confirm @twangboy

@twangboy
Copy link
Copy Markdown
Contributor Author

Yes... it was added to the salt/pkg/windows/req.txt. I was unaware of the additional requirement to use the static files.

twangboy added a commit to twangboy/salt that referenced this pull request Jan 14, 2020
dwoz added a commit that referenced this pull request Jan 23, 2020
Ch3LL added a commit to Ch3LL/salt that referenced this pull request Jan 26, 2020
This reverts commit a399d7f.

Conflicts:
  - salt/utils/network.py
  - salt/utils/win_network.py
  - tests/unit/utils/test_win_network.py
@twangboy twangboy deleted the dotnet_interfaces branch May 26, 2020 19:55
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.

6 participants