Commit b970fb9e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 466eec58
...@@ -135,13 +135,14 @@ ...@@ -135,13 +135,14 @@
tdd_tx_mod: 1, tdd_tx_mod: 1,
{%- elif ru['ru_link_type'] == 'cpri' %} {%- elif ru['ru_link_type'] == 'cpri' %}
{%- do ru_cpri_dict.update({len(dev_argv): ru}) %} {%- do ru_cpri_dict.update({len(dev_argv): ru}) %}
{%- do dev_argv.append("dev%d=/dev/sdr%d@%d" % (len(dev_argv), ru['sdr_dev'], ru['sfp_port'])) %} {%- set link = ru['cpri_link'] %}
{%- do dev_argv.append("dev%d=/dev/sdr%d@%d" % (len(dev_argv), link['sdr_dev'], link['sfp_port'])) %}
{# set cpri parameters to default #} {# set cpri parameters to default #}
{%- do ru.setdefault('cpri_mapping', 'hw') %} XXX <- should be preset set by ru? (specific to ru?) {%- do link.setdefault('mapping', 'hw') %} XXX <- should be preset set by ru? (specific to ru?)
{%- do ru.setdefault('cpri_mult', 16) %} {%- do link.setdefault('mult', 16) %}
{%- do ru.setdefault('cpri_rx_delay', 0) %} {%- do link.setdefault('rx_delay', 0) %}
{%- do ru.setdefault('cpri_tx_delay', 0) %} {%- do link.setdefault('tx_delay', 0) %}
{%- do ru.setdefault('cpri_tx_dbm', 0) %} {%- do link.setdefault('tx_dbm', 0) %}
{%- else %} {%- else %}
{%- do bug('unreachable') %} {%- do bug('unreachable') %}
{%- endif %} {%- endif %}
...@@ -154,13 +155,13 @@ ...@@ -154,13 +155,13 @@
{%- if ru_cpri_dict|length > 0 %} {%- if ru_cpri_dict|length > 0 %}
{%- set vcpri = [None]*(dev_argv|length) %} {%- set vcpri = [None]*(dev_argv|length) %}
{%- for dev, ru in ru_cpri_dict|dictsort %} {%- for dev, ru in ru_cpri_dict|dictsort %}
{%- do vcpri.__setitem__(dev, ru) %} {%- do vcpri.__setitem__(dev, ru['cpri_link']) %}
{%- endfor %} {%- endfor %}
cpri_mapping: "{{ vcpri | map(attribute='cpri_mapping') | join(',') }}", cpri_mapping: "{{ vcpri | map(attribute='mapping') | join(',') }}",
cpri_mult: "{{ vcpri | map(attribute='cpri_mult') | join(',') }}", cpri_mult: "{{ vcpri | map(attribute='mult') | join(',') }}",
cpri_rx_delay: "{{ vcpri | map(attribute='cpri_rx_delay') | join(',') }}", cpri_rx_delay: "{{ vcpri | map(attribute='rx_delay') | join(',') }}",
cpri_tx_delay: "{{ vcpri | map(attribute='cpri_tx_delay') | join(',') }}", cpri_tx_delay: "{{ vcpri | map(attribute='tx_delay') | join(',') }}",
cpri_tx_dbm: "{{ vcpri | map(attribute='cpri_tx_dbm') | join(',') }}", cpri_tx_dbm: "{{ vcpri | map(attribute='tx_dbm') | join(',') }}",
{%- set tap_base = slap_configuration.get('tap-name', '') %} {%- set tap_base = slap_configuration.get('tap-name', '') %}
{%- set vtap = ['']*(dev_argv|length) %} {%- set vtap = ['']*(dev_argv|length) %}
{%- for i, (dev, _) in enumerate(ru_cpri_dict|dictsort) %} {%- for i, (dev, _) in enumerate(ru_cpri_dict|dictsort) %}
......
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