Commit 73f0b9af authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b276f8c4
......@@ -47,6 +47,8 @@ initialization =
# NOTE with scripts=ø interpreter is not handled, so we use `scripts=python` as
# a workaround.
scripts = ${:interpreter}
# this is where buildout installs the interpreter
exe = ${buildout:bin-directory}/${:interpreter}
# pyprog provides macro recipe to build python programs.
......
......@@ -83,6 +83,13 @@
{{- slapparameter_dict.get(name, defaults.get(name)) }}
{%- endmacro %}
{#- tap indicates tap interface that slapos told us to use.
or 'xxx-notap-xxx' if slapos provided us nothing or empty string. #}
{%- set tap = slap_configuration.get('tap-name', '') %}
{%- if tap == '' %}
{%- set tap = 'xxx-notap-xxx' %}
{%- endif %}
{#- J is used around macro calls to retrieve returned objects.
......@@ -231,14 +238,13 @@
{#- assign TAP interfaces to cpri RUs #}
{%- set iru_vcpri = list(iru_dict|dictsort | selectattr('1._.ru_link_type', '==', 'cpri')) %}
{%- set tap_base = slap_configuration.get('tap-name', '') %}
{%- for i, (ru_ref, iru) in enumerate(iru_vcpri) %}
{%- if len(iru_vcpri) > 1 %}
{%- set tap = "%s-%d" % (tap_base, i+1) %}
{%- set ru_tap = "%s-%d" % (tap, i+1) %}
{%- else %}
{%- set tap = tap_base %}
{%- set ru_tap = tap %}
{%- endif %}
{%- do iru._.cpri_link.update({'_tap': tap}) %}
{%- do iru._.cpri_link.update({'_tap': ru_tap}) %}
{%- endfor %}
{%- endmacro %}
......
......@@ -24,11 +24,11 @@ md5sum = 35ad3e7f7ef68831147a297586593660
[amari_slap.jinja2]
_update_hash_filename_ = amari/slap.jinja2
md5sum = 98a2c30d4372a84e42175d590c9d0720
md5sum = 07e6e578c88062a15d9bb4ceae27d5fa
[ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg
md5sum = b3377a9aa722c232246a425ee39e0e86
md5sum = 0d6552b13d87f89f8e5df0d4821ae3c8
[ru_sdr_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg
......@@ -80,7 +80,7 @@ md5sum = ec56bee0916563807197ed5ef0ca0908
[ru_tapsplit]
_update_hash_filename_ = ru/tapsplit
md5sum = b547df6f6efe841466def20531770923
md5sum = 1b62135bf50823d85125a1ade5701388
[ru_xexec.c]
_update_hash_filename_ = ru/xexec.c
......
......@@ -58,7 +58,7 @@ config-testing = {{ slapparameter_dict.get("testing", False) }}
[vtap]
recipe = plone.recipe.command
ntap = {{ ntap }}
command = {{ netcapdo }} {{ buildout_directory }}/bin/pythonwitheggs {{ ru_tapsplit }} {{ slap_configuration['tap-name'] }} ${:ntap}
command = {{ netcapdo }} {{ buildout_directory }}/bin/pythonwitheggs {{ ru_tapsplit }} {{ slaplte.tap }} ${:ntap}
update-command = ${:command}
stop-on-error = true
......@@ -68,7 +68,7 @@ ntap = 0
stop-on-error = false
{%- if ntap == 1 %}
[vtap.{{ slap_configuration['tap-name'] }}]
[vtap.{{ slaplte.tap }}]
network = {{ slap_configuration['tap-ipv6-network'] }}
gateway = {{ slap_configuration['tap-ipv6-gateway'] }}
addr = {{ slap_configuration['tap-ipv6-addr'] }}
......@@ -77,7 +77,7 @@ addr = {{ slap_configuration['tap-ipv6-addr'] }}
{%- else %}
{%- for i in range(1,ntap+1) %}
{%- set tap = '%s-%d' % (slap_configuration['tap-name'], i) %}
{%- set tap = '%s-%d' % (slaplte.tap, i) %}
[vtap.{{ tap }}]
recipt = slapos.recipe.build
init =
......
......@@ -44,7 +44,7 @@ parts +=
rsvp.js
iperf3
dnsmasq
eggs
pythonwitheggs
xamari
setcap-dnsmasq
# unimplemented parts - the http monitor and better log handling using logrotate
......@@ -160,9 +160,9 @@ md5sum = 2b0f2d52857b17fdfb8a5c2ea451a5ad
url = https://raw.githubusercontent.com/guschnwg/g-chart/cbcc7bc40f88fcce4854b55d0902b6273004ba3e/g-chart.line.js
md5sum = 57c50b46c9492c6ab78dc44deac3c0ce
[eggs]
recipe = zc.recipe.egg
eggs =
[pythonwitheggs]
<= python-interpreter
eggs +=
websocket-client
${python-pynacl:egg}
${bcrypt:egg}
......
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