DHCP scopes store a host-name conflict policy #187

Open
opened 2026-10-31 12:42:22 -04:00 by claude · 0 comments
Owner
  • Draft: BUG-49
  • Priority: low
  • Agent: storage-coder
  • Depends on: none
  • Decisions: Q-BUG-11

Why

See #186. DhcpScopeEntity (src/dotnet/src/Ninlil.Dhcp.Data.Abstractions/Entity/DhcpScopeEntity.cs) has no such field.

What changes

  • New DhcpHostNameConflictPolicyEnum { Refuse = 0, AppendSuffix = 1 } in src/dotnet/src/Ninlil.Dhcp.Data.Abstractions/Enum/ (next to DhcpScopeKindEnum), with a summary per member.
  • DhcpScopeEntity.HostNameConflictPolicy, default Refuse, and its configuration in src/dotnet/src/Ninlil.Dns.Data.EntityFrameworkCore/Configuration/ (stored as the provider's usual enum form, default 0 for existing rows).
  • One migration per relational provider (AddDhcpScopeHostNameConflictPolicy), converted with src/script/development/file-scoped-namespaces.sh.
  • MongoDB: AutoMap() picks the property up; a document without it reads as Refuse. Check whether an older build fails on the extra element (MongoClassMapRegistrar.cs, IgnoreExtraElements) or on value 1; add a MongoSchemaSteps.Known step if it would misread.
  • Check that the backup catalog (Ninlil.Dns.Server.Backup/Catalog/BackupEntityCatalog.cs) carries the new column without a change.

Acceptance

  • src/dotnet/tests/Ninlil.Dns.Data.Integration.Tests: a scope saved with AppendSuffix reads back with it on every engine (SQLite without Docker, the rest RequiresDocker); fails first.
  • An existing scope row reads as Refuse after the migration (SQLite test on a migrated database with a row inserted before).
  • src/dotnet/tests/Ninlil.Dhcp.Data.EntityFrameworkCore.Tests passes. Build 0 warnings.
  • Schema change: four migrations plus MongoDB. No API or option change.

Source

#186.

- **Draft:** BUG-49 - **Priority:** low - **Agent:** storage-coder - **Depends on:** none - **Decisions:** Q-BUG-11 ### Why See #186. `DhcpScopeEntity` (`src/dotnet/src/Ninlil.Dhcp.Data.Abstractions/Entity/DhcpScopeEntity.cs`) has no such field. ### What changes - New `DhcpHostNameConflictPolicyEnum { Refuse = 0, AppendSuffix = 1 }` in `src/dotnet/src/Ninlil.Dhcp.Data.Abstractions/Enum/` (next to `DhcpScopeKindEnum`), with a summary per member. - `DhcpScopeEntity.HostNameConflictPolicy`, default `Refuse`, and its configuration in `src/dotnet/src/Ninlil.Dns.Data.EntityFrameworkCore/Configuration/` (stored as the provider's usual enum form, default 0 for existing rows). - One migration per relational provider (`AddDhcpScopeHostNameConflictPolicy`), converted with `src/script/development/file-scoped-namespaces.sh`. - MongoDB: `AutoMap()` picks the property up; a document without it reads as `Refuse`. Check whether an older build fails on the extra element (`MongoClassMapRegistrar.cs`, `IgnoreExtraElements`) or on value 1; add a `MongoSchemaSteps.Known` step if it would misread. - Check that the backup catalog (`Ninlil.Dns.Server.Backup/Catalog/BackupEntityCatalog.cs`) carries the new column without a change. ### Acceptance - [ ] `src/dotnet/tests/Ninlil.Dns.Data.Integration.Tests`: a scope saved with `AppendSuffix` reads back with it on every engine (SQLite without Docker, the rest `RequiresDocker`); fails first. - [ ] An existing scope row reads as `Refuse` after the migration (SQLite test on a migrated database with a row inserted before). - [ ] `src/dotnet/tests/Ninlil.Dhcp.Data.EntityFrameworkCore.Tests` passes. Build 0 warnings. - [ ] Schema change: four migrations plus MongoDB. No API or option change. ### Source #186.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#187
No description provided.