Commit ac26e2cd authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b970fb9e
......@@ -8,7 +8,9 @@
{#- XXX error(slave, msg) vvv is debug stub -#}
{%- macro error(slave, msg) %}
{%- do print('\nE: %s: %s\n' % (J(jref_of_shared(slave)), msg)) %}
{%- set msg = 'E: %s: %s\n' % (J(jref_of_shared(slave)), msg) %}
{%- do print('\n%s' % msg) %}
{%- do assert(False, msg) %}
{%- endmacro %}
......@@ -90,7 +92,6 @@
{#- verify that there is no dangling cell->ru references #}
{#- XXX also verify that there is no dangling cell -> cell refs in ruincell_ref #}
{%- for _, cell in cell_dict|dictsort %}
{{ print('\n\n_:', _, 'cell:', cell) }}
{%- set ru_ref = J(jcell_ru_ref(cell)) %}
{%- if ru_ref not in ru_dict %}
{%- do error(cell, "referred RU %s does not exist" % ru_ref) %}
......@@ -152,8 +153,8 @@
{#- emit cpri_* optins if a cpri ru is present #}
{#- NOTE values for non-cpri links come as empty XXX recheck this is ok #}
{%- if ru_cpri_dict|length > 0 %}
{%- set vcpri = [None]*(dev_argv|length) %}
{%- if len(ru_cpri_dict) > 0 %}
{%- set vcpri = [None]*len(dev_argv) %}
{%- for dev, ru in ru_cpri_dict|dictsort %}
{%- do vcpri.__setitem__(dev, ru['cpri_link']) %}
{%- endfor %}
......@@ -163,9 +164,9 @@
cpri_tx_delay: "{{ vcpri | map(attribute='tx_delay') | join(',') }}",
cpri_tx_dbm: "{{ vcpri | map(attribute='tx_dbm') | join(',') }}",
{%- set tap_base = slap_configuration.get('tap-name', '') %}
{%- set vtap = ['']*(dev_argv|length) %}
{%- set vtap = ['']*len(dev_argv) %}
{%- for i, (dev, _) in enumerate(ru_cpri_dict|dictsort) %}
{%- if ru_cpri_dict|length > 1 %}
{%- if len(ru_cpri_dict) > 1 %}
{%- set tap = "%s-%d" % (tap_base, i) %}
{%- else %}
{%- set tap = tap_base %}
......
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