Skip to content

Enhance address space handling to accept numeric CIDR masks#4734

Open
JC-wk wants to merge 19 commits into
mainfrom
jc-wk/address-space-size-cidr
Open

Enhance address space handling to accept numeric CIDR masks#4734
JC-wk wants to merge 19 commits into
mainfrom
jc-wk/address-space-size-cidr

Conversation

@JC-wk
Copy link
Copy Markdown
Collaborator

@JC-wk JC-wk commented Oct 27, 2025

Resolves #4733

What is being addressed

Describe the current behavior you are modifying. Please also remember to update any impacted documentation.

How is this addressed

  • Accepts cidr values as strings from "16" to "29" for subnet creation
  • Updates documentation
  • Updates CHANGELOG.md
  • Updates API version
  • Adds Tests

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 27, 2025

Unit Test Results

677 tests   677 ✅  8s ⏱️
  1 suites    0 💤
  1 files      0 ❌

Results for commit 64afc10.

♻️ This comment has been updated with latest results.

@JC-wk
Copy link
Copy Markdown
Collaborator Author

JC-wk commented Oct 28, 2025

I've tested allocating a /27 and that worked in my environment

image

@JC-wk JC-wk marked this pull request as ready for review October 28, 2025 19:39
@JC-wk JC-wk requested a review from a team as a code owner October 28, 2025 19:39
Copilot AI review requested due to automatic review settings May 22, 2026 13:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support in the API for requesting auto-assigned address spaces using numeric CIDR prefix lengths (as strings), extending beyond the existing small/medium/large presets while keeping backwards compatibility.

Changes:

  • Extend address space allocation logic to accept numeric CIDR masks (string values) and validate allowed ranges.
  • Add repository tests for numeric CIDR prefix requests.
  • Update workspace authoring documentation and the project changelog to describe the new behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/tre-workspace-authors/authoring-workspace-templates.md Documents numeric CIDR mask support for address_space_size when requesting additional address spaces.
CHANGELOG.md Records the enhancement in the unreleased changelog.
api_app/tests_ma/test_db/test_repositories/test_workpaces_repository.py Adds tests covering successful numeric CIDR prefix requests.
api_app/models/schemas/workspace_template.py Updates sample schema description text to mention numeric CIDR masks.
api_app/db/repositories/workspaces.py Implements numeric CIDR prefix parsing/validation and routes it into new CIDR allocation.

Comment thread api_app/db/repositories/workspaces.py Outdated
Comment thread api_app/db/repositories/workspaces.py Outdated
Comment thread api_app/models/schemas/workspace_template.py
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.

Update address_space_size property to allow cidr subnets

2 participants