Skip to content

Remove legacy /version.json dependency from nd httpapi - #496

Draft
mtarking wants to merge 1 commit into
developfrom
cleanup-httpapi-version
Draft

Remove legacy /version.json dependency from nd httpapi#496
mtarking wants to merge 1 commit into
developfrom
cleanup-httpapi-version

Conversation

@mtarking

@mtarking mtarking commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

The unified Nexus Dashboard (4.2+) no longer exposes the legacy /version.json endpoint. This PR removes the dead code path that depended on it, so nothing in the collection can accidentally query a non-existent endpoint on the new controller.

What changed

  • plugins/httpapi/nd.py — removed the get_version(platform="nd") branch that fetched /version.json. The NDFC path (get_version("ndfc"), hardcoded 12) that cisco.dcnm modules rely on is unchanged.
  • plugins/module_utils/nd.py — removed the now-unused NDModule.version property (and its self._version init), which was the only caller of get_version("nd").
  • Added a changelog fragment.

Why it's safe

  • get_version("nd") / NDModule.version was only consumed by the nd_version module (removed for 2.0.0 in the companion PR). Grep confirmed no surviving module reads .version — the manage/interface/fabric modules go through the state machine + orchestrators + REST sender, not this property.
  • cisco.dcnm calls get_version() with the default "ndfc", so it is unaffected.

Verification done locally

  • python -m py_compile passes for both edited files.
  • Changelog fragment YAML validated.
  • Grep confirms no remaining /version.json or get_version("nd") references; only the legitimate NDFC self.version shim remains.

Scope note

This is the httpapi cleanup split out from the legacy-module-removal PR to keep each diff focused. It does not add a runtime generation guard (get_platform_generation()); that can follow separately if/when modules need to gate on ND generation.

The unified Nexus Dashboard (4.2+) no longer exposes /version.json. Drop the get_version(platform="nd") branch in the httpapi plugin and the now-unused NDModule.version property that consumed it. The NDFC version path (get_version("ndfc")) used by cisco.dcnm modules is unchanged.
@mtarking mtarking self-assigned this Aug 7, 2026
@mtarking mtarking added jira-sync Sync this issue to Jira 2.0.0 Release 2.0.0 nda-project Move this issue to the NDA project labels Aug 7, 2026
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 jira-sync Sync this issue to Jira nda-project Move this issue to the NDA project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant