Commit 577f9eba authored by Ales Mrazek's avatar Ales Mrazek

Implements #5, Fixes #2

parent 06fbec8b
Pipeline #41934 passed with stages
in 50 seconds
......@@ -28,7 +28,7 @@ if json_data:
model_data = model.from_raw(json_data)
# validate data against DataModel
model_data.validate()
#model_data.validate()
# save model_data to json
with open(data_json_path, 'w') as json_file:
......
......@@ -34,8 +34,8 @@ class Converter:
self.do_ipv6 = True
self.write_data = True
# regex
domain = compile('^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$')
# regex domains (".", "stub.example.", "stub.example.net)
domain = compile('^\.$|((([a-z0-9]+(-[a-z0-9]+)*\.)+([a-z]{2,}|)))$')
ipv4_addr = compile('^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}'
+ '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$')
......@@ -224,6 +224,9 @@ class Converter:
def _at_anchorfile(self, key: str, value: str) -> None:
if ' ' in value:
raise UnboundConfValueError("Value: '{0}' of '{1}' option is not Path string".format(value, key))
domain = "domain" + str(self.ta_domain_count)
self.dnssec['trust-anchors'].append({
'domain': domain,
......@@ -321,7 +324,8 @@ class Converter:
##########################################################
def _noop(self, key: str, value: str) -> None:
if not value.strip() == "":
if not value.strip() == "" or not key.strip() == "":
raise UnboundConfValueError("Unknown Unbound Configuration Option. {} {}" .format(key, value))
def _recursion_transport(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment