[Pdns-users] pdnsutil usage for get-meta <zone> without attribute
Herve Maisonneuve
hmaisonneuve6513 at gmail.com
Fri Jun 21 14:54:40 UTC 2019
Hello pdns-mailing list,
I'm writing a backend within cassandra db and python driver through the
remotebackend module http-mode configured
When using the pdnsutil to retrieve all meta-data attached to a particular
zone, it's done by using the pdnsutil 'get-meta' command whithout
attribute, as mentionned in the documentation.
This command works very well for particular attribute but not when ther is
no attribute at all.
I guess my backend doesn't return the right object structure or sequence,
since pdsnutil should try to retrieve each value for each attribute
existing in DB.
I tried several data structures, but without success: for example ( and
more ..)
[{'ALLOW-AXFR-FROM': '192.168.123.0/24'}, {'ALLOW-AXFR-FROM': '
192.168.250.0/24'}, {'SOA-EDIT': '0'}]
[['ALLOW-AXFR-FROM', '192.168.123.0/24'], ['API-RECTIFY', '1'],
['PRESIGNED', '0'], ['SOA-EDIT', '1'], ['SOA-EDIT-API', '1']]
['ALLOW-AXFR-FROM=192.168.123.0/24', 'API-RECTIFY=1', 'PRESIGNED=0',
'SOA-EDIT=1', 'SOA-EDIT-API=1']
DB content for the requested domain
kind | content
-----------------+------------------
ALLOW-AXFR-FROM | 192.168.123.0/24
API-RECTIFY | 1
PRESIGNED | 0
SOA-EDIT | 1
SOA-EDIT-API | 1
result of the pdnsutil command :
***************************************************
pdnsutil get-meta osnworld.net
Jun 21 14:11:44 Reading random entropy from '/dev/urandom'
Jun 21 14:11:44 [bindbackend] Parsing 0 domain(s), will report when done
Jun 21 14:11:44 [bindbackend] Done parsing domains, 0 rejected, 0 new, 0
removed
Metadata for 'osnworld.net'
****************************************************
That means "nothing", I guess, and whatever i try to return
It's why I'm thinking that I don't return the right data format to make
pdnsutil understand the backend's answer
for a particular attribute it works fine:
***************************************************
pdnsutil get-meta osnworld.net API-RECTIFY
Jun 21 11:58:00 Reading random entropy from '/dev/urandom'
Jun 21 11:58:00 [bindbackend] Parsing 0 domain(s), will report when done
Jun 21 11:58:00 [bindbackend] Done parsing domains, 0 rejected, 0 new, 0
removed
Metadata for 'osnworld.net'
API-RECTIFY = 1
****************************************************
Could someone help to find the good data structure I should return
Thanks for all
Herve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20190621/7fc89adc/attachment.html>
More information about the Pdns-users
mailing list