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
Joanne Hugé
slapos
Commits
0f69d001
Commit
0f69d001
authored
Feb 24, 2022
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix IMS
parent
8970aa93
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
42 deletions
+49
-42
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+8
-4
software/ors-amarisoft/config/ue_db.jinja2.cfg
software/ors-amarisoft/config/ue_db.jinja2.cfg
+4
-25
software/ors-amarisoft/instance-enb-epc.jinja2.cfg
software/ors-amarisoft/instance-enb-epc.jinja2.cfg
+1
-0
software/ors-amarisoft/instance-epc.jinja2.cfg
software/ors-amarisoft/instance-epc.jinja2.cfg
+34
-3
software/ors-amarisoft/instance.cfg
software/ors-amarisoft/instance.cfg
+2
-10
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
0f69d001
...
...
@@ -16,11 +16,11 @@
[template]
filename = instance.cfg
md5sum =
6ea4fa210a91c15278c847a809de5991
md5sum =
394a3b4d5955c0fdd5dbc2e33cdd0677
[template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
md5sum =
1358f8e0a4cecefe4cdf389b69067f34
md5sum =
e5f31171ad98cf31f9ce76bf83f4be23
[template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
...
...
@@ -36,11 +36,11 @@ md5sum = 0b74993990a0dfa3c6429dc4ac716826
[template-lte-epc]
_update_hash_filename_ = instance-epc.jinja2.cfg
md5sum =
35556ebd82be804584482a7fe5eff0be
md5sum =
0a5c7d32a18458fc9f9f28939639e7a4
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
md5sum =
d33163012d6c98efc59161974c649557
md5sum =
343ed6321d49a4c0cf37ef869bcea292
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
...
...
@@ -69,3 +69,7 @@ md5sum = 9e867282d7dd80c4255e87a82a47a19d
[interface-up-promise]
_update_hash_filename_ = promise/check_interface_up.py
md5sum = 505efcbe04e717088924f2267b10c2b9
[generate-ue-db.py]
_update_hash_filename_ = generate-ue-db.py
md5sum = b1cfbe26a44bd9172632ac0ae3f7cfb8
software/ors-amarisoft/config/ue_db.jinja2.cfg
View file @
0f69d001
{%- set filtered_slave_instance_list = [] %}
{%- for slave_instance in slave_instance_list %}
{%- if slave_instance.get('imsi', '') != '' %}
{%- do filtered_slave_instance_list.append(slave_instance) %}
{%- endif %}
{%- endfor -%}
ue_db: [
{%- for i, slave_instance in enumerate(filtered_slave_instance_list) %}
{%- if i == 0 -%}
{
{%- else -%}
, {
{%- endif %}
sim_algo: "{{ slave_instance.get('sim_algo', 'milenage') }}",
imsi: "{{ slave_instance.get('imsi', '') }}",
opc: "{{ slave_instance.get('opc', '') }}",
amf: {{ slave_instance.get('amf', '0x9001') }},
sqn: "{{ slave_instance.get('sqn', '000000000000') }}",
K: "{{ slave_instance.get('k', '') }}",
impu: "{{ slave_instance.get('impu', '') }}",
impi: "{{ slave_instance.get('impi', '') }}",
}
{%- endfor -%}
]
{{ slave_instance_list }}
{% for slave_instance in slave_instance_list %}
{{ slave_instance }}
{% endfor %}
software/ors-amarisoft/instance-enb-epc.jinja2.cfg
View file @
0f69d001
...
...
@@ -58,6 +58,7 @@ config-mme_config_link = {{ dumps(slapparameter_dict["mme_config_link"]) }}
{% if slapparameter_dict.get("mme_config_version", None) %}
config-mme_config_version = {{ dumps(slapparameter_dict["mme_config_version"]) }}
{% endif %}
config-slavelist = {{ dumps(slavelist) }}
[lte-enb-request]
<= request-common-base
...
...
software/ors-amarisoft/instance-epc.jinja2.cfg
View file @
0f69d001
[buildout]
parts =
directory
ltelogs
lte-mme-config
...
...
@@ -33,7 +34,7 @@ configuration.ims_addr = 127.0.0.1
configuration.ims_bind = 127.0.0.2
configuration.enb_addr = 127.0.1.1
ue_db_path =
{{ ue_db_path }
}
ue_db_path =
${ue-db-config:path
}
[directory]
recipe = slapos.cookbook:mkdirectory
...
...
@@ -76,7 +77,6 @@ mode = 0775
pidfile = ${directory:run}/ims.pid
hash-files =
${lte-ims-config:rendered}
{{ ue_db_path }}
environment = AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[lte-mme-sh-wrapper]
...
...
@@ -100,7 +100,7 @@ mode = 0775
pidfile = ${directory:run}/mme.pid
hash-files =
${lte-mme-config:rendered}
{{ ue_db_path }
}
${ue-db-config:path
}
${lte-mme-sh-wrapper:rendered}
environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib:{{ nghttp2_location }}/lib
...
...
@@ -158,3 +158,34 @@ eggs = slapos.core
file = {{ interface_up_promise }}
output = ${directory:plugins}/check-tun-up.py
config-ifname = ${slap-configuration:tun-name}
[ue-db-config]
recipe = slapos.recipe.build
path = ${directory:home}/ue_db.cfg
slavelist = {{ slapparameter_dict['slavelist'] }}
init =
import json
slave_instance_list = json.loads(options['slavelist'].replace("'", '"'))
filtered_slave_instance_list = []
for slave_instance in slave_instance_list:
if slave_instance.get('imsi', '') != '':
filtered_slave_instance_list.append(slave_instance)
out = '\n['
for i, slave_instance in enumerate(filtered_slave_instance_list):
if i == 0:
out += '\n{'
else:
out += ", {"
out += '\n sim_algo: "' + slave_instance.get('sim_algo', 'milenage') + '","'
out += '\n imsi: "' + slave_instance.get('imsi', '') + '","'
out += '\n opc: "' + slave_instance.get('opc', '') + '","'
out += '\n amf: ' + slave_instance.get('amf', '0x9001') + ',"'
out += '\n sqn: "' + slave_instance.get('sqn', '000000000000') + '","'
out += '\n k: "' + slave_instance.get('k', '') + '","'
out += '\n impu: "' + slave_instance.get('impu', '') + '","'
out += '\n impi: "' + slave_instance.get('impi', '') + '","'
out += '\n}'
out += '\n]\n'
f = open(options['path'], 'w+')
f.write(out)
f.close()
software/ors-amarisoft/instance.cfg
View file @
0f69d001
...
...
@@ -58,6 +58,7 @@ extensions = jinja2.ext.do
extra-context =
raw monitor_template ${monitor2-template:rendered}
key local_ipv4 local-ipv4-address:local-ipv4
key slavelist slap-configuration:slave-instance-list
[dynamic-template-lte-gnb-epc]
< = jinja2-template-base
...
...
@@ -126,13 +127,4 @@ extra-context =
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw openssl_location ${openssl:location}
raw nghttp2_location ${nghttp2:location}
key ue_db_path ue-db-config:rendered
[ue-db-config]
recipe = slapos.recipe.template:jinja2
template = ${ue_db.jinja2.cfg:target}
filename = ue_db.cfg
extensions = jinja2.ext.do
rendered = $${buildout:directory}/$${:filename}
context =
key slave_instance_list slap-configuration:slave-instance-list
raw ue_db_template ${ue_db.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