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
5
Merge Requests
5
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
Jérome Perrin
slapos
Commits
c1f2b72e
Commit
c1f2b72e
authored
Feb 21, 2024
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/ors-amarisoft: render ue-db.cfg inside core-network buildout
parent
649249ca
Changes
4
Show 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 @
c1f2b72e
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
[template]
[template]
filename = instance.cfg
filename = instance.cfg
md5sum =
22e06207fab996bcc1c26992106618ab
md5sum =
5cf7674e2f6c3afb1b2f6b7646457284
[template-ors]
[template-ors]
filename = instance-ors.cfg
filename = instance-ors.cfg
...
@@ -96,7 +96,7 @@ md5sum = 601d6237059fa665d3f3ffb6a78ad9ca
...
@@ -96,7 +96,7 @@ md5sum = 601d6237059fa665d3f3ffb6a78ad9ca
[template-core-network]
[template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg
_update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum =
9402b750221765b6b124cf5ecb3e520c
md5sum =
4d05284cd328f5fce054b8f227097e25
[template-ue]
[template-ue]
_update_hash_filename_ = instance-ue.jinja2.cfg
_update_hash_filename_ = instance-ue.jinja2.cfg
...
@@ -108,7 +108,7 @@ md5sum = c5f581ba01654b2aec46000abf8d0e35
...
@@ -108,7 +108,7 @@ md5sum = c5f581ba01654b2aec46000abf8d0e35
[ue_db.jinja2.cfg]
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
filename = config/ue_db.jinja2.cfg
md5sum =
dcaac06553a3222b14c0013a13f4a149
md5sum =
87a273c99ce64192506811d7718c2b36
[enb.jinja2.cfg]
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
filename = config/enb.jinja2.cfg
...
...
software/ors-amarisoft/config/ue_db.jinja2.cfg
View file @
c1f2b72e
{%- 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: [
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 -%}
{%- if i == 0 -%}
{
{
{%- else -%}
{%- else -%}
, {
, {
{%- endif %}
{%- endif %}
sim_algo: "{{ s
lave
.get('sim_algo', 'milenage') }}",
sim_algo: "{{ s.get('sim_algo', 'milenage') }}",
imsi: "{{ s
lave
.get('imsi', '') }}",
imsi: "{{ s.get('imsi', '') }}",
opc: "{{ s
lave
.get('opc', '') }}",
opc: "{{ s.get('opc', '') }}",
amf: {{ s
lave
.get('amf', '0x9001') }},
amf: {{ s.get('amf', '0x9001') }},
sqn: "{{ s
lave
.get('sqn', '000000000000') }}",
sqn: "{{ s.get('sqn', '000000000000') }}",
K: "{{ s
lave
.get('k', '') }}",
K: "{{ s.get('k', '') }}",
impu: "{{ s
lave
.get('impu', '') }}",
impu: "{{ s.get('impu', '') }}",
impi: "{{ s
lave
.get('impi', '') }}",
impi: "{{ s.get('impi', '') }}",
}
}
{%- endfor -%}
{%- endfor -%}
]
]
...
...
software/ors-amarisoft/instance-core-network.jinja2.cfg
View file @
c1f2b72e
...
@@ -69,7 +69,8 @@ cert = {{ slap_connection['cert-file'] }}
...
@@ -69,7 +69,8 @@ cert = {{ slap_connection['cert-file'] }}
configuration.gtp_addr = 127.0.1.100
configuration.gtp_addr = 127.0.1.100
configuration.ims_addr = 127.0.0.1
configuration.ims_addr = 127.0.0.1
configuration.ims_bind = 127.0.0.2
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]
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
...
@@ -116,7 +117,7 @@ mode = 0775
...
@@ -116,7 +117,7 @@ mode = 0775
pidfile = ${directory:run}/ims.pid
pidfile = ${directory:run}/ims.pid
hash-files =
hash-files =
${ims-config:output}
${ims-config:output}
{{ ue_db_path }
}
${ue-db-config:output
}
environment = AMARISOFT_PATH=/opt/amarisoft/.amarisoft
environment = AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[mme-sh-wrapper]
[mme-sh-wrapper]
...
@@ -144,7 +145,7 @@ mode = 0775
...
@@ -144,7 +145,7 @@ mode = 0775
pidfile = ${directory:run}/mme.pid
pidfile = ${directory:run}/mme.pid
hash-files =
hash-files =
${mme-config:output}
${mme-config:output}
{{ ue_db_path }
}
${ue-db-config:output
}
${mme-sh-wrapper:output}
${mme-sh-wrapper:output}
environment =
environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib:{{ nghttp2_location }}/lib
LD_LIBRARY_PATH={{ openssl_location }}/lib:{{ nghttp2_location }}/lib
...
@@ -193,6 +194,14 @@ context =
...
@@ -193,6 +194,14 @@ context =
url = {{ ims_template }}
url = {{ ims_template }}
output = ${directory:etc}/ims.cfg
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]
[mme-config]
<= config-base
<= config-base
{% if slapparameter_dict.get("mme_config_link", None) %}
{% if slapparameter_dict.get("mme_config_link", None) %}
...
...
software/ors-amarisoft/instance.cfg
View file @
c1f2b72e
...
@@ -189,11 +189,11 @@ extra-context =
...
@@ -189,11 +189,11 @@ extra-context =
raw mme_template ${mme.jinja2.cfg:target}
raw mme_template ${mme.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq-core-network.jinja2.cfg:target}
raw dnsmasq_template ${dnsmasq-core-network.jinja2.cfg:target}
raw ims_template ${ims.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 openssl_location ${openssl:location}
raw nghttp2_location ${nghttp2:location}
raw nghttp2_location ${nghttp2:location}
raw iperf3_location ${iperf3:location}
raw iperf3_location ${iperf3:location}
raw dnsmasq_location ${dnsmasq:location}
raw dnsmasq_location ${dnsmasq:location}
key ue_db_path ue-db-config:output
key slave_instance_list slap-configuration:slave-instance-list
key slave_instance_list slap-configuration:slave-instance-list
[dynamic-template-ue]
[dynamic-template-ue]
...
@@ -227,13 +227,3 @@ extra-context =
...
@@ -227,13 +227,3 @@ extra-context =
raw dnsmasq_location ${dnsmasq:location}
raw dnsmasq_location ${dnsmasq:location}
raw openssh_location ${openssh:location}
raw openssh_location ${openssh:location}
raw openssh_output_keygen ${openssh-output:keygen}
raw openssh_output_keygen ${openssh-output:keygen}
[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
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