Compare commits
2 commits
24ab31bf89
...
3809ef785a
Author | SHA1 | Date | |
---|---|---|---|
|
3809ef785a | ||
|
fd0fa232c4 |
2 changed files with 7 additions and 2 deletions
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "dnscode"
|
name = "dnscode"
|
||||||
version = "1.3.1"
|
version = "1.3.2"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Minecraftchest1", email="me@minec1.us" },
|
{ name="Minecraftchest1", email="me@minec1.us" },
|
||||||
]
|
]
|
||||||
|
|
|
@ -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