smartcontract,controlplane: add flex-algo link/tenant CLI extensions and migrate command#3513
Draft
ben-malbeclabs wants to merge 2 commits intobc/rfc18-pr2from
Draft
smartcontract,controlplane: add flex-algo link/tenant CLI extensions and
migrate command#3513ben-malbeclabs wants to merge 2 commits intobc/rfc18-pr2from
ben-malbeclabs wants to merge 2 commits intobc/rfc18-pr2from
Conversation
…and migrate command
This was referenced Apr 10, 2026
This was referenced Apr 10, 2026
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.
RFC-18 flex-algo · PR 3 of 5 · see
rfcs/rfc-0018-flex-algo.mdDepends on: #3512 (PR 2)
Series: #3497 · #3512 · #3513 · #3514 · #3515
Summary of Changes
doublezero link get/list/updateto display topology assignments (link_topologies) and drain status, and adds--link-topologyfilter and--unicast-drainedflag tolink updatedoublezero tenant get/list/updateto display included topologies (include_topologies) and adds--include-topologiesflag totenant updatedoublezero-admin migrate flex-algo [--dry-run]command that backfills link topology assignments and VPNv4 loopback flex-algo node segments across all existing devices and linksDiff Breakdown
Mostly core logic — the migrate command alone is 180 lines of backfill and dry-run orchestration.
Key files (click to expand)
controlplane/doublezero-admin/src/cli/migrate.rs— new:migrate flex-algocommand; validates UNICAST-DEFAULT PDA exists, backfills link topologies for all links, backfills flex-algo node segments for all VPNv4 loopback interfaces on all devices; supports--dry-runsmartcontract/cli/src/link/list.rs— adds--topology <name>filter and displayslink_topologies/unicast_drainedcolumns, resolving topology pubkeys to human-readable namessmartcontract/cli/src/link/get.rs— displays topology assignments and drain status; fetches topology map to resolve pubkeys to namessmartcontract/cli/src/link/update.rs— adds--link-topologyand--unicast-drainedflagssmartcontract/cli/src/tenant/list.rs— displaysinclude_topologiescolumnsmartcontract/cli/src/tenant/get.rs— displays included topology namessmartcontract/cli/src/tenant/update.rs— adds--include-topologiesflagTesting Verification
cargo test -p doublezero_sdk -p doublezero_cli -p doublezero-adminpassescargo clippy -- -D warningscleanmake rust-fmtapplied before commit