implement pdnsutil create-zone zone nsname, add-record, delete-rrset, replace-rrset #3298

Merged
merged 3 commits into from Jan 25, 2016

Projects

None yet

1 participant

@ahupowerdns
Member

Now, it may be that this is not the best API. And this is the time to let me know :-) Open issue is: if we do @-expansion in the 'record name' field, why not in the content field? Within the time available, it looks iffy that we can do a good job there. But perhaps we have to. Alternatively, we don't expand the @ in the record name field either.

$ pdnsutil create-zone ds9a.nl ns1.powerdns.com
Creating empty zone 'ds9a.nl.'
Also adding one NS record

$ pdnsutil add-record ds9a.nl @ A 1.2.3.4
$ pdnsutil add-record ds9a.nl "*" CNAME ds9a.nl
$ pdnsutil list-zone ds9a.nl
*.ds9a.nl.      3600    IN      CNAME   ds9a.nl.
ds9a.nl.        3600    IN      A       1.2.3.4 
ds9a.nl.        3600    IN      SOA     ns1.powerdns.com hostmaster.ds9a.nl 1 10800 3600 604800 3600
$ pdnsutil replace-rrset ds9a.nl @ A 3.3.3.3 4.4.4.4
$ pdnsutil list-zone ds9a.nl
*.ds9a.nl.      3600    IN      CNAME   ds9a.nl.
ds9a.nl.        3600    IN      A       3.3.3.3 
ds9a.nl.        3600    IN      A       4.4.4.4 
ds9a.nl.        3600    IN      SOA     ns1.powerdns.com hostmaster.ds9a.nl 1 10800 3600 604800 3600

$ pdnsutil add-record ds9a.nl @ AAAA :::1
Error: Parsing record content (try 'pdnsutil check-zone'): while parsing IPv6 address: ':::1' is invalid
$ pdnsutil add-record ds9a.nl @ AAAA ::1

$ pdnsutil list-zone ds9a.nl
*.ds9a.nl.      3600    IN      CNAME   ds9a.nl.
ds9a.nl.        3600    IN      AAAA    ::1
ds9a.nl.        3600    IN      SOA     ns1.powerdns.com hostmaster.ds9a.nl 1 10800 3600 604800 3600
@ahupowerdns ahupowerdns merged commit 889e865 into PowerDNS:master Jan 25, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ahupowerdns ahupowerdns deleted the ahupowerdns:zedit branch Feb 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment