Skip to content

nd_interface_loopback: align deploy control to config_actions.deploy - #366

Open
allenrobel wants to merge 3 commits into
developfrom
align-loopback-config-actions-deploy
Open

nd_interface_loopback: align deploy control to config_actions.deploy#366
allenrobel wants to merge 3 commits into
developfrom
align-loopback-config-actions-deploy

Conversation

@allenrobel

@allenrobel allenrobel commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

⚠️ Merge Ordering — land before #403's post-#422 rebase

This PR and #403 (loopback policy_type discriminated union) both modify plugins/modules/nd_interface_loopback.py in the same regions (options block, EXAMPLES, main()), so textual conflicts between them are guaranteed. #403 is already held until #422 merges and owes a substantial rebase at that point (per the merge-ordering section in its body). Merging this small PR first lets #403 absorb the config_actions.deploy change in that one rebase it already owes. The reverse order works but is more expensive: this PR would have to re-express deploy control against the union-era module (which by then documents nine policy templates across two OSes).

Translation:

  1. Merge Detect field removals in replaced/overridden states (one-way subset diff) #422
  2. Merge this PR
  3. Rebase nd_interface_loopback: policy_type discriminated union #403 onto develop after 1 and 2 above

Related Issue(s)

Closes #364

Also checks off the #384 task-1 box for this module: its argspec imports now come from nd_argument_specs.py instead of the legacy nd.py.

Proposed Changes

