summaryrefslogtreecommitdiff
path: root/python/samba/dnsserver.py
AgeCommit message (Collapse)AuthorFilesLines
2023-12-15python: use python3 style super statementsRob van der Linde1-8/+8
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-06-23python:samba: Fix code spellingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Jun 23 14:51:14 UTC 2023 on atb-devel-224
2021-11-22py/dnsserver: add a missing exception variableDouglas Bagnall1-1/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2021-11-22py/dnsserver: add missing importsDouglas Bagnall1-0/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.com>
2021-07-05py/dnsserver: TXTRecord copes with single stringsDouglas Bagnall1-0/+2
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-22python dns: dns_record_match() matches IPv6 semanticallyDouglas Bagnall1-1/+8
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-11py: samba.dnsserver: add helper for record buffersDouglas Bagnall1-0/+7
We *always* make these steps when we get a record. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-06-02samba-tool dns: move dns_record_match to dnsserver.pyDouglas Bagnall1-0/+91
This function is used here and in tests, but the tests should not be importing things from netcmd.dns, which is really supposed to be UI code. So we move to a common place. the only difference is the function raises DNSParseError instead of CommandError, and netcmd.dns has to catch and wrap that. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-08py/dnsserver add flag from string functionDouglas Bagnall1-0/+8
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-04-08py/dnsserver: add record_from_string helper functionDouglas Bagnall1-0/+32
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-04-08py/dnsserver: add .from_string() methodsDouglas Bagnall1-0/+71
The logic to parse DNS value strings (e.g. "example.com 10" for an MX, which needs to be split on the space) is repeated at least in samba-tool dns and tests/dcerpc/dnsserver.py. Here we bring it together so we can do it once. The sep= keyword allows callers to separate on all runs of whitespace (the default, as samba-tool dns does) or, using sep='', to separate on true spaces only. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-04-08py/dnsserver: remove workaround of fixed bugDouglas Bagnall1-22/+10
We used to do something wrong with the refcounts, but we don't anymore, so we don't need this confusing nonsense. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-04-08py/dnsserver: replace obsolete comments with useful onesDouglas Bagnall1-2/+18
The replaced comment was about a long fixed Python reference counting bug. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2021-04-08pydns: rename s/CNameRecord/CNAMERecord/ for consistencyDouglas Bagnall1-2/+2
Everything else is TXTRecord, SRVRrcord, SOARecord. Making CNAME the same allows easier lookups. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
2018-08-24PEP8: fix E302: expected 2 blank lines, found 1Joe Guo1-0/+1
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E128: continuation line under-indented for visual indentJoe Guo1-2/+2
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2018-08-24PEP8: fix E127: continuation line over-indented for visual indentJoe Guo1-4/+4
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2017-02-23python: Move dnsserver helper functions into samba.dnsserverAndrew Bartlett1-0/+181
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>