Repository navigation
Layered config phase 5: identity references and hub roles, a value must name something that exists and a hub list edit sends the UI's role calls - #11
Merged
Conversation
nbarrett-anet
force-pushed
the
intent-refactor-06
branch
4 times, most recently
from
November 25, 2026 03:36
c64384f to
d16f813
Compare
…d, and the hub lists are keyed by logical ID
… against what the configuration provides
…nd warns for one already so as read
…CO does and checks the hub list against the refs; an Edge disable that finds nothing returns None
…usters, and a hub named once fills its list or rule entry
…rvice for that segment, on an edge as on a profile
… a large QoS module plans as fast as before
…nd a hub not yet saved is refused with how to save it first
…aved as one insert carrying its backhaul row
… steps in the UI's order, and one module write alone cannot change those lists
…r's hub row carries the cluster's own data
…y call, and one already broken as read is a warning
…y off is refused, not passed as broken as read
…he ones already in place, and writes the hub rows the steps made
…ore the steps, and a dropped hub row is refused
…s, or refuses with on_hub_in_use
…refs against the fresh ones
…tate, and every step is checked before the first is sent
… can provide or refer
…ole-guard cases are pinned
nbarrett-anet
force-pushed
the
intent-refactor-06
branch
from
November 25, 2026 03:38
d16f813 to
40011a1
Compare
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.
Summary
A value that names another object is now checked against what exists. Hubs can be named by name or by logical ID. A change to a segment's hub lists makes the save do what the Orchestrator UI does: it sends the hub role calls in the UI's order, then writes device settings with the hub rows the VCO made. A save that fails part-way says what it did, and a second save finishes the job.
Identity references
pyvelo.core:Provides,RefersToandHubRole. A model walker (walk_fields) finds them, and the phase 3 ref owners now use it too.DanglingReferenceErrorbefore any request, and the message says what to send instead. A value that was already dangling as read gives areference_keptwarning and is written as it was.deviceSettings:backHaulEdgeref. The ref points at the profile's hub service for that segment, looked up by segment object ID and hub logical ID.applyfills in the service. A hub the profile has not saved yet is refused, with advice to save that first. An edge that has no QoS module gets one insert that carries the ref.HubResolver(inpyvelo.config.resolvers.hub) resolves both.HubIdentityis exported frompyvelo.coreandpyvelo_intent. The VPN hub lists are now keyed by logical ID, with the name as the label.BackhaulEdgeis keyed byedge_logical_idand gainsedge_id.Hub roles
The steps. Adding a hub to, or removing one from, a segment's
vpnlists gives role steps in the UI's order:plan()shows them, andrender()lists them.The rules. A list edit that the UI would not allow raises
HubListErrorbefore any request. This covers a hub in a list where its role doesn't fit, or a hub whose type or name disagrees with its logical ID. A rule that was already broken as read gives ahub_list_as_readwarning. Segments whose lists give one hub different roles givehub_roles_disagree.Hub in use. Removing a hub that edge QoS rules still use warns and names the edges.
on_hub_in_use="refuse"makes that a refusal. The check readsedgeQOSUsage.The save order:
getEnterpriseServicesrequests.A conflict at the version read, before any step, refreshes the state as any conflict does.
Part-way failure. A failed step, or a failed write after a step was sent, raises
SaveStepErrorwithSaveProgressattached. A second save sees which steps are already done and skips them.Behaviour changes
deviceSettings:backHaulEdgeref on save, on edges and profiles.plan_moduleorupdate_modulerefuses a change to the hub lists, because the role calls need the pipeline.ConfigPlangainsstepsandcheck_warnings. A save with no changes but some steps still runs.DanglingReferenceError,HubListError,HubServiceNotFoundError, andSaveStepError(withSaveProgress).EnterpriseServiceBase.edge_qos_usageread the aliasedgeQosUsage, which dropped every usage row. It now readsedgeQOSUsage.Nonewhen the VCO answers null.PYVELO_IT_HUB.Known gaps (follow-ups)
plan()takes 5.7–6.1 s, against 5.0–5.3 s before. The reference check takes about 0.2 s of that. The rest is inplan_moduleand needs its own profiling.DanglingReferenceErroradvice doesn't work as written. The message says what to leave out.pipeline.py(1,867 lines),testing/module_store.py(1,210) andhub_steps.py(826).Test plan
scripts/check.shon Python 3.14: ruff clean, basedpyright 0 errors, pytest 6394 passed / 2 skipped.PYVELO_IT_HUB. A run settles whether the VCO accepts the role calls in the UI's order and writes the hub rows the test store assumes.