summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-09-25 19:21:36 +0200
committerChristian Poessinger <christian@poessinger.com>2020-09-25 19:21:36 +0200
commitf39f5dde342aa5e14d1fb4155920c61ac5fd11b1 (patch)
treeb6282ff86de6e8e40281d73e6d4f5b8d1140083c /src/services
parent7f09beeac924b1bc9bf61f8153870bd4cb939b96 (diff)
downloadvyos-1x-f39f5dde342aa5e14d1fb4155920c61ac5fd11b1.tar.gz
vyos-1x-f39f5dde342aa5e14d1fb4155920c61ac5fd11b1.zip
dns: forwarding: T2921: migrate to get_config_dict()
Diffstat (limited to 'src/services')
-rwxr-xr-xsrc/services/vyos-hostsd21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/services/vyos-hostsd b/src/services/vyos-hostsd
index 0079f7e5c..59dbeda17 100755
--- a/src/services/vyos-hostsd
+++ b/src/services/vyos-hostsd
@@ -107,16 +107,17 @@
#
### forward_zones
## Additional zones added to pdns-recursor forward-zones-file.
-## If recursion-desired is true, '+' will be prepended to the zone line.
-## If addNTA is true, a NTA will be added via lua-config-file.
+## If recursion_desired is true, '+' will be prepended to the zone line.
+## If addnta is true, a NTA (Negative Trust Anchor) will be added via
+## lua-config-file.
#
# { 'type': 'forward_zones',
# 'op': 'add',
# 'data': {
# '<str zone>': {
-# 'nslist': ['<str nameserver>', ...],
-# 'addNTA': <bool>,
-# 'recursion-desired': <bool>
+# 'server': ['<str nameserver>', ...],
+# 'addnta': <bool>,
+# 'recursion_desired': <bool>
# }
# ...
# }
@@ -305,12 +306,12 @@ tag_regex_schema = op_type_schema.extend({
forward_zone_add_schema = op_type_schema.extend({
'data': {
str: {
- 'nslist': [str],
- 'addNTA': bool,
- 'recursion-desired': bool
+ 'server': [str],
+ 'addnta': Any({}, None),
+ 'recursion_desired': Any({}, None),
}
}
- }, required=True)
+ }, required=False)
hosts_add_schema = op_type_schema.extend({
'data': {
@@ -586,7 +587,7 @@ if __name__ == '__main__':
context = zmq.Context()
socket = context.socket(zmq.REP)
-
+
# Set the right permissions on the socket, then change it back
o_mask = os.umask(0o007)
socket.bind(SOCKET_PATH)