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
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lu Xu
slapos
Commits
389afd77
Commit
389afd77
authored
Sep 29, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cfd1f645
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
98 additions
and
54 deletions
+98
-54
software/ors-amarisoft/config/lte.jinja2
software/ors-amarisoft/config/lte.jinja2
+36
-3
software/ors-amarisoft/config/ue.cfg
software/ors-amarisoft/config/ue.cfg
+29
-0
software/ors-amarisoft/config/ue.jinja2.cfg
software/ors-amarisoft/config/ue.jinja2.cfg
+12
-30
software/ors-amarisoft/instance-ue.jinja2.cfg
software/ors-amarisoft/instance-ue.jinja2.cfg
+0
-3
software/ors-amarisoft/instance.cfg
software/ors-amarisoft/instance.cfg
+0
-2
software/ors-amarisoft/render-templates
software/ors-amarisoft/render-templates
+4
-4
software/ors-amarisoft/slapos-render-config.py
software/ors-amarisoft/slapos-render-config.py
+13
-8
software/ors-amarisoft/software.jinja2.cfg
software/ors-amarisoft/software.jinja2.cfg
+4
-4
No files found.
software/ors-amarisoft/config/lte.jinja2
View file @
389afd77
...
...
@@ -44,7 +44,6 @@
load_* routines process this queue and move loaded instances to i<type>_dict registries. #}
{%- set qshared_instance_list = slap_configuration.get('slave-instance-list', []) %}
{#- check_loaded_everything verifies that all shared instances were handling during the load. #}
{%- macro check_loaded_everything() %}
{%- for ishared in qshared_instance_list %}
...
...
@@ -52,11 +51,19 @@
{%- endfor %}
{%- endmacro %}
{#- json-decode _ in all shared instances #}
{%- for ishared in qshared_instance_list %}
{%- do ishared.update({'_': J(ishared['_'])}) %}
{%- endfor %}
{#- icell_dict keeps cell shared instances: reference -> icell
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 to initialize this cell and RU registries.
XXX defaults ?
#}
{%- set icell_dict = {} %}
{%- set iru_dict = {} %}
...
...
@@ -64,8 +71,7 @@
{%- set qother = [] %}
{%- for ishared in qshared_instance_list %}
{%- set ref = J(jref_of_shared(ishared)) %}
{%- set _ = J(ishared['_']) %}
{%- do ishared.update({'_': _}) %}
{%- set _ = ishared['_'] %}
{%- if 'ru_type' in _ %}
{%- set iru = ishared %}
{%- do iru_dict.update({ref: iru}) %}
...
...
@@ -159,6 +165,33 @@
{%- endmacro %}
{#- iue_dict keeps ue shared instance: reference -> iue
use load_iue to initialize this ue registry.
#}
{%- set iue_dict = {} %}
{%- macro load_iue() %}
{%- set qother = [] %}
{%- for ishared in qshared_instance_list %}
{%- set ref = J(jref_of_shared(ishared)) %}
{%- set _ = ishared['_'] %}
{%- if 'ue_type' in _ %}
{%- set iue = ishared %}
{#- XXX verify ue.ue_type in lte|nr #}
{%- for k, v in defaults['ue'].items() %}
{%- do _.setdefault(k, v) %}
{%- endfor %}
{%- do iue_dict.update({ref: iue}) %}
{%- else %}
{%- do qother.append(ishared) %}
{%- endif %}
{%- endfor %}
{%- do qshared_instance_list.clear() %}
{%- do qshared_instance_list.extend(qother) %}
{%- endmacro %}
{# ---- XXX ---- #}
{#- ru_config emits RF driver configuration for specified Radio Units. #}
...
...
software/ors-amarisoft/config/ue.cfg
View file @
389afd77
...
...
@@ -36,5 +36,34 @@
}],
ue_list: [
{
sim_algo: "milenage",
opc: "milenage",
amf: 0x9001,
sqn: "000000000000",
impu: "",
impi: "",
imsi: "001010123456789",
K: "00112233445566778899aabbccddeeff",
rue_addr: "host1",
ue_category: 12,
tun_setup_script: "ue-ifup",
apn: "internet",
}
{
sim_algo: "milenage",
opc: "milenage",
amf: 0x9001,
sqn: "000000000000",
impu: "",
impi: "",
imsi: "001010123456789",
K: "00112233445566778899aabbccddeeff",
rue_addr: "host2",
as_release: 15,
ue_category: "nr",
tun_setup_script: "ue-ifup",
apn: "internet",
}
],
}
\ No newline at end of file
software/ors-amarisoft/config/ue.jinja2.cfg
View file @
389afd77
...
...
@@ -9,44 +9,26 @@
'sqn': '000000000000',
'impu': '',
'impi': '',
'imsi':
slap_configuration['configuration.default_lte_imsi']
,
'k':
slap_configuration['configuration.default_lte_k']
,
'imsi':
'001010123456789'
,
'k':
'00112233445566778899aabbccddeeff'
,
}
}
%}
{%- import 'lte.jinja2' as lte with context -%}
{%- set iru_dict = lte.iru_dict %}
{%- set icell_dict = lte.icell_dict %}
{%- set iru_dict = lte.iru_dict %}
{%- set icell_dict = lte.icell_dict %}
{%- set iue_dict = lte.iue_dict %}
{%- set J = lte.J %}
{%- set jref_of_shared = lte.jref_of_shared %}
{%- set jcell_ru_ref = lte.jcell_ru_ref %}
{%- set amari = lte %}{#- XXX temp #}
{#- iue_dict keeps ue slave instances: reference -> iue
in the kept instances _ is automatically json-decoded
#}
{%- set iue_dict = {} %}
{%- for slave in slap_configuration.get('slave-instance-list', []) %}
{%- set ref = J(jref_of_shared(slave)) %}
{%- set _ = J(slave['_']) %}
{%- do slave.update({'_': _}) %}
{%- if 'ue_type' in _ %}
{%- set iue = slave %}
{%- for k, v in defaults['ue'].items() %}
{%- do _.setdefault(k, v) %}
{%- endfor %}
{%- do iue_dict.update({ref: iue}) %}
{%- else %}
{%- do error(slave, "unknown shared instance type") %}
{%- endif %}
{%- endfor %}
{%- do lte.load_iru_and_icell() %}
{%- do lte.load_iue() %}
{%- do lte.check_loaded_everything() %}
{#- XXX verify ue.ue_type in lte|nr #}
{%- do lte.load_iru_and_icell() %}
{%- do lte.check_loaded_everything() %}
{#- start of the config -#}
{#- start of the config -#}
...
...
@@ -137,7 +119,7 @@
rue_addr: "{{ ue.rue_addr }}",
{%- if ue.ue_type == 'lte' %}
ue_category: 12,
{%- elif ue.u
r
_type == 'nr' %}
{%- elif ue.u
e
_type == 'nr' %}
as_release: 15,
ue_category: "nr",
{%- else %}
...
...
software/ors-amarisoft/instance-ue.jinja2.cfg
View file @
389afd77
...
...
@@ -38,9 +38,6 @@ url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
configuration.default_lte_imsi = {{ default_lte_imsi }}
configuration.default_lte_k = {{default_lte_k}}
[directory]
recipe = slapos.cookbook:mkdirectory
software = {{ buildout_directory }}
...
...
software/ors-amarisoft/instance.cfg
View file @
389afd77
...
...
@@ -317,8 +317,6 @@ extra-context =
raw ue_template ${ue.jinja2.cfg:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw openssl_location ${openssl:location}
raw default_lte_imsi ${default-params:default-lte-imsi}
raw default_lte_k ${default-params:default-lte-k}
[ue-db-config]
recipe = slapos.recipe.template:jinja2
...
...
software/ors-amarisoft/render-templates
View file @
389afd77
...
...
@@ -42,12 +42,12 @@ software_list = [
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_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_imsi' : "001010123456789",
#
'default_nr_k' : "00112233445566778899aabbccddeeff",
#'default_nr_ssb_pos_bitmap' : "10000000",
#'default_n_antenna_dl' : 2,
#'default_n_antenna_ul' : 2,
...
...
software/ors-amarisoft/slapos-render-config.py
View file @
389afd77
...
...
@@ -43,15 +43,16 @@ def j2render(config, jcfg):
# Instance simulates configuration for an instance on SlapOS Master.
class
Instance
:
def
__init__
(
self
):
def
__init__
(
self
,
slap_software_type
):
self
.
shared_instance_list
=
[]
self
.
slap_software_type
=
slap_software_type
# ishared appends new shared instance with specified configuration to .shared_instance_list .
def
ishared
(
self
,
title
,
slave_reference
,
cfg
):
ishared
=
{
'slave_title'
:
title
,
'slave_reference'
:
slave_reference
,
'slap_software_type'
:
"enb"
,
'slap_software_type'
:
self
.
slap_software_type
,
'_'
:
json
.
dumps
(
cfg
)
}
self
.
shared_instance_list
.
append
(
ishared
)
...
...
@@ -209,7 +210,7 @@ def iRU3_SDR1_fLTE2(ienb):
def
do_enb
():
ienb
=
Instance
()
ienb
=
Instance
(
'enb'
)
iRU1_SDR_tLTE2_tNR
(
ienb
)
#iRU2_LOPCOMM_fLTE_fNR(ienb)
#iRU3_SDR1_fLTE2(ienb)
...
...
@@ -220,11 +221,7 @@ def do_enb():
"slap_configuration": {
"tap-name": "slaptap9",
"slap-computer-partition-id": "slappart9",
"configuration.default_lte_imsi": "001010123456789",
"configuration.default_lte_k": "00112233445566778899aabbccddeeff",
"configuration.default_lte_inactivity_timer": 10000,
"configuration.default_nr_imsi": "001010123456789",
"configuration.default_nr_k": "00112233445566778899aabbccddeeff",
"configuration.default_nr_inactivity_timer": 10000,
"slave-instance-list": %(jshared_instance_list)s
},
...
...
@@ -243,7 +240,15 @@ def do_enb():
# ---- UE ----
def
do_ue
():
iue
=
Instance
()
iue
=
Instance
(
'ue'
)
iue
.
ishared
(
'UE 1'
,
'_UE_1'
,
{
'ue_type'
:
'lte'
,
'rue_addr'
:
'host1'
})
iue
.
ishared
(
'UE 2'
,
'_UE_2'
,
{
'ue_type'
:
'nr'
,
'rue_addr'
:
'host2'
})
jshared_instance_list
=
json
.
dumps
(
iue
.
shared_instance_list
)
json_params
=
"""{
...
...
software/ors-amarisoft/software.jinja2.cfg
View file @
389afd77
...
...
@@ -6,14 +6,14 @@ extends =
[default-params]
#default-lte-bandwidth = {{ default_lte_bandwidth }}
default-lte-inactivity-timer = {{ default_lte_inactivity_timer }}
default-lte-imsi = {{ default_lte_imsi }}
default-lte-k = {{ default_lte_k }}
#
default-lte-imsi = {{ default_lte_imsi }}
#
default-lte-k = {{ default_lte_k }}
#default-nr-bandwidth = {{ default_nr_bandwidth }}
#default-nr-ssb-pos-bitmap = {{ default_nr_ssb_pos_bitmap }}
default-nr-inactivity-timer = {{ default_nr_inactivity_timer }}
default-nr-imsi = {{ default_nr_imsi }}
default-nr-k = {{ default_nr_k }}
#
default-nr-imsi = {{ default_nr_imsi }}
#
default-nr-k = {{ default_nr_k }}
#default-n-antenna-dl = {{ default_n_antenna_dl }}
#default-n-antenna-ul = {{ default_n_antenna_ul }}
...
...
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