diff options
author | Amitay Isaacs <amitay@gmail.com> | 2012-02-02 13:31:53 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2012-02-21 23:08:35 +1100 |
commit | 6daf04eb6eb21734fbac24248009335cea935292 (patch) | |
tree | c72bd87d4a797b78671fa64dbd9742101b060481 /source4 | |
parent | 597449235e4835bb406d40c7574993200363997b (diff) | |
download | samba-6daf04eb6eb21734fbac24248009335cea935292.tar.gz samba-6daf04eb6eb21734fbac24248009335cea935292.tar.bz2 samba-6daf04eb6eb21734fbac24248009335cea935292.zip |
s4-provision: dns: Add txt DNS record
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/samba/provision/sambadns.py | 9 |
1 files changed, 9 insertions, 0 deletions
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__() |