Skip to content

Conversation

@sasa-tomic
Copy link
Collaborator

Motivation

  • Allow --id with node list when they belong to the same subnet.

Solution

  • Add subnet_id (aliases: --subnet/--id), rename nodes -> remove_nodes, and validate node list against subnet via registry SubnetQueryBy::NodeList.
  • Adjust Resize arg names to add_count/remove_count and update CLI aliases.

Details

  • Fail with a clear error when provided --id doesn't match the nodes' subnet.

Meta — updated tests accordingly

### Motivation - Allow passing a subnet id together with node lists when replacing, provided they belong to that subnet.
### Solution - Accept --id/--subnet-id alongside --remove-nodes/--add-nodes and validate against registry; add validate_subnet_id_and_nodes().
### Details - Rename fields: remove_nodes, subnet_id, add_count/remove_count; derive SubnetTarget from remove_nodes when id omitted.
### Details - Use SubnetQueryBy::NodeList to resolve subnet and error on mismatch.
### Meta - updated tests accordingly
@sasa-tomic sasa-tomic self-assigned this Sep 1, 2025
@sasa-tomic sasa-tomic marked this pull request as ready for review September 1, 2025 16:37
@sasa-tomic sasa-tomic requested a review from a team as a code owner September 1, 2025 16:37
@sasa-tomic sasa-tomic merged commit 72a43d8 into main Sep 2, 2025
10 checks passed
@sasa-tomic sasa-tomic deleted the feat/subnet-allow-id-with-nodes branch September 2, 2025 14:23
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.

3 participants