From 6daf04eb6eb21734fbac24248009335cea935292 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Thu, 2 Feb 2012 13:31:53 +1100 Subject: s4-provision: dns: Add txt DNS record --- source4/scripting/python/samba/provision/sambadns.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source4') diff --git a/source4/scripting/python/samba/provision/sambadns.py b/source4/scripting/python/samba/provision/sambadns.py index 468c86344d..e8bb752fc0 100644 --- a/source4/scripting/python/samba/provision/sambadns.py +++ b/source4/scripting/python/samba/provision/sambadns.py @@ -128,6 +128,15 @@ class SRVRecord(dnsp.DnssrvRpcRecord): srv.wWeight = weight self.data = srv +class TXTRecord(dnsp.DnssrvRpcRecord): + def __init__(self, txt, serial=1, ttl=900, rank=dnsp.DNS_RANK_ZONE): + super(TXTRecord, self).__init__() + self.wType = dnsp.DNS_TYPE_TXT + self.rank = rank + self.dwSerial = serial + self.dwTtlSeconds = ttl + self.data = txt + class TypeProperty(dnsp.DnsProperty): def __init__(self, zone_type=dnsp.DNS_ZONE_TYPE_PRIMARY): super(TypeProperty, self).__init__() -- cgit