nd_interface_*: adopt shared config_actions_spec() and apply_config_actions() bridge - #524
Open
allenrobel wants to merge 1 commit into
Open
nd_interface_*: adopt shared config_actions_spec() and apply_config_actions() bridge#524allenrobel wants to merge 1 commit into
allenrobel wants to merge 1 commit into
Conversation
allenrobel
requested review from
akinross,
anvitha-jain,
gmicol,
lhercot,
mikewiebe,
mtarking,
sajagana,
samiib and
shrsr
as code owners
August 25, 2026 19:34
…ctions() bridge
Replace the eight hand-written inline `config_actions={...}` argspec blocks with
`config_actions_spec(include=("deploy",))`, so all ten nd_interface_* modules build the
option from the shared fragment in nd_argument_specs.py.
Add `NDBaseInterfaceOrchestrator.apply_config_actions(params)` as the single bridge from
module params to the orchestrator's `deploy` flag, and use it from all ten modules in place
of the duplicated three-line parse. Deployment stays opt-in (default False).
No behavior change. Extends test_nd_interface_deploy_default.py to all ten modules and
asserts the runtime `config_actions` spec equals the shared fragment; adds
apply_config_actions() tests to test_base_interface.py.
Closes #523
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F7fNh2q6RyHbb37T67hkN6
allenrobel
force-pushed
the
interface-config-actions-spec
branch
from
August 27, 2026 20:38
bdf7a19 to
a284f23
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.
Related Issue(s)
Closes #523
Follow-up to #520; interface-family slice of the "centralize first, align semantics later" step from the #368 analysis (M1/M2).
Proposed Changes
config_actions={...}argspec blocks (ethernet_trunk_host,port_channel_access,port_channel_trunk_host,subinterface_managed,subinterface_unmanaged,svi,vpc_access,vpc_trunk_host) withargument_spec.update(config_actions_spec(include=("deploy",))), matchingloopbackandethernet_access. All tennd_interface_*modules now build the option from the shared fragment innd_argument_specs.py.NDBaseInterfaceOrchestrator.apply_config_actions(params) -> boolas the single bridge from module params to the orchestrator'sdeployflag; all tenmain()functions call it instead of re-implementing the three-line parse. Deployment stays opt-in (defaultFalse).config_actionsare deliberately untouched until the Module Support for config_actions + resource level deploy #368 contract decisions are recorded.Test Notes
tests/unit/modules/test_nd_interface_deploy_default.pynow covers all ten modules and addstest_nd_interface_deploy_default_00010, asserting each module's runtimeconfig_actionsspec equalsconfig_actions_spec(include=("deploy",))["config_actions"](guards against inline drift).tests/unit/module_utils/orchestrators/test_base_interface.pyaddstest_base_interface_00970/00980forapply_config_actions()(explicit true/false; absent /None/{}→False, actively resetting a priorTrue).ndpytest tests/unit/).black,isort,pylintclean on all changed files;validate-modulessanity passes on the ten modules viandtest.mypyonbase_interface.pyreports only the three pre-existingModelTypeattr-defined errors (lines 256/302), unrelated to this change.Cisco Nexus Dashboard Version
4.2.1
Related ND API Resource Category
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01F7fNh2q6RyHbb37T67hkN6