Sync to v2.1.2 (API-drift cleanup) - #4
Merged
Merged
Conversation
The "throws when neither -UserName nor -UserId is supplied" test invoked the
cmdlet with neither identity parameter. Since -UserName is Mandatory in the
default ('ByName') parameter set, PowerShell's own parameter binder can't
resolve which set applies, falls back to the default, and then prompts
interactively for the missing -UserName instead of letting the cmdlet's own
code run -- hanging forever with no TTY to answer it (reproduced in both a
real interactive terminal and this suite's own non-interactive runner).
Replaced the invocation with a metadata check confirming -UserName and
-UserId are each Mandatory in their own parameter sets, which proves the same
"neither supplied" case is rejected without ever risking the hang.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…rror' The FlashBlade API only accepts info/warning/critical for minimum_notification_severity -- confirmed against the OpenAPI spec and live against FB-A (the array rejects 'error' with "Invalid minimum notification severity specified (choose from 'info', 'warning', 'critical')"). The sibling Update-PfbAlertWatcher cmdlet already had the correct 3-value set; New-PfbAlertWatcher's ValidateSet and help text are now consistent with it and with the real API. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The server-side arrays/space endpoint silently returns an empty space
object for any unrecognized -Type value instead of erroring (verified
live on FB-A: -Type all and -Type garbage-value both returned an empty
result with no error). Add a client-side [ValidateSet(''array'',
''file-system'', ''object-store'')] so invalid values fail fast with a
clear error before any HTTP call is made, and tighten the .PARAMETER
Type help text to state the exact valid values and default.
Adds Tests/Get-PfbArraySpace.Tests.ps1 (no prior test coverage existed
for this cmdlet) covering the ValidateSet attribute, rejection of an
invalid value with zero API calls, pass-through of a valid value, and
omission of -Type from the query string when unspecified.
Live-verified against FB-A (10.21.243.66): -Type array/file-system/
object-store still return real, distinct data; -Type all and -Type
garbage-value now throw immediately client-side with no HTTP call.
The FlashBlade REST API's `protocol` query parameter for
`GET arrays/performance` (confirmed stable across fb2.0-fb2.27
OpenAPI specs) documents valid values as `all`, `HTTP`, `SMB`, `NFS`,
and `S3`, defaulting to `all` (combined performance of all protocols)
when omitted. The existing ValidateSet('nfs', 'smb', 'http', 's3')
was missing 'all', so a user explicitly passing -Protocol all was
rejected client-side by PowerShell's own parameter binder before any
API call, even though it is the exact behavior of omitting -Protocol
entirely.
- Add 'all' to the ValidateSet and update the .PARAMETER Protocol
comment-help to document it as the default.
- Add Tests/Get-PfbArrayPerformance.Tests.ps1 covering: ValidateSet
membership, the -Protocol all regression, -Protocol nfs unchanged,
rejection of an invalid value with zero API calls, and omitting
-Protocol entirely.
Live-verified against FB-A (10.21.243.66): all, nfs, smb, http, and
s3 all now return data; an invalid value is still rejected
client-side with zero API calls.
…auser-test-hang-prompt Fix New-PfbQuotaUser test hang on missing mandatory -UserName
…twatcher-minimumseverity-validateset Fix New-PfbAlertWatcher -MinimumSeverity ValidateSet: drop invalid 'error'
…pfbarrayspace-type-validateset Add ValidateSet to Get-PfbArraySpace -Type
…pfbarrayperformance-protocol-validateset Fix incomplete ValidateSet on Get-PfbArrayPerformance -Protocol
Removes Remove-PfbSession, New-PfbNetworkAccessPolicy, Remove-PfbNetworkAccessPolicy - they modeled REST endpoints that never existed in any FlashBlade API version (2.0-2.27) and always returned HTTP 405. Sessions are read-only; network-access policies are a fixed built-in set (only their rules are mutable, already covered by New-/Remove-PfbNetworkAccessRule). Nothing that worked stops working. ModuleVersion 2.1.1 -> 2.1.2; manifest FunctionsToExport 526 -> 523; CHANGELOG + ReleaseNotes updated. The ValidateSet/enum fixes (PRs dmann000#13-16) are already on main and are folded into this 2.1.2 release note. Validated: Test-ModuleManifest OK (523 exports), Pester 154 passed / 0 failed / 2 skipped (pwsh 7, 24 suites).
v2.1.2: remove 3 never-functional cmdlets (API-drift cleanup)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the fork to v2.1.2, matching upstream dmann000/fb-powershell main.
Validated: Test-ModuleManifest OK (523 exports), Pester 154/0/2 on the cross-platform CI.
🤖 Generated with Claude Code