feat(dut-network): allow DNS hostnames in public_ip field#672
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@ambient-code please rebase and fix conflict. |
Resolve DNS hostnames to IPv4 addresses when used in the public_ip field of static_leases configuration, enabling users to specify entries like "nxp-xxx-08.my.internal.lab.com" instead of raw IP addresses. Closes #666 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cedb7d6 to
cdf0c7d
Compare
|
@ambient-code please rebase again |
… DNS tests The TestDnsNameIn1to1 tests were passing 'static_leases' to _make_driver() but DutNetwork uses 'addresses' as the field name (renamed in 38a6f72). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@mangelajo Done — the branch was already up to date with |
Summary
_resolve_ip()helper toDutNetworkdriver that resolves DNS hostnames to IPv4 addresses usingsocket.getaddrinfo(), passing through valid IP addresses unchanged_get_1to1_mappings()andadd_static_lease()so hostname-basedpublic_ipvalues are resolved before being used in nftables rules and IP aliasesCloses #666
Test plan
test_driver.pypass (including 7 new tests)make lint-fix)🤖 Generated with Claude Code