Remove legacy /version.json dependency from nd httpapi - #496
Draft
mtarking wants to merge 1 commit into
Draft
Conversation
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.
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.
Summary
The unified Nexus Dashboard (4.2+) no longer exposes the legacy
/version.jsonendpoint. 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 theget_version(platform="nd")branch that fetched/version.json. The NDFC path (get_version("ndfc"), hardcoded12) thatcisco.dcnmmodules rely on is unchanged.plugins/module_utils/nd.py— removed the now-unusedNDModule.versionproperty (and itsself._versioninit), which was the only caller ofget_version("nd").Why it's safe
get_version("nd")/NDModule.versionwas only consumed by thend_versionmodule (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.dcnmcallsget_version()with the default"ndfc", so it is unaffected.Verification done locally
python -m py_compilepasses for both edited files./version.jsonorget_version("nd")references; only the legitimate NDFCself.versionshim 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.