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
103
Merge Requests
103
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
a6f310ed
Commit
a6f310ed
authored
Feb 21, 2024
by
Thomas Gambier
🚴🏼
Committed by
Thomas Gambier
Feb 27, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/ors-amarisoft: render ue-db.cfg inside core-network buildout
parent
26defa86
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
37 deletions
+26
-37
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+3
-3
software/ors-amarisoft/config/ue_db.jinja2.cfg
software/ors-amarisoft/config/ue_db.jinja2.cfg
+10
-20
software/ors-amarisoft/instance-core-network.jinja2.cfg
software/ors-amarisoft/instance-core-network.jinja2.cfg
+12
-3
software/ors-amarisoft/instance.cfg
software/ors-amarisoft/instance.cfg
+1
-11
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
a6f310ed
...
...
@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum =
f23909a703ac9001afec38cbac19591a
md5sum =
9b7ced53c256fa5b60c679c75ed03727
[amarisoft-stats.jinja2.py]
_update_hash_filename_ = amarisoft-stats.jinja2.py
...
...
@@ -64,7 +64,7 @@ md5sum = 2d7558e4799818a5546850f735fbb399
[template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum =
aa7fcf7f68ced7e880158d0aa3307be4
md5sum =
660bf81163d726ab51847fca716391b3
[template-ue-lte]
_update_hash_filename_ = instance-ue-lte.jinja2.cfg
...
...
@@ -80,7 +80,7 @@ md5sum = c5f581ba01654b2aec46000abf8d0e35
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
md5sum =
dcaac06553a3222b14c0013a13f4a149
md5sum =
87a273c99ce64192506811d7718c2b36
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
...
...
software/ors-amarisoft/config/ue_db.jinja2.cfg
View file @
a6f310ed
{%- set filtered_slave_instance_list = [] %}
{%- for slave_instance in slave_instance_list %}
{%- if slave_instance.get('_', '') != '' %}
{%- set slave = json_module.loads(slave_instance.pop('_')) %}
{%- else %}
{%- set slave = slave_instance %}
{%- endif %}
{%- if slave.get('imsi', '') != '' %}
{%- do filtered_slave_instance_list.append(slave) %}
{%- endif %}
{%- endfor -%}
ue_db: [
{%- for i, slave in enumerate(filtered_slave_instance_list) %}
{%- for i, slave in enumerate(slap_configuration['sim_list']) %}
{%- set s = json_module.loads(slave.pop('_')) %}
{%- if i == 0 -%}
{
{%- else -%}
, {
{%- endif %}
sim_algo: "{{ s
lave
.get('sim_algo', 'milenage') }}",
imsi: "{{ s
lave
.get('imsi', '') }}",
opc: "{{ s
lave
.get('opc', '') }}",
amf: {{ s
lave
.get('amf', '0x9001') }},
sqn: "{{ s
lave
.get('sqn', '000000000000') }}",
K: "{{ s
lave
.get('k', '') }}",
impu: "{{ s
lave
.get('impu', '') }}",
impi: "{{ s
lave
.get('impi', '') }}",
sim_algo: "{{ s.get('sim_algo', 'milenage') }}",
imsi: "{{ s.get('imsi', '') }}",
opc: "{{ s.get('opc', '') }}",
amf: {{ s.get('amf', '0x9001') }},
sqn: "{{ s.get('sqn', '000000000000') }}",
K: "{{ s.get('k', '') }}",
impu: "{{ s.get('impu', '') }}",
impi: "{{ s.get('impi', '') }}",
}
{%- endfor -%}
]
...
...
software/ors-amarisoft/instance-core-network.jinja2.cfg
View file @
a6f310ed
...
...
@@ -69,7 +69,8 @@ cert = {{ slap_connection['cert-file'] }}
configuration.gtp_addr = 127.0.1.100
configuration.ims_addr = 127.0.0.1
configuration.ims_bind = 127.0.0.2
ue_db_path = {{ ue_db_path }}
ue_db_path = ${ue-db-config:output}
sim_list = {{ dumps(sim_slave_instance_list) }}
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
...
...
@@ -116,7 +117,7 @@ mode = 0775
pidfile = ${directory:run}/ims.pid
hash-files =
${ims-config:output}
{{ ue_db_path }
}
${ue-db-config:output
}
environment = AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[mme-sh-wrapper]
...
...
@@ -144,7 +145,7 @@ mode = 0775
pidfile = ${directory:run}/mme.pid
hash-files =
${mme-config:output}
{{ ue_db_path }
}
${ue-db-config:output
}
${mme-sh-wrapper:output}
environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib:{{ nghttp2_location }}/lib
...
...
@@ -193,6 +194,14 @@ context =
url = {{ ims_template }}
output = ${directory:etc}/ims.cfg
[ue-db-config]
<= config-base
url = {{ ue_db_template }}
output = ${directory:etc}/ue_db.cfg
context =
section slap_configuration slap-configuration
import json_module json
[mme-config]
<= config-base
{% if slapparameter_dict.get("mme_config_link", None) %}
...
...
software/ors-amarisoft/instance.cfg
View file @
a6f310ed
...
...
@@ -328,11 +328,11 @@ extra-context =
raw mme_template ${mme.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq.jinja2.cfg:target}
raw ims_template ${ims.jinja2.cfg:target}
raw ue_db_template ${ue_db.jinja2.cfg:target}
raw openssl_location ${openssl:location}
raw nghttp2_location ${nghttp2:location}
raw iperf3_location ${iperf3:location}
raw dnsmasq_location ${dnsmasq:location}
key ue_db_path ue-db-config:output
key dnsmasq_config_path dnsmasq-config:output
key slave_instance_list slap-configuration:slave-instance-list
...
...
@@ -370,16 +370,6 @@ extra-context =
raw default_nr_imsi ${default-params:default-nr-imsi}
raw default_nr_k ${default-params:default-nr-k}
[ue-db-config]
recipe = slapos.recipe.template:jinja2
url = ${ue_db.jinja2.cfg:target}
filename = ue_db.cfg
extensions = jinja2.ext.do
output = $${directory:etc}/$${:filename}
context =
import json_module json
key slave_instance_list slap-configuration:slave-instance-list
[dnsmasq-config]
recipe = slapos.recipe.template:jinja2
url = ${dnsmasq.jinja2.cfg:target}
...
...
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