summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2012-02-28 14:59:39 +1100
committerAmitay Isaacs <amitay@gmail.com>2012-03-02 00:24:50 +1100
commitbcaa278e32a1fb334253638f24d6f23378c6119c (patch)
treef5b7e750aaaa2e6a43d54acd3e58d8095624e7c9
parenta0d6904ed30b7edd41715c0e8c8517e1486b38e4 (diff)
downloadsamba-bcaa278e32a1fb334253638f24d6f23378c6119c.tar.gz
samba-bcaa278e32a1fb334253638f24d6f23378c6119c.tar.bz2
samba-bcaa278e32a1fb334253638f24d6f23378c6119c.zip
provision: dns: TXT Records need a list of strings as input
-rw-r--r--source4/scripting/python/samba/provision/sambadns.py7
1 files 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):