Skip to content

Conversation

@miesi
Copy link
Contributor

@miesi miesi commented Aug 4, 2025

PATL, add DNAME support to DIM and ndcli

miesi-ionos and others added 2 commits August 4, 2025 20:49
This commit implements comprehensive DNAME (Delegation Name) record support across the entire DIM system:

**Core Implementation:**
- Added DNAME class to dim/dim/rrtype.py with target field validation
- Implemented DNAME-specific validation rules in dim/dim/dns.py:
  - Prevents DNAME at zone apex (RFC 6672 requirement)
  - Ensures DNAME cannot coexist with other records at same name (except NS/DS at zone cuts)
  - Prevents creation of records under DNAME subtrees
  - Validates that DNAME cannot be created if records exist under the subtree

**CLI Support:**
- Added DNAME to ndcli command interface in ndcli/dimcli/__init__.py
- Added DNAME zone import support in ndcli/dimcli/zoneimport.py
- Automatically generates all standard DNAME commands:
  - create rr <name> dname <target>
  - delete rr <name> dname [target]
  - show rr <name> dname [target]
  - modify rr <name> dname [target]
  - Zone and zone-profile variants

**Testing:**
- Created comprehensive functional tests in dim-testsuite/t/rr-create-dname-1.t
- Added API unit tests in dim-testsuite/tests/dns_test.py covering:
  - Basic DNAME creation and deletion
  - Zone apex restriction validation
  - Conflict detection with other record types
  - Subtree validation logic

**Documentation:**
- Updated API documentation in dim/doc/api.rst
- CLI documentation automatically generated from command definitions

**PDNS Integration:**
- Verified existing pdns-output component already supports DNAME records
- Confirmed DNSSEC signing works properly for DNAME records

DNAME records provide DNS redirection for entire subtrees, enabling more flexible domain migrations and organizational restructuring compared to CNAME records which only redirect individual names.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <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.

2 participants