Commit 3e26a9cb authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3b95b433
......@@ -3,41 +3,12 @@
{%- import 'lte.jinja2' as lte -%}
{#- return value is json-encoded to workaround jinja2 macro-ret limitation. #}
{#- XXX macro return json -> start from j #}
{#- XXX macro return json -> starts from j #}
{%- set J = json_module.loads %}
{#- XXX error(slave, msg) -#}
{#- cell_dict keeps cell slave instances: reference -> cell #}
{#- ru_dict keeps RU slave instances + RU whose definition is embedded into a cell: reference -> RU #}
{%- set cell_dict = {} %}
{%- set ru_dict = {} %}
{%- for slave in slap_configuration.get('slave-instance-list', []) %}
{%- set ref = J(jref_of_shared(slave)) %}
{%- set _ = J(slave['_']) %}
{%- if 'ru_type' in _ %}
{%- do ru_dict.update({ref: slave}) %}
{%- elif 'cell_type' in _ %}
{%- do cell_dict.update({ref: slave}) %}
{%- set ru = cell['ru'] %}
{%- if ru['ru_type'] not in ('ru_ref', 'ruincell_ref') %}
{#- embedded ru definition -> expose it as `_<cell_ref>_ru` #}
{%- do ru_dict.update({'_%s_ru' % ref: ru}) %}
{%- endif %}
{%- else %}
{%- do error(slave, "unknown shared instance type") %}
{%- endif %}
{%- endfor %}
{#- verify that there is no dangling cell->ru references #}
{%- for _, cell in cell_dict|dictsort %}
{%- 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) %}
{%- endif %}
{%- endfor %}
{#- jcell_ru_ref returns RU reference linked from a cell.
if the cell embeds RU definition, its reference comes as `_<cell_ref>_ru`. #}
{%- macro jcell_ru_ref(cell) %}
......@@ -79,8 +50,39 @@
{%- endmacro %}
{#- cell_dict keeps cell slave instances: reference -> cell #}
{#- ru_dict keeps RU slave instances + RU whose definition is embedded into a cell: reference -> RU #}
{%- set cell_dict = {} %}
{%- set ru_dict = {} %}
{%- for slave in slap_configuration.get('slave-instance-list', []) %}
{%- set ref = J(jref_of_shared(slave)) %}
{%- set _ = J(slave['_']) %}
{%- if 'ru_type' in _ %}
{%- do ru_dict.update({ref: slave}) %}
{%- elif 'cell_type' in _ %}
{%- do cell_dict.update({ref: slave}) %}
{%- set ru = cell['ru'] %}
{%- if ru['ru_type'] not in ('ru_ref', 'ruincell_ref') %}
{#- embedded ru definition -> expose it as `_<cell_ref>_ru` #}
{%- do ru_dict.update({'_%s_ru' % ref: ru}) %}
{%- endif %}
{%- else %}
{%- do error(slave, "unknown shared instance type") %}
{%- endif %}
{%- endfor %}
{#- verify that there is no dangling cell->ru references #}
{%- for _, cell in cell_dict|dictsort %}
{%- 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) %}
{%- endif %}
{%- endfor %}
{#- start of the config -#}
{
{% if slapparameter_dict.get('log_phy_debug', False) %}
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=debug,file.rotate=1G,file.path=/dev/null",
......
......@@ -118,7 +118,7 @@ json_params = """{
"configuration.default_n_antenna_dl": 2,
"configuration.default_n_antenna_ul": 2,
"configuration.default_nr_inactivity_timer": 10000,
"slave_instance_list": [
"slave-instance-list": [
{
"slave_title": "Cell 1a",
"slave_reference": "_CELL1_a",
......
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