Rename Zone.new_soa()
to Zone.new_SOA()
This commit is contained in:
parent
24ab31bf89
commit
fd0fa232c4
1 changed files with 6 additions and 1 deletions
|
@ -20,6 +20,11 @@ import time
|
||||||
import ipaddress
|
import ipaddress
|
||||||
import fqdn
|
import fqdn
|
||||||
|
|
||||||
|
"""@package dnscode
|
||||||
|
|
||||||
|
Simplifying DNS Zone management
|
||||||
|
"""
|
||||||
|
|
||||||
class InvalidDataException(Exception):
|
class InvalidDataException(Exception):
|
||||||
"""Exception raised when invalid data is passed to a record."""
|
"""Exception raised when invalid data is passed to a record."""
|
||||||
|
|
||||||
|
@ -252,7 +257,7 @@ class Zone:
|
||||||
name = self.__mkfqdn(name)
|
name = self.__mkfqdn(name)
|
||||||
self.add(PTR(name=name, ttl=ttl, host=host))
|
self.add(PTR(name=name, ttl=ttl, host=host))
|
||||||
|
|
||||||
def new_soa(self, mname: str = 'ns1.example.com', rname: str = 'admin.example.com',
|
def new_SOA(self, mname: str = 'ns1.example.com', rname: str = 'admin.example.com',
|
||||||
serial: int = int(time.time()), refresh: int = 86400, retry: int = 7200,
|
serial: int = int(time.time()), refresh: int = 86400, retry: int = 7200,
|
||||||
expire: int = 15552000, ttl: int = 21700):
|
expire: int = 15552000, ttl: int = 21700):
|
||||||
"""Creates and adds a new SOA record to the zone."""
|
"""Creates and adds a new SOA record to the zone."""
|
||||||
|
|
Loading…
Add table
Reference in a new issue