-
Notifications
You must be signed in to change notification settings - Fork 452
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
Retrofit network plugin to work on Windows Nano Server #872
Conversation
@mwrock What windows release first shipped with the new classes? |
I think 8.1/2k12r2 |
Here is a diff of output on a NON nano box looking at before this change vs after:
The only difference is the ordering of the |
Here is the output on nano:
|
👍 |
wmi = WmiLite::Wmi.new | ||
data[:addresses] = wmi.instances_of("Win32_NetworkAdapterConfiguration") | ||
|
||
# If we are running on windows nano or anothe roperating system from the future |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"another operating"
👍 |
Windows Nano exposes the Win32_* WMI classes but they are empty. Instead we should populate network metadata from the newer MSFT_* classes. This PR will continue to use the deprecated classes if they have data and use the new ones if they are empty.
Note that the data in these new schemas is slightly different but I have tried to make the data exposed in the network interfaces as close to identical to that exposed on other versions of windows. Attempts to get an IP address will succeed but some of the subnet metadata is missing since I could not find that in the new classes.
I think this is a good first stab and we should fill in missing data later if needed. The primary objective here is to allow chef client runs to work and not raise an error when trying to use the node's IP.