]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
chore: Unshadow domain and store domainObject
authorJosh Soref <2119212+jsoref@users.noreply.github.com>
Fri, 7 Nov 2025 14:02:54 +0000 (09:02 -0500)
committerJosh Soref <2119212+jsoref@users.noreply.github.com>
Fri, 7 Nov 2025 17:11:48 +0000 (12:11 -0500)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
modules/remotebackend/pdns_unittest.py

index 06cbd0011d7e0886467cbb0eda0e7a840685cbb7..469c545a487a5a7dc628d806d46586a7d4f5fab2 100644 (file)
@@ -211,7 +211,7 @@ class Handler(pdns.remotebackend.Handler):
     def do_supermasterbackend(self, domain='', nsset=[], **kwargs):
         d_id = len(DOMAINS) + 1
         dom = domain.lower()
-        domain = {
+        domainObject = {
             'id': d_id,
             'name': dom,
             'kind': 'slave',
@@ -230,8 +230,8 @@ class Handler(pdns.remotebackend.Handler):
         for rr in nsset:
             nsset.append(self.record(qname=rr['qname'], qtype=rr['qtype'], content=rr['content'], ttl=rr['ttl']))
 
-        domain['rr'][dom]['NS'] = nsset
-        DOMAINS[dom] = domain
+        domainObject['rr'][dom]['NS'] = nsset
+        DOMAINS[dom] = domainObject
 
         self.result = [{
             'nameserver': 'ns.%s' % dom,
@@ -242,7 +242,7 @@ class Handler(pdns.remotebackend.Handler):
     def do_createslavedomain(self, domain='', **kwargs):
         d_id = len(DOMAINS) + 1
         dom = domain.lower()
-        domain = {
+        domainObject = {
             'id': d_id,
             'name': dom,
             'kind': 'slave',
@@ -253,6 +253,8 @@ class Handler(pdns.remotebackend.Handler):
             'rr': {
             }
         }
+        DOMAINS[dom] = domainObject
+
         self.result = True
 
     def do_feedrecord(self, rr={}, **kwargs):