Skip to content

Added fixes for output mismatch and returning status code got from ND - #455

Open
jeetugangwar11 wants to merge 7 commits into
CiscoDevNet:developfrom
jeetugangwar11:RM_issues_304
Open

Added fixes for output mismatch and returning status code got from ND#455
jeetugangwar11 wants to merge 7 commits into
CiscoDevNet:developfrom
jeetugangwar11:RM_issues_304

Conversation

@jeetugangwar11

Copy link
Copy Markdown
Collaborator

Issues:

  1. Output mismatch in case of mudule using NDStateMachine and Orchestraror.
  2. Use RETURN_CODE returned by ND instead of hardcoding 200 for successful operations.

Changes:

Use the HTTP RETURN_CODE provided by the ND response envelope for successful Resource Manager API operations instead of hardcoding 200.
Preserve the response metadata for resource create, update-delete, and delete operations.
Continue using a synthetic 200 response for check-mode and logical operations where no API request is sent.
Preserve per-resource operation status and messages in the response DATA.
Retain the actual ND response code for partial-success failures, such as HTTP 207 Multi-Status.

Test Notes:

Ran the complete Resource Manager unit test suite:
Verified that partial delete responses expose the ND-provided RETURN_CODE: 207.
Verified that API path, verb, payload, response, result, metadata, and diff are returned correctly at -vvv.

Nexus Dashboard: 4.3.1.135.51166

Related ND API Resource Category:

manage

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

…D instead of harcoding 200 for successful operation.
@jeetugangwar11 jeetugangwar11 added the ready for review Submitter is requesting a PR review label Jul 29, 2026
@jeetugangwar11 jeetugangwar11 changed the title [Jeet] Added fix output mismatch and returning status code got from ND [Jeet] Added fixes for output mismatch and returning status code got from ND Jul 29, 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

One finding, on the vPC-pair setup loop in rm_tasks.yaml. The RETURN_CODE/verbosity changes themselves look correct (status captured immediately after each request, no cross-request leakage; unit and integration assertions match the new behavior).

🤖 Generated with Claude Code

Comment thread tests/integration/targets/nd_resource_manager/tasks/rm_tasks.yaml
allenrobel
allenrobel previously approved these changes Aug 3, 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.

LGTM

@mtarking mtarking changed the title [Jeet] Added fixes for output mismatch and returning status code got from ND Added fixes for output mismatch and returning status code got from ND Aug 6, 2026
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.

4 participants