]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Special-case zone in-view
authorPetr Špaček <pspacek@isc.org>
Thu, 30 Jun 2022 09:48:16 +0000 (11:48 +0200)
committerPetr Špaček <pspacek@isc.org>
Fri, 1 Jul 2022 06:59:23 +0000 (08:59 +0200)
It is not really a zone type, so let's not generate "type in-view"
anchor for it.

doc/arm/_ext/iscconf.py
doc/arm/_ext/mergegrammar.py

index d7f1e495de393e4aa8324f5c5336b2ac8e9806d9..809445ec5047ca1e534600bfb753d8d5d08a0669 100644 (file)
@@ -145,8 +145,11 @@ def domain_factory(domainname, domainlabel, todolist, grammar):
                     try:
                         zone_idx = path.index("zone")
                         zone_type_txt = path[zone_idx + 1]
-                        assert zone_type_txt.startswith("type "), zone_type_txt
-                        zone_types.add(zone_type_txt[len("type ") :])
+                        if zone_type_txt.startswith("type "):
+                            zone_types.add(zone_type_txt[len("type ") :])
+                        else:
+                            assert zone_type_txt == "in-view"
+                            zone_types.add(zone_type_txt)
                     except (ValueError, IndexError):
                         nozone_paths.append(path)
                 condensed_paths = nozone_paths[:]
index 966d1c3bc9547d7f45fb95f94f391817db717201..b0500eb4b5bd11c5775b3ad81529761f65f1622c 100644 (file)
@@ -22,7 +22,11 @@ import parsegrammar
 def read_zone():
     zone_grammars = {}
     for file in Path("../misc/").glob("*.zoneopt"):
-        zone_type = f"type {file.stem}"
+        # in-view is not really a zone type
+        if file.stem == "in-view":
+            zone_type = "in-view"
+        else:
+            zone_type = f"type {file.stem}"
 
         with file.open(encoding="ascii") as fp:
             zonegrammar = parsegrammar.parse_mapbody(fp)