Skip to content

ESD-1687: Expose as-override on VXC BGP connections - #546

Open
Phil-Browne wants to merge 5 commits into
mainfrom
esd-1687-vxc-bgp-as-override
Open

ESD-1687: Expose as-override on VXC BGP connections#546
Phil-Browne wants to merge 5 commits into
mainfrom
esd-1687-vxc-bgp-as-override

Conversation

@Phil-Browne

Copy link
Copy Markdown
Contributor

Wires the SDK's new AsOverride *bool on 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's as_override.

  • Bump megaportgo pin v1.15.0 to v1.17.0.
  • JSON input: read asOverride in parseBGPConnections, setting the pointer only when the key is present.
  • Interactive input: add an optional AS Override prompt that leaves the field unset when skipped.
  • Preserve the tri-state: nil means the API applies its default, so existing configs are unaffected.
  • Cover the JSON true/false/unset/non-boolean cases and the interactive yes/no/skip/invalid cases in unit tests.

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.

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@148024c). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #546   +/-   ##
=======================================
  Coverage        ?   79.50%           
=======================================
  Files           ?      193           
  Lines           ?    18876           
  Branches        ?        0           
=======================================
  Hits            ?    15007           
  Misses          ?     2820           
  Partials        ?     1049           
Files with missing lines Coverage Δ
internal/commands/vxc/vxc_inputs_partner.go 83.22% <100.00%> (ø)
internal/commands/vxc/vxc_prompts_vrouter.go 56.16% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/megaportgo from v1.15.0 to v1.17.0.
  • Adds asOverride support to vRouter BGP interactive prompts and JSON parsing while preserving tri-state semantics (nil => API default).
  • Extends unit tests to cover asOverride in 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.

Comment thread internal/commands/vxc/vxc_prompts_vrouter.go Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants