mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-09-03 18:55:33 +00:00
1f1c414632
Collapses the ~24-line Level/Node/VmId/Group validation block duplicated across 18 Firewall cmdlets into a single FirewallScope.TryValidate helper in PSProxmoxVE.Core, beside FirewallService.BuildBasePath which already owns the level-to-path mapping (ADR 0021: request-payload/validation correctness is proven offline, not against a live cluster). Each cmdlet now makes one TryValidate call and, on failure, one ThrowTerminatingError with the same ErrorId (NodeRequired/VmIdRequired/ GroupRequired), ErrorCategory.InvalidArgument, target object (null) and message text it used before, so the Pester assertions under tests/PSProxmoxVE.Tests/Firewall/ keep passing unedited. Part of #154. Co-authored-by: goodolclint-claude[bot] <323206664+goodolclint-claude[bot]@users.noreply.github.com>