ESD-1311: Add GetMCRIPsec method - #162
Open
Phil-Browne wants to merge 11 commits into
Open
Conversation
Phil-Browne
requested review from
a team and
mola-dev
and removed request for
a team
June 3, 2026 13:24
Return ErrMCRIPsecNoData (with trace id) instead of (nil, nil) when a successful response has no data payload, so Terraform Read/import does not panic dereferencing a nil configuration.
When LogResponseBody is set, Do drained the network body and swapped in an in-memory NopCloser, so the caller's deferred Close hit the no-op copy and the original body was never closed. Close it once drained.
- Assert the 404 test returns the API not-found error, not just any error - Drive the LogResponseBody test with the populated fixture and assert the full decoded struct, so a truncated body would fail it - Share the populated fixture via a helper to remove duplication - Drop em dashes and a rot-prone hardcoded limit from comments
…ipsec-get # Conflicts: # client.go
The "never includes the pre-shared key or phase lifetimes" note was repeated across the interface, method, and two type docs. Keep it on IPsecTunnel, the type that actually lacks the fields.
The client.go hunk was a variable rename and comment rewording with no behavior change, unrelated to the IPsec read path. Restores the file to main to keep the diff scoped to GetMCRIPsec.
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.
Adds
MCRService.GetMCRIPsecwrappingGET /v3/products/mcrs/{uid}/ipsec— the only way to read IPsec tunnel state back after ordering, which the Terraform provider needs for Read/import/drift detection.MCRIPsecConfiguration,IPsecConfiguredVXC,IPsecTunnelper the specTestMCRWithIPsecAddOnintegration test now reads back IPsec stateJira: ESD-1311