modified: README.md
modified: src/netbox_plugin_bind_provisioner/management/commands/bind-transfer-endpoint.py Remove code and description that imported old catz serials from flat files that were used before switch to DB model. Code and docs no longer applicable so removed.
This commit is contained in:
1 parent
ae6bb3c1b6
commit
e8450c90da
2 files changed
+3
-23
No files matched your search
@@ -48,7 +48,6 @@ Parameter | Description
|
|||||||
### Plugin settings
|
### Plugin settings
|
||||||
Setting | Description
|
Setting | Description
|
||||||
--------------------| ---------------------------------------------------------
|
--------------------| ---------------------------------------------------------
|
||||||
catalog_serial_file | !!!NO LONGER USED!!! Replaced by DB entry.
|
|
||||||
tsig_keys | Maps a TSIG Key to be used for each view.
|
tsig_keys | Maps a TSIG Key to be used for each view.
|
||||||
|
|
||||||
## Installation guide
|
## Installation guide
|
||||||
|
|||||||
@@ -194,23 +194,6 @@ class CatalogZone:
|
|||||||
|
|
||||||
return zone
|
return zone
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def importLegacySerialFile(cls, file_path):
|
|
||||||
if os.path.exists(file_path):
|
|
||||||
try:
|
|
||||||
with open(file_path, "r") as f:
|
|
||||||
serial = int(f.read().strip())
|
|
||||||
cls._serial_obj.value = int(serial)
|
|
||||||
cls._serial_obj.save()
|
|
||||||
logger.info(
|
|
||||||
f"Legacy catalog serial file {file_path} imported into database and file removed. Serial is now {serial}"
|
|
||||||
)
|
|
||||||
os.remove(file_path)
|
|
||||||
except OSError as e:
|
|
||||||
logger.error(
|
|
||||||
f"Failed to import catalog zone serial from legacy file {file_path}"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class DNSBaseRequestHandler(socketserver.BaseRequestHandler):
|
class DNSBaseRequestHandler(socketserver.BaseRequestHandler):
|
||||||
# getZoneFromNB rewritten
|
# getZoneFromNB rewritten
|
||||||
@@ -715,18 +698,15 @@ class Command(BaseCommand):
|
|||||||
port = options["port"]
|
port = options["port"]
|
||||||
address = options["address"]
|
address = options["address"]
|
||||||
CatalogZone.initSerial()
|
CatalogZone.initSerial()
|
||||||
|
|
||||||
# Initialize settings
|
# Initialize settings
|
||||||
self.loadSettings()
|
self.loadSettings()
|
||||||
# self.loadCatalogZoneSettings()
|
|
||||||
self.loadTSIGKeySettings()
|
self.loadTSIGKeySettings()
|
||||||
# Following is temporary. Function and invocation can be deleted once v1.0 is reached.
|
|
||||||
serial_file = self.settings.get("catalog_serial_file", None)
|
|
||||||
if serial_file:
|
|
||||||
CatalogZone.importLegacySerialFile(serial_file)
|
|
||||||
|
|
||||||
udp_server = UDPDNSServer(
|
udp_server = UDPDNSServer(
|
||||||
(address, port), UDPRequestHandler, self.keyring, self.tsig_view_map
|
(address, port), UDPRequestHandler, self.keyring, self.tsig_view_map
|
||||||
)
|
)
|
||||||
|
|
||||||
tcp_server = TCPDNSServer(
|
tcp_server = TCPDNSServer(
|
||||||
(address, port), TCPRequestHandler, self.keyring, self.tsig_view_map
|
(address, port), TCPRequestHandler, self.keyring, self.tsig_view_map
|
||||||
)
|
)
|
||||||
@@ -738,6 +718,7 @@ class Command(BaseCommand):
|
|||||||
udp_thread = threading.Thread(
|
udp_thread = threading.Thread(
|
||||||
target=run_udp_server, args=(udp_server,), daemon=True
|
target=run_udp_server, args=(udp_server,), daemon=True
|
||||||
)
|
)
|
||||||
|
|
||||||
udp_thread.start()
|
udp_thread.start()
|
||||||
|
|
||||||
logger.debug(f"AXFR endpoint listening on {address} tcp/{port}")
|
logger.debug(f"AXFR endpoint listening on {address} tcp/{port}")
|
||||||
|
|||||||
Reference in new issue
Block a user