Skip to content

Expose is_secondary on StorageNodeDTO (v2 storage-nodes API)#1175

Open
boddumanohar wants to merge 1 commit into
mainfrom
feature/expose-storage-node-is-secondary
Open

Expose is_secondary on StorageNodeDTO (v2 storage-nodes API)#1175
boddumanohar wants to merge 1 commit into
mainfrom
feature/expose-storage-node-is-secondary

Conversation

@boddumanohar

Copy link
Copy Markdown
Member

Summary

  • Adds is_secondary to StorageNodeDTO (v2 GET /storage-nodes/), a passthrough of the existing model.is_secondary_node field. No behavior change.
  • The v2 API previously only exposed secondary_node_id (a primary's pointer to its own secondary) — a secondary node's own record wasn't distinguishable via the API.

Why

Needed by simplyblock-operator's new load-aware primary node placement webhook (companion branch: feature/primary-node-placement in simplyblock-operator), which excludes secondary nodes from placement candidates when choosing the best primary node for a new volume at creation time.

Test plan

  • pytest tests/unit/web/api/v2/test_storage_node_endpoints.py — 11 passed
  • ruff check simplyblock_web/api/v2/_dtos.py — clean

🤖 Generated with Claude Code

Passthrough of the existing model.is_secondary_node field, no behavior
change. Needed by the simplyblock-operator's new load-aware primary node
placement webhook to exclude secondary nodes from placement candidates
(simplyblock/simplyblock-operator#<placement-pr>).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant