Add reusable Windows PowerShell and CIM helpers #6631
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.47) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 276 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.336
Real PR Conversation Timeline
1 comments
"Review active on #6631"
general
weight: 0.35
RoniKishner
##### What this PR does / why we need it:
Adds reusable Windows guest helpers needed to automate environment preparation for Windows Server Failover Cluster (WSFC) scenarios.
Moves Windows helpers out of SSP and QEMU guest-agent version parsing into
utilities/guest_agent.py, updating callers and the corresponding unit tests.Windows OS queries now use encoded PowerShell commands and return only the five required CIM properties. Windows readiness checks match Caption only, retry transient query failures and stop promptly on unexpected errors.
Unsupported version and registry formats raise
ValueError.The PowerShell runner sends scripts and sensitive input through SSH stdin, redacts exact input occurrences from failure details, and logs guest context.
Follow-up PRs will use it for Active Directory, DNS and domain joins.
##### Which issue(s) this PR fixes:
Part of CNV-70031.
First extraction from #6587.
##### Special notes for reviewer:
##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->
https://redhat.atlassian.net/browse/CNV-70031
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Windows VM readiness checks now match the requested operating system version against reported system information. Temporary connection, command, and response errors are retried, and readiness timeouts include clearer failure details.
Refactor
Windows operating system details, timezone information, and guest-agent versions remain available across validation and VM workflows. Guest-agent version parsing supports common version and build-number formats, while unsupported operating system information is rejected.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
[CNV-70031]: https://redhat.atlassian.net/browse/CNV-70031?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