Commit a198c9dd authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Make longer TXT records possible. Prepare for ip-tunnels

parent 69338517
......@@ -215,7 +215,10 @@ def generate_forward(tree, hosts):
(ttl, pri, util.fqn(tree, mx._parent)))
pass
for txt in [ t for t in tree._subnet_._txt_ if t.domain[1] == domain]:
result += ('@ IN TXT "%s"' % (txt.value[0]))
result += '@ IN TXT ('
for s in txt.value[0].split():
result += ' "%s "' % s
result += ' )'
pass
for srv in [ s for s in tree._subnet_._srv_ if s.domain[1] == domain]:
s = {}
......
......@@ -314,7 +314,7 @@ def configure_bridge(tree, interface):
pass
return configure_networking(bridge_connection, interface)
def configure_interface(tree, interface):
def configure_ethernet_interface(tree, interface):
result = False
device_name = network.wired_device_name(interface.ethernet[0])
config_name = device_name
......@@ -392,8 +392,6 @@ def execute(tree, host):
if h.name[0] != host:
continue
for i in h._interface_:
if not i.ethernet[0]:
continue
changed = False
if i.bridge[0]:
changed |= configure_bridge_interface(tree, i)
......@@ -402,11 +400,12 @@ def execute(tree, host):
elif i.bridge_to[0]:
changed |= configure_bridge_interface(tree, i)
pass
else:
changed |= configure_interface(tree, i)
elif i.ethernet[0]:
changed |= configure_ethernet_interface(tree, i)
pass
else:
print(i)
if changed:
network.reload()
try:
......@@ -418,7 +417,7 @@ def execute(tree, host):
elif i.bridge_to[0]:
activate_bridge_interface(i)
pass
else:
elif i.ethernet[0]:
activate_interface(i)
pass
pass
......
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