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
76ced981
Commit
76ced981
authored
Oct 06, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f2b44b58
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
26 deletions
+38
-26
software/ors-amarisoft/amari/slap.jinja2
software/ors-amarisoft/amari/slap.jinja2
+4
-6
software/ors-amarisoft/config/enb.cfg
software/ors-amarisoft/config/enb.cfg
+1
-1
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+28
-17
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+2
-1
software/ors-amarisoft/ru/libinstance.jinja2.cfg
software/ors-amarisoft/ru/libinstance.jinja2.cfg
+1
-1
software/ors-amarisoft/slapos-render-config.py
software/ors-amarisoft/slapos-render-config.py
+2
-0
No files found.
software/ors-amarisoft/amari/slap.jinja2
View file @
76ced981
...
...
@@ -110,8 +110,7 @@
iru_dict keeps RU shared instances + RU whose definition is embedded into a cell: reference -> iRU
in the kept instances _ is automatically json-decoded
use load_iru_and_icell(kind) to initialize this cell and RU registries.
icell_kind=enb - load cells definition to serve them
icell_kind=enb - load cells definition to serve them from enb
icell_kind=ue - load cells definition to connect to them
XXX defaults ?
...
...
@@ -213,12 +212,11 @@
{%- endmacro %}
{#-
ipeer_cell_dict keeps peer cell shared instances: reference -> ipeer_cell
{#-
load_ipeercell initializes peer-cell registry.
use load_ipeer to initialize this peer registry.
ipeercell_dict keeps peer cell shared instances: reference -> ipeercell
#}
{%- set ipeer_cell_dict = {} %}
{%- macro load_ipeer_cell() %}
{%- macro load_ipeercell(ipeercell_dict) %}
// XXX TODO
{%- endmacro %}
...
...
software/ors-amarisoft/config/enb.cfg
View file @
76ced981
// XXX -> amari ?
{
{
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,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
log_filename: "log/enb.log",
...
...
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
76ced981
...
...
@@ -2,15 +2,26 @@
{#- XXX icell vs cell / iru vs ru everyhere + document it #}
{#- XXX TDD check #}
{%- import 'amari_lte.jinja2' as lte with context %}
{%- from 'amari_slap.jinja2' import J, jref_of_shared, jcell_ru_ref, cfg with context %}
{%- import 'amari_lte.jinja2' as lte with context %}
{%- import 'amari_slap.jinja2' as slaplte with context %}
{%- set J = slaplte.J %}
{%- set jref_of_shared = slaplte.jref_of_shared %}
{%- set jcell_ru_ref = slaplte.jcell_ru_ref %}
{%- set cfg = slaplte.cfg %}
{#- for standalone testing via slapos-render-config.py
NOTE: keep in sync with instance-enb.jinja2.cfg and ru/libinstance.jinja2.cfg #}
{%- if _standalone is defined %}
{%- set iru_dict = {} %}
{%- set icell_dict = {} %}
{%- set ipeercell_dict = {} %}
{%- do slaplte.load_iru_and_icell(iru_dict, icell_dict, icell_kind='enb') %}
{%- do slaplte.load_ipeercell(ipeercell_dict) %}
{%- do slaplte.check_loaded_everything() %}
{%- endif %}
{#- XXX kill: instance does this #}
{#- {%- do lte.load_iru_and_icell(kind='enb') %} #}
{#- {%- do lte.load_ipeer_cell() %} #}
{#- {%- do lte.check_loaded_everything() %} #}
{#- start of the config -#}
{
...
...
@@ -84,11 +95,11 @@
// LTE cells
cell_list: [
{%- for i, (cell_ref, icell) in enumerate(icell_dict|dictsort) %}
{%- set cell = icell['_'] %}
{%- if cell.cell_type == 'lte' %}
{%- set ru_ref = J(jcell_ru_ref(icell)) %}
{%- set iru = iru_dict[ru_ref] %}
{%- set ru = iru['_'] %}
{%- set cell = icell['_']
%}
{%- if cell.cell_type == 'lte'
%}
{%- set ru_ref = J(jcell_ru_ref(icell
, icell_dict
)) %}
{%- set iru = iru_dict[ru_ref]
%}
{%- set ru = iru['_']
%}
// {{ cell_ref }}
{
...
...
@@ -345,11 +356,11 @@
{#
nr_cell_list: [
{%- for i, (cell_ref, icell) in enumerate(icell_dict|dictsort) %}
{%- set cell = icell['_'] %}
{%- if cell.cell_type == 'nr' %}
{%- set ru_ref = J(jcell_ru_ref(icell)) %}
{%- set iru = iru_dict[ru_ref] %}
{%- set ru = iru['_'] %}
{%- set cell = icell['_']
%}
{%- if cell.cell_type == 'nr'
%}
{%- set ru_ref = J(jcell_ru_ref(icell
, icell_dict
)) %}
{%- set iru = iru_dict[ru_ref]
%}
{%- set ru = iru['_']
%}
// {{ cell_ref }}
{
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
76ced981
...
...
@@ -61,7 +61,8 @@ offline = true
{%- set icell_kind='enb' %}
{%- import 'amari_slap.jinja2' as slaplte with context %}
{%- import 'ru_libinstance.jinja2.cfg' as rulib with context %}
{%- do slaplte.load_ipeer_cell() %}
{%- set ipeercell_dict = {} %}
{%- do slaplte.load_ipeercell() %}
{%- do slaplte.check_loaded_everything() %}
...
...
software/ors-amarisoft/ru/libinstance.jinja2.cfg
View file @
76ced981
{#- XXX need to be already loaded {%- import 'amari_slap.jinja2' as lte with context %} #}
{#- icell_kind should be set from outside XXX #}
{%- set icell_dict = {} %}
{%- set iru_dict = {} %}
{%- set icell_dict = {} %}
{%- do slaplte.load_iru_and_icell(iru_dict, icell_dict, icell_kind) %}
software/ors-amarisoft/slapos-render-config.py
View file @
76ced981
...
...
@@ -12,6 +12,8 @@ import json, copy, sys, pprint
# j2render renders config/<config>.jinja2.cfg into config/<config>.cfg with provided json parameters.
def
j2render
(
config
,
jcfg
):
ctx
=
json
.
loads
(
jcfg
)
assert
'_standalone'
not
in
ctx
ctx
[
'_standalone'
]
=
True
textctx
=
''
for
k
,
v
in
ctx
.
items
():
textctx
+=
'json %s %s
\
n
'
%
(
k
,
json
.
dumps
(
v
))
...
...
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