ESD-1687: Expose as-override on VXC BGP connections - #546
Open
Phil-Browne wants to merge 5 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #546 +/- ##
=======================================
Coverage ? 79.50%
=======================================
Files ? 193
Lines ? 18876
Branches ? 0
=======================================
Hits ? 15007
Misses ? 2820
Partials ? 1049
🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR exposes the Megaport SDK’s new tri-state AsOverride *bool field on vRouter BGP connections through the CLI’s JSON and interactive input paths, enabling end-to-end configuration for MCR eBGP peering.
Changes:
- Bumps
github.com/megaport/megaportgofromv1.15.0tov1.17.0. - Adds
asOverridesupport to vRouter BGP interactive prompts and JSON parsing while preserving tri-state semantics (nil=> API default). - Extends unit tests to cover
asOverridein both interactive and JSON workflows (true/false/unset + invalid types/inputs).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/commands/vxc/vxc_prompts_vrouter.go | Adds an interactive prompt to optionally set AsOverride on BGP connections. |
| internal/commands/vxc/vxc_prompts_test.go | Updates/extends prompt tests to validate AsOverride yes/no/skip/invalid behaviors. |
| internal/commands/vxc/vxc_inputs_partner.go | Parses JSON asOverride and sets AsOverride pointer only when the key is present. |
| internal/commands/vxc/vxc_inputs_test.go | Adds JSON parsing test coverage for asOverride true/false/unset and type errors. |
| go.mod | Updates the megaportgo dependency pin to v1.17.0. |
| go.sum | Updates dependency checksums to match megaportgo v1.17.0. |
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.
Wires the SDK's new
AsOverride *boolon vRouter BGP connections (added in megaportgo v1.17.0) through the CLI. This was the one remaining BGP field the CLI didn't read or send, so MCR eBGP peering can now be configured end to end, matching the Terraform provider'sas_override.megaportgopin v1.15.0 to v1.17.0.asOverrideinparseBGPConnections, setting the pointer only when the key is present.BGP connections are only supplied via JSON or interactive input, so there is no flag-mode work. The JSON path is shared by both VXC buy and update.