Treat HTTP 207 no-command switch deploys as successful no-ops - #573
Draft
nikhilsrikrishna wants to merge 3 commits into
Draft
nikhilsrikrishna wants to merge 3 commits into
nikhilsrikrishna wants to merge 3 commits into
Conversation
nikhilsrikrishna
requested review from
akinross,
allenrobel,
anvitha-jain,
gmicol,
lhercot,
mikewiebe,
mtarking,
sajagana,
samiib and
shrsr
as code owners
September 17, 2026 11:40
nikhilsrikrishna
marked this pull request as draft
September 17, 2026 12:24
8 tasks
nikhilsrikrishna
marked this pull request as ready for review
September 18, 2026 11:34
nikhilsrikrishna
marked this pull request as draft
September 18, 2026 11:38
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)
N/A — fixes false failures for valid no-op switch deployments.
This change is also required by #495 for Interface Groups switch-level deployment on vPC-paired switches.
Why This Change Is Needed
POST /api/v1/manage/fabrics/{fabric}/switchActions/deploycan return HTTP 207 when the deployment request was handled successfully but one of the included switches has no pending configuration:{ "switchId": "SN2", "status": "notExecuted", "message": "No Commands to execute" }This is a valid no-op in two known workflows:
Policy pending-delete cleanup
For
state: deletedwithdeploy: true, a requested policy may no longer appear in the active-policy cache becausemarkDeletedpolicies and generated child policies are intentionally filtered out.The module therefore supports a blind pending-delete cleanup path: when the switch is known but the active policy is absent, it calls
switchActions/deployto apply any previously staged deletion.If that deletion has already converged, or the switch otherwise has no remaining pending commands, NDFC returns
notExecuted / No Commands to execute. The deployment request is valid and the switch is already in the desired state, so this response must not fail the Ansible task.The same response can also occur during a repeated normal delete/deploy after the first operation has already removed the pending configuration.
Interface Groups vPC peer deployment
Interface Groups supports switch-level deployment. When the affected switch belongs to a vPC pair, NDFC can internally include the peer switch in the deployment operation.
The requested switch may deploy successfully while its already-synchronized peer is returned as:
status: notExecutedmessage: No Commands to executeThe peer result is a successful no-op and should not cause the complete Interface Groups deployment to fail.
Previously,
NdV1Strategytreated every HTTP 207 item whose status was not exactlysuccessas fatal. This caused valid switch deployments to be reported as failures.Proposed Changes
notExecuted / No Commands to executeresult as a successful no-op only when:switchActions/deploy;DATA.switchIds[];switchId; andThis is implemented in the shared response strategy because Policies, Policy Groups, and Interface Groups all use the same
switchActions/deployendpoint.Test Notes
196 passed.4729 passed.ansible-test sanity --python 3.11: passed.cisco-nd-1.5.0.tar.gz).inSyncwith zero pending commands.nd_manage_policy_groupintegration onVXLAN_Fabric:deletedsetup initially encountered a transient NDFC device-delivery HTTP 207.deletedpassed all 25 tasks.deploy: truereturnedchanged: falseand passed instead of failing on the no-command response.inSync.Cisco Nexus Dashboard Version
4.2 and 4.3
Related ND API Resource Category
Checklist