Hi,
i work on a python library based on python/libknot/control.py.
I'm at the point to add/remove resource record to a configured zone.
I have tried a lot, but got no positive result:
"invalid parameter (data: COMMAND = b'zone-set', ERROR = b'invalid
parameter', ZONE = b'domain.tld.', OWNER = b'www.domain.tld.', TYPE =
b'A', DATA = b'127.0.0.1')"
The full test script debug output:
DEBUG: _openSocket
DEBUG: _zone-begin
DEBUG: _cmd: {'cmd': 'zone-begin'}
DEBUG: _cmd: {'cmd': 'zone-set', 'zone': 'domain.tld.',
'owner': 'www.domain.tld.', 'rtype': 'A', 'data':
'127.0.0.1'}
DEBUG: _zone-abort
DEBUG: _cmd: {'cmd': 'zone-abort'}
invalid parameter (data: COMMAND = b'zone-set', ERROR = b'invalid
parameter', ZONE = b'domain.tld.', OWNER = b'www.domain.tld.', TYPE =
b'A', DATA = b'127.0.0.1')
DEBUG: _zone-begin
DEBUG: _cmd: {'cmd': 'zone-begin'}
DEBUG: _cmd: {'cmd': 'zone-get', 'zone': 'domain.tld.',
'owner': 'ns1.domain.tld.'}
DEBUG: _zone-commit
DEBUG: _cmd: {'cmd': 'zone-commit'}
resp: {
"domain.tld.": {
"ns1.domain.tld.": {
"A": {
"ttl": "86400",
"data": [
"192.168.120.211"
]
}
}
}
}
DEBUG: _closeSocket
The "_cmd" call uses libknot.control.send_block[1] internally, the following
"{…}" held the function parameters.
[1]
https://gitlab.labs.nic.cz/knot/knot-dns/blob/master/python/libknot/control…
It needs some time to discover "owner" as the query filter for
"zone-get", which
wasn't that obvious.
Now I'm wondering how set the parameter, for adding a resource record to a
zone.
- frank
--
Frank Matthieß Stapenhorster Straße 42b, DE 33615 Bielefeld
Mail: frank.matthiess(a)virtion.de
GnuPG: 9F81 BD57 C898 6059 86AA 0E9B 6B23 DE93 01BB 63D1