Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
102
Merge Requests
102
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
a9766e01
Commit
a9766e01
authored
Dec 10, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fc0e561e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
87 deletions
+2
-87
software/ors-amarisoft/render-templates
software/ors-amarisoft/render-templates
+0
-87
software/ors-amarisoft/slapos-render-config.py
software/ors-amarisoft/slapos-render-config.py
+0
-0
software/ors-amarisoft/software-ors.cfg
software/ors-amarisoft/software-ors.cfg
+2
-0
No files found.
software/ors-amarisoft/render-templates
deleted
100755 → 0
View file @
fc0e561e
#!/usr/bin/env python3
# XXX goes away completely
from
jinja2
import
Template
import
argparse
import
os
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'-d'
,
'--delete'
,
action
=
'store_true'
)
args
=
parser
.
parse_args
()
if
args
.
delete
:
directory
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
test_directory
=
os
.
path
.
join
(
directory
,
'test'
)
for
f
in
os
.
listdir
(
directory
):
if
'tdd'
in
f
or
'fdd'
in
f
:
os
.
remove
(
os
.
path
.
join
(
directory
,
f
))
for
f
in
os
.
listdir
(
test_directory
):
if
'testTDD'
in
f
or
'testFDD'
in
f
:
os
.
remove
(
os
.
path
.
join
(
test_directory
,
f
))
exit
()
global_context
=
{
'generated_file_message'
:
"This file was generated using a jinja2 template and the render-templates script, don't modify directly."
}
software_list
=
[
# {
# 'software_name' : 'tdd-ors',
# 'rf_mode' : 'tdd',
# 'trx' : 'sdr',
# 'bbu' : 'ors',
# 'ru' : 'ors',
# }, {
# 'software_name' : 'fdd-ors',
# 'rf_mode' : 'fdd',
# 'trx' : 'sdr',
# 'bbu' : 'ors',
# 'ru' : 'ors',
# }
]
for
i
in
range
(
len
(
software_list
)):
software_list
[
i
].
update
({
#'default_lte_bandwidth' : "20 MHz",
#'default_lte_imsi' : "001010123456789",
#'default_lte_k' : "00112233445566778899aabbccddeeff",
'default_lte_inactivity_timer'
:
10000
,
#'default_nr_bandwidth' : 40,
#'default_nr_imsi' : "001010123456789",
#'default_nr_k' : "00112233445566778899aabbccddeeff",
#'default_nr_ssb_pos_bitmap' : "10000000",
#'default_n_antenna_dl' : 2,
#'default_n_antenna_ul' : 2,
'default_nr_inactivity_timer'
:
10000
,
})
with
open
(
'software.cfg.json.jinja2'
,
'r'
)
as
f
:
software_json_template
=
Template
(
f
.
read
())
instance_json_template_map
=
{}
for
software_type
in
[
'enb'
,
'gnb'
]:
with
open
(
'instance-{}-input-schema.json.jinja2'
.
format
(
software_type
),
'r'
)
as
f
:
instance_json_template_map
[
software_type
]
=
Template
(
f
.
read
())
with
open
(
'software.jinja2.cfg'
,
'r'
)
as
f
:
software_template
=
Template
(
f
.
read
())
with
open
(
'test/test.jinja2.py'
,
'r'
)
as
f
:
test_template
=
Template
(
f
.
read
())
for
software
in
software_list
:
with
open
(
'software-{}.cfg.json'
.
format
(
software
[
'software_name'
]),
'w+'
)
as
f
:
f
.
write
(
software_json_template
.
render
(
**
software
,
**
global_context
)
+
'
\
n
'
)
with
open
(
'test/test{}.py'
.
format
(
software
[
'software_name'
].
upper
()),
'w+'
)
as
f
:
f
.
write
(
test_template
.
render
(
**
software
,
**
global_context
)
+
'
\
n
'
)
with
open
(
'software-{}.cfg'
.
format
(
software
[
'software_name'
]),
'w+'
)
as
f
:
f
.
write
(
software_template
.
render
(
**
software
,
**
global_context
)
+
'
\
n
'
)
for
software_type
in
[
'enb'
,
'gnb'
]:
with
open
(
'instance-{}-{}-input-schema.json'
.
format
(
software
[
'software_name'
],
software_type
),
'w+'
)
as
f
:
f
.
write
(
instance_json_template_map
[
software_type
].
render
(
**
software
,
**
global_context
)
+
'
\
n
'
)
software/ors-amarisoft/slapos-render-config.py
100644 → 100755
View file @
a9766e01
File mode changed from 100644 to 100755
software/ors-amarisoft/software-ors.cfg
View file @
a9766e01
...
...
@@ -9,3 +9,5 @@ extends =
# XXX move ors-specific code here
# XXX predefine ru/cells from ORS-specific schema, not from shared instances.
# XXX set [default-params] ?
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