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

.

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