Repository navigation
Layered config phase 7: QoS layered, its cosMapping flag warned of, and QoS checked against the composed module - #13
Merged
Merged
Conversation
nbarrett-anet
force-pushed
the
intent-refactor-08
branch
6 times, most recently
from
November 25, 2026 03:43
653ce3b to
83a5698
Compare
…e's segment, and a copy made local carries no server ID inside a kind or an Owned
…te keeps the raw ones
… local, rules are additive and defaults the profile's, with the template's display defaults
… start from the profile
…nherits, and effective_dump leaves out a field its layer lacks
…son found stored under that name
… and the warning gives the patch that keeps it Owned.localize on a present edge object whose flag is off or absent, at a field the backend composer reads by presence, turns its flag on and changes no value, so a patch into it changes only what it names. The flag_off_in_use message says the flag may be absent and gives the keep patch beside localize().
…olds, and QoS pins an edge's null client connector over a profile block
nbarrett-anet
force-pushed
the
intent-refactor-08
branch
from
November 25, 2026 03:46
83a5698 to
85ab898
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
QoS is the second module converted to layered configuration, on the same terms as the firewall:
cosMappingis owned. It is either inherited from the profile or the edge's own.state.effective.qosshows what the edge uses and where each value comes from.compare_effectivechecks QoS against the VCO's composed module.QoS models
QosData[L],QosSegment[L]andQosConfigurationModule[L]are typed by layer. The module rows and the composed read are typed per layer too.serviceRateLimitandqoeareInheritableby presence: the edge stores the key or inherits it. A value neither layer stores shows the profile template's display default.qosClientConnectorisInheritable, with display defaultNone.cosMappingisInheritablewith itsoverrideflag (ByFlag("override", presence_wins=True)). This follows the VCO's rule: an edge object that is present wins whatever its flag.rulesareAdditive: the edge's entries come ahead of the profile's.defaultsareProfileOnly: an edge segment holds none, and a write keeps the raw ones.webProxyisUnconverted.lossPctkey, notloss_pct. Before this fix, a new or edited rule was written with the wrong key.Ownership (
pyvelo.core)segment()), is bound to the profile's segment, so its values inherit and can be localized.bind_new_itemandbind_profile_layersare shared with the firewall.Ownedor a field kind (clear_server_ownednow descends into both).localize()underpresence_wins. When the edge already stores the object with its flag off,localize()keeps that object and turns the flag on. It no longer copies the profile's. A patch into such an object changes only what it names.ByFlagflag key is refused. The message namesset_local()/inherit()and gives the JSON patch that inherits.ProfileOnlyfield such asdefaultsis refused withPatchError.effective_dumpleaves out a profile-only field the profile doesn't store, where it used to crash.Plan warnings
plan()gives aPlanWarning("flag_off_in_use", ...)for an edgecosMappingwhose flag is false or absent, since the VCO uses that object anyway. The warning gives both ways out:null;localize(), or{"segments": {"Voice": {"cosMapping": {}}}}.An unrelated edit keeps the warning.
compare_effective("firewall", "QOS"). QoS has no unmodelled keys.Testing support
ModuleStore.add_configurationraisesValueErrorfor a module ID that another configuration already holds.Behaviour changes
Owned. Reading one gives.stored/.local/.is_local.state.effective.qos.<field>.valueis what the edge uses.CosMapping.overrideis no longer set directly. Useset_local()/inherit()/localize(), or a patch.defaultsraisesPatchError.Known gaps (follow-ups)
localize()underpresence_winskeeps the stored edge object. This assumes "the value the effective view would show" governs, not "the profile value". Device settings will need the same answer.nullqosClientConnector. No layer on the test VCO stores one, so the null-over-profile reading is pinned only by a unit test.vlan_type/vlanTypewire key. None of 115 stored rules carries either key, so the key is unchanged.QosClientConnectoris still a loose model.localize()always copies from the profile.ByFlag(inherit_as=<lambda>)edge layer.same_statecompares each side at its own level.dict[K, Model].Test plan
scripts/check.shon Python 3.13 (the supported floor, as in CI): ruff clean, basedpyright 0 errors, pytest 6793 passed / 2 skipped.compare_effectiveon the test VCO's edges with a profile gives 0 QoS findings, down from 6 before thelossPctfix.