s4-dns: Print/Set minimumTTL value in SOA record
[obnox/samba/samba-obnox.git] / python / samba / netcmd / dns.py
index c00d17ad7273c1919ab99378277d1377a01b6dbc..0306e51d9317b1bd77248faedd84344c38fb3968 100644 (file)
@@ -355,11 +355,12 @@ def print_dns_record(outf, rec):
     elif rec.wType == dnsp.DNS_TYPE_CNAME:
         mesg = 'CNAME: %s' % (rec.data.str)
     elif rec.wType == dnsp.DNS_TYPE_SOA:
-        mesg = 'SOA: serial=%d, refresh=%d, retry=%d, expire=%d, ns=%s, email=%s' % (
+        mesg = 'SOA: serial=%d, refresh=%d, retry=%d, expire=%d, minttl=%d, ns=%s, email=%s' % (
                     rec.data.dwSerialNo,
                     rec.data.dwRefresh,
                     rec.data.dwRetry,
                     rec.data.dwExpire,
+                    rec.data.dwMinimumTtl,
                     rec.data.NamePrimaryServer.str,
                     rec.data.ZoneAdministratorEmail.str)
     elif rec.wType == dnsp.DNS_TYPE_MX:
@@ -424,7 +425,7 @@ class PTRRecord(dnsserver.DNS_RPC_RECORD):
         self.wType = dnsp.DNS_TYPE_PTR
         self.dwFlags = rank | node_flag
         self.dwSerial = serial
-        self.dwTtleSeconds = ttl
+        self.dwTtlSeconds = ttl
         self._ptr = ptr[:]
         ptr_name = dnsserver.DNS_RPC_NAME()
         ptr_name.str = self._ptr
@@ -498,6 +499,7 @@ class SOARecord(dnsserver.DNS_RPC_RECORD):
         soa.dwRefresh = refresh
         soa.dwRetry = retry
         soa.dwExpire = expire
+        soa.dwMinimumTtl = minimum
         soa.NamePrimaryServer.str = self._mname
         soa.NamePrimaryServer.len = len(mname)
         soa.ZoneAdministratorEmail.str = self._rname
@@ -1115,7 +1117,7 @@ class cmd_update_record(Command):
                                         name,
                                         add_rec_buf,
                                         del_rec_buf)
-        self.outf.write('Record updated succefully\n')
+        self.outf.write('Record updated successfully\n')
 
 
 class cmd_delete_record(Command):
@@ -1167,7 +1169,7 @@ class cmd_delete_record(Command):
                                         name,
                                         None,
                                         del_rec_buf)
-        self.outf.write('Record deleted succefully\n')
+        self.outf.write('Record deleted successfully\n')
 
 
 class cmd_dns(SuperCommand):