Commit 9ea3e537 authored by Lu Xu's avatar Lu Xu 👀

Update Release Candidate

parents f793c50f ee938d06
[buildout]
extends =
../autoconf/buildout.cfg
../automake/buildout.cfg
parts =
brctl
[brctl]
recipe = slapos.recipe.cmmi
url = https://mirrors.edge.kernel.org/pub/linux/utils/net/bridge-utils/bridge-utils-1.7.1.tar.xz
md5sum = 3e1fee4dc22cac5457c2f6ffb990a518
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:%(PATH)s
pre-configure =
aclocal &&
autoconf
...@@ -25,7 +25,7 @@ configure-options = ...@@ -25,7 +25,7 @@ configure-options =
--disable-fam --disable-fam
--disable-xattr --disable-xattr
--disable-man --disable-man
--with-python=${buildout:executable} --with-python=$PYTHON
environment = environment =
PATH=${gettext:location}/bin:${patch:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s PATH=${gettext:location}/bin:${patch:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${gettext:location}/include -I${zlib:location}/include CPPFLAGS=-I${gettext:location}/include -I${zlib:location}/include
...@@ -34,3 +34,4 @@ environment = ...@@ -34,3 +34,4 @@ environment =
LIBFFI_LIBS= -L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi LIBFFI_LIBS= -L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
PCRE_CFLAGS=-I${pcre:location}/include PCRE_CFLAGS=-I${pcre:location}/include
PCRE_LIBS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -lpcre PCRE_LIBS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -lpcre
post-install = rm %(location)s/bin/gtester-report
[buildout]
extends =
../nftables/buildout.cfg
../util-linux/buildout.cfg
../pkgconfig/buildout.cfg
../openssl/buildout.cfg
../zlib/buildout.cfg
parts =
miniupnpd
[miniupnp-repository]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/miniupnp/miniupnp.git
revision = miniupnpd_2_3_0
git-executable = ${git:location}/bin/git
[miniupnpd]
recipe = slapos.recipe.cmmi
shared = true
path = ${miniupnp-repository:location}/miniupnpd
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${iptables:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig
LDFLAGS=-L${libuuid:location}/lib -L${openssl:location}/lib -L${zlib:location}/lib
# because these configure not support prefix syntax
configure-command = ./configure
configure-options =
--firewall=iptables
make-options =
-f Makefile.linux
make-targets =
install PREFIX=%(location)s
...@@ -16,6 +16,9 @@ parts = ...@@ -16,6 +16,9 @@ parts =
#<= nodejs-X.Y.Z #<= nodejs-X.Y.Z
# nodejs 16 needs gcc > 8.3 # nodejs 16 needs gcc > 8.3
[gcc]
min_version = 8.3
[nodejs-16.13.2] [nodejs-16.13.2]
<= nodejs-base <= nodejs-base
openssl_location = ${openssl:location} openssl_location = ${openssl:location}
......
#!/usr/bin/env python #!/usr/bin/env python3
r"""Command-line tool to format software release JSON for slapos. r"""Command-line tool to format software release JSON for slapos.
Inspired by json.tool from python, but enforcing 2 spaces and non-sorted keys. Inspired by json.tool from python, but enforcing 2 spaces and non-sorted keys.
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = fd556a0cb44610f0b0898b7126bd77b2 md5sum = db7fe97f4c6b84cfadb7b5c68eab517a
[template-instance-beremiz] [template-instance-beremiz]
filename = instance-beremiz.cfg.jinja2.in filename = instance-beremiz.cfg.jinja2.in
...@@ -23,7 +23,7 @@ md5sum = c92317d0d754f62d3259136d1a0df1ac ...@@ -23,7 +23,7 @@ md5sum = c92317d0d754f62d3259136d1a0df1ac
[template-instance-beremiz-test] [template-instance-beremiz-test]
filename = instance-beremiz-test.cfg.jinja2.in filename = instance-beremiz-test.cfg.jinja2.in
md5sum = ff7cf06927041f6aec5ad559950b69cb md5sum = a2fa2b9d3a225a1dd71db67bd4fea769
[template-fluxbox-menu.in] [template-fluxbox-menu.in]
filename = fluxbox-menu.in filename = fluxbox-menu.in
......
...@@ -21,6 +21,13 @@ environment = ...@@ -21,6 +21,13 @@ environment =
XORG_LOCK_DIR=${xserver:lock-dir} XORG_LOCK_DIR=${xserver:lock-dir}
DISPLAY=${xserver:display} DISPLAY=${xserver:display}
[beremiz-env.sh]
# Add openssl needed to build matiec during tests
inline +=
#export OPENSSL_CRYPTO_LIBRARY={{ openssl_location }}/lib
#export OPENSSL_INCLUDE_DIR={{ openssl_location }}/include
export OPENSSL_ROOT_DIR={{ openssl_location }}
[runTestSuite] [runTestSuite]
env.sh = ${beremiz-env.sh:output} env.sh = ${beremiz-env.sh:output}
workdir = {{ nxdtest_dir }} workdir = {{ nxdtest_dir }}
......
...@@ -82,4 +82,5 @@ extra-context = ...@@ -82,4 +82,5 @@ extra-context =
raw instance_nxdtest {{ nxdtest_template }} raw instance_nxdtest {{ nxdtest_template }}
raw xdotool_bin {{ xdotool_location }}/bin/xdotool raw xdotool_bin {{ xdotool_location }}/bin/xdotool
raw opencv_location {{ opencv_location }} raw opencv_location {{ opencv_location }}
raw openssl_location {{ openssl_location }}
raw nxdtest_dir {{ buildout_directory }} raw nxdtest_dir {{ buildout_directory }}
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
# not need these here). # not need these here).
[deploy-script-controller-script] [deploy-script-controller-script]
filename = deploy-script-controller filename = deploy-script-controller
md5sum = 8357771b70efd0740561b1cb46f6955e md5sum = ca83be8dd6ebebe0fa37ec1266330b0d
[template-deploy-test] [template-deploy-test]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 1faa52013b12b1753bcaff0b1309ad90 md5sum = ba11521137356f4361b7d3d304f8fc0c
...@@ -13,10 +13,13 @@ ...@@ -13,10 +13,13 @@
# Format of data-to-vm is shell script: # Format of data-to-vm is shell script:
# URL=<url>\nWAITTIME=<seconds>\nTRIES=<amount> # URL=<url>\nWAITTIME=<seconds>\nTRIES=<amount>
# #
# Expected values in configuration: # MANDATORY values in configuration:
# * URL - the url of the script to download and test # * URL - the url of the script to download and test
# OPTIONAL values in configuration:
# * WAITTIME - waiting time, before next try # * WAITTIME - waiting time, before next try
# * TRIES - amount of tries # * TRIES - amount of tries
# * any other exported variables can be used by the deployment script
# note: you need to export the variables for them to be used in the deployment script
# Possible TODOs: # Possible TODOs:
# * post results on each try # * post results on each try
...@@ -24,9 +27,9 @@ ...@@ -24,9 +27,9 @@
LOG_FILE=/var/log/test-script-deployment.log LOG_FILE=/var/log/test-script-deployment.log
wget -O /tmp/test-script.cfg.$$ -q http://10.0.2.100/data wget -O /tmp/test-script.cfg."$$" -q http://10.0.2.100/data
source /tmp/test-script.cfg.$$ source /tmp/test-script.cfg."$$"
if [ -z "$LOG_FILE" ] ; then if [ -z "$LOG_FILE" ] ; then
echo "Output log file is missing" echo "Output log file is missing"
...@@ -34,79 +37,73 @@ if [ -z "$LOG_FILE" ] ; then ...@@ -34,79 +37,73 @@ if [ -z "$LOG_FILE" ] ; then
fi fi
if [ -z "$URL" ] ; then if [ -z "$URL" ] ; then
echo "URL is missing" >> $LOG_FILE 2>&1 echo "URL is missing." >> "$LOG_FILE" 2>&1
exit 1 exit 1
fi fi
if [ -z "$WAITTIME" ] ; then export WAITTIME=${WAITTIME:-360}
echo "WAITTIME missing" >> $LOG_FILE 2>&1 echo "INFO: WAITTIME is $WAITTIME" >> "$LOG_FILE" 2>&1
exit 1 export TRIES=${TRIES:-80}
fi echo "INFO: TRIES is $TRIES" >> "$LOG_FILE" 2>&1
if [ -z "$TRIES" ] ; then
echo "TRIES missing" >> $LOG_FILE 2>&1
exit 1
fi
DEPLOYMENT_SCRIPT=/tmp/test-script-deployment.bash.$$ DEPLOYMENT_SCRIPT=/tmp/test-script-deployment.bash."$$"
wget -O $DEPLOYMENT_SCRIPT -q $URL wget -O "$DEPLOYMENT_SCRIPT" -q "$URL"
if [[ ! -s "$DEPLOYMENT_SCRIPT" ]] ; then if [[ ! -s "$DEPLOYMENT_SCRIPT" ]] ; then
echo "exit 1" > $DEPLOYMENT_SCRIPT echo "exit 1" > "$DEPLOYMENT_SCRIPT"
fi fi
function add_log () function add_log ()
{ {
LOG_FILE=$1 LOG_FILE="$1"
for f in /opt/slapos/log/slapos-node-{software,instance}.log ; do for f in /opt/slapos/log/slapos-node-{software,instance}.log ; do
echo "Tail of '$f':" >> $LOG_FILE echo "Tail of '$f':" >> "$LOG_FILE"
tail -n 500 $f >> $LOG_FILE tail -n 500 "$f" >> "$LOG_FILE"
done done
} }
function add_checks () function add_checks ()
{ {
LOG_FILE=$1 LOG_FILE="$1"
echo 'lsof -Pni' >> $LOG_FILE 2>&1 echo 'lsof -Pni' >> "$LOG_FILE" 2>&1
lsof -Pni >> $LOG_FILE 2>&1 lsof -Pni >> "$LOG_FILE" 2>&1
echo 'iptables-save' >> $LOG_FILE 2>&1 echo 'iptables-save' >> "$LOG_FILE" 2>&1
iptables-save >> $LOG_FILE 2>&1 iptables-save >> "$LOG_FILE" 2>&1
for f in /tmp/playbook-* ; do echo $f ; cat $f; echo; done >> $LOG_FILE 2>&1 for f in /tmp/playbook-* ; do echo "$f" ; cat "$f"; echo; done >> "$LOG_FILE" 2>&1
echo 'slapos node status' >> $LOG_FILE 2>&1 echo 'slapos node status' >> "$LOG_FILE" 2>&1
slapos node status >> $LOG_FILE 2>&1 slapos node status >> "$LOG_FILE" 2>&1
} }
function upload () function upload ()
{ {
try=$1 try="$1"
LOG_FILE=$2 LOG_FILE="$2"
add_log $LOG_FILE add_log "$LOG_FILE"
add_checks $LOG_FILE add_checks "$LOG_FILE"
t=`date '+%Y%m%d%H%S'` t=`date '+%Y%m%d%H%S'`
mv $LOG_FILE ${LOG_FILE}.$t mv "$LOG_FILE" ${LOG_FILE}."$t"
curl -q -X POST --data-urlencode "path=test-script-result/log-file.log.$t" --data-urlencode "content@${LOG_FILE}.$t" http://10.0.2.100/ curl -q -X POST --data-urlencode "path=test-script-result/log-file.log.$t" --data-urlencode "content@${LOG_FILE}.$t" http://10.0.2.100/
} }
try=1 try=1
while true; do while true; do
echo "$0: Try $try. Running '/bin/bash $DEPLOYMENT_SCRIPT'" >> $LOG_FILE 2>&1 echo "$0: Try $try. Running '/bin/bash $DEPLOYMENT_SCRIPT'" >> "$LOG_FILE" 2>&1
export TEST_YML_PATH /bin/bash "$DEPLOYMENT_SCRIPT" >> "$LOG_FILE" 2>&1
/bin/bash $DEPLOYMENT_SCRIPT >> $LOG_FILE 2>&1 result="$?"
result=$? if [ "$result" == 0 ] ; then
if [ $result == 0 ] ; then echo "$0: Try $try. Script executed successfully." >> "$LOG_FILE" 2>&1
echo "$0: Try $try. Script executed successfully." >> $LOG_FILE 2>&1 upload "$try" "$LOG_FILE"
upload $try $LOG_FILE
break break
fi fi
if (( try > TRIES )) ; then if (( try > TRIES )) ; then
echo "$0: Try $try. Amount of tries $TRIES exceeded, giving up." >> $LOG_FILE 2>&1 echo "$0: Try $try. Amount of tries $TRIES exceeded, giving up." >> $LOG_FILE 2>&1
upload $try $LOG_FILE upload "$try" "$LOG_FILE"
break break
fi fi
# wait WAITTIME before checking the state # wait WAITTIME before checking the state
echo "$0: Try $try. Sleeping $WAITTIME before retry." >> $LOG_FILE 2>&1 echo "$0: Try $try. Sleeping $WAITTIME before retry." >> $LOG_FILE 2>&1
upload $try $LOG_FILE upload "$try" "$LOG_FILE"
sleep $WAITTIME sleep "$WAITTIME"
((try++)) ((try++))
done done
exit $result exit "$result"
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
{% set test_type = slapparameter_dict.get('test-type', 'script-from-url') -%} {% set test_type = slapparameter_dict.get('test-type', 'script-from-url') -%}
{# Choose parameters according to test type -#} {# Choose parameters according to test type -#}
{% if test_type == 'script-from-url' -%} {% if test_type == 'script-from-url' -%}
{% set script_url = slapparameter_dict.get('script-to-test-url') -%} {% set data_to_vm = slapparameter_dict.get('data-to-vm') -%}
{% set test_yml_path = '/not/required' -%}
{% elif test_type == 'cloned-playbook' -%} {% elif test_type == 'cloned-playbook' -%}
{% set script_url = 'http://10.0.2.100/standalone-local-playbook' -%} {% set script_url = 'http://10.0.2.100/standalone-local-playbook' -%}
{% set test_yml_path = slapparameter_dict.get('yml-path-to-test') -%} {% set test_yml_path = slapparameter_dict.get('yml-path-to-test') -%}
...@@ -38,10 +37,7 @@ config-bootstrap-script-url = {{ in_vm_test_script }}#{{ in_vm_test_script_md5 } ...@@ -38,10 +37,7 @@ config-bootstrap-script-url = {{ in_vm_test_script }}#{{ in_vm_test_script_md5 }
# Script configuration # Script configuration
config-data-to-vm = config-data-to-vm =
URL={{ script_url }} {{ data_to_vm }}
WAITTIME={{ waittime }}
TRIES={{ tries }}
TEST_YML_PATH={{ test_yml_path }}
# require HTTP server # require HTTP server
config-enable-http-server = true config-enable-http-server = true
......
...@@ -48,8 +48,6 @@ context = ...@@ -48,8 +48,6 @@ context =
raw bin_directory ${buildout:bin-directory} raw bin_directory ${buildout:bin-directory}
raw in_vm_test_script ${deploy-script-controller-script:location} raw in_vm_test_script ${deploy-script-controller-script:location}
raw in_vm_test_script_md5 ${deploy-script-controller-script:md5sum} raw in_vm_test_script_md5 ${deploy-script-controller-script:md5sum}
raw waittime ${deploy-script-controller-script:waittime}
raw tries ${deploy-script-controller-script:tries}
section test_image_repository test-image-repository section test_image_repository test-image-repository
[test-image-repository] [test-image-repository]
......
...@@ -43,9 +43,6 @@ output = ${buildout:directory}/template-original.kvm.cfg ...@@ -43,9 +43,6 @@ output = ${buildout:directory}/template-original.kvm.cfg
[deploy-script-controller-script] [deploy-script-controller-script]
location = ${:_profile_base_location_}/${:filename} location = ${:_profile_base_location_}/${:filename}
# configuration
waittime = 360
tries = 80
[standalone-local-playbook] [standalone-local-playbook]
filename = standalone-local-playbook filename = standalone-local-playbook
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = f0a12f3abc25713f5c79c9bf13290340 md5sum = 8b275dc35fdb169eca6b087bc32a9286
[template-lte-enb-epc] [template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg _update_hash_filename_ = instance-enb-epc.jinja2.cfg
...@@ -42,6 +42,14 @@ md5sum = 7acdbad30c130faa3bce49b04b2c0c2f ...@@ -42,6 +42,14 @@ md5sum = 7acdbad30c130faa3bce49b04b2c0c2f
_update_hash_filename_ = instance-mme.jinja2.cfg _update_hash_filename_ = instance-mme.jinja2.cfg
md5sum = 728f4d3ae248710c23e4b73eea4d628e md5sum = 728f4d3ae248710c23e4b73eea4d628e
[template-lte-ue-lte]
_update_hash_filename_ = instance-ue-lte.jinja2.cfg
md5sum = 0808194507345550abc37118129fb757
[template-lte-ue-nr]
_update_hash_filename_ = instance-ue-nr.jinja2.cfg
md5sum = ed4112748616803ec0eb3c30bde80856
[ue_db.jinja2.cfg] [ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg filename = config/ue_db.jinja2.cfg
md5sum = dcaac06553a3222b14c0013a13f4a149 md5sum = dcaac06553a3222b14c0013a13f4a149
...@@ -70,6 +78,14 @@ md5sum = 21e24367dd8213a00f6c777df33d5c03 ...@@ -70,6 +78,14 @@ md5sum = 21e24367dd8213a00f6c777df33d5c03
filename = config/ims.jinja2.cfg filename = config/ims.jinja2.cfg
md5sum = 36281b03597252cf75169417d02fc28c md5sum = 36281b03597252cf75169417d02fc28c
[ue-lte.jinja2.cfg]
filename = config/ue-lte.jinja2.cfg
md5sum = ee034558efb3e1fad4687fcd2f448872
[ue-nr.jinja2.cfg]
filename = config/ue-nr.jinja2.cfg
md5sum = 2082bcb28d9be653225ce6db46dc236a
[sdr-busy-promise] [sdr-busy-promise]
_update_hash_filename_ = promise/check_sdr_busy.jinja2.py _update_hash_filename_ = promise/check_sdr_busy.jinja2.py
md5sum = 93dacb1da15310eb70d0815711a06cdf md5sum = 93dacb1da15310eb70d0815711a06cdf
......
{
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",
rue_bind_addr: "{{ pub_info['rue_bind_addr'] }}",
com_addr: "{{ pub_info['com_addr'] }}",
rf_driver: {
name: "sdr",
args: "dev0=/dev/sdr0",
rx_antenna:"tx_rx",
},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_lte_tx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_lte_rx_gain']) }},
cell_groups: [{
multi_ue: true,
cells: [
{
bandwidth: {{ slapparameter_dict.get('n_rb_dl', slap_configuration['configuration.default_lte_n_rb_dl']) }},
dl_earfcn: {{ slapparameter_dict.get('dl_earfcn', slap_configuration['configuration.default_dl_earfcn']) }},
n_antenna_dl: {{ slapparameter_dict.get('n_antenna_dl', slap_configuration['configuration.default_n_antenna_dl']) }},
n_antenna_ul: {{ slapparameter_dict.get('n_antenna_ul', slap_configuration['configuration.default_n_antenna_ul']) }},
global_timing_advance: -1,
}
],
pdcch_decode_opt: false,
pdcch_decode_opt_threshold: 0.1,
}],
ue_list: [
{
imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_lte_imsi']) }}",
K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_lte_k']) }}",
rue_addr: "{{ slapparameter_dict.get('rue_addr') }}",
ue_category: 12,
tun_setup_script: "ue-ifup",
apn: "internet",
}
],
}
{
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",
rue_bind_addr: "{{ pub_info['rue_bind_addr'] }}",
com_addr: "{{ pub_info['com_addr'] }}",
rf_driver: {
name: "sdr",
args: "dev0=/dev/sdr0",
rx_antenna:"tx_rx",
},
tx_gain: {{ slapparameter_dict.get('tx_gain', slap_configuration['configuration.default_nr_tx_gain']) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', slap_configuration['configuration.default_nr_rx_gain']) }},
cell_groups: [{
group_type: "nr",
multi_ue: false,
cells: [{
rf_port: 0,
bandwidth: {{ slapparameter_dict.get('nr_bandwidth', slap_configuration['configuration.default_nr_bandwidth']) }},
band: {{ slapparameter_dict.get('nr_band', slap_configuration['configuration.default_nr_band']) }},
dl_nr_arfcn: {{ slapparameter_dict.get('dl_nr_arfcn', slap_configuration['configuration.default_dl_nr_arfcn']) }},
ssb_nr_arfcn: {{ slapparameter_dict.get('ssb_nr_arfcn', slap_configuration['configuration.default_ssb_nr_arfcn']) }},
subcarrier_spacing: 30,
n_antenna_dl: {{ slapparameter_dict.get('n_antenna_dl', slap_configuration['configuration.default_n_antenna_dl']) }},
n_antenna_ul: {{ slapparameter_dict.get('n_antenna_ul', slap_configuration['configuration.default_n_antenna_ul']) }},
}
],
}],
ue_list: [
{
imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_nr_imsi']) }}",
K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_nr_k']) }}",
rue_addr: "{{ slapparameter_dict.get('rue_addr') }}",
as_release: 15,
ue_category: "nr",
tun_setup_script: "ue-ifup",
apn: "internet",
}
]
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 78
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 40
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 38350
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 78
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 40
},
"dl_nr_arfcn": {
"title": "DL NR ARFCN",
"description": "Downlink NR Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 378000
},
"nr_band": {
"title": "NR band",
"description": "NR band number",
"type": "number",
"default": 39
},
"nr_bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth (in MHz)",
"type": "number",
"default": 40
},
"ssb_nr_arfcn": {
"title": "SSB NR ARFCN",
"description": "SSB NR ARFCN, you can retrieve from ENB/GNB side",
"type": "number",
"default": 377790
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 78
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 40
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 38050
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 78
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 40
},
"dl_nr_arfcn": {
"title": "DL NR ARFCN",
"description": "Downlink NR Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 520000
},
"nr_band": {
"title": "NR band",
"description": "NR band number",
"type": "number",
"default": 38
},
"nr_bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth (in MHz)",
"type": "number",
"default": 40
},
"ssb_nr_arfcn": {
"title": "SSB NR ARFCN",
"description": "SSB NR ARFCN, you can retrieve from ENB/GNB side",
"type": "number",
"default": 517930
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 78
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 40
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 42590
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 78
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 40
},
"dl_nr_arfcn": {
"title": "DL NR ARFCN",
"description": "Downlink NR Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 632628
},
"nr_band": {
"title": "NR band",
"description": "NR band number",
"type": "number",
"default": 78
},
"nr_bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth (in MHz)",
"type": "number",
"default": 40
},
"ssb_nr_arfcn": {
"title": "SSB NR ARFCN",
"description": "SSB NR ARFCN, you can retrieve from ENB/GNB side",
"type": "number",
"default": 632544
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 78
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 40
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 44590
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": 100
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": 78
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": 40
},
"dl_nr_arfcn": {
"title": "DL NR ARFCN",
"description": "Downlink NR Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": 646666
},
"nr_band": {
"title": "NR band",
"description": "NR band number",
"type": "number",
"default": 78
},
"nr_bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth (in MHz)",
"type": "number",
"default": 40
},
"ssb_nr_arfcn": {
"title": "SSB NR ARFCN",
"description": "SSB NR ARFCN, you can retrieve from ENB/GNB side",
"type": "number",
"default": 646656
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": 2
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "001010123456789"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "00112233445566778899aabbccddeeff"
}
}
}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": {{ default_lte_tx_gain }}
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": {{ default_lte_rx_gain }}
},
"dl_earfcn": {
"title": "DL EARFCN",
"description": "Downlink E-UTRA Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": {{ default_dl_earfcn }}
},
"n_rb_dl": {
"title": "DL RB",
"description": "number of DL resource blocks",
"type": "number",
"default": {{ default_lte_n_rb_dl }}
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": {{ default_n_antenna_dl }}
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": {{ default_n_antenna_ul }}
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "{{ default_lte_imsi }}"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "{{ default_lte_k }}"
}
}
}
[buildout]
parts =
directory
ltelogs
lte-ue-lte-config
lte-ue-service
sdr-busy-promise
monitor-base
publish-connection-information
extends = {{ monitor_template }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }}
partition = {{ slap_connection['partition-id'] }}
url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
configuration.default_dl_earfcn = {{ default_dl_earfcn }}
configuration.default_lte_n_rb_dl = {{ default_lte_n_rb_dl }}
configuration.default_lte_tx_gain = {{ default_lte_tx_gain }}
configuration.default_lte_rx_gain = {{ default_lte_rx_gain }}
configuration.default_n_antenna_dl = {{ default_n_antenna_dl }}
configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
configuration.default_lte_imsi = {{ default_lte_imsi }}
configuration.default_lte_k = {{default_lte_k}}
[directory]
recipe = slapos.cookbook:mkdirectory
software = {{ buildout_directory }}
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
etc = ${:home}/etc
bin = ${:home}/bin
tmp = ${:home}/tmp
run = ${:var}/run
script = ${:etc}/run
service = ${:etc}/service
promise = ${:etc}/promise
log = ${:var}/log
[ltelogs]
recipe = slapos.recipe.template:jinja2
url = {{ ltelogs_template }}
output = ${directory:home}/ltelogs.sh
extensions = jinja2.ext.do
context =
section directory directory
{% if slapparameter_dict.get("ue_lte_config_link", None) %}
[ue-lte-config-dl]
recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("ue_lte_config_link") }}
version = {{ slapparameter_dict.get("ue_lte_config_version") }}
offline = false
{% endif %}
[lte-ue-sh-wrapper]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true;
{{ ue }}/lteue ${directory:etc}/ue.cfg >> ${directory:log}/ue-output.log 2>> ${directory:log}/ue-output.log
{% endif %}
### User Equipment (UE)
[lte-ue-service]
recipe = slapos.cookbook:wrapper
init = ${ltelogs:output} ${directory:log}/ue.log; sleep 2
command-line = ${lte-ue-sh-wrapper:output}
wrapper-path = ${directory:service}/lte-ue
mode = 0775
reserve-cpu = True
pidfile = ${directory:run}/ue.pid
hash-files =
${lte-ue-lte-config:output}
${lte-ue-sh-wrapper:output}
environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[config-base]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
context =
section directory directory
section slap_configuration slap-configuration
section pub_info publish-connection-information
key slapparameter_dict slap-configuration:configuration
[lte-ue-lte-config]
<= config-base
{% if slapparameter_dict.get("ue_lte_config_link", None) %}
url = ${ue-lte-config-dl:target}
{% else %}
url = {{ ue_lte_template }}
{% endif %}
output = ${directory:etc}/ue.cfg
[publish-connection-information]
<= monitor-publish
recipe = slapos.cookbook:publish.serialised
rue_bind_addr = ${slap-configuration:ipv6-random}
com_addr = [${slap-configuration:ipv6-random}]:9002
[monitor-instance-parameter]
{% if slapparameter_dict.get("name", None) %}
monitor-title = {{ slapparameter_dict['name'] | string }}
{% endif %}
{% if slapparameter_dict.get("monitor-password", None) %}
password = {{ slapparameter_dict['monitor-password'] | string }}
{% endif %}
[sdr-busy-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ sdr_busy_promise }}
output = ${directory:etc}/check-sdr-busy.py
extensions = jinja2.ext.do
context =
key slapparameter_dict slap-configuration:configuration
# Add custom promise to check if /dev/sdr0 is busy
[sdr-busy-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file = ${sdr-busy-promise-template:output}
output = ${directory:plugins}/check-sdr-busy.py
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"rue_addr": {
"title": "[Required] Remote UE address",
"description": "[Required] Address of remote UE server. Default port is 2152.",
"type": "string",
"default": ""
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
"type": "number",
"default": {{ default_nr_tx_gain }}
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number",
"default": {{ default_nr_rx_gain }}
},
"dl_nr_arfcn": {
"title": "DL NR ARFCN",
"description": "Downlink NR Absolute Radio Frequency Channel Number of the cell",
"type": "number",
"default": {{ default_dl_nr_arfcn }}
},
"nr_band": {
"title": "NR band",
"description": "NR band number",
"type": "number",
"default": {{ default_nr_band }}
},
"nr_bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth (in MHz)",
"type": "number",
"default": {{ default_nr_bandwidth }}
},
"ssb_nr_arfcn": {
"title": "SSB NR ARFCN",
"description": "SSB NR ARFCN, you can retrieve from ENB/GNB side",
"type": "number",
"default": {{ default_ssb_nr_arfcn }}
},
"n_antenna_dl": {
"title": "Number of DL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of DL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": {{ default_n_antenna_dl }}
},
"n_antenna_ul": {
"title": "Number of UL antennas",
"description": "Enumeration: 1, 2, 4 or 8. Number of UL antennas. It must be the same for all NB-IoT and LTE cells sharing the same RF port.",
"type": "number",
"default": {{ default_n_antenna_ul }}
},
"imsi": {
"title": "IMSI",
"description": "IMSI",
"type": "string",
"default": "{{ default_nr_imsi }}"
},
"k": {
"title": "K",
"description": "Set the user secret key (as a 16 bytes hexadecimal string, or eventually 32 bytes hexadecimal string for TUAK).",
"type": "string",
"default": "{{ default_nr_k }}"
}
}
}
[buildout]
parts =
directory
ltelogs
lte-ue-nr-config
lte-ue-service
sdr-busy-promise
monitor-base
publish-connection-information
extends = {{ monitor_template }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }}
partition = {{ slap_connection['partition-id'] }}
url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
configuration.default_dl_nr_arfcn = {{ default_dl_nr_arfcn }}
configuration.default_nr_bandwidth = {{ default_nr_bandwidth }}
configuration.default_nr_band = {{ default_nr_band}}
configuration.default_nr_tx_gain = {{ default_nr_tx_gain }}
configuration.default_nr_rx_gain = {{ default_nr_rx_gain }}
configuration.default_ssb_nr_arfcn = {{ default_ssb_nr_arfcn }}
configuration.default_n_antenna_dl = {{ default_n_antenna_dl }}
configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
configuration.default_nr_imsi = {{ default_nr_imsi }}
configuration.default_nr_k = {{ default_nr_k }}
[directory]
recipe = slapos.cookbook:mkdirectory
software = {{ buildout_directory }}
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
etc = ${:home}/etc
bin = ${:home}/bin
tmp = ${:home}/tmp
run = ${:var}/run
script = ${:etc}/run
service = ${:etc}/service
promise = ${:etc}/promise
log = ${:var}/log
[ltelogs]
recipe = slapos.recipe.template:jinja2
url = {{ ltelogs_template }}
output = ${directory:home}/ltelogs.sh
extensions = jinja2.ext.do
context =
section directory directory
{% if slapparameter_dict.get("ue_nr_config_link", None) %}
[ue-nr-config-dl]
recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("ue_nr_config_link") }}
version = {{ slapparameter_dict.get("ue_nr_config_version") }}
offline = false
{% endif %}
[lte-ue-sh-wrapper]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true;
{{ ue }}/lteue ${directory:etc}/ue.cfg >> ${directory:log}/ue-output.log 2>> ${directory:log}/ue-output.log
{% endif %}
### User Equipment (UE)
[lte-ue-service]
recipe = slapos.cookbook:wrapper
init = ${ltelogs:output} ${directory:log}/ue.log; sleep 2
command-line = ${lte-ue-sh-wrapper:output}
wrapper-path = ${directory:service}/lte-ue
mode = 0775
reserve-cpu = True
pidfile = ${directory:run}/ue.pid
hash-files =
${lte-ue-nr-config:output}
${lte-ue-sh-wrapper:output}
environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[config-base]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
context =
section directory directory
section slap_configuration slap-configuration
section pub_info publish-connection-information
key slapparameter_dict slap-configuration:configuration
[lte-ue-nr-config]
<= config-base
{% if slapparameter_dict.get("ue_nr_config_link", None) %}
url = ${ue-nr-config-dl:target}
{% else %}
url = {{ ue_nr_template }}
{% endif %}
output = ${directory:etc}/ue.cfg
[publish-connection-information]
<= monitor-publish
recipe = slapos.cookbook:publish.serialised
rue_bind_addr = ${slap-configuration:ipv6-random}
com_addr = [${slap-configuration:ipv6-random}]:9002
[monitor-instance-parameter]
{% if slapparameter_dict.get("name", None) %}
monitor-title = {{ slapparameter_dict['name'] | string }}
{% endif %}
{% if slapparameter_dict.get("monitor-password", None) %}
password = {{ slapparameter_dict['monitor-password'] | string }}
{% endif %}
[sdr-busy-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ sdr_busy_promise }}
output = ${directory:etc}/check-sdr-busy.py
extensions = jinja2.ext.do
context =
key slapparameter_dict slap-configuration:configuration
# Add custom promise to check if /dev/sdr0 is busy
[sdr-busy-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file = ${sdr-busy-promise-template:output}
output = ${directory:plugins}/check-sdr-busy.py
...@@ -39,6 +39,7 @@ init = ...@@ -39,6 +39,7 @@ init =
options['enb'] = path + "/enb" options['enb'] = path + "/enb"
options['mme'] = path + "/mme" options['mme'] = path + "/mme"
options['ims'] = path + "/ims" options['ims'] = path + "/ims"
options['ue'] = path + "/ue"
[ethernet-ip] [ethernet-ip]
recipe = slapos.recipe.build recipe = slapos.recipe.build
...@@ -61,6 +62,8 @@ epc = dynamic-template-lte-epc:output ...@@ -61,6 +62,8 @@ epc = dynamic-template-lte-epc:output
enb = dynamic-template-lte-enb:output enb = dynamic-template-lte-enb:output
gnb = dynamic-template-lte-gnb:output gnb = dynamic-template-lte-gnb:output
mme = dynamic-template-lte-mme:output mme = dynamic-template-lte-mme:output
ue-lte = dynamic-template-lte-ue-lte:output
ue-nr = dynamic-template-lte-ue-nr:output
RootSoftwareInstance = $${:enb-epc} RootSoftwareInstance = $${:enb-epc}
[dynamic-template-lte-enb-epc] [dynamic-template-lte-enb-epc]
...@@ -71,7 +74,7 @@ extensions = jinja2.ext.do ...@@ -71,7 +74,7 @@ extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:output} raw monitor_template ${monitor2-template:output}
key slave_instance_list slap-configuration:slave-instance-list key slave_instance_list slap-configuration:slave-instance-list
[dynamic-template-lte-gnb-epc] [dynamic-template-lte-gnb-epc]
< = jinja2-template-base < = jinja2-template-base
url = ${template-lte-gnb-epc:target} url = ${template-lte-gnb-epc:target}
...@@ -89,7 +92,7 @@ extensions = jinja2.ext.do ...@@ -89,7 +92,7 @@ extensions = jinja2.ext.do
extra-context = extra-context =
raw monitor_template ${monitor2-template:output} raw monitor_template ${monitor2-template:output}
key slave_instance_list slap-configuration:slave-instance-list key slave_instance_list slap-configuration:slave-instance-list
[dynamic-template-lte-enb] [dynamic-template-lte-enb]
< = jinja2-template-base < = jinja2-template-base
url = ${template-lte-enb:target} url = ${template-lte-enb:target}
...@@ -151,6 +154,53 @@ extra-context = ...@@ -151,6 +154,53 @@ extra-context =
raw iperf3_location ${iperf3:location} raw iperf3_location ${iperf3:location}
key ue_db_path ue-db-config:output key ue_db_path ue-db-config:output
[dynamic-template-lte-ue-lte]
< = jinja2-template-base
url = ${template-lte-ue-lte:target}
filename = instance-lte-ue-lte.cfg
extensions = jinja2.ext.do
extra-context =
raw monitor_template ${monitor2-template:output}
raw interface_up_promise ${interface-up-promise:target}
key ue amarisoft:ue
raw ue_lte_template ${ue-lte.jinja2.cfg:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw sdr_busy_promise ${sdr-busy-promise:target}
raw openssl_location ${openssl:location}
raw default_dl_earfcn ${enb:default-dl-earfcn}
raw default_lte_dl_freq ${enb:default-lte-dl-freq}
raw default_lte_n_rb_dl ${enb:default-lte-n-rb-dl}
raw default_lte_tx_gain ${enb:default-lte-tx-gain}
raw default_lte_rx_gain ${enb:default-lte-rx-gain}
raw default_n_antenna_dl ${enb:default-n-antenna-dl}
raw default_n_antenna_ul ${enb:default-n-antenna-ul}
raw default_lte_imsi ${enb:default-lte-imsi}
raw default_lte_k ${enb:default-lte-k}
[dynamic-template-lte-ue-nr]
< = jinja2-template-base
url = ${template-lte-ue-nr:target}
filename = instance-lte-ue-nr.cfg
extensions = jinja2.ext.do
extra-context =
raw monitor_template ${monitor2-template:output}
raw interface_up_promise ${interface-up-promise:target}
key ue amarisoft:ue
raw ue_nr_template ${ue-nr.jinja2.cfg:target}
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw sdr_busy_promise ${sdr-busy-promise:target}
raw openssl_location ${openssl:location}
raw default_dl_nr_arfcn ${enb:default-dl-nr-arfcn}
raw default_nr_band ${enb:default-nr-band}
raw default_nr_bandwidth ${enb:default-nr-bandwidth}
raw default_nr_tx_gain ${enb:default-nr-tx-gain}
raw default_nr_rx_gain ${enb:default-nr-rx-gain}
raw default_n_antenna_dl ${enb:default-n-antenna-dl}
raw default_n_antenna_ul ${enb:default-n-antenna-ul}
raw default_nr_imsi ${enb:default-nr-imsi}
raw default_nr_k ${enb:default-nr-k}
raw default_ssb_nr_arfcn ${enb:default-ssb-nr-arfcn}
[ue-db-config] [ue-db-config]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
url = ${ue_db.jinja2.cfg:target} url = ${ue_db.jinja2.cfg:target}
......
...@@ -7,10 +7,17 @@ import os ...@@ -7,10 +7,17 @@ import os
LTE_N_RB_DL=100 LTE_N_RB_DL=100
LTE_TX_GAIN=78 LTE_TX_GAIN=78
LTE_RX_GAIN=40 LTE_RX_GAIN=40
LTE_IMSI="001010123456789"
LTE_K="00112233445566778899aabbccddeeff"
NR_BANDWIDTH=40 NR_BANDWIDTH=40
NR_TX_GAIN=78 NR_TX_GAIN=78
NR_RX_GAIN=40 NR_RX_GAIN=40
NR_IMSI="001010123456789"
NR_K="00112233445566778899aabbccddeeff"
N_ANTENNA_DL=2
N_ANTENNA_UL=2
global_context = { global_context = {
'generated_file_message': "This file was generated using a jinja2 template and the render-templates script, don't modify directly." 'generated_file_message': "This file was generated using a jinja2 template and the render-templates script, don't modify directly."
...@@ -26,6 +33,8 @@ rf_mode_context_list = [ ...@@ -26,6 +33,8 @@ rf_mode_context_list = [
'default_lte_n_rb_dl': LTE_N_RB_DL, 'default_lte_n_rb_dl': LTE_N_RB_DL,
'default_lte_tx_gain': LTE_TX_GAIN, 'default_lte_tx_gain': LTE_TX_GAIN,
'default_lte_rx_gain': LTE_RX_GAIN, 'default_lte_rx_gain': LTE_RX_GAIN,
'default_lte_imsi': LTE_IMSI,
'default_lte_k': LTE_K,
'default_dl_nr_arfcn': 378000, 'default_dl_nr_arfcn': 378000,
'default_nr_band': 39, 'default_nr_band': 39,
...@@ -34,9 +43,14 @@ rf_mode_context_list = [ ...@@ -34,9 +43,14 @@ rf_mode_context_list = [
'default_nr_tx_gain': NR_TX_GAIN, 'default_nr_tx_gain': NR_TX_GAIN,
'default_nr_rx_gain': NR_RX_GAIN, 'default_nr_rx_gain': NR_RX_GAIN,
'default_nr_ssb_pos_bitmap': "1000", 'default_nr_ssb_pos_bitmap': "1000",
'default_ssb_nr_arfcn': 377790,
'default_nr_imsi': NR_IMSI,
'default_nr_k': NR_K,
'min_frequency': 1880.0, 'min_frequency': 1880.0,
'max_frequency': 1920, 'max_frequency': 1920,
'default_n_antenna_dl': N_ANTENNA_DL,
'default_n_antenna_ul': N_ANTENNA_UL,
}, { }, {
'rf_mode': 'tdd2600', 'rf_mode': 'tdd2600',
...@@ -46,6 +60,8 @@ rf_mode_context_list = [ ...@@ -46,6 +60,8 @@ rf_mode_context_list = [
'default_lte_n_rb_dl': LTE_N_RB_DL, 'default_lte_n_rb_dl': LTE_N_RB_DL,
'default_lte_tx_gain': LTE_TX_GAIN, 'default_lte_tx_gain': LTE_TX_GAIN,
'default_lte_rx_gain': LTE_RX_GAIN, 'default_lte_rx_gain': LTE_RX_GAIN,
'default_lte_imsi': LTE_IMSI,
'default_lte_k': LTE_K,
'default_dl_nr_arfcn': 520000, 'default_dl_nr_arfcn': 520000,
'default_nr_band': 38, 'default_nr_band': 38,
...@@ -54,9 +70,14 @@ rf_mode_context_list = [ ...@@ -54,9 +70,14 @@ rf_mode_context_list = [
'default_nr_tx_gain': NR_TX_GAIN, 'default_nr_tx_gain': NR_TX_GAIN,
'default_nr_rx_gain': NR_RX_GAIN, 'default_nr_rx_gain': NR_RX_GAIN,
'default_nr_ssb_pos_bitmap': "10000000", 'default_nr_ssb_pos_bitmap': "10000000",
'default_ssb_nr_arfcn': 517930,
'default_nr_imsi': NR_IMSI,
'default_nr_k': NR_K,
'min_frequency': 2570, 'min_frequency': 2570,
'max_frequency': 2620, 'max_frequency': 2620,
'default_n_antenna_dl': N_ANTENNA_DL,
'default_n_antenna_ul': N_ANTENNA_UL,
}, { }, {
'rf_mode': 'tdd3500', 'rf_mode': 'tdd3500',
...@@ -66,6 +87,8 @@ rf_mode_context_list = [ ...@@ -66,6 +87,8 @@ rf_mode_context_list = [
'default_lte_n_rb_dl': LTE_N_RB_DL, 'default_lte_n_rb_dl': LTE_N_RB_DL,
'default_lte_tx_gain': LTE_TX_GAIN, 'default_lte_tx_gain': LTE_TX_GAIN,
'default_lte_rx_gain': LTE_RX_GAIN, 'default_lte_rx_gain': LTE_RX_GAIN,
'default_lte_imsi': LTE_IMSI,
'default_lte_k': LTE_K,
'default_dl_nr_arfcn': 632628, 'default_dl_nr_arfcn': 632628,
'default_nr_band': 78, 'default_nr_band': 78,
...@@ -74,9 +97,14 @@ rf_mode_context_list = [ ...@@ -74,9 +97,14 @@ rf_mode_context_list = [
'default_nr_tx_gain': NR_TX_GAIN, 'default_nr_tx_gain': NR_TX_GAIN,
'default_nr_rx_gain': NR_RX_GAIN, 'default_nr_rx_gain': NR_RX_GAIN,
'default_nr_ssb_pos_bitmap': "10000000", 'default_nr_ssb_pos_bitmap': "10000000",
'default_ssb_nr_arfcn': 632544,
'default_nr_imsi': NR_IMSI,
'default_nr_k': NR_K,
'min_frequency': 3400, 'min_frequency': 3400,
'max_frequency': 3600, 'max_frequency': 3600,
'default_n_antenna_dl': N_ANTENNA_DL,
'default_n_antenna_ul': N_ANTENNA_UL,
}, { }, {
'rf_mode': 'tdd3700', 'rf_mode': 'tdd3700',
...@@ -86,6 +114,8 @@ rf_mode_context_list = [ ...@@ -86,6 +114,8 @@ rf_mode_context_list = [
'default_lte_n_rb_dl': LTE_N_RB_DL, 'default_lte_n_rb_dl': LTE_N_RB_DL,
'default_lte_tx_gain': LTE_TX_GAIN, 'default_lte_tx_gain': LTE_TX_GAIN,
'default_lte_rx_gain': LTE_RX_GAIN, 'default_lte_rx_gain': LTE_RX_GAIN,
'default_lte_imsi': LTE_IMSI,
'default_lte_k': LTE_K,
'default_dl_nr_arfcn': 646666, 'default_dl_nr_arfcn': 646666,
'default_nr_band': 78, 'default_nr_band': 78,
...@@ -94,9 +124,14 @@ rf_mode_context_list = [ ...@@ -94,9 +124,14 @@ rf_mode_context_list = [
'default_nr_tx_gain': NR_TX_GAIN, 'default_nr_tx_gain': NR_TX_GAIN,
'default_nr_rx_gain': NR_RX_GAIN, 'default_nr_rx_gain': NR_RX_GAIN,
'default_nr_ssb_pos_bitmap': "10000000", 'default_nr_ssb_pos_bitmap': "10000000",
'default_ssb_nr_arfcn': 646656,
'default_nr_imsi': NR_IMSI,
'default_nr_k': NR_K,
'min_frequency': 3600, 'min_frequency': 3600,
'max_frequency': 3800, 'max_frequency': 3800,
'default_n_antenna_dl': N_ANTENNA_DL,
'default_n_antenna_ul': N_ANTENNA_UL,
} }
] ]
...@@ -106,6 +141,10 @@ with open('instance-enb-input-schema.jinja2.json', 'r') as f: ...@@ -106,6 +141,10 @@ with open('instance-enb-input-schema.jinja2.json', 'r') as f:
instance_enb_json_template = Template(f.read()) instance_enb_json_template = Template(f.read())
with open('instance-gnb-input-schema.jinja2.json', 'r') as f: with open('instance-gnb-input-schema.jinja2.json', 'r') as f:
instance_gnb_json_template = Template(f.read()) instance_gnb_json_template = Template(f.read())
with open('instance-ue-lte-input-schema.jinja2.json', 'r') as f:
instance_ue_lte_json_template = Template(f.read())
with open('instance-ue-nr-input-schema.jinja2.json', 'r') as f:
instance_ue_nr_json_template = Template(f.read())
with open('software.jinja2.cfg', 'r') as f: with open('software.jinja2.cfg', 'r') as f:
software_template = Template(f.read()) software_template = Template(f.read())
with open('test/test.jinja2.py', 'r') as f: with open('test/test.jinja2.py', 'r') as f:
...@@ -121,12 +160,17 @@ for rf_mode_context in rf_mode_context_list: ...@@ -121,12 +160,17 @@ for rf_mode_context in rf_mode_context_list:
with open('software-{}.cfg'.format(rf_mode_context['rf_mode']), with open('software-{}.cfg'.format(rf_mode_context['rf_mode']),
'w+') as f: 'w+') as f:
f.write(software_template.render(**rf_mode_context, **global_context) + '\n') f.write(software_template.render(**rf_mode_context, **global_context) + '\n')
for software_type in ['enb', 'enb-epc', 'gnb', 'gnb-epc']: for software_type in ['enb', 'enb-epc', 'gnb', 'gnb-epc', 'ue-lte', 'ue-nr']:
with open('instance-{}-{}-input-schema.json'.format( with open('instance-{}-{}-input-schema.json'.format(
rf_mode_context['rf_mode'], rf_mode_context['rf_mode'],
software_type), software_type),
'w+') as f: 'w+') as f:
if software_type in ['enb', 'enb-epc']: if software_type in ['enb', 'enb-epc']:
f.write(instance_enb_json_template.render(**rf_mode_context, **global_context, epc='epc' in software_type) + '\n') f.write(instance_enb_json_template.render(**rf_mode_context, **global_context, epc='epc' in software_type) + '\n')
else: elif software_type in ['gnb', 'gnb-epc']:
f.write(instance_gnb_json_template.render(**rf_mode_context, **global_context, epc='epc' in software_type) + '\n') f.write(instance_gnb_json_template.render(**rf_mode_context, **global_context, epc='epc' in software_type) + '\n')
elif software_type in ['ue-lte']:
f.write(instance_ue_lte_json_template.render(**rf_mode_context, **global_context) + '\n')
else:
f.write(instance_ue_nr_json_template.render(**rf_mode_context, **global_context) + '\n')
...@@ -10,6 +10,8 @@ default-lte-band = 39 ...@@ -10,6 +10,8 @@ default-lte-band = 39
default-lte-n-rb-dl = 100 default-lte-n-rb-dl = 100
default-lte-tx-gain = 78 default-lte-tx-gain = 78
default-lte-rx-gain = 40 default-lte-rx-gain = 40
default-lte-imsi = 001010123456789
default-lte-k = 00112233445566778899aabbccddeeff
default-dl-nr-arfcn = 378000 default-dl-nr-arfcn = 378000
default-nr-band = 39 default-nr-band = 39
...@@ -18,6 +20,11 @@ default-nr-bandwidth = 40 ...@@ -18,6 +20,11 @@ default-nr-bandwidth = 40
default-nr-tx-gain = 78 default-nr-tx-gain = 78
default-nr-rx-gain = 40 default-nr-rx-gain = 40
default-nr-ssb-pos-bitmap = 1000 default-nr-ssb-pos-bitmap = 1000
default-ssb-nr-arfcn = 377790
default-nr-imsi = 001010123456789
default-nr-k = 00112233445566778899aabbccddeeff
min-frequency = 1880.0 min-frequency = 1880.0
max-frequency = 1920 max-frequency = 1920
default-n-antenna-dl =2
default-n-antenna-ul =2
...@@ -69,6 +69,22 @@ ...@@ -69,6 +69,22 @@
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
"shared": true, "shared": true,
"index": 7 "index": 7
},
"ue-lte": {
"title": "UE-LTE",
"description": "UE LTE Configuration",
"software-type": "ue-lte",
"request": "instance-tdd1900-ue-lte-input-schema.json",
"response": "instance-tdd1900-ue-lte-schema.json",
"index": 8
},
"ue-nr": {
"title": "UE-NR",
"description": "UE NR Configuration",
"software-type": "ue-nr",
"request": "instance-tdd1900-ue-nr-input-schema.json",
"response": "instance-tdd1900-ue-nr-schema.json",
"index": 9
} }
} }
} }
...@@ -10,6 +10,8 @@ default-lte-band = 38 ...@@ -10,6 +10,8 @@ default-lte-band = 38
default-lte-n-rb-dl = 100 default-lte-n-rb-dl = 100
default-lte-tx-gain = 78 default-lte-tx-gain = 78
default-lte-rx-gain = 40 default-lte-rx-gain = 40
default-lte-imsi = 001010123456789
default-lte-k = 00112233445566778899aabbccddeeff
default-dl-nr-arfcn = 520000 default-dl-nr-arfcn = 520000
default-nr-band = 38 default-nr-band = 38
...@@ -18,6 +20,11 @@ default-nr-bandwidth = 40 ...@@ -18,6 +20,11 @@ default-nr-bandwidth = 40
default-nr-tx-gain = 78 default-nr-tx-gain = 78
default-nr-rx-gain = 40 default-nr-rx-gain = 40
default-nr-ssb-pos-bitmap = 10000000 default-nr-ssb-pos-bitmap = 10000000
default-ssb-nr-arfcn = 517930
default-nr-imsi = 001010123456789
default-nr-k = 00112233445566778899aabbccddeeff
min-frequency = 2570 min-frequency = 2570
max-frequency = 2620 max-frequency = 2620
default-n-antenna-dl =2
default-n-antenna-ul =2
...@@ -69,6 +69,22 @@ ...@@ -69,6 +69,22 @@
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
"shared": true, "shared": true,
"index": 7 "index": 7
},
"ue-lte": {
"title": "UE-LTE",
"description": "UE LTE Configuration",
"software-type": "ue-lte",
"request": "instance-tdd2600-ue-lte-input-schema.json",
"response": "instance-tdd2600-ue-lte-schema.json",
"index": 8
},
"ue-nr": {
"title": "UE-NR",
"description": "UE NR Configuration",
"software-type": "ue-nr",
"request": "instance-tdd2600-ue-nr-input-schema.json",
"response": "instance-tdd2600-ue-nr-schema.json",
"index": 9
} }
} }
} }
...@@ -10,6 +10,8 @@ default-lte-band = 42 ...@@ -10,6 +10,8 @@ default-lte-band = 42
default-lte-n-rb-dl = 100 default-lte-n-rb-dl = 100
default-lte-tx-gain = 78 default-lte-tx-gain = 78
default-lte-rx-gain = 40 default-lte-rx-gain = 40
default-lte-imsi = 001010123456789
default-lte-k = 00112233445566778899aabbccddeeff
default-dl-nr-arfcn = 632628 default-dl-nr-arfcn = 632628
default-nr-band = 78 default-nr-band = 78
...@@ -18,6 +20,11 @@ default-nr-bandwidth = 40 ...@@ -18,6 +20,11 @@ default-nr-bandwidth = 40
default-nr-tx-gain = 78 default-nr-tx-gain = 78
default-nr-rx-gain = 40 default-nr-rx-gain = 40
default-nr-ssb-pos-bitmap = 10000000 default-nr-ssb-pos-bitmap = 10000000
default-ssb-nr-arfcn = 632544
default-nr-imsi = 001010123456789
default-nr-k = 00112233445566778899aabbccddeeff
min-frequency = 3400 min-frequency = 3400
max-frequency = 3600 max-frequency = 3600
default-n-antenna-dl =2
default-n-antenna-ul =2
...@@ -69,6 +69,22 @@ ...@@ -69,6 +69,22 @@
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
"shared": true, "shared": true,
"index": 7 "index": 7
},
"ue-lte": {
"title": "UE-LTE",
"description": "UE LTE Configuration",
"software-type": "ue-lte",
"request": "instance-tdd3500-ue-lte-input-schema.json",
"response": "instance-tdd3500-ue-lte-schema.json",
"index": 8
},
"ue-nr": {
"title": "UE-NR",
"description": "UE NR Configuration",
"software-type": "ue-nr",
"request": "instance-tdd3500-ue-nr-input-schema.json",
"response": "instance-tdd3500-ue-nr-schema.json",
"index": 9
} }
} }
} }
...@@ -10,6 +10,8 @@ default-lte-band = 43 ...@@ -10,6 +10,8 @@ default-lte-band = 43
default-lte-n-rb-dl = 100 default-lte-n-rb-dl = 100
default-lte-tx-gain = 78 default-lte-tx-gain = 78
default-lte-rx-gain = 40 default-lte-rx-gain = 40
default-lte-imsi = 001010123456789
default-lte-k = 00112233445566778899aabbccddeeff
default-dl-nr-arfcn = 646666 default-dl-nr-arfcn = 646666
default-nr-band = 78 default-nr-band = 78
...@@ -18,6 +20,11 @@ default-nr-bandwidth = 40 ...@@ -18,6 +20,11 @@ default-nr-bandwidth = 40
default-nr-tx-gain = 78 default-nr-tx-gain = 78
default-nr-rx-gain = 40 default-nr-rx-gain = 40
default-nr-ssb-pos-bitmap = 10000000 default-nr-ssb-pos-bitmap = 10000000
default-ssb-nr-arfcn = 646656
default-nr-imsi = 001010123456789
default-nr-k = 00112233445566778899aabbccddeeff
min-frequency = 3600 min-frequency = 3600
max-frequency = 3800 max-frequency = 3800
default-n-antenna-dl =2
default-n-antenna-ul =2
...@@ -69,6 +69,22 @@ ...@@ -69,6 +69,22 @@
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
"shared": true, "shared": true,
"index": 7 "index": 7
},
"ue-lte": {
"title": "UE-LTE",
"description": "UE LTE Configuration",
"software-type": "ue-lte",
"request": "instance-tdd3700-ue-lte-input-schema.json",
"response": "instance-tdd3700-ue-lte-schema.json",
"index": 8
},
"ue-nr": {
"title": "UE-NR",
"description": "UE NR Configuration",
"software-type": "ue-nr",
"request": "instance-tdd3700-ue-nr-input-schema.json",
"response": "instance-tdd3700-ue-nr-schema.json",
"index": 9
} }
} }
} }
...@@ -17,6 +17,8 @@ parts += ...@@ -17,6 +17,8 @@ parts +=
enb.jinja2.cfg enb.jinja2.cfg
gnb.jinja2.cfg gnb.jinja2.cfg
ue_db.jinja2.cfg ue_db.jinja2.cfg
ue-lte.jinja2.cfg
ue-nr.jinja2.cfg
sib23.asn sib23.asn
iperf3 iperf3
# unimplemented parts - the http monitor and better log handling using logrotate # unimplemented parts - the http monitor and better log handling using logrotate
...@@ -51,6 +53,12 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_} ...@@ -51,6 +53,12 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template-lte-mme] [template-lte-mme]
<= download-base <= download-base
[template-lte-ue-lte]
<= download-base
[template-lte-ue-nr]
<= download-base
[sdr-busy-promise] [sdr-busy-promise]
<= download-base <= download-base
...@@ -86,3 +94,9 @@ filename = mme.jinja2.cfg ...@@ -86,3 +94,9 @@ filename = mme.jinja2.cfg
[ims.jinja2.cfg] [ims.jinja2.cfg]
<= copy-config-to-instance <= copy-config-to-instance
filename = ims.jinja2.cfg filename = ims.jinja2.cfg
[ue-lte.jinja2.cfg]
<= copy-config-to-instance
filename = ue-lte.jinja2.cfg
[ue-nr.jinja2.cfg]
<= copy-config-to-instance
filename = ue-nr.jinja2.cfg
...@@ -69,6 +69,22 @@ ...@@ -69,6 +69,22 @@
"response": "instance-epc-slave-schema.json", "response": "instance-epc-slave-schema.json",
"shared": true, "shared": true,
"index": 7 "index": 7
},
"ue-lte": {
"title": "UE-LTE",
"description": "UE LTE Configuration",
"software-type": "ue-lte",
"request": "instance-{{ rf_mode }}-ue-lte-input-schema.json",
"response": "instance-{{ rf_mode }}-ue-lte-schema.json",
"index": 8
},
"ue-nr": {
"title": "UE-NR",
"description": "UE NR Configuration",
"software-type": "ue-nr",
"request": "instance-{{ rf_mode }}-ue-nr-input-schema.json",
"response": "instance-{{ rf_mode }}-ue-nr-schema.json",
"index": 9
} }
} }
} }
...@@ -10,6 +10,8 @@ default-lte-band = {{ default_lte_band }} ...@@ -10,6 +10,8 @@ default-lte-band = {{ default_lte_band }}
default-lte-n-rb-dl = {{ default_lte_n_rb_dl }} default-lte-n-rb-dl = {{ default_lte_n_rb_dl }}
default-lte-tx-gain = {{ default_lte_tx_gain }} default-lte-tx-gain = {{ default_lte_tx_gain }}
default-lte-rx-gain = {{ default_lte_rx_gain }} default-lte-rx-gain = {{ default_lte_rx_gain }}
default-lte-imsi = {{ default_lte_imsi }}
default-lte-k = {{ default_lte_k }}
default-dl-nr-arfcn = {{ default_dl_nr_arfcn }} default-dl-nr-arfcn = {{ default_dl_nr_arfcn }}
default-nr-band = {{ default_nr_band }} default-nr-band = {{ default_nr_band }}
...@@ -18,6 +20,11 @@ default-nr-bandwidth = {{ default_nr_bandwidth }} ...@@ -18,6 +20,11 @@ default-nr-bandwidth = {{ default_nr_bandwidth }}
default-nr-tx-gain = {{ default_nr_tx_gain }} default-nr-tx-gain = {{ default_nr_tx_gain }}
default-nr-rx-gain = {{ default_nr_rx_gain }} default-nr-rx-gain = {{ default_nr_rx_gain }}
default-nr-ssb-pos-bitmap = {{ default_nr_ssb_pos_bitmap }} default-nr-ssb-pos-bitmap = {{ default_nr_ssb_pos_bitmap }}
default-ssb-nr-arfcn = {{ default_ssb_nr_arfcn }}
default-nr-imsi = {{ default_nr_imsi }}
default-nr-k = {{ default_nr_k }}
min-frequency = {{ min_frequency }} min-frequency = {{ min_frequency }}
max-frequency = {{ max_frequency }} max-frequency = {{ max_frequency }}
default-n-antenna-dl ={{ default_n_antenna_dl }}
default-n-antenna-ul ={{ default_n_antenna_ul }}
...@@ -140,6 +140,23 @@ epc_param_dict = { ...@@ -140,6 +140,23 @@ epc_param_dict = {
'epc_plmn': '00102', 'epc_plmn': '00102',
} }
ue_param_dict = {
'testing': True,
'tx_gain': 17,
'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'dl_nr_arfcn': 325320,
'nr_band': 99,
'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase):
def test_sim_card(self): def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self) test_ue_db(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-lte"
def test_ue_lte_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-nr"
def test_ue_nr_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain'])
...@@ -140,6 +140,23 @@ epc_param_dict = { ...@@ -140,6 +140,23 @@ epc_param_dict = {
'epc_plmn': '00102', 'epc_plmn': '00102',
} }
ue_param_dict = {
'testing': True,
'tx_gain': 17,
'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'dl_nr_arfcn': 325320,
'nr_band': 99,
'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase):
def test_sim_card(self): def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self) test_ue_db(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-lte"
def test_ue_lte_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-nr"
def test_ue_nr_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain'])
...@@ -140,6 +140,23 @@ epc_param_dict = { ...@@ -140,6 +140,23 @@ epc_param_dict = {
'epc_plmn': '00102', 'epc_plmn': '00102',
} }
ue_param_dict = {
'testing': True,
'tx_gain': 17,
'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'dl_nr_arfcn': 325320,
'nr_band': 99,
'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase):
def test_sim_card(self): def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self) test_ue_db(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-lte"
def test_ue_lte_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-nr"
def test_ue_nr_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain'])
...@@ -140,6 +140,23 @@ epc_param_dict = { ...@@ -140,6 +140,23 @@ epc_param_dict = {
'epc_plmn': '00102', 'epc_plmn': '00102',
} }
ue_param_dict = {
'testing': True,
'tx_gain': 17,
'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'dl_nr_arfcn': 325320,
'nr_band': 99,
'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase):
def test_sim_card(self): def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self) test_ue_db(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-lte"
def test_ue_lte_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-nr"
def test_ue_nr_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain'])
...@@ -140,6 +140,23 @@ epc_param_dict = { ...@@ -140,6 +140,23 @@ epc_param_dict = {
'epc_plmn': '00102', 'epc_plmn': '00102',
} }
ue_param_dict = {
'testing': True,
'tx_gain': 17,
'rx_gain': 17,
'dl_earfcn': 325320,
'n_rb_dl': 50,
'dl_nr_arfcn': 325320,
'nr_band': 99,
'nr_bandwidth': 50,
'ssb_nr_arfcn': 377790,
'imsi': "001010123456789",
'k': "00112233445566778899aabbccddeeff",
'rue_addr': "192.168.99.88",
'n_antenna_dl': 2,
'n_antenna_ul': 2,
}
def test_enb_conf(self): def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase): ...@@ -309,3 +326,52 @@ class TestGNBEPCSimCard(ORSTestCase):
def test_sim_card(self): def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self) test_ue_db(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-lte"
def test_ue_lte_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], ue_param_dict['dl_earfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['n_rb_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], ue_param_dict['rx_gain'])
class TestUENRParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(ue_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "ue-nr"
def test_ue_nr_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], ue_param_dict['ssb_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], ue_param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], ue_param_dict['nr_bandwidth'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], ue_param_dict['nr_band'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], ue_param_dict['n_antenna_dl'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], ue_param_dict['n_antenna_ul'])
self.assertEqual(conf['ue_list'][0]['rue_addr'],ue_param_dict['rue_addr'])
self.assertEqual(conf['ue_list'][0]['imsi'], ue_param_dict['imsi'])
self.assertEqual(conf['ue_list'][0]['K'], ue_param_dict['k'])
self.assertEqual(conf['tx_gain'], ue_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'],ue_param_dict['rx_gain'])
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 3112bf86fa543df52548a551f5413f99 md5sum = a8bd56d112344ae56138e3a775fec478
...@@ -87,12 +87,26 @@ repository = ${slapos.rebootstrap-repository:location} ...@@ -87,12 +87,26 @@ repository = ${slapos.rebootstrap-repository:location}
<= download-source <= download-source
repository = ${rubygemsrecipe-repository:location} repository = ${rubygemsrecipe-repository:location}
[re6stnet]
<= download-source
repository = ${re6stnet-repository:location}
[re6stnet-test-runner]
recipe = slapos.recipe.template:jinja2
template = inline:#!/bin/sh
#change #!/usr/bin/python2 -> #!/real_python_path/bin/pythonVersion
sed '1s?/usr/bin/python2?${python:location}/bin/python${python:version}?' -i ${re6stnet-repository:location}/re6st/ovpn-*
# update files in /sys/class/net
mount -t sysfs sysfs /sys
python -m unittest discover -v
rendered = $${re6stnet:location}/test-runner.sh
[slapos-test-runner-nxdtest-environment.sh] [slapos-test-runner-nxdtest-environment.sh]
recipe = slapos.recipe.template recipe = slapos.recipe.template
output = $${create-directory:etc}/$${:_buildout_section_name_} output = $${create-directory:etc}/$${:_buildout_section_name_}
inline = inline =
export PATH=${coreutils:location}/bin:${curl:location}/bin:${openssl:location}/bin:${jq:location}/bin:${sed:location}/bin:${grep:location}/bin:${git:location}/bin:${libxslt:location}/bin:${socat:location}/bin:${lmsensors:location}/bin:${rsync:location}/bin/:${buildout:bin-directory}:$PATH export PATH=${coreutils:location}/bin:${curl:location}/bin:${openssl:location}/bin:${jq:location}/bin:${sed:location}/bin:${grep:location}/bin:${git:location}/bin:${libxslt:location}/bin:${socat:location}/bin:${lmsensors:location}/bin:${rsync:location}/bin/:${iptables:location}/sbin:${miniupnpd:location}/usr/sbin:${brctl:location}/sbin:${openvpn:location}/sbin:${babeld:location}/bin:${buildout:bin-directory}:$PATH
export SLAPOS_TEST_IPV4=$${slap-configuration:ipv4-random} export SLAPOS_TEST_IPV4=$${slap-configuration:ipv4-random}
export SLAPOS_TEST_IPV6=$${slap-configuration:ipv6-random} export SLAPOS_TEST_IPV6=$${slap-configuration:ipv6-random}
export SLAPOS_TEST_EGGS_DIRECTORY=$${buildout:eggs-directory} export SLAPOS_TEST_EGGS_DIRECTORY=$${buildout:eggs-directory}
...@@ -105,6 +119,7 @@ recipe = slapos.recipe.template ...@@ -105,6 +119,7 @@ recipe = slapos.recipe.template
output = $${:workdir}/.nxdtest output = $${:workdir}/.nxdtest
workdir = $${create-directory:nxdtest-working-dir} workdir = $${create-directory:nxdtest-working-dir}
inline = inline =
import six
TestCase( TestCase(
"kedifa", "kedifa",
['python', '-m', 'unittest', 'discover', '-v'], ['python', '-m', 'unittest', 'discover', '-v'],
...@@ -199,6 +214,14 @@ inline = ...@@ -199,6 +214,14 @@ inline =
cwd="""$${rubygemsrecipe:location}""", cwd="""$${rubygemsrecipe:location}""",
summaryf=UnitTest.summary, summaryf=UnitTest.summary,
) )
if six.PY2:
TestCase(
"re6stnet",
['unshare', '-Umnr', '$${re6stnet-test-runner:rendered}'],
cwd="""$${re6stnet:location}/re6st/tests""",
summaryf=UnitTest.summary,
)
[runTestSuite] [runTestSuite]
env.sh = $${slapos-test-runner-nxdtest-environment.sh:output} env.sh = $${slapos-test-runner-nxdtest-environment.sh:output}
......
...@@ -4,3 +4,7 @@ extends = ...@@ -4,3 +4,7 @@ extends =
[python] [python]
part = python2.7 part = python2.7
[extra-eggs]
eggs +=
${re6stnet-setup:egg}
...@@ -19,6 +19,11 @@ extends = ...@@ -19,6 +19,11 @@ extends =
../../component/userhosts/buildout.cfg ../../component/userhosts/buildout.cfg
../../component/postgresql/buildout.cfg ../../component/postgresql/buildout.cfg
../../component/psycopg2/buildout.cfg ../../component/psycopg2/buildout.cfg
../../component/nftables/buildout.cfg
../../component/miniupnpd/buildout.cfg
../../component/openvpn/buildout.cfg
../../component/babeld/buildout.cfg
../../component/bridge-utils/buildout.cfg
../../stack/slapos.cfg ../../stack/slapos.cfg
../../stack/caucase/buildout.cfg ../../stack/caucase/buildout.cfg
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
...@@ -116,6 +121,14 @@ setup = ${slapos.rebootstrap-repository:location} ...@@ -116,6 +121,14 @@ setup = ${slapos.rebootstrap-repository:location}
egg = rubygemsrecipe[test] egg = rubygemsrecipe[test]
setup = ${rubygemsrecipe-repository:location} setup = ${rubygemsrecipe-repository:location}
[re6stnet-setup]
<= setup-develop-egg
egg = re6stnet[test]
setup = ${re6stnet-repository:location}
[extra-eggs]
eggs =
[eggs] [eggs]
<= python-interpreter <= python-interpreter
eggs += eggs +=
...@@ -142,6 +155,7 @@ eggs += ...@@ -142,6 +155,7 @@ eggs +=
${rubygemsrecipe-setup:egg} ${rubygemsrecipe-setup:egg}
zope.testing zope.testing
supervisor supervisor
${extra-eggs:eggs}
[eggs/scripts] [eggs/scripts]
recipe = zc.recipe.egg recipe = zc.recipe.egg
...@@ -215,6 +229,10 @@ repository = https://lab.nexedi.com/nexedi/slapos.rebootstrap.git ...@@ -215,6 +229,10 @@ repository = https://lab.nexedi.com/nexedi/slapos.rebootstrap.git
<= git-clone-repository <= git-clone-repository
repository = https://lab.nexedi.com/nexedi/rubygemsrecipe.git repository = https://lab.nexedi.com/nexedi/rubygemsrecipe.git
[re6stnet-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/re6stnet.git
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
...@@ -253,3 +271,8 @@ zope.testing = 4.6.2 ...@@ -253,3 +271,8 @@ zope.testing = 4.6.2
pathlib = 1.0.1 pathlib = 1.0.1
psycopg2 = 2.8.6 psycopg2 = 2.8.6
iniparse = 0.5 iniparse = 0.5
miniupnpc = 1.9
nemu = 0.3.1
multiping = 1.1.2
python-passfd = 0.2
python-unshare = 0.2
#!/usr/bin/env python #!/usr/bin/env python3
""" """
Helper script to update buildout.hash.cfg Helper script to update buildout.hash.cfg
......
#!/usr/bin/env python #!/usr/bin/env python3
import argparse import argparse
import json import json
import os.path import os.path
......
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