Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
22af390d
Commit
22af390d
authored
Aug 23, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0851eb81
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+19
-14
No files found.
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
22af390d
{#- XXX ORS -> provide defaults for: slave_instance_list -#}
{#- XXX icell vs cell / iru vs ru everyhere #}
{%- import 'lte.jinja2' as lte -%}
...
...
@@ -16,11 +17,11 @@
{#- 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)
%}
{{- _jcell_ru_ref(
cell, [])
}}
{%- macro jcell_ru_ref(
icell)
%}
{{- _jcell_ru_ref(
icell, [])
}}
{%- endmacro %}
{%- macro _jcell_ru_ref(
cell, seen)
%}
{%- set cell_ref = J(jref_of_shared(
cell))
%}
{%- macro _jcell_ru_ref(
icell, seen)
%}
{%- set cell_ref = J(jref_of_shared(
icell))
%}
{%- if cell_ref in seen %}
{%- for x in seen %}
{%- do error(x, "%s form a cycle via RU references" % seen) %}
...
...
@@ -28,7 +29,7 @@
{#- XXX what to return ? #}
{%- else %}
{%- do seen.append(cell_ref) %}
{%- set ru =
cell['_']['ru']
%}
{%- set ru =
icell['_']['ru']
%}
{%- if ru['ru_type'] == 'ru_ref' %}
{{- ru['ru_ref'] | tojson }}
{%- elif ru['ru_type'] == 'ruincell_ref' %}
...
...
@@ -36,7 +37,7 @@
{{- _jcell_ru_ref(cell_dict[ru['ruincell_ref']], seen) }}
{%- else %}
{#- ru definition is embedded into cell #}
{{- ('_%s_ru' % J(jref_of_shared(
cell))) | tojson
}}
{{- ('_%s_ru' % J(jref_of_shared(
icell))) | tojson
}}
{%- endif %}
{%- endif %}
{%- endmacro %}
...
...
@@ -89,10 +90,10 @@
{#- 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
%}
{%- set ru_ref = J(jcell_ru_ref(
cell))
%}
{%- for _,
icell in cell_dict|dictsort
%}
{%- set ru_ref = J(jcell_ru_ref(
icell))
%}
{%- if ru_ref not in ru_dict %}
{%- do error(
cell, "referred RU %s does not exist" % ru_ref)
%}
{%- do error(
icell, "referred RU %s does not exist" % ru_ref)
%}
{%- endif %}
{%- endfor %}
...
...
@@ -122,8 +123,8 @@
{%- set dev_argv = [] %}
{%- set ru_cpri_dict = {} %} {# dev -> ru for ru with link_kind = cpri #}
{%- for rf_port, (ru_ref, ru) in enumerate(ru_dict|dictsort) %}
{%- set ru = ru['_'] %}
{%- for rf_port, (ru_ref,
i
ru) in enumerate(ru_dict|dictsort) %}
{%- set ru =
i
ru['_'] %}
{%- do ru.update({'.rf_port': rf_port}) %}
{%- if ru['ru_type'] == 'sdr' %}
XXX move to ru/sdr ?
...
...
@@ -212,12 +213,16 @@
enb_id: {{ slapparameter_dict.get('enb_id', '0x1A2D0') }},
{{ print('\n3333\n') }}
# LTE cells
cell_list: [
{%- for cell_ref, cell in cell_dict|dictsort %}
{%- for cell_ref, icell in cell_dict|dictsort %}
{% set cell = icell['_'] %}
{%- if cell['cell_type'] == 'lte' %}
{%- set ru_ref = J(jcell_ru_ref(cell)) %}
{%- set ru = ru_dict[ru_ref] %}
{%- set ru_ref = J(jcell_ru_ref(icell)) %}
{%- set iru = ru_dict[ru_ref] %}
{%- set ru = iru['_'] %}
{
rf_port: {{ ru['.rf_port'] }},
n_antenna_dl: {{ ru['n_antenna_dl'] }},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment