Commit 5d0ba337 authored by Joanne Hugé's avatar Joanne Hugé

Update Release Candidate

parents e5c1e753 e705aae2
...@@ -11,8 +11,8 @@ parts = ...@@ -11,8 +11,8 @@ parts =
[nghttp2] [nghttp2]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://github.com/nghttp2/nghttp2/releases/download/v1.57.0/nghttp2-1.57.0.tar.xz url = https://github.com/nghttp2/nghttp2/releases/download/v1.62.1/nghttp2-1.62.1.tar.bz2
md5sum = 1525d4966622500f119017dc057c76c8 md5sum = cc2f311e5affee2e78005946e0875fc3
pre-configure = pre-configure =
autoreconf -fisv -I ${libtool:location}/share/aclocal -I ${pkgconfig:location}/share/aclocal autoreconf -fisv -I ${libtool:location}/share/aclocal -I ${pkgconfig:location}/share/aclocal
automake automake
......
...@@ -14,8 +14,8 @@ class WebsocketTestClass(e2e.EndToEndTestCase): ...@@ -14,8 +14,8 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
cls.sim_instance_name = time.strftime('e2e-cb003-sim-%Y-%B-%d-%H:%M:%S') cls.sim_instance_name = time.strftime('e2e-cb003-sim-%Y-%B-%d-%H:%M:%S')
cls.ue_instance_name = time.strftime('e2e-sb005-ue-%Y-%B-%d-%H:%M:%S') cls.ue_instance_name = time.strftime('e2e-sb005-ue-%Y-%B-%d-%H:%M:%S')
cls.product = "/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg" cls.product = "/opt/e2e/slapos/software/simpleran/software-fdd-lopcomm.cfg"
cls.ue_product = "/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg" cls.ue_product = "/opt/e2e/slapos/software/simpleran/software-fdd-lopcomm.cfg"
# Component GUIDs and configurations # Component GUIDs and configurations
cls.comp_enb ="COMP-3920" cls.comp_enb ="COMP-3920"
......
...@@ -14,7 +14,7 @@ class WebsocketTestClass(e2e.EndToEndTestCase): ...@@ -14,7 +14,7 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
cls.sim_instance_name = time.strftime('e2e-ors84-sim-%Y-%B-%d-%H:%M:%S') cls.sim_instance_name = time.strftime('e2e-ors84-sim-%Y-%B-%d-%H:%M:%S')
cls.ue_instance_name = time.strftime('e2e-simbox005-ue-%Y-%B-%d-%H:%M:%S') cls.ue_instance_name = time.strftime('e2e-simbox005-ue-%Y-%B-%d-%H:%M:%S')
cls.product = cls.product.get('ors-tdd') cls.product = cls.product.get('ors-tdd')
cls.ue_product = "/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg" cls.ue_product = "/opt/e2e/slapos/software/simpleran/software-fdd-lopcomm.cfg"
# Component GUIDs and configurations # Component GUIDs and configurations
cls.comp_enb = "COMP-4057" cls.comp_enb = "COMP-4057"
......
...@@ -19,4 +19,4 @@ md5sum = 0d6db8da45bbdf311f9c6a2f916045a2 ...@@ -19,4 +19,4 @@ md5sum = 0d6db8da45bbdf311f9c6a2f916045a2
[template-default] [template-default]
filename = instance-default.cfg.in filename = instance-default.cfg.in
md5sum = 452599c3067904a9decb8c5dba55eb46 md5sum = 339a47644377509a754c9ead038728a6
...@@ -11,7 +11,7 @@ parts = ...@@ -11,7 +11,7 @@ parts =
monitor-base monitor-base
port-listening-promise port-listening-promise
galene-service galene-service
{% if slapparameter_dict.get('dns_sr_url', '') %} {% if slapparameter_dict.get('request_dns', '') %}
request-dns-entry request-dns-entry
{% endif %} {% endif %}
...@@ -27,7 +27,7 @@ recipe = slapos.cookbook:publish ...@@ -27,7 +27,7 @@ recipe = slapos.cookbook:publish
url = https://[$${galene-wrapper:ip}]:$${galene-wrapper:port} url = https://[$${galene-wrapper:ip}]:$${galene-wrapper:port}
admin-user = $${admin-password:username} admin-user = $${admin-password:username}
admin-password = $${admin-password:passwd} admin-password = $${admin-password:passwd}
{% if slapparameter_dict.get('dns_sr_url', '') %} {% if slapparameter_dict.get('request_dns', '') %}
domain-url = https://$${request-dns-entry:connection-domain}:$${galene-wrapper:port} domain-url = https://$${request-dns-entry:connection-domain}:$${galene-wrapper:port}
{% endif %} {% endif %}
...@@ -131,11 +131,11 @@ name = galene-port-listening.py ...@@ -131,11 +131,11 @@ name = galene-port-listening.py
config-host = $${slap-configuration:ipv6-random} config-host = $${slap-configuration:ipv6-random}
config-port = 8443 config-port = 8443
{% if slapparameter_dict.get('dns_sr_url', '') %} {% if slapparameter_dict.get('request_dns', '') %}
[request-dns-entry] [request-dns-entry]
name = dns-galene-entry name = dns-galene-entry
recipe = slapos.cookbook:request.serialised recipe = slapos.cookbook:request.serialised
software-url = {{ slapparameter_dict['dns_sr_url'] }} software-url = automated_local_dns
software-type = core-network software-type = core-network
server-url = {{ slap_connection['server-url'] }} server-url = {{ slap_connection['server-url'] }}
computer-id = {{ slap_connection['computer-id'] }} computer-id = {{ slap_connection['computer-id'] }}
......
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
"type": "boolean", "type": "boolean",
"default": true "default": true
}, },
"dns_sr_url": { "request_dns": {
"default": "", "title": "Request DNS",
"title": "DNS SR URL", "description": "Request local DNS to a core network running on the same node",
"description": "URL of the SR running the DNS server", "type": "boolean",
"type": "string" "default": true
} }
} }
} }
...@@ -466,7 +466,7 @@ ...@@ -466,7 +466,7 @@
"const": [ "const": [
"https://shacache.nxdcdn.com/02257c3ec27e45d9f022c181a69b59da67e5c72871cdb4f9a69db323a1fad58093f2e69702d29aa98f5f65e920e0b970d816475a5a936e1f3bf33832257b7e92#b710c178eb434d79ce40ce703d30a5f0" "https://shacache.nxdcdn.com/02257c3ec27e45d9f022c181a69b59da67e5c72871cdb4f9a69db323a1fad58093f2e69702d29aa98f5f65e920e0b970d816475a5a936e1f3bf33832257b7e92#b710c178eb434d79ce40ce703d30a5f0"
], ],
"title": "Debian Bookworm 11 netinst x86_64" "title": "Debian Bullseye 11 netinst x86_64"
}, },
{ {
"const": [ "const": [
......
...@@ -332,7 +332,7 @@ ...@@ -332,7 +332,7 @@
"const": [ "const": [
"https://shacache.nxdcdn.com/02257c3ec27e45d9f022c181a69b59da67e5c72871cdb4f9a69db323a1fad58093f2e69702d29aa98f5f65e920e0b970d816475a5a936e1f3bf33832257b7e92#b710c178eb434d79ce40ce703d30a5f0" "https://shacache.nxdcdn.com/02257c3ec27e45d9f022c181a69b59da67e5c72871cdb4f9a69db323a1fad58093f2e69702d29aa98f5f65e920e0b970d816475a5a936e1f3bf33832257b7e92#b710c178eb434d79ce40ce703d30a5f0"
], ],
"title": "Debian Bookworm 11 netinst x86_64" "title": "Debian Bullseye 11 netinst x86_64"
}, },
{ {
"const": [ "const": [
......
...@@ -19,7 +19,7 @@ md5sum = 403a4a362b2ffec05f8d0b591bab92fa ...@@ -19,7 +19,7 @@ md5sum = 403a4a362b2ffec05f8d0b591bab92fa
[template-default] [template-default]
_update_hash_filename_ = instance-default.cfg.in _update_hash_filename_ = instance-default.cfg.in
md5sum = 89a7224c3dd9356bf262100816b67f73 md5sum = 73c1fe98a12465369450cb8f3340881b
[dovecot.jinja2.conf] [dovecot.jinja2.conf]
_update_hash_filename_ = dovecot.jinja2.conf _update_hash_filename_ = dovecot.jinja2.conf
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
"$schema": "http://json-schema.org/draft-04/schema#", "$schema": "http://json-schema.org/draft-04/schema#",
"title": "Input Parameters", "title": "Input Parameters",
"properties": { "properties": {
"dns_sr_url": { "request_dns": {
"default": "", "title": "Request DNS",
"title": "DNS SR URL", "description": "Request local DNS to a core network running on the same node",
"description": "URL of the SR running the DNS server", "type": "boolean",
"type": "string" "default": true
} }
} }
} }
...@@ -195,7 +195,7 @@ recipe = slapos.cookbook:publish ...@@ -195,7 +195,7 @@ recipe = slapos.cookbook:publish
imap-port = 10143 imap-port = 10143
smtp-port = 10025 smtp-port = 10025
imap-smtp-ipv6 = ${slap-configuration:ipv6-random} imap-smtp-ipv6 = ${slap-configuration:ipv6-random}
{% if slapparameter_dict.get('dns_sr_url', '') %} {% if slapparameter_dict.get('request_dns', '') %}
domain = ${request-dns-entry:connection-domain} domain = ${request-dns-entry:connection-domain}
{% endif %} {% endif %}
...@@ -216,7 +216,7 @@ config-port = 10025 ...@@ -216,7 +216,7 @@ config-port = 10025
[request-dns-entry] [request-dns-entry]
name = dns-mail-entry name = dns-mail-entry
recipe = slapos.cookbook:request.serialised recipe = slapos.cookbook:request.serialised
software-url = {{ slapparameter_dict['dns_sr_url'] }} software-url = automated_local_dns
software-type = core-network software-type = core-network
server-url = {{ slap_connection['server-url'] }} server-url = {{ slap_connection['server-url'] }}
computer-id = {{ slap_connection['computer-id'] }} computer-id = {{ slap_connection['computer-id'] }}
...@@ -302,7 +302,7 @@ parts = ...@@ -302,7 +302,7 @@ parts =
imap-listen-promise imap-listen-promise
smtp-listen-promise smtp-listen-promise
{{ part_list | join('\n ') }} {{ part_list | join('\n ') }}
{% if slapparameter_dict.get('dns_sr_url', '') %} {% if slapparameter_dict.get('request_dns', '') %}
request-dns-entry request-dns-entry
{% endif %} {% endif %}
......
Tests for ors-amarisoft software release
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 711d90973a5cfb2f61d3a3a53c07c64c md5sum = f1b9ae02222c020c89d1a3fa75475826
[template-ors] [template-ors]
filename = instance-ors.cfg filename = instance-ors.cfg
md5sum = 1e7d200bfbbbae26e56585017177aaee md5sum = 8c2abee8eb0a538ad8ae1a84e140af69
[slaplte.jinja2] [slaplte.jinja2]
_update_hash_filename_ = slaplte.jinja2 _update_hash_filename_ = slaplte.jinja2
md5sum = 27c49897c9a3e4c260105534bed0132d md5sum = 8d6eb90fc1191c3a1b24200df2ebf4fa
[ru_amarisoft-stats.jinja2.py] [ru_amarisoft-stats.jinja2.py]
_update_hash_filename_ = ru/amarisoft-stats.jinja2.py _update_hash_filename_ = ru/amarisoft-stats.jinja2.py
...@@ -60,19 +60,23 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e ...@@ -60,19 +60,23 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb] [template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = 140cce72eb04768abbe87ea4982f36bd md5sum = bda6ff7bc76cf73e3bd55aca21134a3a
[template-ors-enb] [template-ors-enb]
_update_hash_filename_ = instance-ors-enb.jinja2.cfg _update_hash_filename_ = instance-ors-enb.jinja2.cfg
md5sum = 601d6237059fa665d3f3ffb6a78ad9ca md5sum = 585457493ce5302ba1f1073b8a3b877c
[template-ors-ue]
_update_hash_filename_ = instance-ors-ue.jinja2.cfg
md5sum = f4389a92fb111447e7976e452db78607
[template-core-network] [template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg _update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum = 8e3f5a1a742a6934a61d6a3a282f1293 md5sum = dab992c02a363e00cdc86f102a7ae489
[template-ue] [template-ue]
_update_hash_filename_ = instance-ue.jinja2.cfg _update_hash_filename_ = instance-ue.jinja2.cfg
md5sum = 812a43458c21f7d0cdb2141515a236ae md5sum = eb4c1c0e654922ded618991e5f3c0f8f
[template-obsolete] [template-obsolete]
_update_hash_filename_ = instance-obsolete.jinja2.cfg _update_hash_filename_ = instance-obsolete.jinja2.cfg
...@@ -80,11 +84,11 @@ md5sum = c5f581ba01654b2aec46000abf8d0e35 ...@@ -80,11 +84,11 @@ md5sum = c5f581ba01654b2aec46000abf8d0e35
[ue_db.jinja2.cfg] [ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg filename = config/ue_db.jinja2.cfg
md5sum = 3b901e8733e6afff8940c6c318da4493 md5sum = dd50b4e4780830ddbde28b84af118f18
[enb.jinja2.cfg] [enb.jinja2.cfg]
filename = config/enb.jinja2.cfg filename = config/enb.jinja2.cfg
md5sum = 1b8dc68206485299c08ab0e1544773f6 md5sum = 2c49e14af6869387880d5e8e1c0ede64
[drb_lte.jinja2.cfg] [drb_lte.jinja2.cfg]
filename = config/drb_lte.jinja2.cfg filename = config/drb_lte.jinja2.cfg
...@@ -104,7 +108,7 @@ md5sum = 9dbd93036c15c87c6de74b88b34062b6 ...@@ -104,7 +108,7 @@ md5sum = 9dbd93036c15c87c6de74b88b34062b6
[mme.jinja2.cfg] [mme.jinja2.cfg]
filename = config/mme.jinja2.cfg filename = config/mme.jinja2.cfg
md5sum = 4628509e89747cf30e85ce2cb3a0aebd md5sum = b86f0e7a0d890771d56aee22838d6487
[dnsmasq-core-network.jinja2.cfg] [dnsmasq-core-network.jinja2.cfg]
filename = config/dnsmasq-core-network.jinja2.cfg filename = config/dnsmasq-core-network.jinja2.cfg
...@@ -120,7 +124,7 @@ md5sum = f07c85916bcb7e4002c8edc3d087c1be ...@@ -120,7 +124,7 @@ md5sum = f07c85916bcb7e4002c8edc3d087c1be
[ue.jinja2.cfg] [ue.jinja2.cfg]
filename = config/ue.jinja2.cfg filename = config/ue.jinja2.cfg
md5sum = 62291a11fd36a42464901cdc81338687 md5sum = 4b0f08b2d8efa506d6165f8b4e0d9578
[software.cfg.html] [software.cfg.html]
_update_hash_filename_ = gadget/software.cfg.html _update_hash_filename_ = gadget/software.cfg.html
...@@ -129,3 +133,11 @@ md5sum = 61a2f783fbf683a34aed3d13e00baca2 ...@@ -129,3 +133,11 @@ md5sum = 61a2f783fbf683a34aed3d13e00baca2
[promise.gadget.js] [promise.gadget.js]
_update_hash_filename_ = gadget/promise.gadget.js _update_hash_filename_ = gadget/promise.gadget.js
md5sum = 330f5f07806f1da11cd05bb8e4b52e55 md5sum = 330f5f07806f1da11cd05bb8e4b52e55
[ue-ifup]
_update_hash_filename_ = config/ue-ifup
md5sum = f02fbfd31ba89cf243e2752adcae28d9
[frequency_outofbounds_promise]
_update_hash_filename_ = promise/check_frequency_outofbounds.py
md5sum = 7c83eab2df4f5a5d519e3eb16e4077a3
Changelog Changelog
========= =========
Version 1.0.371 (2024-10-09)
-------------
* rename ors-amarisoft to simpleran
## UE simulator:
* add UE mode for ORS (experimental)
## eNB / gNB changes:
* add compatibility with our KPI calculation and storage platform
* support external MBMSGW
* display current frequency and band
* add promise testing if frequency is out of bounds (ORS only)
* fix eNB configuration for 1.4MHz bandwidth
* change default RX gain to 25
* add useful information in eNB / gNB logs: host ID, FPGA version and kernel version
* keep old eNB / gNB radio logs
## Core Network changes:
* support external HSS (S6), tested only for LTE
* add multicast and broadcast
* display the list of IMSI in the UE database
Version 1.0.361 (2024-05-29) Version 1.0.361 (2024-05-29)
------------- -------------
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
log_filename: "{{ directory['log'] }}/enb.log", log_filename: "{{ directory['log'] }}/enb.log",
{# instantiate radio units #} {# instantiate radio units #}
{{ slaplte.ru_config(iru_dict, slapparameter_dict) }} {{ slaplte.ru_config(iru_dict, slapparameter_dict, True) }}
{%- if slapparameter_dict.get('websocket_password', '') %} {%- if slapparameter_dict.get('websocket_password', '') %}
com_addr: "[{{ gtp_addr_v6 }}]:{{ slapparameter_dict.com_ws_port }}", com_addr: "[{{ gtp_addr_v6 }}]:{{ slapparameter_dict.com_ws_port }}",
...@@ -155,12 +155,19 @@ ...@@ -155,12 +155,19 @@
com_addr: "{{ slapparameter_dict.com_addr }}:{{ slapparameter_dict.com_ws_port }}", com_addr: "{{ slapparameter_dict.com_addr }}:{{ slapparameter_dict.com_ws_port }}",
{%- endif %} {%- endif %}
{%- if slapparameter_dict.get('mbmsgw_addr', '') %}
mbmsgw_addr: "{{ slapparameter_dict.mbmsgw_addr }}",
{%- endif %}
{% if do_lte %} {% if do_lte %}
// LTE core network // LTE core network
mme_list: [ mme_list: [
{%- for _, mme in slapparameter_dict.mme_list |dictsort %} {%- for _, mme in slapparameter_dict.mme_list |dictsort %}
{ {
mme_addr: "{{ mme['mme_addr'] }}", mme_addr: "{{ mme['mme_addr'] }}",
{%- if mme.get('s1ap_bind_addr', '') %}
s1ap_bind_addr: "{{ mme['s1ap_bind_addr'] }}",
{%- endif %}
}, },
{%- endfor %} {%- endfor %}
], ],
...@@ -172,6 +179,9 @@ ...@@ -172,6 +179,9 @@
{%- for _, amf in slapparameter_dict.amf_list |dictsort %} {%- for _, amf in slapparameter_dict.amf_list |dictsort %}
{ {
amf_addr: "{{ amf['amf_addr'] }}", amf_addr: "{{ amf['amf_addr'] }}",
{%- if amf.get('ngap_bind_addr', '') %}
ngap_bind_addr: "{{ amf['ngap_bind_addr'] }}",
{%- endif %}
}, },
{%- endfor %} {%- endfor %}
], ],
...@@ -306,7 +316,7 @@ ...@@ -306,7 +316,7 @@
{%- set n_rb_dl = J(jlte_n_rb_dl(cell.bandwidth)) %} {%- set n_rb_dl = J(jlte_n_rb_dl(cell.bandwidth)) %}
n_rb_dl: {{ n_rb_dl }}, n_rb_dl: {{ n_rb_dl }},
si_coderate: {{ 0.30 if n_rb_dl == 6 else 0.20 }}, si_coderate: {{ 0.60 if n_rb_dl == 6 else 0.20 }},
pdsch_dedicated: { pdsch_dedicated: {
p_a: {{ {4: -6, 2: -3}.get(ru.n_antenna_dl, 0) }}, p_a: {{ {4: -6, 2: -3}.get(ru.n_antenna_dl, 0) }},
...@@ -314,7 +324,7 @@ ...@@ -314,7 +324,7 @@
}, },
pdcch_format: {{ 1 if n_rb_dl == 6 else 2 }}, pdcch_format: {{ 1 if n_rb_dl == 6 else 2 }},
prach_config_index: {{ 15 if n_rb_dl == 6 else 4 }}, prach_config_index: {{ 0 if n_rb_dl == 6 else 4 }},
initial_cqi: {{ 5 if n_rb_dl == 6 else 3 }}, initial_cqi: {{ 5 if n_rb_dl == 6 else 3 }},
pucch_dedicated: { pucch_dedicated: {
...@@ -342,7 +352,7 @@ ...@@ -342,7 +352,7 @@
srs_dedicated: { srs_dedicated: {
{%- if n_rb_dl == 6 %} {%- if n_rb_dl == 6 %}
srs_bandwidth_config: 7, srs_bandwidth_config: 7,
srs_bandwidth: 1, srs_bandwidth: 3,
{%- elif n_rb_dl == 15 %} {%- elif n_rb_dl == 15 %}
srs_bandwidth_config: 6, srs_bandwidth_config: 6,
srs_bandwidth: 1, srs_bandwidth: 1,
......
...@@ -59,7 +59,12 @@ ...@@ -59,7 +59,12 @@
nr_support: true, nr_support: true,
eps_5gs_interworking: "with_n26", {%- set eps_5gs_interworking =
{'With N26': "with_n26",
'Without N26': "without_n26",
'None': "none"}
[slapparameter_dict.get('eps_5gs_interworking', 'With N26')] %}
eps_5gs_interworking: "{{ eps_5gs_interworking }}",
fifteen_bearers: false, fifteen_bearers: false,
...@@ -128,6 +133,23 @@ ...@@ -128,6 +133,23 @@
ue_to_ue_forwarding: false, ue_to_ue_forwarding: false,
nas_cipher_algo_pref: [ ], nas_cipher_algo_pref: [ ],
nas_integ_algo_pref: [ 2, 1 ], nas_integ_algo_pref: [ 2, 1 ],
ue_db_filename: "{{ directory['var'] }}/lte_ue.db",
{%- if slapparameter_dict.get('hss_addr', '') %}
ue_db: [],
s6: {
server_addr: "{{ slapparameter_dict.get('hss_addr', '') }}",
{%- if slapparameter_dict.get('hss_bind_addr', '') %}
bind_addr: "{{ slapparameter_dict.get('hss_bind_addr', '') }}",
{%- endif %}
{%- if slapparameter_dict.get('s6_origin_realm', '') %}
origin_realm: "{{ slapparameter_dict.get('s6_origin_realm', '') }}",
{%- endif %}
{%- if slapparameter_dict.get('s6_origin_host', '') %}
origin_host: "{{ slapparameter_dict.get('s6_origin_host', '') }}",
{%- endif %}
}
{%- else %}
include "{{ slap_configuration['ue_db_path'] }}", include "{{ slap_configuration['ue_db_path'] }}",
ue_db_filename: "{{ directory['var'] }}/lte_ue.db" {%- endif %}
} }
#!/bin/bash
ue_id="$1"
pdn_id="$2"
ifname="$3"
ipv4_addr="$4"
ipv4_dns="$5"
ipv6_local_addr="$6"
ipv6_dns="$7"
param="$8"
old_link_local=""
shift; shift; shift; shift; shift; shift; shift; shift;
while [ "$1" != "" ] ; do
case "$1" in
--mtu)
mtu="$2"
shift
;;
*)
echo "Bad parameter: $1" >&2
exit 1
;;
esac
shift
done
if [ "$pdn_id" != "0" ] ; then
echo "We should have only PDN 0, exiting..."
exit 1
fi
echo "Configure $ue_id($param) on pdn $pdn_id, tun=$ifname, ip=$ipv4_addr, dns=$ipv4_dns, ip6=$ipv6_local_addr, ip6_dns=$ipv6_dns"
if [ "$ipv4_dns" != "" ] || [ "$ipv6_dns" != "" ] ; then
if [ "$ipv4_dns" != "" ] ; then
echo "nameserver $ipv4_dns" >> /etc/resolv.conf
fi
if [ "$ipv6_dns" != "" ] ; then
echo "nameserver $ipv6_dns" >> /etc/resolv.conf
fi
fi
if [ "$ipv6_local_addr" != "" ] ; then
echo '0' > /proc/sys/net/ipv6/conf/$ifname/disable_ipv6
echo '1' > /proc/sys/net/ipv6/conf/$ifname/accept_ra
echo '1' > /proc/sys/net/ipv6/conf/$ifname/router_solicitation_delay
echo '1' > /proc/sys/net/ipv6/conf/$ifname/autoconf
else
echo '1' > /proc/sys/net/ipv6/conf/$ifname/disable_ipv6
fi
ifconfig $ifname up
if [ "$ipv4_addr" != "" ] ; then
ifconfig $ifname $ipv4_addr/24
if [ "$mtu" != "" ] ; then
ifconfig $ifname mtu $mtu
fi
fi
if [ "$ipv6_local_addr" != "" ] ; then
old_link_local=`ip addr show dev $ifname | sed -e's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d'`
if [ "$old_link_local" != "" ] ; then
ifconfig $ifname inet6 del $old_link_local/64
fi
ifconfig $ifname inet6 add $ipv6_local_addr/64
fi
if [ "$ipv4_addr" != "" -a "$ipv6_local_addr" != "" ] ; then
echo "MAC_ADDR="$(ip link show dev $ifname | grep -oP "ether \K[\d:a-f]+")
fi
...@@ -20,12 +20,17 @@ ...@@ -20,12 +20,17 @@
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
log_filename: "{{ directory['log'] }}/ue.log", log_filename: "{{ directory['log'] }}/ue.log",
{%- if not ors %}
rue_bind_addr: "{{ pub_info['rue_bind_addr'] }}", rue_bind_addr: "{{ pub_info['rue_bind_addr'] }}",
com_addr: "{{ pub_info['com_addr'] }}", com_addr: "{{ pub_info['com_addr'] }}",
{%- endif %}
{# instantiate radio units #} {# instantiate radio units #}
{{ slaplte.ru_config(iru_dict, slapparameter_dict) }} {%- if ors %}
{{ slaplte.ru_config(iru_dict, slapparameter_dict, False) }}
{%- else %}
{{ slaplte.ru_config(iru_dict, slapparameter_dict, True) }}
{%- endif %}
cell_groups: [{ cell_groups: [{
// LTE cells // LTE cells
...@@ -102,7 +107,9 @@ ...@@ -102,7 +107,9 @@
impi: "{{ ue.impi }}", impi: "{{ ue.impi }}",
imsi: "{{ ue.imsi }}", imsi: "{{ ue.imsi }}",
K: "{{ ue.k }}", K: "{{ ue.k }}",
{%- if ue.get('rue_addr', False) %}
rue_addr: "{{ ue.rue_addr }}", rue_addr: "{{ ue.rue_addr }}",
{%- endif %}
{%- if ue.ue_type == 'lte' %} {%- if ue.ue_type == 'lte' %}
as_release: 13, as_release: 13,
ue_category: 13, ue_category: 13,
...@@ -112,7 +119,11 @@ ...@@ -112,7 +119,11 @@
{%- else %} {%- else %}
{%- do bug('unreachable') %} {%- do bug('unreachable') %}
{%- endif %} {%- endif %}
tun_setup_script: "ue-ifup", {%- if ors %}
tun_setup_script: "{{ ue_ifup }}",
{%- else %}
tun_setup_script: "ue_ifup",
{%- endif %}
apn: "internet", apn: "internet",
}, },
{%- endfor %} {%- endfor %}
......
...@@ -14,11 +14,34 @@ ue_db: [ ...@@ -14,11 +14,34 @@ ue_db: [
K: "{{ s.get('k', '') }}", K: "{{ s.get('k', '') }}",
impu: "{{ s.get('impu', '') }}", impu: "{{ s.get('impu', '') }}",
impi: "{{ s.get('impi', '') }}", impi: "{{ s.get('impi', '') }}",
{%- if "ip" in s %} {%- if "ip" in s or s.get('enable_multicast', False) or s.get('enable_ipv6_multicast', False) or s.get('enable_broadcast') or s.get('route_list', False) %}
pdn_list:[{ pdn_list:[{
access_point_name: "internet", access_point_name: "internet",
default: true, default: true,
{%- if "ip" in s %}
ipv4_addr: "{{ s['ip'] }}" ipv4_addr: "{{ s['ip'] }}"
{%- endif %}
{%- if s.get('enable_multicast', False) %}
multicast: true,
{%- endif %}
{%- if s.get('enable_ipv6_multicast', False) %}
ipv6_multicast: true,
{%- endif %}
{%- if s.get('enable_broadcast', False) %}
broadcast: true,
{%- endif %}
{%- if s.get('route_list', False) %}
routes: [
{%- for _, route in s.route_list |dictsort %}
[
{
ipv6_remote_addr_prefix: "{{ route['ipv6_remote_addr_prefix'] }}",
prefix_len: {{ route['prefix_len'] }},
}
],
{%- endfor -%}
],
{%- endif %}
}] }]
{%- endif %} {%- endif %}
} }
......
...@@ -50,6 +50,37 @@ ...@@ -50,6 +50,37 @@
"title": "Fixed IP for the UE", "title": "Fixed IP for the UE",
"description": "Set to true to force a static IPv4 for each UE. If true, the number of UE is limited.", "description": "Set to true to force a static IPv4 for each UE. If true, the number of UE is limited.",
"type": "boolean" "type": "boolean"
},
"eps_5gs_interworking": {
"title": "EPS 5GS Interworking",
"type": "string",
"description": "Defines whether inter RAT mobility between EPS and 5GS is supported or not, and whether N26 interface is supported or not. Note that interworking with N26 is required to perform handover between EPS and 5GS.",
"enum": [
"None",
"With N26",
"Without N26"
],
"default": "With N26"
},
"hss_addr": {
"title": "HSS Address",
"description": "IP address and optional port of the HSS used for S6a interface. The default port is 3868.",
"type": "string"
},
"hss_bind_addr": {
"title": "HSS Bind Address",
"description": "IP address and optional port on which the S6a SCTP connection is bound. The default address is the same as the S1AP SCTP connection.",
"type": "string"
},
"s6_origin_realm": {
"title": "S6 Origin Realm",
"description": "Defines the string sent in the Origin-Realm AVP for S6 messages. Default is set to mnc<MNC>.mcc<MCC>.3gppnetwork.org.",
"type": "string"
},
"s6_origin_host": {
"title": "S6 Origin Host",
"description": "Defines the string sent in the Origin-Host AVP for S6 messages. Default is set to epc.mnc<MNC>.mcc<MCC>.3gppnetwork.org.",
"type": "string"
} }
} }
} }
...@@ -267,11 +267,7 @@ context = ...@@ -267,11 +267,7 @@ context =
[mme-config] [mme-config]
<= config-base <= config-base
{% if slapparameter_dict.get("mme_config_link", None) %}
url = ${mme-config-dl:target}
{% else %}
url = {{ mme_template }} url = {{ mme_template }}
{% endif %}
output = ${directory:etc}/mme.cfg output = ${directory:etc}/mme.cfg
extra-context = extra-context =
raw support_ims {{ support_ims }} raw support_ims {{ support_ims }}
...@@ -316,6 +312,12 @@ monitor-title = {{ slapparameter_dict['name'] | string }} ...@@ -316,6 +312,12 @@ monitor-title = {{ slapparameter_dict['name'] | string }}
password = {{ slapparameter_dict['monitor-password'] | string }} password = {{ slapparameter_dict['monitor-password'] | string }}
{% endif %} {% endif %}
{% set imsi_list = [] -%}
{%- for slave in sim_slave_instance_list %}
{%- set slave_parameters = json_module.loads(slave['_']) %}
{%- do imsi_list.append(slave_parameters.imsi) %}
{%- endfor %}
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
recipe = slapos.cookbook:publish.serialised recipe = slapos.cookbook:publish.serialised
...@@ -329,6 +331,7 @@ core-network-ipv4 = {{ lan_ipv4 }} ...@@ -329,6 +331,7 @@ core-network-ipv4 = {{ lan_ipv4 }}
amarisoft-version = {{ lte_version }} amarisoft-version = {{ lte_version }}
license-expiration = {{ lte_expiration }} license-expiration = {{ lte_expiration }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
sim-list = {{ imsi_list | join(', ') }}
[macro.promise] [macro.promise]
<= monitor-promise-base <= monitor-promise-base
......
...@@ -20,6 +20,11 @@ ...@@ -20,6 +20,11 @@
"type": "string", "type": "string",
"default": "127.0.1.1" "default": "127.0.1.1"
}, },
"mbmsgw_addr": {
"title": "SGW Address",
"description": "Set the IP address (and optional port) of the MBMS Gateway for the M2 connection. The default port is 36443.",
"type": "string"
},
"mme_list": { "mme_list": {
"title": "MME list", "title": "MME list",
"description": "List of MME to which the eNodeB is connected. (must be set if there are LTE cells)", "description": "List of MME to which the eNodeB is connected. (must be set if there are LTE cells)",
...@@ -30,6 +35,11 @@ ...@@ -30,6 +35,11 @@
"title": "MME Address", "title": "MME Address",
"description": "IP address (and optional port) of S1AP SCTP connection to the MME. The default port is 36412.", "description": "IP address (and optional port) of S1AP SCTP connection to the MME. The default port is 36412.",
"type": "string" "type": "string"
},
"s1ap_bind_addr": {
"title": "S1AP Bind Address",
"description": "Optional String. IP address and optional port on which the S1AP SCTP connection is bound.",
"type": "string"
} }
}, },
"type": "object" "type": "object"
...@@ -87,6 +97,11 @@ ...@@ -87,6 +97,11 @@
"title": "AMF Address", "title": "AMF Address",
"description": "IP address (and optional port) of NGAP SCTP connection to the AMF. The default port is 38412.", "description": "IP address (and optional port) of NGAP SCTP connection to the AMF. The default port is 38412.",
"type": "string" "type": "string"
},
"ngap_bind_addr": {
"title": "NGAP Bind Address",
"description": "Optional string. IP address and optional port on which the NGAP SCTP connection is bound.",
"type": "string"
} }
}, },
"type": "object" "type": "object"
...@@ -197,19 +212,27 @@ ...@@ -197,19 +212,27 @@
"type": "number", "type": "number",
"default": 0 "default": 0
}, },
"wendelin_telecom_software_release_url": {
"title": "Wendelin Telecom Software Release URL",
"description": "URL of the Wendelin Telecom Software Release to use to request a shared instance",
"type": "string",
"default": "wendelin-telecom-enb-shared-instance"
},
"xlog_fluentbit_forward_host": { "xlog_fluentbit_forward_host": {
"title": "Fluentbit Xlog forwarding address", "title": "Fluentbit Xlog forwarding address",
"description": "Address of remote Fluentd or Fluentbit server to which Fluentbit should forward Xlog data", "description": "Address of remote Fluentd or Fluentbit server to which Fluentbit should forward Xlog data",
"type": "string" "type": "string",
"default": "fluentd.rapid.space"
}, },
"xlog_fluentbit_forward_port": { "xlog_fluentbit_forward_port": {
"title": "Fluentbit Xlog forwarding port", "title": "Fluentbit Xlog forwarding port",
"description": "(Optional) Port of remote Fluentd or Fluentbit server to which Fluentbit should forward Xlog data", "description": "Port of remote Fluentd or Fluentbit server to which Fluentbit should forward Xlog data",
"type": "string" "type": "integer",
"default": 24224
}, },
"xlog_fluentbit_forward_shared_key": { "xlog_fluentbit_forward_shared_key": {
"title": "Fluentbit Xlog forwarding shared key", "title": "Fluentbit Xlog forwarding shared key",
"description": "Secret Key shared with remote Fluentd or Fluentbit server for authentication when forwarding Xlog data", "description": "Secret key shared with remote Fluentd or Fluentbit server for authentication when forwarding Xlog data",
"type": "string" "type": "string"
} }
} }
......
...@@ -8,25 +8,30 @@ ...@@ -8,25 +8,30 @@
'use_ipv4': False, 'use_ipv4': False,
'gnb_id_bits': 28, 'gnb_id_bits': 28,
'nssai': {'1': {'sst': 1}}, 'nssai': {'1': {'sst': 1}},
'wendelin_telecom_software_release_url': 'wendelin-telecom-enb-shared-instance',
'xlog_fluentbit_forward_host': 'fluentd.rapid.space',
'xlog_fluentbit_forward_port': 24224,
} %} } %}
{%- set gtp_addr_lo = '127.0.1.1' %} {%- set gtp_addr_lo = '127.0.1.1' %}
{%- for k,v in enb_defaults|dictsort %} {%- for k,v in enb_defaults|dictsort %}
{%- do slapparameter_dict.setdefault(k, v) %} {%- do slapparameter_dict.setdefault(k, v) %}
{%- endfor %} {%- endfor %}
{%- set B = xbuildout.encode %}
[buildout] [buildout]
extra-parts =
parts = parts =
directory directory
enb-config enb-config
enb-service enb-service
xamari-xlog-service xamari-xlog-service
{% if slapparameter_dict.get('xlog_fluentbit_forward_host') %}
xlog-fluentbit-service xlog-fluentbit-service
{% endif %} request-wendelin-telecom-shared
check-baseband-latency.py check-baseband-latency.py
monitor-base monitor-base
publish-connection-information publish-connection-information
${:extra-parts}
extends = {{ monitor_template }} extends = {{ monitor_template }}
...@@ -82,28 +87,39 @@ promise = ${:etc}/promise ...@@ -82,28 +87,39 @@ promise = ${:etc}/promise
log = ${:var}/log log = ${:var}/log
xlog-fluentbit = ${:var}/xlog-fluentbit xlog-fluentbit = ${:var}/xlog-fluentbit
{% if slapparameter_dict.get("enb_config_link", None) %}
[enb-config-dl]
recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("enb_config_link") }}
version = {{ slapparameter_dict.get("enb_config_version") }}
offline = false
{% endif %}
[enb-sh-wrapper] [enb-sh-wrapper]
recipe = slapos.recipe.template recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
enb-log = ${directory:log}/enb-output.log enb-info-log = ${directory:log}/enb-info.log
enb-info-archive-log = ${directory:log}/enb-info.log
enb-radio-log = ${directory:log}/enb.log
enb-start-date = ${directory:run}/enb-start.date
inline = inline =
#!/bin/sh #!/bin/sh
{% if not slapparameter_dict.get("testing", False) %} {% if not slapparameter_dict.get("testing", False) %}
sudo -n /opt/amarisoft/rm-tmp-lte; # Amarisoft init scripts
sudo -n /opt/amarisoft/init-sdr; sudo -n /opt/amarisoft/rm-tmp-lte
sudo -n /opt/amarisoft/init-enb; sudo -n /opt/amarisoft/init-sdr
(echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting eNB software..." && echo) >> ${:enb-log}; sudo -n /opt/amarisoft/init-enb
tail -c 1M ${:enb-log} > ${:enb-log}.tmp; # Add useful information to enb-info log
mv ${:enb-log}.tmp ${:enb-log}; (echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting eNB software...") >> ${:enb-info-log}
{{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${:enb-log} 2>> ${:enb-log}; (echo -n "PCB: " ; for o in t b v s ; do sudo -n /opt/amarisoft/get-sdr-info -$o 2> /dev/null ; echo -n " " ; done ; echo) >> ${:enb-info-log}
(AMARISOFT_PATH=/dev/null {{ enb }}/lteenb ${directory:etc}/enb.cfg 2>&1 >/dev/null | sed -n 's/^.*\(Host ID.*\)$/\1/gp') >> ${:enb-info-log}
echo "System info: $(uname -a)" >> ${:enb-info-log}
({{ sdr }}/sdr_util version && echo) >> ${:enb-info-log}
# Keep the 50 latest enb radio log
stat ${:enb-start-date} && mv ${:enb-radio-log} ${directory:log}/enb-$(cat ${:enb-start-date}).log
rm -f $(ls -1t ${directory:log}/enb-2* | tail -n+50)
rm -f $(ls -1t ${directory:log}/enb-info-2* | tail -n+50)
date +"%Y-%m-%d-%T" > ${:enb-start-date}
# Trim enb info log to 500k and keep a 100M archive of enb info log
head -c -500k ${:enb-info-log} >> ${:enb-info-archive-log}
tail -c 500k ${:enb-info-log} > ${:enb-info-log}.tmp
mv ${:enb-info-log}.tmp ${:enb-info-log}
tail -c 100M ${:enb-info-archive-log} > ${:enb-info-archive-log}.tmp
mv ${:enb-info-archive-log}.tmp ${:enb-info-archive-log}
# Launch lteenb
{{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${:enb-info-log} 2>> ${:enb-info-log}
{% endif %} {% endif %}
[enb-service] [enb-service]
...@@ -149,12 +165,11 @@ wrapper-path = ${directory:service}/${:_buildout_section_name_} ...@@ -149,12 +165,11 @@ wrapper-path = ${directory:service}/${:_buildout_section_name_}
command-line = ${xamari-xlog-script:output} command-line = ${xamari-xlog-script:output}
hash-files = ${:command-line} hash-files = ${:command-line}
{% if slapparameter_dict.get('xlog_fluentbit_forward_host') %}
[xlog-fluentbit-tag] [xlog-fluentbit-tag]
recipe = slapos.recipe.build recipe = slapos.recipe.build
computer = ${slap-connection:computer-id} computer = ${slap-connection:computer-id}
enb-id = {{ slapparameter_dict.get("enb_id", "") }} enb-id = {{ slapparameter_dict.get("enb_id") }}
gnb-id = {{ slapparameter_dict.get("gnb_id", "") }} gnb-id = {{ slapparameter_dict.get("gnb_id") }}
init = init =
import socket import socket
...@@ -174,10 +189,10 @@ init = ...@@ -174,10 +189,10 @@ init =
recipe = slapos.recipe.template recipe = slapos.recipe.template
output = ${directory:etc}/${:_buildout_section_name_}.cfg output = ${directory:etc}/${:_buildout_section_name_}.cfg
logfile = ${xamari-xlog-script:logfile} logfile = ${xamari-xlog-script:logfile}
forward-host = {{ slapparameter_dict.get('xlog_fluentbit_forward_host', '') }} forward-host = {{ slapparameter_dict.xlog_fluentbit_forward_host }}
forward-port = {{ slapparameter_dict.get('xlog_fluentbit_forward_port', '') }} forward-port = {{ slapparameter_dict.xlog_fluentbit_forward_port }}
forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }} forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }}
forward-self-hostname = {{ comp_id['comp-id'] }} forward-self-hostname = {{ B(comp_id['comp-id']) }}
inline = inline =
[SERVICE] [SERVICE]
flush 5 flush 5
...@@ -191,9 +206,7 @@ inline = ...@@ -191,9 +206,7 @@ inline =
name forward name forward
match * match *
Host ${:forward-host} Host ${:forward-host}
{%- if slapparameter_dict.get('xlog_fluentbit_forward_port') %}
Port ${:forward-port} Port ${:forward-port}
{%- endif %}
{%- if slapparameter_dict.get('xlog_fluentbit_forward_shared_key') %} {%- if slapparameter_dict.get('xlog_fluentbit_forward_shared_key') %}
Shared_Key ${:forward-shared-key} Shared_Key ${:forward-shared-key}
{%- endif %} {%- endif %}
...@@ -208,7 +221,14 @@ fluentbit-config = ${xlog-fluentbit-config:output} ...@@ -208,7 +221,14 @@ fluentbit-config = ${xlog-fluentbit-config:output}
command-line = ${:fluentbit} -c ${:fluentbit-config} command-line = ${:fluentbit} -c ${:fluentbit-config}
wrapper-path = ${directory:service}/${:_buildout_section_name_} wrapper-path = ${directory:service}/${:_buildout_section_name_}
hash-files = ${:fluentbit-config} hash-files = ${:fluentbit-config}
{% endif %}
[request-wendelin-telecom-shared]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Wendelin Telecom Registration
software-url = {{ slapparameter_dict.wendelin_telecom_software_release_url }}
shared = true
config-fluentbit-tag = ${xlog-fluentbit-tag:xlog-fluentbit-tag}
[config-base] [config-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -228,11 +248,7 @@ context = ...@@ -228,11 +248,7 @@ context =
[enb-config] [enb-config]
<= config-base <= config-base
{% if slapparameter_dict.get("enb_config_link", None) %}
url = ${enb-config-dl:target}
{% else %}
url = {{ enb_template }} url = {{ enb_template }}
{% endif %}
output = ${directory:etc}/enb.cfg output = ${directory:etc}/enb.cfg
import-list = import-list =
rawfile slaplte.jinja2 {{ slaplte_template }} rawfile slaplte.jinja2 {{ slaplte_template }}
...@@ -263,9 +279,7 @@ ru-list = {{ dumps(rulib.iru_dict.keys() | sort) }} ...@@ -263,9 +279,7 @@ ru-list = {{ dumps(rulib.iru_dict.keys() | sort) }}
cell-list = {{ dumps(rulib.icell_dict.keys() | sort) }} cell-list = {{ dumps(rulib.icell_dict.keys() | sort) }}
peer-list = {{ dumps(ipeer_dict.keys() | sort) }} peer-list = {{ dumps(ipeer_dict.keys() | sort) }}
peer-cell-list = {{ dumps(ipeercell_dict.keys() | sort) }} peer-cell-list = {{ dumps(ipeercell_dict.keys() | sort) }}
{%- if slapparameter_dict.get('xlog_fluentbit_forward_host') %}
fluentbit-tag = ${xlog-fluentbit-tag:xlog-fluentbit-tag} fluentbit-tag = ${xlog-fluentbit-tag:xlog-fluentbit-tag}
{%- endif %}
[monitor-instance-parameter] [monitor-instance-parameter]
......
...@@ -73,6 +73,9 @@ ...@@ -73,6 +73,9 @@
"$ref": "instance-enb-input-schema.json#/properties/gtp_addr", "$ref": "instance-enb-input-schema.json#/properties/gtp_addr",
"default": "127.0.1.1" "default": "127.0.1.1"
}, },
"mbmsgw_addr": {
"$ref": "instance-enb-input-schema.json#/properties/mbmsgw_addr"
},
"mme_list": { "mme_list": {
"$ref": "instance-enb-input-schema.json#/properties/mme_list", "$ref": "instance-enb-input-schema.json#/properties/mme_list",
"default": { "default": {
...@@ -196,6 +199,9 @@ ...@@ -196,6 +199,9 @@
"min_rxtx_delay": { "min_rxtx_delay": {
"$ref": "instance-enb-input-schema.json#/properties/min_rxtx_delay" "$ref": "instance-enb-input-schema.json#/properties/min_rxtx_delay"
}, },
"wendelin_telecom_software_release_url": {
"$ref": "instance-enb-input-schema.json#/properties/wendelin_telecom_software_release_url"
},
"xlog_fluentbit_forward_host": { "xlog_fluentbit_forward_host": {
"$ref": "instance-enb-input-schema.json#/properties/xlog_fluentbit_forward_host" "$ref": "instance-enb-input-schema.json#/properties/xlog_fluentbit_forward_host"
}, },
......
...@@ -199,12 +199,6 @@ ...@@ -199,12 +199,6 @@
are present, replace their generic enb_* counterparts with gnb_* ones #} are present, replace their generic enb_* counterparts with gnb_* ones #}
{%- if enb_mode == 'gnb' %} {%- if enb_mode == 'gnb' %}
{%- set _ = slapparameter_dict %} {%- set _ = slapparameter_dict %}
{%- if 'gnb_config_link' in _ %}
{%- do _.update({
'enb_config_link': _.gnb_config_link,
'enb_config_version': _.get('gnb_config_version'),
}) %}
{%- endif %}
{%- if 'gnb_stats_fetch_period' in _ %} {%- if 'gnb_stats_fetch_period' in _ %}
{%- do _.update({'enb_stats_fetch_period': _.gnb_stats_fetch_period}) %} {%- do _.update({'enb_stats_fetch_period': _.gnb_stats_fetch_period}) %}
{%- endif %} {%- endif %}
...@@ -236,10 +230,13 @@ current-tx-gain = {{ ors_version['current-tx-gain'] }} ...@@ -236,10 +230,13 @@ current-tx-gain = {{ ors_version['current-tx-gain'] }}
current-rx-gain = {{ ors_version['current-rx-gain'] }} current-rx-gain = {{ ors_version['current-rx-gain'] }}
{%- if enb_mode == 'enb' %} {%- if enb_mode == 'enb' %}
current-frequency = {{ xearfcn_module.frequency(ors_version['current-earfcn']) }} MHz
current-band = {{ xearfcn_module.band(ors_version['current-earfcn'])[0]["band"] }}
current-earfcn = {{ ors_version['current-earfcn'] }} current-earfcn = {{ ors_version['current-earfcn'] }}
{%- elif enb_mode == 'gnb' %} {%- elif enb_mode == 'gnb' %}
current-nr-arfcn = {{ ors_version['current-nr-arfcn'] }} current-frequency = {{ xnrarfcn_module.frequency(ors_version['current-nr-arfcn']) }} MHz
current-nr-band = {{ ors_version['current-nr-band'] }} current-nr-band = {{ ors_version['current-nr-band'] }}
current-nr-arfcn = {{ ors_version['current-nr-arfcn'] }}
{%- endif %} {%- endif %}
...@@ -254,3 +251,20 @@ init = ...@@ -254,3 +251,20 @@ init =
del publish['cell-list'] del publish['cell-list']
del publish['peer-list'] del publish['peer-list']
del publish['peer-cell-list'] del publish['peer-cell-list']
# Add custom promise to check if /dev/sdr0 is busy
[frequency-outofbounds-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file = {{ frequency_outofbounds_promise }}
output = ${directory:plugins}/check-frequency-outofbounds.py
{%- if enb_mode == 'enb' %}
config-frequency = {{ xearfcn_module.frequency(ors_version['current-earfcn']) }}
{%- elif enb_mode == 'gnb' %}
config-frequency = {{ xnrarfcn_module.frequency(ors_version['current-nr-arfcn']) }}
{%- endif %}
config-range-rating = {{ ors_version['range'] }}
[buildout]
extra-parts +=
frequency-outofbounds-promise
...@@ -50,6 +50,13 @@ ...@@ -50,6 +50,13 @@
"$ref": "instance-enb-input-schema.json#/properties/gnb_id_bits", "$ref": "instance-enb-input-schema.json#/properties/gnb_id_bits",
"default": 28 "default": 28
}, },
"gtp_addr": {
"$ref": "instance-enb-input-schema.json#/properties/gtp_addr",
"default": "127.0.1.1"
},
"mbmsgw_addr": {
"$ref": "instance-enb-input-schema.json#/properties/mbmsgw_addr"
},
"amf_list": { "amf_list": {
"$ref": "instance-enb-input-schema.json#/properties/amf_list", "$ref": "instance-enb-input-schema.json#/properties/amf_list",
"default": { "default": {
......
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth",
"type": "string",
"enum": [
"1.4 MHz",
"3 MHz",
"5 MHz",
"10 MHz",
"15 MHz",
"20 MHz"
],
"default": "20 MHz"
},
"n_antenna_dl": {
"$ref": "ru/common.json#/properties/n_antenna_dl",
"enum": [
1,
2
],
"default": 2
},
"n_antenna_ul": {
"$ref": "ru/common.json#/properties/n_antenna_ul",
"enum": [
1,
2
],
"default": 2
},
"rf_mode": {
"$ref": "cell/common.json#/properties/rf_mode",
"default": "tdd"
},
"dl_earfcn": {
"$ref": "cell/lte/input-schema.json#/properties/dl_earfcn"
},
"tx_gain": {
"$ref": "ru/common.json#/properties/tx_gain"
},
"rx_gain": {
"$ref": "ru/common.json#/properties/rx_gain"
},
"log_phy_debug": {
"$ref": "instance-enb-input-schema.json#/properties/log_phy_debug"
},
"disable_sdr": {
"default": false,
"title": "Disable SDR",
"description": "Disables radio",
"type": "boolean"
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema",
"description": "Values returned by ORS UE instantiation (stub)",
"type": "object",
"properties": {}
}
{%- set ors_defaults = {
"bandwidth": "20 MHz",
"n_antenna_dl": 2,
"n_antenna_ul": 1,
"rf_mode": "tdd",
"plmn": "00101",
"disable_sdr": false
} %}
{%- for k,v in ors_defaults|dictsort %}
{%- do slapparameter_dict.setdefault(k, v) %}
{%- endfor %}
{#- make real ru/cell/peer/... shared instances to be rejected in ORS mode #}
{%- set ishared_list = slap_configuration.setdefault('slave-instance-list', []) %}
{%- for ishared in ishared_list %}
{%- set _ = json_module.loads(ishared['_']) %}
{%- if 'ru_type' in _ or 'cell_type' in _ %}
{%- do ishared.update({'_': {'REJECT': 1}|tojson}) %}
{%- endif %}
{%- if 'imsi' in _ %}
{%- do _.update({'ue_type': 'lte'}) %}
{%- endif %}
{%- endfor %}
{#- inject ru+cell synthesized from ORS-specific parameters #}
{%- macro iref(name) %}
{{- '%s.%s' % (slap_configuration['instance-title'], name) -}}
{%- endmacro %}
{%- do ishared_list.append({
'slave_title': iref('RU'),
'slave_reference': False,
'_': {
'ru_type': 'sdr',
'ru_link_type': 'sdr',
'sdr_dev_list': [0],
'n_antenna_dl': slapparameter_dict.n_antenna_dl,
'n_antenna_ul': slapparameter_dict.n_antenna_ul,
'tx_gain': ors_version['current-tx-gain'],
'rx_gain': ors_version['current-rx-gain'],
'txrx_active': 'ACTIVE' if (not slapparameter_dict.disable_sdr) else 'INACTIVE',
} |tojson
})
%}
{%- set cell = {
'cell_type': 'lte',
'dl_earfcn': ors_version['current-earfcn'],
'bandwidth': float(slapparameter_dict.bandwidth.removesuffix(' MHz')),
}
%}
{%- do cell.update({
'cell_kind': 'ue',
'rf_mode': slapparameter_dict.rf_mode,
'ru': { 'ru_type': 'ru_ref',
'ru_ref': iref('RU') }
})
%}
{%- do ishared_list.append({
'slave_title': iref('CELL'),
'slave_reference': False,
'_': cell | tojson
})
%}
# code of generic ue
{% include 'instance-ue-base.jinja2.cfg' %}
# let all templates know we are running in ORS mode
[config-base]
context -=
json ors false
context +=
key ors :ors
raw ue_ifup {{ ue_ifup }}
ors = {{ dumps(ors_version) }}
# add ORS-specific bits to published information
[publish-connection-information]
ors-version = {{ ors_version['ors-version'] }}
frequency-range-rating = {{ ors_version['range'] }}
current-tx-power-estimate = {{ ors_version['power-estimate'] }}
current-tx-gain = {{ ors_version['current-tx-gain'] }}
current-rx-gain = {{ ors_version['current-rx-gain'] }}
current-earfcn = {{ ors_version['current-earfcn'] }}
...@@ -10,7 +10,7 @@ enb-epc = $${:obsolete} ...@@ -10,7 +10,7 @@ enb-epc = $${:obsolete}
gnb-epc = $${:obsolete} gnb-epc = $${:obsolete}
epc = $${:obsolete} epc = $${:obsolete}
mme = $${:obsolete} mme = $${:obsolete}
ue = ue = dynamic-template-ors-ue:output
[dynamic-template-obsolete] [dynamic-template-obsolete]
< = jinja2-template-base < = jinja2-template-base
...@@ -30,9 +30,21 @@ filename = instance-enb.cfg ...@@ -30,9 +30,21 @@ filename = instance-enb.cfg
extra-context += extra-context +=
section ors ors-version section ors ors-version
section ors_version ors-version section ors_version ors-version
raw frequency_outofbounds_promise ${frequency_outofbounds_promise:target}
import-list += import-list +=
rawfile instance-enb-base.jinja2.cfg ${template-enb:target} rawfile instance-enb-base.jinja2.cfg ${template-enb:target}
[dynamic-template-ors-ue]
< = dynamic-template-ue
url = ${template-ors-ue:target}
filename = instance-ue.cfg
extra-context +=
section ors ors-version
section ors_version ors-version
raw ue_ifup ${ue-ifup:output}
import-list +=
rawfile instance-ue-base.jinja2.cfg ${template-ue:target}
[ors-version] [ors-version]
recipe = slapos.recipe.build recipe = slapos.recipe.build
configuration = $${slap-configuration:configuration} configuration = $${slap-configuration:configuration}
......
...@@ -58,27 +58,30 @@ service = ${:etc}/service ...@@ -58,27 +58,30 @@ service = ${:etc}/service
promise = ${:etc}/promise promise = ${:etc}/promise
log = ${:var}/log log = ${:var}/log
{% if slapparameter_dict.get("ue_config_link", None) %}
[ue-config-dl]
recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("ue_config_link") }}
version = {{ slapparameter_dict.get("ue_config_version") }}
offline = false
{% endif %}
[lte-ue-sh-wrapper] [lte-ue-sh-wrapper]
recipe = slapos.recipe.template recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_} output = ${directory:bin}/${:_buildout_section_name_}
ue-log = ${directory:log}/ue-output.log ue-log = ${directory:log}/ue-output.log
ue-radio-log = ${directory:log}/ue.log
ue-start-date = ${directory:run}/enb-start.date
inline = inline =
#!/bin/sh #!/bin/sh
{% if not slapparameter_dict.get("testing", False) %} {% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true; sudo /opt/amarisoft/rm-tmp-lte | true;
sudo -n /opt/amarisoft/init-sdr;
sudo -n /opt/amarisoft/init-ue;
stat ${:ue-start-date} && mv ${:ue-radio-log} ${directory:log}/ue-$(cat ${:ue-start-date}).log
rm -f $(ls -1t ${directory:log}/ue-2* | tail -n+50)
date +"%Y-%m-%d-%T" > ${:ue-start-date}
(echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting UE software..." && echo) >> ${:ue-log}; (echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting UE software..." && echo) >> ${:ue-log};
tail -c 1M ${:ue-log} > ${:ue-log}.tmp; tail -c 1M ${:ue-log} > ${:ue-log}.tmp;
mv ${:ue-log}.tmp ${:ue-log}; mv ${:ue-log}.tmp ${:ue-log};
{%- if ors %}
echo "power_on" | sudo -n {{ ue }}/lteue ${directory:etc}/ue.cfg >> ${:ue-log} 2>> ${:ue-log};
{%- else %}
{{ ue }}/lteue ${directory:etc}/ue.cfg >> ${:ue-log} 2>> ${:ue-log}; {{ ue }}/lteue ${directory:etc}/ue.cfg >> ${:ue-log} 2>> ${:ue-log};
{% endif %} {%- endif %}
{%- endif %}
### User Equipment (UE) ### User Equipment (UE)
[lte-ue-service] [lte-ue-service]
...@@ -110,11 +113,7 @@ context = ...@@ -110,11 +113,7 @@ context =
[lte-ue-config] [lte-ue-config]
<= config-base <= config-base
{% if slapparameter_dict.get("ue_config_link", None) %}
url = ${ue-config-dl:target}
{% else %}
url = {{ ue_template }} url = {{ ue_template }}
{% endif %}
output = ${directory:etc}/ue.cfg output = ${directory:etc}/ue.cfg
import-list = import-list =
rawfile slaplte.jinja2 {{ slaplte_template }} rawfile slaplte.jinja2 {{ slaplte_template }}
......
...@@ -127,7 +127,7 @@ title = $${slap-configuration:root-instance-title} ...@@ -127,7 +127,7 @@ title = $${slap-configuration:root-instance-title}
init = init =
import socket import socket
options['hostname'] = socket.gethostname() options['hostname'] = socket.gethostname()
comp_id = '__'.join(options[x] for x in ('hostname', 'computer', 'title')) comp_id = '_'.join(options[x] for x in ('hostname', 'computer', 'title'))
options['comp-id'] = comp_id options['comp-id'] = comp_id
[switch-softwaretype] [switch-softwaretype]
......
import os
import errno
from zope.interface import implementer
from slapos.grid.promise import interface
from slapos.grid.promise.generic import GenericPromise
@implementer(interface.IPromise)
class RunPromise(GenericPromise):
def __init__(self, config):
"""
Called when initialising the promise before testing.
Sets the configuration and the periodicity.
"""
super(RunPromise, self).__init__(config)
self.setPeriodicity(minute=1)
def sense(self):
"""
Called every time the promise is tested.
Signals a positive or negative result.
In this case, check whether the file exists.
"""
frequency = self.getConfig('frequency')
range_rating = self.getConfig('range-rating')
try:
min_frequency = int(range_rating.split('MHz')[0].strip())
max_frequency = int(range_rating.split('-')[1].split('MHz')[0].strip())
except (IndexError, ValueError) as e:
self.logger.info("Range rating not available, skipping the promise")
return
try:
frequency = int(float(frequency))
except ValueError as e:
self.logger.info("Invalid frequency, skipping the promise")
return
if min_frequency <= frequency <= max_frequency:
self.logger.info("Frequency is in bounds ({} MHz <= {} MHz <= {} MHz)".format(
min_frequency,
frequency,
max_frequency))
elif frequency < min_frequency:
self.logger.error("Frequency is lower than the lowest possible frequency on this hardware, please increase it ({} MHz < {} MHz)".format(
frequency,
min_frequency))
else:
self.logger.error("Frequency is higher than the highest possible frequency on this hardware, please increase it ({} MHz > {} MHz)".format(
frequency,
max_frequency))
def test(self):
"""
Called after sense() if the instance is still converging.
Returns success or failure based on sense results.
In this case, fail if the previous sensor result is negative.
"""
return self._test(result_count=1, failure_amount=1)
def anomaly(self):
"""
Called after sense() if the instance has finished converging.
Returns success or failure based on sense results.
Failure signals the instance has diverged.
In this case, fail if two out of the last three results are negative.
"""
return self._anomaly(result_count=1, failure_amount=1)
...@@ -60,6 +60,43 @@ ...@@ -60,6 +60,43 @@
"description": "Defines user IMPI. Must be fully filled with hostname if necessary.", "description": "Defines user IMPI. Must be fully filled with hostname if necessary.",
"type": "string", "type": "string",
"default": "" "default": ""
},
"enable_multicast": {
"default": false,
"title": "Enable IPv4 multicast",
"description": "Set to true to enable IPv4 multicast",
"type": "boolean"
},
"enable_ipv6_multicast": {
"default": false,
"title": "Enable IPv6 multicast",
"description": "Set to true to enable IPv6 multicast",
"type": "boolean"
},
"enable_broadcast": {
"default": false,
"title": "Enable IPv4 broadcast",
"description": "Set to true to enable IPv4 broadcast",
"type": "boolean"
},
"route_list": {
"title": "Route list",
"patternProperties": {
".*": {
"properties": {
"ipv6_remote_addr_prefix": {
"title": "IPv6 remote address prefix",
"type": "string"
},
"prefix_len": {
"title": "Prefix length",
"type": "number"
}
},
"type": "object"
}
},
"type": "object"
} }
} }
} }
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
'slave_reference': False, 'slave_reference': False,
}}) %} }}) %}
{%- endif %} {%- endif %}
{%- else %} {%- else %}
{%- do qother.append(ishared) %} {%- do qother.append(ishared) %}
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
{#- ---- building configuration ---- #} {#- ---- building configuration ---- #}
{#- ru_config emits RF driver configuration for specified Radio Units. #} {#- ru_config emits RF driver configuration for specified Radio Units. #}
{%- macro ru_config(iru_dict, slapparameter_dict) %} {%- macro ru_config(iru_dict, slapparameter_dict, support_gain_in_list) %}
// Radio Units // Radio Units
rf_driver: { rf_driver: {
{%- set dev_argv = [] %} {%- set dev_argv = [] %}
...@@ -513,6 +513,12 @@ ...@@ -513,6 +513,12 @@
}, },
{#- emit tx/rx gain for all channels #} {#- emit tx/rx gain for all channels #}
{%- if support_gain_in_list %}
tx_gain: {{ tx_gainv }}, tx_gain: {{ tx_gainv }},
rx_gain: {{ rx_gainv }}, rx_gain: {{ rx_gainv }},
{%- else %}
tx_gain: {{ tx_gainv[0] }},
rx_gain: {{ rx_gainv[0] }},
{%- endif %}
{%- endmacro %} {%- endmacro %}
...@@ -22,3 +22,18 @@ output = ${buildout:directory}/template.cfg ...@@ -22,3 +22,18 @@ output = ${buildout:directory}/template.cfg
[template-ors-enb] [template-ors-enb]
<= download-base <= download-base
[template-ors-ue]
<= download-base
[ue-ifup]
<= download-base
recipe = slapos.recipe.template:jinja2
url = ${:_profile_base_location_}/${:_update_hash_filename_}
output= ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
context =
section bash bash
[frequency_outofbounds_promise]
<= download-base
...@@ -19,13 +19,30 @@ ...@@ -19,13 +19,30 @@
"response": "instance-ors-gnb-schema.json", "response": "instance-ors-gnb-schema.json",
"index": 2 "index": 2
}, },
"ue": {
"title": "UE",
"software-type": "ue",
"description": "User Equipment Configuration",
"request": "instance-ors-ue-input-schema.json",
"response": "instance-ors-ue-schema.json",
"index": 3
},
"ue-slave": {
"title": "UE Sim Card",
"software-type": "ue",
"description": "User Equipment Sim Card Configuration",
"request": "sim/input-schema.json",
"response": "sim/schema.json",
"shared": true,
"index": 4
},
"core-network": { "core-network": {
"title": "Core Network", "title": "Core Network",
"software-type": "core-network", "software-type": "core-network",
"description": "Core Network Configuration", "description": "Core Network Configuration",
"request": "instance-core-network-input-schema.json", "request": "instance-core-network-input-schema.json",
"response": "instance-core-network-schema.json", "response": "instance-core-network-schema.json",
"index": 3 "index": 5
}, },
"core-network-slave": { "core-network-slave": {
"title": "Core Network Sim Card", "title": "Core Network Sim Card",
...@@ -34,7 +51,7 @@ ...@@ -34,7 +51,7 @@
"request": "sim/input-schema.json", "request": "sim/input-schema.json",
"response": "sim/schema.json", "response": "sim/schema.json",
"shared": true, "shared": true,
"index": 4 "index": 6
} }
} }
} }
Tests for simpleran software release
...@@ -34,7 +34,7 @@ with open("README.md") as f: ...@@ -34,7 +34,7 @@ with open("README.md") as f:
setup( setup(
name=name, name=name,
version=version, version=version,
description="Test for SlapOS' ors-amarisoft", description="Test for SlapOS' simpleran",
long_description=long_description, long_description=long_description,
long_description_content_type='text/markdown', long_description_content_type='text/markdown',
maintainer="Nexedi", maintainer="Nexedi",
......
...@@ -314,12 +314,14 @@ class ENBTestCase4(RFTestCase4): ...@@ -314,12 +314,14 @@ class ENBTestCase4(RFTestCase4):
'enb_id': '0x17', 'enb_id': '0x17',
'gnb_id': '0x23', 'gnb_id': '0x23',
'gnb_id_bits': 30, 'gnb_id_bits': 30,
'mbmsgw_addr': '1.4.3.2',
'gtp_addr': '4.2.3.1',
'mme_list': { 'mme_list': {
'1': {'mme_addr': '1.2.3.4'}, '1': {'mme_addr': '1.2.3.4', 's1ap_bind_addr': '2.1.3.4'},
'2': {'mme_addr': '[abcd:5::1]:78'}, '2': {'mme_addr': '[abcd:5::1]:78'},
}, },
'amf_list': { 'amf_list': {
'1': {'amf_addr': '4.3.2.1:77'}, '1': {'amf_addr': '4.3.2.1:77', 'ngap_bind_addr': '2.1.3.4'},
'2': {'amf_addr': 'dcba:5::1'}, '2': {'amf_addr': 'dcba:5::1'},
}, },
'plmn_list': { 'plmn_list': {
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment