Skip to content

Config Actions: Wire nd_manage_switches to the Common Save and Deploy Framework - #499

Open
AKDRG wants to merge 9 commits into
CiscoDevNet:developfrom
AKDRG:config_actions_switches_integration
Open

Config Actions: Wire nd_manage_switches to the Common Save and Deploy Framework#499
AKDRG wants to merge 9 commits into
CiscoDevNet:developfrom
AKDRG:config_actions_switches_integration

Conversation

@AKDRG

@AKDRG AKDRG commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Related Issue(s)

Related to #368

Merge dependency on common framework #498

Proposed Changes

  • Wire nd_manage_switches into the shared config_actions framework.
  • Parse and validate switch module config_actions through the common policy-driven parser.
  • Add a switch-specific config actions backend for:
    • fabric config save
    • switch-scoped deploy
    • global fabric deploy
  • Preserve existing switch module defaults:
    • config_actions.save: true
    • config_actions.deploy: true
    • config_actions.type: switch
  • Enforce common validation behavior:
    • reject explicit empty config_actions: {}
    • reject deploy: true with save: false
    • reject unsupported deploy types for switch workflows
  • Route switch finalize flows through the common controller while preserving existing add, migrate, re-add, POAP, preprovision, RMA, and idempotent deploy behavior.
  • Add result registration for config save/deploy actions so config action execution is visible in module output.
  • Keep idempotent out-of-sync switches deployable on a later run when config_actions.deploy is enabled.
  • Add focused unit coverage for switch config action finalize behavior and common framework integration.

Test Notes

  • Ran formatting:

    • black --check -l 159 plugins tests
    • Result: passed
  • Ran targeted sanity checks:

    • ansible-test sanity --test pep8 --color --truncate 0
    • ansible-test sanity --test pylint --color --truncate 0
    • Result: passed
  • Ran full sanity from a materialized collection tree:

    • ansible-test sanity --color --truncate 0
    • Result: passed
    • Note: Python 3.10 and 3.12 compile/import checks were skipped locally because those interpreters are not installed.
  • Live tested switch config actions on AK-VXLAN:

    • 8-switch import with config save and switch-level deploy enabled.
    • Switch-level deploy flow completed.
    • Global deploy flow was exercised.
    • Subsequent deploy run after a staged/non-deployed run was validated.
    • Cleanup/removal workflow was tested.

Cisco Nexus Dashboard Version

Cisco Nexus Dashboard 4.2.1

Related ND API Resource Category

  • analyze
  • infa
  • manage
  • onemanage
  • other

Checklist

  • Latest commit is rebased from develop with merge conflicts resolved
  • New or updates to documentation has been made accordingly
  • Assigned the proper reviewers

@AKDRG AKDRG changed the title Config actions switches integration Config Actions: Wire nd_manage_switches to the Common Save and Deploy Framework Aug 10, 2026
@AKDRG AKDRG self-assigned this Aug 10, 2026
@AKDRG AKDRG added the ready for review Submitter is requesting a PR review label Aug 10, 2026

@allenrobel allenrobel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Reviewed the switch-module wiring into the common config-actions framework (findings in the config_actions/ package itself are out of scope here since they land via #498). Two findings, posted inline.

🤖 Generated with Claude Code

Comment thread plugins/module_utils/manage_switches/nd_switch_resources.py
Comment thread plugins/module_utils/manage_switches/config_actions_backend.py

@allenrobel allenrobel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified 8327cd91 addresses both threads: finalize() now fails on switch-scoped deploy with no targets, and _idempotent_sync_serials() fails early naming any out-of-sync switch without a resolved switchId. Unit tests pass locally (39 passed). LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review Submitter is requesting a PR review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants