Commit 56d5d470 authored by Joanne Hugé's avatar Joanne Hugé

wip

parent 497812ca
...@@ -100,7 +100,7 @@ md5sum = 601d6237059fa665d3f3ffb6a78ad9ca ...@@ -100,7 +100,7 @@ md5sum = 601d6237059fa665d3f3ffb6a78ad9ca
[template-core-network] [template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg _update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum = 358e1b27fb2a45979a6166f10521ff2a md5sum = 38bbabf1316ebd53bc40576defa58a6e
[template-ue] [template-ue]
_update_hash_filename_ = instance-ue.jinja2.cfg _update_hash_filename_ = instance-ue.jinja2.cfg
......
...@@ -111,10 +111,14 @@ sim_list = {{ dumps(sim_slave_instance_list) }} ...@@ -111,10 +111,14 @@ sim_list = {{ dumps(sim_slave_instance_list) }}
{%- endif %} {%- endif %}
{#- split slapos tun interface #} {#- split slapos tun interface #}
{%- set tun = slap_configuration.get('tun-name', '') %}
{%- if tun == '' %}
{%- set tun = 'xxx-notun-xxx' %}
{%- endif %}
{%- set vtun_list = [] %} {%- set vtun_list = [] %}
[vtun] [vtun]
recipe = plone.recipe.command recipe = plone.recipe.command
command = {{ netcapdo }} {{ pythonwitheggs }} {{ tunsplit }} {{ slaplte.tun }} 2 command = {{ netcapdo }} {{ pythonwitheggs }} {{ tunsplit }} {{ tun }} 2
update-command = ${:command} update-command = ${:command}
stop-on-error = true stop-on-error = true
{%- if testing %} {%- if testing %}
...@@ -122,7 +126,7 @@ command = : ...@@ -122,7 +126,7 @@ command = :
{%- endif %} {%- endif %}
{%- for i in range(1,3) %} {%- for i in range(1,3) %}
{%- set tun = '%s-%d' % (slaplte.tun, i) %} {%- set tun = '%s-%d' % (tun, i) %}
{%- do vtun_list.append(tun) %} {%- do vtun_list.append(tun) %}
[vtun.{{ tun }}] [vtun.{{ tun }}]
recipe = slapos.recipe.build recipe = slapos.recipe.build
...@@ -144,7 +148,7 @@ init = ...@@ -144,7 +148,7 @@ init =
if {{ testing }}: if {{ testing }}:
slapnet = netaddr.IPNetwork('{{ str(test_slapnet) }}') slapnet = netaddr.IPNetwork('{{ str(test_slapnet) }}')
else: else:
slapnet = tunsplit.ifnet6('{{ slaplte.tun }}') slapnet = tunsplit.ifnet6('{{ tun }}')
tunnet = tunsplit.netsplit(slapnet, {{ 1+ntun }}) [{{ i }}] tunnet = tunsplit.netsplit(slapnet, {{ 1+ntun }}) [{{ i }}]
options['network'] = str(tunnet) options['network'] = str(tunnet)
......
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