nd_manage_vpc_pair: Add resource deploy scope and make config_actions.deploy opt-in - #513
Open
sivakasi-cisco wants to merge 4 commits into
Open
nd_manage_vpc_pair: Add resource deploy scope and make config_actions.deploy opt-in#513sivakasi-cisco wants to merge 4 commits into
sivakasi-cisco wants to merge 4 commits into
Conversation
sivakasi-cisco
marked this pull request as ready for review
August 18, 2026 13:26
sivakasi-cisco
requested review from
akinross,
allenrobel,
anvitha-jain,
gmicol,
lhercot,
mikewiebe,
mtarking,
sajagana,
samiib and
shrsr
as code owners
August 18, 2026 13:26
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
Adds a new
resourcedeploy scope tond_manage_vpc_pair'sconfig_actions,and makes deploy opt-in (
deploy: falseby default) so the module never pushesconfiguration to the fabric unless explicitly requested.
What changed
New
config_actions.type: resourcescoperesourceas a third choice forconfig_actions.type(alongsideswitchandglobal).resourcedeploys only the peer switches that make up the managed vPC pair(s)and are left out-of-sync — not every out-of-sync switch in the fabric
(
switch), nor the entire fabric (global).is mapped to its two peer switches (
switch_id/peer_switch_id), which arealready resolved to serial numbers upstream.
module.warninstead of being silently skipped, so a resource deploy neverbecomes a silent no-op. An already in-sync pair is a clean no-op.
deploynow defaults tofalse(opt-in)config_actions.deploydefaults tofalseeverywhere: the pydanticConfigActionsModel, the Ansibleargument_spec,get_config_actions()(explicit read + fallback),
custom_vpc_deploy(), and module DOCUMENTATION.savestill defaults totrue. Setdeploy: trueexplicitly to pushconfiguration to the fabric.
config_actions:block.Files
plugins/module_utils/manage_vpc_pair/common.py—resourceadded tochoices;
deployfallback →false.plugins/module_utils/manage_vpc_pair/deploy.py— resource-scoped deploy(
_pair_identifiers,_get_managed_pair_switches_needing_deploy);switch/resourceshare the per-switch deploy path.plugins/module_utils/models/manage_vpc_pair/vpc_pair_model.py— model +argument_spec:
deploydefaultfalse,typeLiteral gainsresource.plugins/modules/nd_manage_vpc_pair.py— DOCUMENTATION:resourcechoice/description,
deploydefaultfalse.tests/unit/module_utils/test_manage_vpc_pair_deploy.py,test_manage_vpc_pair_model.py— unit coverage for resource scope + defaults.Behavior / compatibility
config_actionsis introduced in this PR, so defaultingdeploytofalsesets the initial contract rather than changing released behavior. Playbooks must
set
config_actions.deploy: trueto trigger a deploy.Testing
test_manage_vpc_pair_deploy.py/test_manage_vpc_pair_model.py(resource-scope deploy, in-sync no-op, unresolved-peer warning, model &
argument_spec defaults).
nd_vpc_pairtarget (merge/replace/override/delete/gather)against a lab fabric.
Closes #428