From bcaa278e32a1fb334253638f24d6f23378c6119c Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 28 Feb 2012 14:59:39 +1100 Subject: provision: dns: TXT Records need a list of strings as input --- source4/scripting/python/samba/provision/sambadns.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source4/scripting/python/samba/provision/sambadns.py b/source4/scripting/python/samba/provision/sambadns.py index ae8515689b..f24284abf6 100644 --- a/source4/scripting/python/samba/provision/sambadns.py +++ b/source4/scripting/python/samba/provision/sambadns.py @@ -129,13 +129,16 @@ class SRVRecord(dnsp.DnssrvRpcRecord): self.data = srv class TXTRecord(dnsp.DnssrvRpcRecord): - def __init__(self, txt, serial=1, ttl=900, rank=dnsp.DNS_RANK_ZONE): + def __init__(self, slist, 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 + stringlist = dnsp.string_list() + stringlist.count = len(slist) + stringlist.str = slist + self.data = stringlist class TypeProperty(dnsp.DnsProperty): def __init__(self, zone_type=dnsp.DNS_ZONE_TYPE_PRIMARY): -- cgit