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
c7e06e3e
Commit
c7e06e3e
authored
Oct 20, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a62e5ccc
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1543 additions
and
1515 deletions
+1543
-1515
software/ors-amarisoft/amari/lte.jinja2
software/ors-amarisoft/amari/lte.jinja2
+0
-508
software/ors-amarisoft/amari/slap.jinja2
software/ors-amarisoft/amari/slap.jinja2
+1
-3
software/ors-amarisoft/config/CELL1_a-drb.cfg
software/ors-amarisoft/config/CELL1_a-drb.cfg
+503
-0
software/ors-amarisoft/config/CELL1_b-drb.cfg
software/ors-amarisoft/config/CELL1_b-drb.cfg
+503
-0
software/ors-amarisoft/config/CELL1_c-drb.cfg
software/ors-amarisoft/config/CELL1_c-drb.cfg
+0
-0
software/ors-amarisoft/config/drb_lte.jinja2.cfg
software/ors-amarisoft/config/drb_lte.jinja2.cfg
+507
-0
software/ors-amarisoft/config/enb.cfg
software/ors-amarisoft/config/enb.cfg
+2
-996
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+1
-1
software/ors-amarisoft/slapos-render-config.py
software/ors-amarisoft/slapos-render-config.py
+26
-7
No files found.
software/ors-amarisoft/amari/lte.jinja2
View file @
c7e06e3e
This diff is collapsed.
Click to expand it.
software/ors-amarisoft/amari/slap.jinja2
View file @
c7e06e3e
...
...
@@ -272,9 +272,7 @@
{%- if ref.startswith(partition_id) %}
{%- set ref = ref[len(partition_id):] %}
{%- endif %}
{%- if ref.startswith('_') %}
{%- set ref = ref[1:] %}
{%- endif %}
{%- set ref = ref.removeprefix('_') %}
{{- ref | tojson }}
{%- endmacro %}
...
...
software/ors-amarisoft/config/CELL1_a-drb.cfg
0 → 100644
View file @
c7e06e3e
This diff is collapsed.
Click to expand it.
software/ors-amarisoft/config/CELL1_b-drb.cfg
0 → 100644
View file @
c7e06e3e
This diff is collapsed.
Click to expand it.
software/ors-amarisoft/config/CELL1_c-drb.cfg
0 → 100644
View file @
c7e06e3e
software/ors-amarisoft/config/drb_lte.jinja2.cfg
0 → 100644
View file @
c7e06e3e
This diff is collapsed.
Click to expand it.
software/ors-amarisoft/config/enb.cfg
View file @
c7e06e3e
This diff is collapsed.
Click to expand it.
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
c7e06e3e
...
...
@@ -236,7 +236,7 @@
manual_ref_signal_power: true,
{%- endif %}
drb_config:
{{ lte.cell_drb_config(cell) }}
drb_config:
"{{ cell_ref }}-drb.cfg"
},
{%- endif %}
{%- endfor %}
...
...
software/ors-amarisoft/slapos-render-config.py
View file @
c7e06e3e
...
...
@@ -9,8 +9,8 @@ from slapos.recipe.template import jinja2_template
import
json
,
copy
,
sys
,
pprint
# j2render renders config/<
config>.jinja2.cfg into config/<config>.cfg
with provided json parameters.
def
j2render
(
config
,
jcfg
):
# j2render renders config/<
src> into config/<out>
with provided json parameters.
def
j2render
(
src
,
out
,
jcfg
):
ctx
=
json
.
loads
(
jcfg
)
assert
'_standalone'
not
in
ctx
ctx
[
'_standalone'
]
=
True
...
...
@@ -23,8 +23,8 @@ def j2render(config, jcfg):
buildout
=
None
# stub
r
=
jinja2_template
.
Recipe
(
buildout
,
"recipe"
,
{
'extensions'
:
'jinja2.ext.do'
,
'url'
:
'config/{}
.jinja2.cfg'
.
format
(
config
),
'output'
:
'config/{}
.cfg'
.
format
(
config
),
'url'
:
'config/{}
'
.
format
(
src
),
'output'
:
'config/{}
'
.
format
(
out
),
'context'
:
textctx
,
'import-list'
:
'''
rawfile amari_lte.jinja2 amari/lte.jinja2
...
...
@@ -43,7 +43,7 @@ def j2render(config, jcfg):
'pprint'
:
lambda
obj
:
pprint
.
pprint
(
obj
,
sys
.
stderr
),
})
with
open
(
'config/{}
.cfg'
.
format
(
config
),
'w+'
)
as
f
:
with
open
(
'config/{}
'
.
format
(
out
),
'w+'
)
as
f
:
f
.
write
(
r
.
_render
().
decode
())
...
...
@@ -66,6 +66,12 @@ class Instance:
self
.
shared_instance_list
.
append
(
ishared
)
return
ishared
# py version of jref_of_shared.
def
ref_of_shared
(
ishared
):
ref
=
ishared
[
'slave_title'
]
ref
=
ref
.
removeprefix
(
'_'
)
return
ref
# ---- eNB ----
...
...
@@ -298,7 +304,20 @@ def do_enb():
}
}"""
%
locals
()
j2render
(
'enb'
,
json_params
)
j2render
(
'enb.jinja2.cfg'
,
'enb.cfg'
,
json_params
)
# drb.cfg for all cells
for
ishared
in
ienb
.
shared_instance_list
:
ref
=
ref_of_shared
(
ishared
)
_
=
json
.
loads
(
ishared
[
'_'
])
if
'cell_type'
in
_
:
cell
=
_
j2render
(
'drb_%s.jinja2.cfg'
%
cell
[
'cell_type'
],
'%s-drb.cfg'
%
ref
,
json
.
dumps
({
'cell_ref'
:
ref
,
'cell'
:
cell
}))
# ---- UE ----
...
...
@@ -366,7 +385,7 @@ def do_ue():
}
}"""
%
locals
()
j2render
(
'ue'
,
json_params
)
j2render
(
'ue
.jinja2.cfg'
,
'ue.cfg
'
,
json_params
)
def
main
():
...
...
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