Align nd_interface_loopback deploy control with the convention used by the unmerged interface
modules: replace the flat top-level deploy boolean with a config_actions dict whose single key
is deploy.

  • DOCUMENTATION: deploy: option replaced by config_actions: (dict) with a deploy suboption (type: bool, default true).
  • EXAMPLES: deploy: falseconfig_actions: { deploy: false }.
  • argument_spec: deploy=dict(...)config_actions_spec(include=("deploy",)), the shared fragment added by Relocate nd_argument_spec to nd_argument_specs.py; add config_actions_spec fragment #387
    (reproduces the deploy-only block hand-written in the sibling interface modules byte-for-byte).
  • nd_argument_spec import re-pointed from legacy nd.py to nd_argument_specs.py (Tracking: Gen-3 argspec imports via nd_argument_specs.py #384 task 1 for this module).
  • Read site: reads config_actions.deploy (default true) and sets orchestrator.deploy.
  • version_added corrected to 2.0.0 (review feedback).

Deploy scope and batching are unchanged (interface-scope interfaceActions/deploy, one bulk call per run);
only the toggle moves under config_actions.

No deprecation/changelog fragment: the module is unreleased (released changelog stops at 1.2.0;
galaxy 1.5.0), so nothing shipped is broken.

Test Notes

  • ndblack --check / ndisort --check-only: clean.
  • ndpylint: 10.00/10; ndmypy: only the pre-existing environmental ansible_collections.*
    import-resolution error on the unchanged import block; no new findings from this change.
  • ndtest --test validate-modules plugins/modules/nd_interface_loopback.py: passes (exit 0) —
    confirms DOCUMENTATION suboptions match the fragment-built argspec options.
  • ndpytest tests/unit/module_utils/orchestrators/test_loopback_interface.py tests/unit/module_utils/test_nd_argument_specs.py: 28 passed.
  • Integration merged.yaml no-deploy task updated to the new param shape.

Cisco Nexus Dashboard Version

4.2.1

Related ND API Resource Category

  • analyze
  • infra
  • 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

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Aligns nd_interface_loopback’s “deploy after mutation” toggle with the interface-module convention by nesting it under config_actions.deploy instead of a flat top-level deploy option, and updates the loopback integration scenario accordingly.

Changes:

  • Replace module option deploy: bool with config_actions: { deploy: bool } in DOCUMENTATION/EXAMPLES and in argument_spec.
  • Update the module runtime read site to set model_orchestrator.deploy from config_actions.deploy (defaulting to true).
  • Update the loopback integration “no-deploy” task to use the new config_actions.deploy shape.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
plugins/modules/nd_interface_loopback.py Moves deploy control under config_actions.deploy in docs, examples, argspec, and orchestration setup.
tests/integration/targets/nd_interface_loopback/tasks/merged.yaml Updates the no-deploy integration task to pass config_actions: { deploy: false }.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/modules/nd_interface_loopback.py
@allenrobel
allenrobel force-pushed the align-loopback-config-actions-deploy branch from c057fba to cdfefda Compare June 30, 2026 16:20
@allenrobel allenrobel self-assigned this Jul 1, 2026
@allenrobel allenrobel added 2.0.0 Release 2.0.0 ready for review Submitter is requesting a PR review labels Jul 1, 2026
allenrobel added a commit that referenced this pull request Jul 2, 2026
The module has not shipped in a release; 1.4.0 predates its actual
availability. Align version_added with the current collection version
so the config_actions change is not a post-release break.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6
@allenrobel
allenrobel requested a review from Copilot July 2, 2026 18:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread plugins/modules/nd_interface_loopback.py
@allenrobel allenrobel removed the ready for review Submitter is requesting a PR review label Jul 2, 2026
@allenrobel
allenrobel marked this pull request as draft July 2, 2026 19:21
allenrobel added a commit that referenced this pull request Jul 3, 2026
The module has not shipped in a release; 1.4.0 predates its actual
availability. Align version_added with the current collection version
so the config_actions change is not a post-release break.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6
@allenrobel
allenrobel force-pushed the align-loopback-config-actions-deploy branch from 443250a to 6975466 Compare July 3, 2026 01:34
@allenrobel allenrobel added ready for review Submitter is requesting a PR review postponed and removed ready for review Submitter is requesting a PR review labels Jul 7, 2026
allenrobel added a commit that referenced this pull request Jul 9, 2026
The module has not shipped in a release; 1.4.0 predates its actual
availability. Align version_added with the current collection version
so the config_actions change is not a post-release break.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6
@allenrobel
allenrobel force-pushed the align-loopback-config-actions-deploy branch from 6975466 to a943ecb Compare July 9, 2026 16:55
allenrobel added a commit that referenced this pull request Jul 13, 2026
The module has not shipped in a release; 1.4.0 predates its actual
availability. Align version_added with the current collection version
so the config_actions change is not a post-release break.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6
@allenrobel
allenrobel force-pushed the align-loopback-config-actions-deploy branch from a943ecb to ee84b7d Compare July 13, 2026 17:09
@sivakasi-cisco sivakasi-cisco added the nac04 NaC ND release 0.0.4 label Jul 14, 2026
allenrobel added a commit that referenced this pull request Jul 16, 2026
The module has not shipped in a release; 1.4.0 predates its actual
availability. Align version_added with the current collection version
so the config_actions change is not a post-release break.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6
@allenrobel
allenrobel force-pushed the align-loopback-config-actions-deploy branch from ee84b7d to 5a73abd Compare July 16, 2026 00:46
allenrobel added a commit that referenced this pull request Jul 19, 2026
The module has not shipped in a release; 1.4.0 predates its actual
availability. Align version_added with the current collection version
so the config_actions change is not a post-release break.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6
@allenrobel
allenrobel force-pushed the align-loopback-config-actions-deploy branch from 5a73abd to 2308c2d Compare July 19, 2026 18:17
@sivakasi-cisco sivakasi-cisco added nac01 NaC ND release 0.0.1 and removed nac04 NaC ND release 0.0.4 labels Jul 21, 2026
allenrobel added a commit that referenced this pull request Jul 22, 2026
The module has not shipped in a release; 1.4.0 predates its actual
availability. Align version_added with the current collection version
so the config_actions change is not a post-release break.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6
@allenrobel
allenrobel force-pushed the align-loopback-config-actions-deploy branch from 2308c2d to c44dddc Compare July 22, 2026 16:12
@allenrobel
allenrobel marked this pull request as ready for review July 24, 2026 18:41
@allenrobel allenrobel added the ready for review Submitter is requesting a PR review label Jul 24, 2026
allenrobel and others added 3 commits July 27, 2026 13:02
Replace the flat top-level `deploy` boolean with a `config_actions` dict
carrying a single `deploy` key, matching the convention already used by the
unmerged interface modules (svi, ethernet_trunk_host, subinterface_managed,
subinterface_unmanaged).

Changes DOCUMENTATION, EXAMPLES, the argument_spec, and the read site. No
deprecation/changelog fragment: the module is unreleased (released changelog
stops at 1.2.0; galaxy 1.5.0), so nothing shipped is broken.

Closes #364

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H5FaXWEXvkgJUrUBZbfdFA
The module has not shipped in a release; 1.4.0 predates its actual
availability. Align version_added with the current collection version
so the config_actions change is not a post-release break.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Deb5UWoTfAZa6kq7khAEu6
Now that #387 is merged, build the `config_actions` block via
`config_actions_spec(include=("deploy",))` from `nd_argument_specs.py`
instead of the hand-written dict (which the fragment reproduces
byte-for-byte), and re-point the `nd_argument_spec` import from the
legacy `nd.py` to `nd_argument_specs.py` — completing the #384 task-1
checkbox for this module.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TnSktMFZGRafkf5GbuBwwm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.0.0 Release 2.0.0 nac01 NaC ND release 0.0.1 ready for review Submitter is requesting a PR review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nd_interface_loopback - align deploy control to config_actions.deploy

3 participants