feat: add subnet edit functionality with internal subnet labeling in workload traffic insights

Add SubnetUpdate schema with optional fields for PATCH operations, implement update_subnet endpoint with validation and audit logging, add subnet_label_for_ip helper to match IPs against known subnets using longest prefix matching, update flow_endpoint_label to show "internal (CIDR)" for traffic within known subnets instead of "external", add DNS servers and DHCP toggle to subnet form UI, implement edit
This commit is contained in:
2026-07-09 15:29:36 +02:00
parent 10e9406510
commit a16b56614c
4 changed files with 135 additions and 15 deletions
+8
View File
@@ -113,6 +113,14 @@ class SubnetCreate(BaseModel):
dhcp_enabled: bool = False
class SubnetUpdate(BaseModel):
network_id: str | None = None
cidr: str | None = None
gateway: str | None = None
dns: list[str] | None = None
dhcp_enabled: bool | None = None
class SecurityGroupCreate(BaseModel):
project_id: str | None = None
name: str