Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
hostinfo
Commits
1cc9c133
Commit
1cc9c133
authored
Feb 01, 2017
by
Anders Blomdell
Browse files
Added subdomain delegation
parent
2468a959
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/hostinfo/named.py
View file @
1cc9c133
...
...
@@ -127,6 +127,15 @@ def header(tree, domain, origin=None):
util
.
fqn
(
tree
,
ns
.
_parent
))
pass
pass
delegation
=
[]
for
ns
in
tree
.
_host_
.
_interface_
.
_nameserver_
:
subdomain
=
ns
.
domain
[
0
].
split
(
'.'
)
if
subdomain
[
1
:]
==
domain
.
split
(
'.'
):
delegation
.
append
(
'%-16sIN NS %s'
%
(
subdomain
[
0
],
util
.
fqn
(
tree
,
ns
.
_parent
)))
for
d
in
sorted
(
delegation
):
result
+=
d
result
+=
";"
return
result
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment