Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos
Commits
d62ca771
Commit
d62ca771
authored
Feb 16, 2024
by
Thomas Gambier
Browse files
Options
Browse Files
Download
Plain Diff
Update Release Candidate
parents
d6e69812
73f44633
Changes
78
Show whitespace changes
Inline
Side-by-side
Showing
78 changed files
with
1639 additions
and
1525 deletions
+1639
-1525
component/ZODB/buildout.cfg
component/ZODB/buildout.cfg
+1
-1
component/coreutils/buildout.cfg
component/coreutils/buildout.cfg
+5
-8
component/helloweb/buildout.cfg
component/helloweb/buildout.cfg
+1
-1
component/jupyter-py2/buildout.cfg
component/jupyter-py2/buildout.cfg
+0
-1
component/pygolang/test.cfg
component/pygolang/test.cfg
+0
-3
component/python3/buildout.cfg
component/python3/buildout.cfg
+2
-2
component/ruby/buildout.cfg
component/ruby/buildout.cfg
+1
-1
software/dufs/software.cfg
software/dufs/software.cfg
+2
-2
software/end-to-end-testing/tests/test_lopcomm.py
software/end-to-end-testing/tests/test_lopcomm.py
+244
-0
software/end-to-end-testing/tests/test_ors.py
software/end-to-end-testing/tests/test_ors.py
+222
-0
software/erp5-zope2/software.cfg
software/erp5-zope2/software.cfg
+3
-0
software/gitlab/buildout.hash.cfg
software/gitlab/buildout.hash.cfg
+3
-3
software/gitlab/gitlab-parameters.cfg
software/gitlab/gitlab-parameters.cfg
+1
-1
software/gitlab/instance-gitlab.cfg.in
software/gitlab/instance-gitlab.cfg.in
+19
-3
software/gitlab/instance.cfg.in
software/gitlab/instance.cfg.in
+1
-16
software/gitlab/software.cfg
software/gitlab/software.cfg
+4
-4
software/metabase/software.cfg
software/metabase/software.cfg
+2
-2
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+20
-24
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+375
-346
software/ors-amarisoft/config/sib23.jinja2.asn
software/ors-amarisoft/config/sib23.jinja2.asn
+2
-2
software/ors-amarisoft/config/ue-nr.jinja2.cfg
software/ors-amarisoft/config/ue-nr.jinja2.cfg
+0
-47
software/ors-amarisoft/config/ue.jinja2.cfg
software/ors-amarisoft/config/ue.jinja2.cfg
+39
-17
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+40
-14
software/ors-amarisoft/instance-gnb.jinja2.cfg
software/ors-amarisoft/instance-gnb.jinja2.cfg
+0
-330
software/ors-amarisoft/instance-ors-enb.jinja2.cfg
software/ors-amarisoft/instance-ors-enb.jinja2.cfg
+61
-0
software/ors-amarisoft/instance-ors.cfg
software/ors-amarisoft/instance-ors.cfg
+172
-0
software/ors-amarisoft/instance-ue-nr.jinja2.cfg
software/ors-amarisoft/instance-ue-nr.jinja2.cfg
+0
-140
software/ors-amarisoft/instance-ue.jinja2.cfg
software/ors-amarisoft/instance-ue.jinja2.cfg
+25
-11
software/ors-amarisoft/instance.cfg
software/ors-amarisoft/instance.cfg
+19
-205
software/ors-amarisoft/ru/libinstance.jinja2.cfg
software/ors-amarisoft/ru/libinstance.jinja2.cfg
+21
-4
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
+10
-4
software/ors-amarisoft/slaplte.jinja2
software/ors-amarisoft/slaplte.jinja2
+34
-0
software/ors-amarisoft/slapos-render-config.py
software/ors-amarisoft/slapos-render-config.py
+55
-11
software/ors-amarisoft/software-base.cfg
software/ors-amarisoft/software-base.cfg
+4
-14
software/ors-amarisoft/software-fdd-ors.cfg
software/ors-amarisoft/software-fdd-ors.cfg
+1
-1
software/ors-amarisoft/software-ors.cfg
software/ors-amarisoft/software-ors.cfg
+21
-0
software/ors-amarisoft/software-tdd-ors.cfg
software/ors-amarisoft/software-tdd-ors.cfg
+1
-1
software/ors-amarisoft/software.jinja2.cfg
software/ors-amarisoft/software.jinja2.cfg
+4
-0
software/ors-amarisoft/test/setup.py
software/ors-amarisoft/test/setup.py
+1
-0
software/ors-amarisoft/test/test.jinja2.py
software/ors-amarisoft/test/test.jinja2.py
+23
-37
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+38
-0
software/ors-amarisoft/test/testFDD-LOPCOMM.py
software/ors-amarisoft/test/testFDD-LOPCOMM.py
+19
-37
software/ors-amarisoft/test/testFDD-ORS.py
software/ors-amarisoft/test/testFDD-ORS.py
+19
-37
software/ors-amarisoft/test/testFDD.py
software/ors-amarisoft/test/testFDD.py
+19
-37
software/ors-amarisoft/test/testTDD-M2RU.py
software/ors-amarisoft/test/testTDD-M2RU.py
+19
-37
software/ors-amarisoft/test/testTDD-ORS.py
software/ors-amarisoft/test/testTDD-ORS.py
+19
-37
software/ors-amarisoft/test/testTDD.py
software/ors-amarisoft/test/testTDD.py
+19
-37
software/osie-coupler/buildout.hash.cfg
software/osie-coupler/buildout.hash.cfg
+1
-1
software/osie-coupler/instance.cfg.in
software/osie-coupler/instance.cfg.in
+3
-4
software/osie-coupler/software.cfg
software/osie-coupler/software.cfg
+11
-2
software/rapid-cdn/buildout.hash.cfg
software/rapid-cdn/buildout.hash.cfg
+2
-2
software/rapid-cdn/instance-frontend.cfg.in
software/rapid-cdn/instance-frontend.cfg.in
+2
-0
software/rapid-cdn/instance.cfg.in
software/rapid-cdn/instance.cfg.in
+1
-1
software/rapid-cdn/test/test.py
software/rapid-cdn/test/test.py
+6
-1
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultDefaultSlave.test_file_list_plugin.txt
...nableHttp2ByDefaultDefaultSlave.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultDefaultSlaveGlobalDisableHttp2.test_file_list_plugin.txt
...tDefaultSlaveGlobalDisableHttp2.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultFalseSlave.test_file_list_plugin.txt
...tEnableHttp2ByDefaultFalseSlave.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultFalseSlaveGlobalDisableHttp2.test_file_list_plugin.txt
...ultFalseSlaveGlobalDisableHttp2.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestMasterAIKCDisabledAIBCCDisabledRequest.test_file_list_plugin.txt
...IKCDisabledAIBCCDisabledRequest.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestMasterRequest.test_file_list_plugin.txt
...est_data/test.TestMasterRequest.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestMasterRequestDomain.test_file_list_plugin.txt
...ta/test.TestMasterRequestDomain.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestRe6stVerificationUrlDefaultSlave.test00cluster_request_instance_parameter_dict.txt
...ltSlave.test00cluster_request_instance_parameter_dict.txt
+2
-0
software/rapid-cdn/test/test_data/test.TestRe6stVerificationUrlSlave.test00cluster_request_instance_parameter_dict.txt
...rlSlave.test00cluster_request_instance_parameter_dict.txt
+2
-0
software/rapid-cdn/test/test_data/test.TestReplicateSlave.test_file_list_plugin.txt
...st_data/test.TestReplicateSlave.test_file_list_plugin.txt
+0
-2
software/rapid-cdn/test/test_data/test.TestSlave.test_file_list_plugin.txt
...n/test/test_data/test.TestSlave.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestSlaveCiphers.test_file_list_plugin.txt
...test_data/test.TestSlaveCiphers.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_plugin.txt
...est.TestSlaveGlobalDisableHttp2.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestSlaveHealthCheck.test_file_list_plugin.txt
..._data/test.TestSlaveHealthCheck.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestSlaveHostHaproxyClash.test_file_list_plugin.txt
.../test.TestSlaveHostHaproxyClash.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestSlaveHttp3.test_file_list_plugin.txt
...t/test_data/test.TestSlaveHttp3.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibility.test_file_list_plugin.txt
...SMasterCertificateCompatibility.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibilityOverrideMaster.test_file_list_plugin.txt
...cateCompatibilityOverrideMaster.test_file_list_plugin.txt
+0
-1
software/rapid-cdn/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibilityUpdate.test_file_list_plugin.txt
...rCertificateCompatibilityUpdate.test_file_list_plugin.txt
+0
-1
software/slapos-sr-testing/software.cfg
software/slapos-sr-testing/software.cfg
+1
-2
software/slapos-testing/software.cfg
software/slapos-testing/software.cfg
+0
-1
software/theia/test/project_tests.py
software/theia/test/project_tests.py
+8
-8
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+1
-2
stack/slapos.cfg
stack/slapos.cfg
+8
-5
No files found.
component/ZODB/buildout.cfg
View file @
d62ca771
...
...
@@ -58,7 +58,7 @@ egg-versions =
[ZODB5]
<= _ZODB
egg-versions =
ZODB = 5.8.
0
ZODB = 5.8.
1
transaction = 3.0.1
...
...
component/coreutils/buildout.cfg
View file @
d62ca771
[buildout]
extends =
../gmp/buildout.cfg
../patch/buildout.cfg
../perl/buildout.cfg
../xz-utils/buildout.cfg
parts =
...
...
@@ -16,15 +17,11 @@ configure-options =
--without-selinux
--prefix=@@LOCATION@@
environment =
PATH=${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${p
atch:location}/bin:${p
erl:location}/bin:${xz-utils:location}/bin:%(PATH)s
LDFLAGS=-Wl,--as-needed -L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib
# Latest version of command split in coreutils is not working in gitlab backup
# For more details, see: https://lab.nexedi.com/nexedi/slapos/merge_requests/1503/diffs#note_197515
[coreutils-9.1]
<= coreutils
url = https://ftp.gnu.org/gnu/coreutils/coreutils-9.1.tar.xz
md5sum = 8b1ca4e018a7dce9bb937faec6618671
patches =
https://github.com/coreutils/coreutils/commit/c4c5ed8f4e9cd55a12966d4f520e3a13101637d9.patch#b6810d7559ffbc5e24636a860f02e836
patch-options = -p1
[coreutils-output]
# Shared binary location to ease migration
...
...
component/helloweb/buildout.cfg
View file @
d62ca771
...
...
@@ -24,7 +24,7 @@ parts =
<= go-git-package
go.importpath = lab.nexedi.com/nexedi/helloweb
repository = https://lab.nexedi.com/nexedi/helloweb.git
revision =
a7c788ae7
1
revision =
1d9bcbe
1
[gowork]
install =
...
...
component/jupyter-py2/buildout.cfg
View file @
d62ca771
...
...
@@ -79,7 +79,6 @@ tornado = 4.4.2
nbconvert = 4.1.0
pathlib2 = 2.2.1
patsy = 0.4.1
pexpect = 4.2.1
scandir = 1.5
wcwidth = 0.1.7
jupyter-console = 5.1.0
component/pygolang/test.cfg
View file @
d62ca771
...
...
@@ -52,10 +52,7 @@ inline =
ipython = 5.10.0
ipython-genutils = 0.2.0
simplegeneric = 0.8.1
Pygments = 2.5.2
prompt-toolkit = 1.0.18
pickleshare = 0.7.5
pexpect = 4.8.0
backports.shutil-get-terminal-size = 1.0.0
ptyprocess = 0.6.0
component/python3/buildout.cfg
View file @
d62ca771
...
...
@@ -78,5 +78,5 @@ md5sum = 8847dc6458d1431d0ae0f55942deeb89
[python3.11]
<= python3-common
version = 3.11
package_version = 3.11.
5
md5sum =
393856f1b7713aa8bba4b642ab9985d
3
package_version = 3.11.
8
md5sum =
b353b8433e560e1af2b130f56dfbd97
3
component/ruby/buildout.cfg
View file @
d62ca771
...
...
@@ -27,7 +27,7 @@ environment =
[ruby2.6]
<= ruby-common
url = http://ftp.ruby-lang.org/pub/ruby/2.6/ruby-2.6.5.tar.xz
url = http
s
://ftp.ruby-lang.org/pub/ruby/2.6/ruby-2.6.5.tar.xz
md5sum = b8a4e2bdbb76485c3d6690e57be67750
[ruby]
...
...
software/dufs/software.cfg
View file @
d62ca771
...
...
@@ -13,8 +13,8 @@ parts =
[dufs]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/sigoden/dufs/archive/refs/tags/v0.
39
.0.tar.gz
md5sum =
e0fca35530c043c5dff7fcbe415ed35d
url = https://github.com/sigoden/dufs/archive/refs/tags/v0.
40
.0.tar.gz
md5sum =
3b71b3d07af69d6ba92c054625dc0dd2
configure-command = :
make-binary = cargo install --root=%(location)s --path . --locked
make-targets =
...
...
software/end-to-end-testing/tests/test_lopcomm.py
0 → 100644
View file @
d62ca771
import
json
import
time
import
slapos.testing.e2e
as
e2e
from
websocket
import
create_connection
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
@
classmethod
def
setUpClass
(
cls
):
try
:
super
().
setUpClass
()
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-cb003-enb-%Y-%B-%d-%H:%M:%S'
)
cls
.
cn_instance_name
=
time
.
strftime
(
'e2e-cb003-core-network-%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
.
product
=
"/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg"
cls
.
ue_product
=
"/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg"
# Component GUIDs and configurations
cls
.
comp_enb
=
"COMP-3920"
cls
.
comp_cn
=
"COMP-3920"
cls
.
comp_ue
=
"COMP-3756"
cls
.
dl_earfcn
=
300
# Retry configurations
cls
.
max_retries
=
10
cls
.
retry_delay
=
180
# seconds
# Setup instances
cls
.
setup_instances
()
cls
.
waitUntilGreen
(
cls
.
enb_instance_name
)
cls
.
waitUntilGreen
(
cls
.
cn_instance_name
)
except
Exception
as
e
:
cls
.
logger
.
error
(
"Error during setup: "
+
str
(
e
))
# Ensure cleanup
cls
.
tearDownClass
()
raise
@
classmethod
def
retry_request
(
cls
,
func
,
*
args
,
**
kwargs
):
for
attempt
in
range
(
cls
.
max_retries
):
try
:
result
=
func
(
*
args
,
**
kwargs
)
if
result
:
return
result
except
Exception
as
e
:
cls
.
logger
.
error
(
f"Error on attempt
{
attempt
+
1
}
:
{
e
}
"
)
if
attempt
<
cls
.
max_retries
-
1
:
time
.
sleep
(
cls
.
retry_delay
)
return
None
@
classmethod
def
setup_instances
(
cls
):
cls
.
request_enb
()
cls
.
request_core_network
()
cls
.
setup_websocket_connection
()
@
classmethod
def
request_enb
(
cls
,
custom_params
=
None
):
cls
.
logger
.
info
(
"Request "
+
cls
.
enb_instance_name
)
enb_parameters
=
{
"bandwidth"
:
"20 MHz"
,
"n_antenna_dl"
:
1
,
"n_antenna_ul"
:
1
,
"cpri_mult"
:
16
,
"cell_list"
:
{
"RRH-B1"
:
{
"cpri_rx_delay"
:
25.11
,
"cpri_tx_delay"
:
13.77
,
"cpri_tx_dbm"
:
56
,
"ru_mac_addr"
:
"00:0a:00:00:10:20"
,
"dl_earfcn"
:
cls
.
dl_earfcn
}
},
"dnsmasq"
:
True
,
"txa0cc00_active"
:
"ACTIVE"
,
"rxa0cc00_active"
:
"ACTIVE"
,
"txa0cc00_center_frequency"
:
2140
,
"rxa0cc00_center_frequency_earfcn"
:
18300
,
"rxa0cc00_center_frequency"
:
1950
,
"txa0cc00_gain"
:
-
20
,
"user-authorized-key"
:
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDegkDlZaDJEoiXo5FZ5iJmYcVHyqd5G+YaWLmZ/Ae6wtY8Pp0e/+eCcARO67pwn73MAj9IELu3h5rdPuZvZx0xXWGOc3ceOQBsJh/h4eMpiBKvA5ELWVuXDIl98xgIIjiaO4QgZyw1OhpN5EB6EyUNKt/xCHuU37mZaFLbcNDW3h6JI5U5plIARY0e/dFPFywtKqCgnqhJubJh/kHcb4ZeJzQMnA33WGwVD/b+F015kHXfk4T259Z27yqMTokVjaiUnI2Wbac3e+Lc5bpecA68rlmhc6fs0bh5Geldy2Q8y8gJQUX3sihA9PjlDN+T8mNYHyk9QaCM/SQkwxB71D172nMoUcrppUZyf6JaLmB/cO0iVsIr8x2GnGT0EzL/y1hmvi1dD17E0DpgoRcjI3DxleTbUTpayT4ZHrtVnkp2Nf1LgEJmdTx0hqTb9HTqhXATTKLSETYAwIu0yWnlA9oK2MwsiPPQ/8IS5HzhN3XFEIdV+tQ7GZPVfv4sYpwt7us= root@root"
,
"plmn_list"
:
{
"Australia"
:
{
"plmn"
:
"50501"
}}
}
if
custom_params
:
enb_parameters
.
update
(
custom_params
)
json_enb_parameters
=
json
.
dumps
(
enb_parameters
)
cls
.
retry_request
(
cls
.
request
,
cls
.
product
,
cls
.
enb_instance_name
,
filter_kw
=
{
"computer_guid"
:
cls
.
comp_enb
},
partition_parameter_kw
=
{
'_'
:
json_enb_parameters
},
software_type
=
'enb'
)
@
classmethod
def
request_core_network
(
cls
):
cls
.
logger
.
info
(
"Request "
+
cls
.
cn_instance_name
)
core_network_parameters
=
json
.
dumps
({
"core_network_plmn"
:
"50501"
})
cls
.
retry_request
(
cls
.
request_core_network_with_guid
,
core_network_parameters
)
@
classmethod
def
request_core_network_with_guid
(
cls
,
core_network_parameters
):
core_network_instance
=
cls
.
request
(
cls
.
product
,
cls
.
cn_instance_name
,
filter_kw
=
{
"computer_guid"
:
cls
.
comp_cn
},
partition_parameter_kw
=
{
'_'
:
core_network_parameters
},
software_type
=
'core-network'
)
if
core_network_instance
:
instance_infos
=
cls
.
getInstanceInfos
(
cls
.
cn_instance_name
)
cls
.
cn_instance_guid
=
instance_infos
.
news
[
'instance'
][
0
][
'reference'
]
cls
.
request_demo_sim_cards
()
return
True
return
False
@
classmethod
def
request_demo_sim_cards
(
cls
):
cls
.
logger
.
info
(
"Request "
+
cls
.
sim_instance_name
)
if
cls
.
cn_instance_guid
is
None
:
cls
.
logger
.
error
(
"Core network instance GUID not set. Cannot request demo SIM cards."
)
return
sim_card_parameters
=
json
.
dumps
({
"sim_algo"
:
"xor"
,
"imsi"
:
"505010123456789"
,
"k"
:
"00112233445566778899aabbccddeeff"
,
"imeisv"
:
"8682430000000101"
,
"impi"
:
"505010123456789@ims.mnc505.mcc001.3gppnetwork.org"
,
"impu"
:
[
"505010123456789"
,
"tel:0600000000"
,
"tel:600"
]
})
cls
.
retry_request
(
cls
.
request
,
cls
.
product
,
cls
.
sim_instance_name
,
partition_parameter_kw
=
{
'_'
:
sim_card_parameters
},
software_type
=
'core-network'
,
filter_kw
=
{
"instance_guid"
:
cls
.
cn_instance_guid
},
shared
=
True
,
state
=
'started'
)
@
classmethod
def
setup_websocket_connection
(
cls
):
ue_instance
=
cls
.
retry_request
(
cls
.
request_ue
)
cls
.
waitUntilGreen
(
cls
.
ue_instance_name
)
cls
.
ue_com_addr
=
ue_instance
.
get
(
'com_addr'
)
if
ue_instance
else
None
if
not
cls
.
ue_com_addr
:
cls
.
logger
.
error
(
"Failed to obtain UE com address."
)
return
cls
.
ws_url
=
f"ws://
{
cls
.
ue_com_addr
}
"
cls
.
logger
.
info
(
f"Websocket URL:
{
cls
.
ws_url
}
"
)
for
attempt
in
range
(
cls
.
max_retries
):
try
:
cls
.
ws
=
create_connection
(
cls
.
ws_url
)
cls
.
logger
.
info
(
"Websocket connection established."
)
break
except
Exception
as
e
:
cls
.
logger
.
error
(
f"Websocket connection attempt
{
attempt
+
1
}
failed:
{
e
}
"
)
if
attempt
<
cls
.
max_retries
-
1
:
time
.
sleep
(
5
)
@
classmethod
def
request_ue
(
cls
):
cls
.
logger
.
info
(
"Request "
+
cls
.
ue_instance_name
)
ue_parameters
=
json
.
dumps
({
"n_antenna_dl"
:
2
,
"n_antenna_ul"
:
2
,
"dl_earfcn"
:
cls
.
dl_earfcn
,
"sim_algo"
:
"xor"
,
"imsi"
:
"505010123456789"
,
"k"
:
"00112233445566778899aabbccddeeff"
,
"imeisv"
:
"8682430000000101"
,
"impi"
:
"505010123456789@ims.mnc505.mcc001.3gppnetwork.org"
,
"impu"
:
[
"505010123456789"
,
"tel:0600000000"
,
"tel:600"
]
})
return
cls
.
retry_request
(
cls
.
request
,
cls
.
ue_product
,
cls
.
ue_instance_name
,
filter_kw
=
{
"computer_guid"
:
cls
.
comp_ue
},
partition_parameter_kw
=
{
'_'
:
ue_parameters
},
software_type
=
'ue-lte'
)
@
classmethod
def
tearDownClass
(
cls
):
if
hasattr
(
cls
,
'ws'
)
and
cls
.
ws
is
not
None
:
cls
.
ws
.
close
()
super
().
tearDownClass
()
def
send
(
self
,
msg
):
self
.
ws
.
send
(
json
.
dumps
(
msg
))
def
recv
(
self
):
return
json
.
loads
(
self
.
ws
.
recv
())
def
ue_get
(
self
):
self
.
send
({
"message"
:
"ue_get"
})
result
=
self
.
recv
()
if
'message'
not
in
result
:
raise
ValueError
(
f"Unexpected response format:
{
result
}
"
)
if
'ue_list'
in
result
:
if
not
result
[
'ue_list'
]:
raise
ValueError
(
f"No UE found in response:
{
result
}
"
)
return
result
[
'ue_list'
][
0
]
else
:
return
result
def
power_on
(
self
,
ue_id
):
self
.
assertFalse
(
self
.
ue_get
()[
'power_on'
],
"UE already powered on"
)
self
.
send
({
"message"
:
"power_on"
,
"ue_id"
:
ue_id
})
self
.
recv
()
def
power_off
(
self
,
ue_id
):
self
.
assertTrue
(
self
.
ue_get
()[
'power_on'
],
"UE already powered off"
)
self
.
send
({
"message"
:
"power_off"
,
"ue_id"
:
ue_id
})
self
.
recv
()
class
BBUTest
(
WebsocketTestClass
):
def
test_ue_has_ip
(
self
):
result
=
self
.
recv
()
result
=
self
.
ue_get
()
ue_id
=
result
[
'ue_id'
]
try
:
self
.
power_on
(
ue_id
)
time
.
sleep
(
5
)
result
=
self
.
ue_get
()
self
.
assertIn
(
'pdn_list'
,
result
,
"UE didn't connect"
)
self
.
assertIn
(
'ipv4'
,
result
[
'pdn_list'
][
0
],
"UE didn't get IPv4"
)
self
.
logger
.
info
(
"UE connected with ip: "
+
result
[
'pdn_list'
][
0
][
'ipv4'
])
finally
:
self
.
power_off
(
ue_id
)
def
test_max_rx_sample_db
(
self
):
pass
# check-rx-saturated is disabled for BBU+RU
# custom_params = {"max_rx_sample_db": -99}
# BBUTest.request_enb(custom_params)
# self.waitUntilPromises(BBUTest.enb_instance_name, promise_name="check-rx-saturated", expected=False)
def
test_min_rxtx_delay
(
self
):
custom_params
=
{
"min_rxtx_delay"
:
99
}
BBUTest
.
request_enb
(
custom_params
)
self
.
waitUntilPromises
(
BBUTest
.
enb_instance_name
,
promise_name
=
"check-baseband-latency"
,
expected
=
False
)
software/end-to-end-testing/tests/test_ors.py
0 → 100644
View file @
d62ca771
import
json
import
time
import
slapos.testing.e2e
as
e2e
from
websocket
import
create_connection
class
WebsocketTestClass
(
e2e
.
EndToEndTestCase
):
@
classmethod
def
setUpClass
(
cls
):
try
:
super
().
setUpClass
()
cls
.
enb_instance_name
=
time
.
strftime
(
'e2e-ors84-enb-%Y-%B-%d-%H:%M:%S'
)
cls
.
cn_instance_name
=
time
.
strftime
(
'e2e-ors84-core-network-%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
.
product
=
cls
.
product
.
get
(
'ors-tdd'
)
cls
.
ue_product
=
"/opt/e2e/slapos/software/ors-amarisoft/software-fdd-lopcomm.cfg"
# Component GUIDs and configurations
cls
.
comp_enb
=
"COMP-4057"
cls
.
comp_cn
=
"COMP-4057"
cls
.
comp_ue
=
"COMP-3756"
cls
.
dl_earfcn
=
38550
# Retry configurations
cls
.
max_retries
=
10
cls
.
retry_delay
=
180
# seconds
# Setup instances
cls
.
setup_instances
()
cls
.
waitUntilGreen
(
cls
.
enb_instance_name
)
cls
.
waitUntilGreen
(
cls
.
cn_instance_name
)
except
Exception
as
e
:
cls
.
logger
.
error
(
"Error during setup: "
+
str
(
e
))
# Ensure cleanup
cls
.
tearDownClass
()
raise
@
classmethod
def
retry_request
(
cls
,
func
,
*
args
,
**
kwargs
):
for
attempt
in
range
(
cls
.
max_retries
):
try
:
result
=
func
(
*
args
,
**
kwargs
)
if
result
:
return
result
except
Exception
as
e
:
cls
.
logger
.
error
(
f"Error on attempt
{
attempt
+
1
}
:
{
e
}
"
)
if
attempt
<
cls
.
max_retries
-
1
:
time
.
sleep
(
cls
.
retry_delay
)
return
None
@
classmethod
def
setup_instances
(
cls
):
cls
.
request_enb
()
cls
.
request_core_network
()
cls
.
setup_websocket_connection
()
@
classmethod
def
request_enb
(
cls
,
custom_params
=
None
):
cls
.
logger
.
info
(
"Request "
+
cls
.
enb_instance_name
)
enb_parameters
=
{
"dl_earfcn"
:
cls
.
dl_earfcn
,
"plmn_list"
:
{
"Australia"
:
{
"plmn"
:
"50501"
}}
}
if
custom_params
:
enb_parameters
.
update
(
custom_params
)
json_enb_parameters
=
json
.
dumps
(
enb_parameters
)
cls
.
retry_request
(
cls
.
request
,
cls
.
product
,
cls
.
enb_instance_name
,
filter_kw
=
{
"computer_guid"
:
cls
.
comp_enb
},
partition_parameter_kw
=
{
'_'
:
json_enb_parameters
},
software_type
=
'enb'
)
@
classmethod
def
request_core_network
(
cls
):
core_network_parameters
=
json
.
dumps
({
"core_network_plmn"
:
"50501"
})
cls
.
retry_request
(
cls
.
request_core_network_with_guid
,
core_network_parameters
)
@
classmethod
def
request_core_network_with_guid
(
cls
,
core_network_parameters
):
cls
.
logger
.
info
(
"Request "
+
cls
.
cn_instance_name
)
core_network_instance
=
cls
.
request
(
cls
.
product
,
cls
.
cn_instance_name
,
filter_kw
=
{
"computer_guid"
:
cls
.
comp_cn
},
partition_parameter_kw
=
{
'_'
:
core_network_parameters
},
software_type
=
'core-network'
)
if
core_network_instance
:
instance_infos
=
cls
.
getInstanceInfos
(
cls
.
cn_instance_name
)
cls
.
cn_instance_guid
=
instance_infos
.
news
[
'instance'
][
0
][
'reference'
]
cls
.
request_demo_sim_cards
()
return
True
return
False
@
classmethod
def
request_demo_sim_cards
(
cls
):
if
cls
.
cn_instance_guid
is
None
:
cls
.
logger
.
error
(
"Core network instance GUID not set. Cannot request demo SIM cards."
)
return
cls
.
logger
.
info
(
"Request "
+
cls
.
sim_instance_name
)
sim_card_parameters
=
json
.
dumps
({
"sim_algo"
:
"xor"
,
"imsi"
:
"505010123456789"
,
"k"
:
"00112233445566778899aabbccddeeff"
,
"imeisv"
:
"8682430000000101"
,
"impi"
:
"505010123456789@ims.mnc505.mcc001.3gppnetwork.org"
,
"impu"
:
[
"505010123456789"
,
"tel:0600000000"
,
"tel:600"
]
})
cls
.
retry_request
(
cls
.
request
,
cls
.
product
,
cls
.
sim_instance_name
,
partition_parameter_kw
=
{
'_'
:
sim_card_parameters
},
software_type
=
'core-network'
,
filter_kw
=
{
"instance_guid"
:
cls
.
cn_instance_guid
},
shared
=
True
,
state
=
'started'
)
@
classmethod
def
setup_websocket_connection
(
cls
):
ue_instance
=
cls
.
retry_request
(
cls
.
request_ue
)
cls
.
waitUntilGreen
(
cls
.
ue_instance_name
)
cls
.
ue_com_addr
=
ue_instance
.
get
(
'com_addr'
)
if
ue_instance
else
None
if
not
cls
.
ue_com_addr
:
cls
.
logger
.
error
(
"Failed to obtain UE com address."
)
return
cls
.
ws_url
=
f"ws://
{
cls
.
ue_com_addr
}
"
cls
.
logger
.
info
(
f"Websocket URL:
{
cls
.
ws_url
}
"
)
for
attempt
in
range
(
cls
.
max_retries
):
try
:
cls
.
ws
=
create_connection
(
cls
.
ws_url
)
cls
.
logger
.
info
(
"Websocket connection established."
)
break
except
Exception
as
e
:
cls
.
logger
.
error
(
f"Websocket connection attempt
{
attempt
+
1
}
failed:
{
e
}
"
)
if
attempt
<
cls
.
max_retries
-
1
:
time
.
sleep
(
5
)
@
classmethod
def
request_ue
(
cls
):
cls
.
logger
.
info
(
"Request "
+
cls
.
ue_instance_name
)
ue_parameters
=
json
.
dumps
({
"n_antenna_dl"
:
2
,
"n_antenna_ul"
:
2
,
"dl_earfcn"
:
cls
.
dl_earfcn
,
"sim_algo"
:
"xor"
,
"imsi"
:
"505010123456789"
,
"k"
:
"00112233445566778899aabbccddeeff"
,
"imeisv"
:
"8682430000000101"
,
"impi"
:
"505010123456789@ims.mnc505.mcc001.3gppnetwork.org"
,
"impu"
:
[
"505010123456789"
,
"tel:0600000000"
,
"tel:600"
]
})
return
cls
.
retry_request
(
cls
.
request
,
cls
.
ue_product
,
cls
.
ue_instance_name
,
filter_kw
=
{
"computer_guid"
:
cls
.
comp_ue
},
partition_parameter_kw
=
{
'_'
:
ue_parameters
},
software_type
=
'ue-lte'
)
@
classmethod
def
tearDownClass
(
cls
):
if
hasattr
(
cls
,
'ws'
)
and
cls
.
ws
is
not
None
:
cls
.
ws
.
close
()
super
().
tearDownClass
()
def
send
(
self
,
msg
):
self
.
ws
.
send
(
json
.
dumps
(
msg
))
def
recv
(
self
):
return
json
.
loads
(
self
.
ws
.
recv
())
def
ue_get
(
self
):
self
.
send
({
"message"
:
"ue_get"
})
result
=
self
.
recv
()
if
'message'
not
in
result
:
raise
ValueError
(
f"Unexpected response format:
{
result
}
"
)
if
'ue_list'
in
result
:
if
not
result
[
'ue_list'
]:
raise
ValueError
(
f"No UE found in response:
{
result
}
"
)
return
result
[
'ue_list'
][
0
]
else
:
return
result
def
power_on
(
self
,
ue_id
):
self
.
assertFalse
(
self
.
ue_get
()[
'power_on'
],
"UE already powered on"
)
self
.
send
({
"message"
:
"power_on"
,
"ue_id"
:
ue_id
})
self
.
recv
()
def
power_off
(
self
,
ue_id
):
self
.
assertTrue
(
self
.
ue_get
()[
'power_on'
],
"UE already powered off"
)
self
.
send
({
"message"
:
"power_off"
,
"ue_id"
:
ue_id
})
self
.
recv
()
class
ORSTest
(
WebsocketTestClass
):
def
test_ue_has_ip
(
self
):
result
=
self
.
recv
()
result
=
self
.
ue_get
()
ue_id
=
result
[
'ue_id'
]
try
:
self
.
power_on
(
ue_id
)
time
.
sleep
(
5
)
result
=
self
.
ue_get
()
self
.
assertIn
(
'pdn_list'
,
result
,
"UE didn't connect"
)
self
.
assertIn
(
'ipv4'
,
result
[
'pdn_list'
][
0
],
"UE didn't get IPv4"
)
self
.
logger
.
info
(
"UE connected with ip: "
+
result
[
'pdn_list'
][
0
][
'ipv4'
])
finally
:
self
.
power_off
(
ue_id
)
def
test_max_rx_sample_db
(
self
):
custom_params
=
{
"max_rx_sample_db"
:
-
99
}
ORSTest
.
request_enb
(
custom_params
)
self
.
waitUntilPromises
(
ORSTest
.
enb_instance_name
,
promise_name
=
"check-rx-saturated"
,
expected
=
False
)
def
test_min_rxtx_delay
(
self
):
# Fixed by 9798ef1e, change `expected` to False when released
custom_params
=
{
"min_rxtx_delay"
:
99
}
ORSTest
.
request_enb
(
custom_params
)
self
.
waitUntilPromises
(
ORSTest
.
enb_instance_name
,
promise_name
=
"check-baseband-latency"
,
expected
=
True
)
software/erp5-zope2/software.cfg
View file @
d62ca771
[buildout]
extends =
../../stack/erp5-zope2/buildout.cfg
[erp5]
branch = zope2
software/gitlab/buildout.hash.cfg
View file @
d62ca771
...
...
@@ -14,7 +14,7 @@
# not need these here).
[instance.cfg]
filename = instance.cfg.in
md5sum =
ea1d4fb7b2330ae9d94df07f74b934b4
md5sum =
d1ca30a1b910b6b775f4f95bd91123a6
[watcher]
_update_hash_filename_ = watcher.in
...
...
@@ -34,7 +34,7 @@ md5sum = eb1230fee50067924ba89f4dc6e82fa9
[gitlab-parameters.cfg]
_update_hash_filename_ = gitlab-parameters.cfg
md5sum = c
2e23c0f7baa1633df0436ca4e728424
md5sum = c
fda6d959bb90bf0b9c947383f45ce0a
[gitlab-shell-config.yml.in]
_update_hash_filename_ = template/gitlab-shell-config.yml.in
...
...
@@ -54,7 +54,7 @@ md5sum = 58e3d5bbda32583d00cd8f44ec0525b0
[instance-gitlab.cfg.in]
_update_hash_filename_ = instance-gitlab.cfg.in
md5sum =
8e5b0ddb1b79679b4162f302aa438b62
md5sum =
9303fa3912e6eaea04add760b55521f3
[instance-gitlab-export.cfg.in]
_update_hash_filename_ = instance-gitlab-export.cfg.in
...
...
software/gitlab/gitlab-parameters.cfg
View file @
d62ca771
...
...
@@ -9,7 +9,7 @@
# (last updated for omnibus-gitlab 8.8.9+ce.0-g25376053)
[gitlab-parameters]
configuration.external_url = http://lab.example.com
configuration.external_url = http
s
://lab.example.com
# db advanced
configuration.db_pool = 10
...
...
software/gitlab/instance-gitlab.cfg.in
View file @
d62ca771
...
...
@@ -49,16 +49,32 @@ offline = true
# GitLab instance parameters #
##################################
[worker-processes]
recipe = slapos.recipe.build
unicorn-worker-processes = {{ instance_parameter_dict['configuration.unicorn_worker_processes'] }}
init =
import multiprocessing
worker_count = int(options['unicorn-worker-processes'])
if worker_count == 0:
# automatically load all available CPUs
worker_count = multiprocessing.cpu_count() + 1
worker_count = 2 if worker_count < 2 else worker_count
options['unicorn-worker-processes'] = worker_count
options['nginx-worker-processes'] = worker_count -1
[instance-parameter]
{#- There are dangerous keys like recipe, etc #}
{#- XXX: Some other approach would be useful #}
{%- set DROP_KEY_LIST = ['recipe', '__buildout_signature__', 'computer', 'partition', 'url', 'key', 'cert'] %}
{%- set DROP_KEY_LIST = ['recipe', '__buildout_signature__', 'computer', 'partition', 'url', 'key', 'cert',
'configuration.unicorn_worker_processes', 'configuration.nginx_worker_processes'] %}
{%- for key, value in instance_parameter_dict.items() -%}
{%- if key not in DROP_KEY_LIST %}
{{ key }} = {{ value }}
{%- endif -%}
{%- endfor %}
# settings for worker processes:
configuration.unicorn_worker_processes = ${worker-processes:unicorn-worker-processes}
configuration.nginx_worker_processes = ${worker-processes:nginx-worker-processes}
# for convenience
...
...
@@ -171,7 +187,7 @@ mode = 0700
recipe = slapos.cookbook:mkdirectory
gitaly = ${directory:var}/gitaly
sockets = ${:gitaly}/sockets
internal = ${
:sockets}/internal
internal = ${
directory:var}/int
log = ${directory:log}/gitaly
[gitaly]
...
...
software/gitlab/instance.cfg.in
View file @
d62ca771
...
...
@@ -19,16 +19,6 @@ RootSoftwareInstance = $${:gitlab}
# TODO -import, -pull-backup
[worker-processes]
recipe = slapos.recipe.build
init =
import multiprocessing
cpu_count = multiprocessing.cpu_count()
# automatically load all available CPUs
options['unicorn-worker-processes'] = cpu_count + 1
options['nginx-worker-processes'] = cpu_count
[slap-configuration]
# std stuff to fetch slapos instance parameters
recipe = slapos.cookbook:slapconfiguration
...
...
@@ -41,11 +31,6 @@ cert = $${slap-connection:cert-file}
# autogenerated gitlab instance parameters
<= gitlab-parameters
# adjust/override some default settings:
configuration.unicorn_worker_processes = $${worker-processes:unicorn-worker-processes}
configuration.nginx_worker_processes = $${worker-processes:nginx-worker-processes}
# gitlab non-native parameters
configuration.icp_license =
...
...
@@ -72,7 +57,7 @@ context =
raw bzip2_location ${bzip2:location}
raw bundler_4gitlab ${bundler-4gitlab:bundle}
raw bundler_1_17_3_dir ${bundler-4gitlab:bundle1.17.3}
raw coreutils_location ${coreutils
-9.1
:location}
raw coreutils_location ${coreutils:location}
raw curl_bin ${curl:location}/bin/curl
raw dcron_bin ${dcron-output:crond}
raw git ${git:location}/bin/git
...
...
software/gitlab/software.cfg
View file @
d62ca771
...
...
@@ -145,8 +145,7 @@ bundle1.17.3 = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/ruby/
# gitlab wants git to be really on path ( it uses git from abspath defined in
# gitlab.yml, but there are not all cases like this, e.g. in
# https://gitlab.com/gitlab-org/gitlab_git/blob/2f0d3c1a/lib/gitlab_git/repository.rb#L259 )
# gitlab (via github-markup) wants to convert rst -> html via running: python2 (with docutils egg)
# (python-4gitlab puts interpreter into ${buildout:bin-directory})
# gitlab (via github-markup) wants to convert rst -> html via running: python (with docutils egg)
environment =
PATH = ${python-4gitlab:bin}:${yarn:location}/bin:${:ruby-location}/bin:${cmake:location}/bin:${pkgconfig:location}/bin:${nodejs:location}/bin:${postgresql10:location}/bin:${redis28:location}/bin:${git:location}/bin:${buildout:bin-directory}:%(PATH)s
...
...
@@ -161,7 +160,7 @@ git-executable = ${git:location}/bin/git
[gitlab-repository]
<= git-repository
repository = https://lab.nexedi.com/nexedi/gitlab-ce.git
revision = v12.10.14-
8-gd7e78e901
3
revision = v12.10.14-
12-g7ce27b4919
3
location = ${buildout:parts-directory}/gitlab
[gitlab-shell-repository]
...
...
@@ -239,7 +238,7 @@ environment =
[gowork.goinstall]
git2go = ${go_github.com_libgit2_git2go_prepare:path}/vendor/libgit2/install
command = bash -c ". ${gowork:env.sh} && CGO_CFLAGS=-I${:git2go}/include CGO_LDFLAGS='-L${:git2go}/lib -lgit2' go install ${gowork:buildflags} -v $(echo -n '${gowork:install}' |tr '\n' ' ')"
command = bash -c ". ${gowork:env.sh} && CGO_CFLAGS=-I${:git2go}/include CGO_LDFLAGS='-L${:git2go}/lib -lgit2' go install ${gowork:buildflags} -v $(echo -n '${gowork:install}' |tr '\n' ' ')
&& go test -v lab.nexedi.com/kirr/git-backup
"
[gowork]
golang = ${golang1.13:location}
...
...
@@ -264,6 +263,7 @@ make-targets =
[gitlab-backup]
recipe = plone.recipe.command
stop-on-error = true
command =
cp -a ${go_lab.nexedi.com_kirr_git-backup:location}/contrib/gitlab-backup ${gowork:bin}
update-command = ${:command}
...
...
software/metabase/software.cfg
View file @
d62ca771
...
...
@@ -20,8 +20,8 @@ parts =
[metabase.jar]
recipe = slapos.recipe.build:download
url = https://downloads.metabase.com/v0.48.
2
/metabase.jar
md5sum =
d708a85436da3d5751f0e48ebd10c142
url = https://downloads.metabase.com/v0.48.
6
/metabase.jar
md5sum =
7d75ee710f9518148999b69b7a7e9d79
[instance-profile]
recipe = slapos.recipe.template
...
...
software/ors-amarisoft/buildout.hash.cfg
View file @
d62ca771
...
...
@@ -16,11 +16,15 @@
[template]
filename = instance.cfg
md5sum = 12591aca22ddc61f9fb1ec7e596873e3
md5sum = fa81cd744e5a9382aa203c3777adc3a8
[template-ors]
filename = instance-ors.cfg
md5sum = 56a2c2b8245e86f3a8ed2eebeb8e88d9
[slaplte.jinja2]
_update_hash_filename_ = slaplte.jinja2
md5sum =
c31dffa87765d93327f18ffd89ce36ca
md5sum =
566efd38f12e6d42769399f421e77d6c
[ru_amarisoft-stats.jinja2.py]
_update_hash_filename_ = ru/amarisoft-stats.jinja2.py
...
...
@@ -32,7 +36,7 @@ md5sum = ab666fdfadbfc7d8a16ace38d295c883
[ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg
md5sum =
d3ae8839b1a7b7a225bc69c3910c0b35
md5sum =
30c262a427de2132d6d66d9fb3597426
[ru_sdr_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg
...
...
@@ -40,7 +44,7 @@ md5sum = de71c63b8df940207409de7e948f7c8c
[ru_lopcomm_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/lopcomm/libinstance.jinja2.cfg
md5sum =
b2af1e70141216a4db07cca655aa63a7
md5sum =
71508d94a47db493f30af30188c48d64
[ru_sunwave_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sunwave/libinstance.jinja2.cfg
...
...
@@ -80,23 +84,19 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
md5sum =
ae49a3a9a97407f9aea30981403ee1a2
md5sum =
c8096440bfc2a1ed0e2821ef71e0bd1c
[template-
g
nb]
_update_hash_filename_ = instance-
g
nb.jinja2.cfg
md5sum =
54a0c7c3a2a1c905a15c58c650ee1095
[template-
ors-e
nb]
_update_hash_filename_ = instance-
ors-e
nb.jinja2.cfg
md5sum =
f1e6e2fb8854482d570fc3eee4935f84
[template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum = c807be73b9304f5a4c7483a3776bbc17
[template-ue-lte]
_update_hash_filename_ = instance-ue-lte.jinja2.cfg
md5sum = b444f859248778e18c5eba60f5670f6c
[template-ue-nr]
_update_hash_filename_ = instance-ue-nr.jinja2.cfg
md5sum = bc65fdce1c453d92310d53928dcaaa7a
[template-ue]
_update_hash_filename_ = instance-ue.jinja2.cfg
md5sum = d8153dd5e0978afea018498b29f06fd5
[template-obsolete]
_update_hash_filename_ = instance-obsolete.jinja2.cfg
...
...
@@ -108,7 +108,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg]
filename = config/enb.jinja2.cfg
md5sum =
914d781af63f4214e6cc3be4ffe93215
md5sum =
a7f898b48b15992b2c4a64a925f007aa
[drb_lte.jinja2.cfg]
filename = config/drb_lte.jinja2.cfg
...
...
@@ -120,7 +120,7 @@ md5sum = 84d3cef8fc7f1c2aed7c348d500f5636
[sib23.jinja2.asn]
filename = config/sib23.jinja2.asn
md5sum =
a1973ba6e43d40e510d61d461c2d13ac
md5sum =
0d709fafde394dc05441d110c2e41858
[mme.jinja2.cfg]
filename = config/mme.jinja2.cfg
...
...
@@ -138,13 +138,9 @@ md5sum = 9bd5b08f23640f71ad109d186d060f2d
filename = config/ims.jinja2.cfg
md5sum = 36281b03597252cf75169417d02fc28c
[ue-lte.jinja2.cfg]
filename = config/ue-lte.jinja2.cfg
md5sum = c0313f9d15543361f7c8e19af96c737a
[ue-nr.jinja2.cfg]
filename = config/ue-nr.jinja2.cfg
md5sum = 824233ab4d53ec428d358fb67bca8ba2
[ue.jinja2.cfg]
filename = config/ue.jinja2.cfg
md5sum = 1d55e896236f7ee08a10cd58182a9a76
[ru_lopcomm_CreateProcessingEle.jinja2.xml]
_update_hash_filename_ = ru/lopcomm/CreateProcessingEle.jinja2.xml
...
...
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
d62ca771
{%- import 'slaplte.jinja2' as slaplte with context %}
{%- set J = slaplte.J %}
{%- set ierror = slaplte.ierror %}
{%- set bug = slaplte.bug %}
{#- for standalone testing via slapos-render-config.py
NOTE: keep in sync with ru/libinstance.jinja2.cfg #}
...
...
@@ -13,6 +16,57 @@
{%- do assert(not (do_lte and do_nr)) %}
{#- ru and cell are namespace objects that hold Radio Unit and Cell related parameters #}
{%- set ru = namespace(ru_type=ru_type) %}
{%- set cell = namespace() %}
{#- handover_config emits handover configuration #}
{%- macro handover_config() %}
ncell_list: [
// Inter-ENB HO
{%- for _, ncell in slapparameter_dict.get('ncell_list', {})|dictsort %}
{
{%- if do_lte %}
rat: "eutra",
n_id_cell: {{ ncell.get('pci', '') }},
dl_earfcn: {{ ncell.get('dl_earfcn', '') }},
cell_id: {{ ncell.get('cell_id', '') }},
tac: {{ ncell.get('tac', 1) }},
{%- elif do_nr %}
rat: "nr",
dl_nr_arfcn: {{ ncell.get('dl_nr_arfcn', '') }},
ssb_nr_arfcn: {{ ncell.get('ssb_nr_arfcn', '') }},
ul_nr_arfcn: {{ ncell.get('dl_nr_arfcn', '') }},
n_id_cell: {{ ncell.get('pci', '') }},
gnb_id_bits: {{ ncell.get('gnb_id_bits', '') }},
nr_cell_id: {{ ncell.get('nr_cell_id', '') }},
tac: {{ ncell.get('tac', 1) }},
band: {{ ncell.get('nr_band', '') }},
ssb_subcarrier_spacing: 30,
ssb_period: 20,
ssb_offset: 0,
ssb_duration: 1,
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
},
{%- endfor %}
],
{%- endmacro %}
{#- jlte_n_rb_dl returns n_rb_dl for an LTE bandwidth. #}
{%- macro jlte_n_rb_dl(bandwidth) %}
{%- set _ = {1.4: 6,
3: 15,
5: 25,
10: 50,
15: 75,
20: 100} %}
{{- _[float(bandwidth.removesuffix(' MHz'))] | tojson }}
{%- endmacro %}
{%- if do_lte %}
{%- if slapparameter_dict.get('tdd_ul_dl_config', '[Configuration 2] 5ms 2UL 6DL (default)') == '[Configuration 2] 5ms 2UL 6DL (default)' %}
{%- set tdd_config = 2 %}
...
...
@@ -31,55 +85,28 @@
{%- endif %}
{%- endif %}
{% if rf_mode == 'tdd' %}
#define TDD 1
{% else %}
#define TDD 0
{% endif %}
{%- if do_lte %}
{%- if slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '1.4 MHz' %}
#define N_RB_DL 6
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '3 MHz' %}
#define N_RB_DL 15
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '5 MHz' %}
#define N_RB_DL 25
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '10 MHz' %}
#define N_RB_DL 50
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '15 MHz' %}
#define N_RB_DL 75
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '20 MHz' %}
#define N_RB_DL 100
{%- endif %}
{%- endif %}
#define N_ANTENNA_DL {{ slapparameter_dict.get('n_antenna_dl', slap_configuration['configuration.default_n_antenna_dl']) }}
{% if ru == "m2ru" %}
#define N_ANTENNA_UL {{ slapparameter_dict.get('n_antenna_ul', 1) }}
{%- set cell.bandwidth = slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) %}
{%- endif %}
{%- set ru.n_antenna_dl = slapparameter_dict.get('n_antenna_dl', int(slap_configuration['configuration.default_n_antenna_dl'])) %}
{% if ru.ru_type == "m2ru" %}
{%- set ru.n_antenna_ul = slapparameter_dict.get('n_antenna_ul', 1) %}
{% else %}
#define N_ANTENNA_UL {{ slapparameter_dict.get('n_antenna_ul', slap_configuration['configuration.default_n_antenna_ul']) }
}
{%- set ru.n_antenna_ul = slapparameter_dict.get('n_antenna_ul', int(slap_configuration['configuration.default_n_antenna_ul'])) %
}
{% endif %}
{
{%- if do_lte %}
{% if slapparameter_dict.get('log_phy_debug', False) %}
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=debug,file.rotate=1G,file.path=/dev/null",
{% else %}
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
{% endif %}
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,
{%- if slapparameter_dict.get('log_phy_debug', False) -%}
phy.level=debug
{%- else -%}
phy.level=info
{%- endif -%}
,file.rotate=1G,file.path=/dev/null",
log_filename: "{{ directory['log'] }}/enb.log",
{%- endif %}
{%- if do_nr %}
{% if slapparameter_dict.get('log_phy_debug', False) %}
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=debug,file.rotate=1G,file.path=/dev/null",
{% else %}
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
{% endif %}
log_filename: "{{ directory['log'] }}/gnb.log",
{%- endif %}
{% if ru == "lopcomm" %}
{% if ru.ru_type == "lopcomm" %}
rf_driver: {
{%- if slapparameter_dict.get('disable_sdr', False) %}
name: "dummy",
...
...
@@ -133,7 +160,7 @@
},
tx_gain: 0,
rx_gain: 0,
{% elif ru == "m2ru" %}
{% elif ru
.ru_type
== "m2ru" %}
rf_driver: {
{%- if slapparameter_dict.get('disable_sdr', False) %}
name: "dummy",
...
...
@@ -150,7 +177,7 @@
},
tx_gain: 0,
rx_gain: 0,
{% elif
bbu == "ors"
%}
{% elif
ors
%}
rf_driver: {
{%- if slapparameter_dict.get('disable_sdr', False) %}
name: "dummy",
...
...
@@ -177,6 +204,7 @@
{%- endif %}
{%- if do_lte %}
// LTE core network
mme_list: [
{% if slapparameter_dict.get('mme_list', '') %}
{%- for i, k in enumerate(slapparameter_dict['mme_list']) %}
...
...
@@ -197,6 +225,7 @@
{%- endif %}
{%- if do_nr %}
// NR core network
amf_list: [
{% if slapparameter_dict.get('amf_list', '') %}
{%- for i, k in enumerate(slapparameter_dict['amf_list']) %}
...
...
@@ -249,36 +278,26 @@
en_dc_support: true,
{%- endif %}
// LTE cells
cell_list: [
{%- if do_lte %}
{%- for i, k in enumerate(cell_list) %}
{%- if i == 0 -%}
{
{%- else -%}
, {
{%- endif %}
rf_port: {{ i }},
n_antenna_dl: {{ ru.n_antenna_dl }},
n_antenna_ul: {{ ru.n_antenna_ul }},
cell_id: {{ cell_list[k].get('cell_id', slapparameter_dict.get('cell_id', '0x0' + i|string)) }},
tac: {{ cell_list[k].get('tac', slapparameter_dict.get('tac', '0x0001')) }},
n_id_cell: {{ cell_list[k].get('pci', slapparameter_dict.get('pci', i)) }},
root_sequence_index: {{ cell_list[k].get('root_sequence_index', slapparameter_dict.get('root_sequence_index', 204 + i)) }},
dl_earfcn: {{ cell_list[k].get('dl_earfcn', slapparameter_dict.get('dl_earfcn', earfcn)) }},
{%- if slapparameter_dict.get('ncell_list', '') %}
ncell_list: [
{%- for i, k in enumerate(slapparameter_dict['ncell_list']) %}
{%- if i == 0 -%}
{
{%- else -%}
, {
{%- endif %}
n_id_cell: {{ slapparameter_dict['ncell_list'][k].get('pci', '') }},
dl_earfcn: {{ slapparameter_dict['ncell_list'][k].get('dl_earfcn', '') }},
cell_id: {{ slapparameter_dict['ncell_list'][k].get('cell_id', '') }},
tac: {{ slapparameter_dict['ncell_list'][k].get('tac', 1) }},
}
{%- endfor -%}
],
{% endif %}
inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', slap_configuration['configuration.default_lte_inactivity_timer']) }},
// Handover
{{- handover_config() }}
// Carrier Aggregation
{%- set scell_list = [] %}
{%- for j, l in enumerate(cell_list) %}
{%- if j != i %}
...
...
@@ -297,7 +316,87 @@
}
{%- endfor %}
],
}
// tune LTE parameters for the cell
{% if ors %}
manual_ref_signal_power: true,
{% endif %}
{%- set tdd = (rf_mode == 'tdd') %}
{%- if tdd %}
uldl_config: {{ tdd_config }},
sp_config: 7,
{%- endif %}
{%- set n_rb_dl = J(jlte_n_rb_dl(cell.bandwidth)) %}
n_rb_dl: {{ n_rb_dl }},
si_coderate: {{ 0.30 if n_rb_dl == 6 else 0.20 }},
pdsch_dedicated: {
p_a: {{ {4: -6, 2: -3}.get(ru.n_antenna_dl, 0) }},
p_b: -1,
},
pdcch_format: {{ 1 if n_rb_dl == 6 else 2 }},
prach_config_index: {{ 15 if n_rb_dl == 6 else 4 }},
initial_cqi: {{ 5 if n_rb_dl == 6 else 3 }},
pucch_dedicated: {
n1_pucch_sr_count: 11,
cqi_pucch_n_rb: 1,
{#- for CA with 2 cells it is possible to use PUCCH 1b CS ack/nack #}
{%- if len(cell_list) == 2 %}
ack_nack_feedback_mode_ca: "cs",
n1_pucch_an_cs_count: 8,
{#- starting from 3 cells it is always PUCCH 3 for ack/nack in CA #}
{%- elif len(cell_list) >= 3 %}
ack_nack_feedback_mode_ca: "pucch3",
n3_pucch_an_n_rb: 3,
{%- endif %}
{%- if tdd %}
tdd_ack_nack_feedback_mode: "multiplexing", /* TDD only */
{%- endif %}
},
{%- if ru.n_antenna_dl >= 2 %}
m_ri: 8,
transmission_mode: 3,
{%- endif %}
srs_dedicated: {
{%- if n_rb_dl == 6 %}
srs_bandwidth_config: 7,
srs_bandwidth: 1,
{%- elif n_rb_dl == 15 %}
srs_bandwidth_config: 6,
srs_bandwidth: 1,
{%- elif n_rb_dl == 25 %}
srs_bandwidth_config: 3,
srs_bandwidth: 1,
{%- elif n_rb_dl == 50 %}
srs_bandwidth_config: 2,
srs_bandwidth: 2,
{%- elif n_rb_dl == 75 %}
srs_bandwidth_config: 2,
srs_bandwidth: 2,
{%- else %}
srs_bandwidth_config: 2,
srs_bandwidth: 3,
{%- endif %}
srs_subframe_config: 3,
srs_period: 40,
srs_hopping_bandwidth: 0,
},
drb_config: "{{ drb_file }}",
sib_sched_list: [
{
filename: "{{ sib23_file }}",
si_periodicity: 16,
},
],
},
{%- endfor %}
{%- endif %}
],
...
...
@@ -321,16 +420,6 @@
"00101",
{% endif %}
],
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: N_ANTENNA_UL,
{% if bbu == "ors" %}
manual_ref_signal_power: true,
{% endif %}
#if TDD == 1
uldl_config: {{ tdd_config }},
sp_config: 7,
#endif
n_rb_dl: N_RB_DL,
cyclic_prefix: "normal",
phich_duration: "normal",
...
...
@@ -341,54 +430,13 @@
intra_freq_reselection: true,
q_rx_lev_min: -70,
si_window_length: 40,
sib_sched_list: [
{
filename: "{{ sib23_file }}",
si_periodicity: 16,
},
],
#if N_RB_DL == 6
si_coderate: 0.30,
#else
si_coderate: 0.20,
#endif
si_pdcch_format: 2,
n_symb_cch: 0,
pdsch_dedicated: {
#if N_ANTENNA_DL == 4
p_a: -6,
#elif N_ANTENNA_DL == 2
p_a: -3,
#else
p_a: 0,
#endif
p_b: -1,
},
#if N_RB_DL == 6
pdcch_format: 1,
#else
pdcch_format: 2,
#endif
#if N_RB_DL == 6
prach_config_index: 15,
#else
prach_config_index: 4,
#endif
prach_freq_offset: -1,
pucch_dedicated: {
n1_pucch_sr_count: 11,
cqi_pucch_n_rb: 1,
#if TDD == 1
tdd_ack_nack_feedback_mode: "multiplexing", /* TDD only */
#endif
},
pusch_dedicated: {
beta_offset_ack_index: 9,
beta_offset_ri_index: 6,
...
...
@@ -399,12 +447,6 @@
pusch_msg3_mcs: 0,
#if N_RB_DL == 6
initial_cqi: 5,
#else
initial_cqi: 3,
#endif
dl_256qam: true,
ul_64qam: true,
...
...
@@ -412,36 +454,6 @@
cqi_period: 40,
#if N_ANTENNA_DL >= 2
m_ri: 8,
transmission_mode: 3,
#endif
srs_dedicated: {
#if N_RB_DL == 6
srs_bandwidth_config: 7,
srs_bandwidth: 1,
#elif N_RB_DL == 15
srs_bandwidth_config: 6,
srs_bandwidth: 1,
#elif N_RB_DL == 25
srs_bandwidth_config: 3,
srs_bandwidth: 1,
#elif N_RB_DL == 50
srs_bandwidth_config: 2,
srs_bandwidth: 2,
#elif N_RB_DL == 75
srs_bandwidth_config: 2,
srs_bandwidth: 2,
#else
srs_bandwidth_config: 2,
srs_bandwidth: 3,
#endif
srs_subframe_config: 3,
srs_period: 40,
srs_hopping_bandwidth: 0,
},
mac_config: {
ul_max_harq_tx: 5,
dl_max_harq_tx: 5,
...
...
@@ -456,8 +468,6 @@
cipher_algo_pref: [],
integ_algo_pref: [2, 1],
inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', slap_configuration['configuration.default_lte_inactivity_timer']) }},
srb_config: [
{
id: 1,
...
...
@@ -473,8 +483,7 @@
}
],
drb_config: "{{ drb_file }}",
{# TODO fully expose lte meas_config_desc in generic SR #}
meas_config_desc: {
a1_report_type: "rsrp",
a1_rsrp: -70,
...
...
@@ -495,53 +504,37 @@
{%- endif %}
{% if do_nr %}
// NR cells
nr_cell_list: [
{
rf_port: 0,
n_antenna_dl: {{ ru.n_antenna_dl }},
n_antenna_ul: {{ ru.n_antenna_ul }},
cell_id: {{ slapparameter_dict.get('cell_id', '0x01') }},
n_id_cell: {{ slapparameter_dict.get('pci', 500) }},
band: {{ nr_band }},
dl_nr_arfcn: {{ nr_arfcn }},
bandwidth: {{ slapparameter_dict.get('nr_bandwidth', slap_configuration['configuration.default_nr_bandwidth']) }},
subcarrier_spacing: 30,
ssb_pos_bitmap: "{{ slapparameter_dict.get('ssb_pos_bitmap', slap_configuration['configuration.default_nr_ssb_pos_bitmap']) }}",
{%- if slapparameter_dict.get('ncell_list', '') %}
ncell_list: [
{%- for i, k in enumerate(slapparameter_dict['ncell_list']) %}
{%- if i == 0 -%}
{
{%- else -%}
, {
{%- endif %}
rat: "nr",
dl_nr_arfcn: {{ slapparameter_dict['ncell_list'][k].get('dl_nr_arfcn', '') }},
ssb_nr_arfcn: {{ slapparameter_dict['ncell_list'][k].get('ssb_nr_arfcn', '') }},
ul_nr_arfcn: {{ slapparameter_dict['ncell_list'][k].get('dl_nr_arfcn', '') }},
n_id_cell: {{ slapparameter_dict['ncell_list'][k].get('pci', '') }},
gnb_id_bits: {{ slapparameter_dict['ncell_list'][k].get('gnb_id_bits', '') }},
nr_cell_id: {{ slapparameter_dict['ncell_list'][k].get('nr_cell_id', '') }},
tac: {{ slapparameter_dict['ncell_list'][k].get('tac', 1) }},
band: {{ slapparameter_dict['ncell_list'][k].get('nr_band', '') }},
ssb_subcarrier_spacing: 30,
ssb_period: 20,
ssb_offset: 0,
ssb_duration: 1,
}
{%- endfor -%}
],
{% endif %}
},
],
nr_cell_default: {
bandwidth: {{ slapparameter_dict.get('nr_bandwidth', slap_configuration['configuration.default_nr_bandwidth']) }},
n_antenna_dl: N_ANTENNA_DL,
n_antenna_ul: N_ANTENNA_UL,
{%- if bbu == "ors" %}
inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', slap_configuration['configuration.default_nr_inactivity_timer']) }},
// Handover
{{- handover_config() }}
// tune NR parameters for the cell
{%- if ors %}
manual_ref_signal_power: true,
{%- if o
ne_watt == "True"
%}
{%- if o
rs['one-watt']
%}
ss_pbch_block_power: {{ (tx_gain | int) - 54 }},
{%- else %}
ss_pbch_block_power: {{ (tx_gain | int) - 35 }},
{%- endif -%}
{%- endif %}
{% if tdd_config == 1 %}
tdd_ul_dl_config: {
pattern1: {
...
...
@@ -573,8 +566,201 @@
},
},
{% endif %}
prach: {
{% if ru.ru_type == "m2ru" %}
msg1_frequency_start: 0,
{% endif %}
},
pdcch: {
{% if ru.ru_type == "m2ru" %}
n_rb_coreset0: 48,
n_symb_coreset0: 1,
dedicated_coreset: {
{% if ru.ru_type == "m2ru" %}
duration: 1,
{% endif %}
},
{% endif %}
{% if tdd_config == 3 %}
uss: {
n_candidates: [ 0, 8, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{% else %}
uss: {
n_candidates: [ 0, 2, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{% endif %}
},
pdsch: {
{% if ru.ru_type == "m2ru" %}
k0: 0,
k1: [ 8, 7, 7, 6, 5, 4, 12, 11 ],
{% elif tdd_config == 3 %}
k1: [4, 11],
{% endif %}
},
pusch: {
{% if ru.ru_type == "m2ru" %}
k2: 4,
msg3_k2: 7,
{% elif tdd_config == 3 %}
k2: [11, 12, 4, 5, 6, 7, 7, 8],
msg3_k2: 7,
{% endif %}
},
csi_rs: {
nzp_csi_rs_resource: [
{
{%- if ru.n_antenna_dl == 1 %}
n_ports: 1,
frequency_domain_allocation: "row2",
bitmap: "100000000000",
cdm_type: "no_cdm",
{%- elif ru.n_antenna_dl == 2 %}
n_ports: 2,
frequency_domain_allocation: "other",
bitmap: "100000",
cdm_type: "fd_cdm2",
{%- elif ru.n_antenna_dl == 4 %}
n_ports: 4,
frequency_domain_allocation: "row4",
bitmap: "100",
cdm_type: "fd_cdm2",
{%- elif ru.n_antenna_dl == 8 %}
n_ports: 8,
frequency_domain_allocation: "other",
bitmap: "110011",
cdm_type: "fd_cdm2",
{%- else %}
{%- do error('n_antenna_dl=%d is not supported' % ru.n_antenna_dl) %}
{%- endif %}
},
{% if tdd_config != 3 %}
{
csi_rs_id: 1,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 4,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 11,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 2,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 8,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 11,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 3,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 4,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 12,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 4,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 8,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 12,
qcl_info_periodic_csi_rs: 0,
},
{% endif %}
],
nzp_csi_rs_resource_set: [
{},
{% if tdd_config != 3 %}
{
csi_rs_set_id: 1,
nzp_csi_rs_resources: [ 1, 2, 3, 4 ],
repetition: false,
trs_info: true,
},
{% endif %}
],
csi_resource_config: [
{},
{},
{% if tdd_config != 3 %}
{
csi_rsc_config_id: 2,
nzp_csi_rs_resource_set_list: [ 1 ],
resource_type: "periodic",
},
{% endif %}
],
csi_report_config: [
{
{%- if ru.n_antenna_dl > 1 %}
codebook_config: {
codebook_type: "type1",
sub_type: "typeI_SinglePanel",
{%- if ru.n_antenna_dl == 2 %}
{%- elif ru.n_antenna_dl == 4 %}
n1: 2,
n2: 1,
codebook_mode: 1,
{%- elif ru.n_antenna_dl == 8 %}
n1: 4,
n2: 1,
codebook_mode: 1,
{%- endif %}
},
{%- endif %}
},
],
},
drb_config: "{{ drb_file }}",
},
],
nr_cell_default: {
ssb_period: 20,
n_id_cell: {{ slapparameter_dict.get('pci', 500) }},
plmn_list: [
{%- if slapparameter_dict.get('plmn_list', '') %}
{%- for i, k in enumerate(slapparameter_dict['plmn_list']) %}
...
...
@@ -651,11 +837,7 @@
prach_config_index: 160,
msg1_subcarrier_spacing: 30,
msg1_fdm: 1,
{% if ru == "m2ru" %}
msg1_frequency_start: 0,
{% else %}
msg1_frequency_start: -1,
{% endif %}
zero_correlation_zone_config: 15,
preamble_received_target_power: -110,
preamble_trans_max: 7,
...
...
@@ -667,19 +849,11 @@
cb_preambles_per_ssb: 8,
},
pdcch: {
{% if ru == "m2ru" %}
n_rb_coreset0: 48,
n_symb_coreset0: 1,
{% endif %}
search_space0_index: 0,
dedicated_coreset: {
rb_start: -1,
l_crb: -1,
{% if ru == "m2ru" %}
duration: 1,
{% else %}
duration: 0,
{% endif %}
precoder_granularity: "sameAsREG_bundle",
},
css: {
...
...
@@ -687,17 +861,6 @@
},
rar_al_index: 2,
si_al_index: 2,
{% if tdd_config == 3 %}
uss: {
n_candidates: [ 0, 8, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{% else %}
uss: {
n_candidates: [ 0, 2, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{% endif %}
al_index: 1,
},
pdsch: {
...
...
@@ -705,12 +868,6 @@
dmrs_add_pos: 1,
dmrs_type: 1,
dmrs_max_len: 1,
{% if ru == "m2ru" %}
k0: 0,
k1: [ 8, 7, 7, 6, 5, 4, 12, 11 ],
{% elif tdd_config == 3 %}
k1: [4, 11],
{% endif %}
mcs_table: "qam256",
rar_mcs: 2,
si_mcs: 6,
...
...
@@ -719,29 +876,6 @@
nzp_csi_rs_resource: [
{
csi_rs_id: 0,
#if N_ANTENNA_DL == 1
n_ports: 1,
frequency_domain_allocation: "row2",
bitmap: "100000000000",
cdm_type: "no_cdm",
#elif N_ANTENNA_DL == 2
n_ports: 2,
frequency_domain_allocation: "other",
bitmap: "100000",
cdm_type: "fd_cdm2",
#elif N_ANTENNA_DL == 4
n_ports: 4,
frequency_domain_allocation: "row4",
bitmap: "100",
cdm_type: "fd_cdm2",
#elif N_ANTENNA_DL == 8
n_ports: 8,
frequency_domain_allocation: "other",
bitmap: "110011",
cdm_type: "fd_cdm2",
#else
#error unsupported number of DL antennas
#endif
density: 1,
first_symb: 4,
rb_start: 0,
...
...
@@ -752,72 +886,6 @@
offset: 1,
qcl_info_periodic_csi_rs: 0,
},
{% if tdd_config != 3 %}
{
csi_rs_id: 1,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 4,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 11,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 2,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 8,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 11,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 3,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 4,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 12,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 4,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 8,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 12,
qcl_info_periodic_csi_rs: 0,
},
{% endif %}
],
nzp_csi_rs_resource_set: [
{
...
...
@@ -825,14 +893,6 @@
nzp_csi_rs_resources: [ 0 ],
repetition: false,
},
{% if tdd_config != 3 %}
{
csi_rs_set_id: 1,
nzp_csi_rs_resources: [ 1, 2, 3, 4 ],
repetition: false,
trs_info: true,
},
{% endif %}
],
csi_im_resource: [
{
...
...
@@ -883,13 +943,6 @@
csi_im_resource_set_list: [ 0 ],
resource_type: "periodic",
},
{% if tdd_config != 3 %}
{
csi_rsc_config_id: 2,
nzp_csi_rs_resource_set_list: [ 1 ],
resource_type: "periodic",
},
{% endif %}
],
csi_report_config: [
{
...
...
@@ -898,22 +951,6 @@
report_config_type: "periodic",
period: 80,
report_quantity: "CRI_RI_PMI_CQI",
#if N_ANTENNA_DL > 1
codebook_config: {
codebook_type: "type1",
sub_type: "typeI_SinglePanel",
#if N_ANTENNA_DL == 2
#elif N_ANTENNA_DL == 4
n1: 2,
n2: 1,
codebook_mode: 1,
#elif N_ANTENNA_DL == 8
n1: 4,
n2: 1,
codebook_mode: 1,
#endif
},
#endif
cqi_table: 2,
subband_size: "value1",
},
...
...
@@ -948,13 +985,6 @@
mcs_table: "qam256",
mcs_table_tp: "qam256",
ldpc_max_its: 5,
{% if ru == "m2ru" %}
k2: 4,
msg3_k2: 7,
{% elif tdd_config == 3 %}
k2: [11, 12, 4, 5, 6, 7, 7, 8],
msg3_k2: 7,
{% endif %}
p0_nominal_with_grant: -84,
msg3_mcs: 4,
msg3_delta_power: 0,
...
...
@@ -976,9 +1006,8 @@
},
cipher_algo_pref: [],
integ_algo_pref: [2, 1],
inactivity_timer: {{ slapparameter_dict.get('inactivity_timer', slap_configuration['configuration.default_nr_inactivity_timer']) }},
drb_config: "{{ drb_file }}",
{# TODO fully expose nr meas_config_desc in generic SR #}
meas_config_desc: {
a1_report_type: "rsrp",
a1_rsrp: -60,
...
...
software/ors-amarisoft/config/sib23.jinja2.asn
View file @
d62ca771
...
...
@@ -36,8 +36,8 @@
}
},
pdsch-ConfigCommon {
{% if
bbu == "ors"
%}
{%- if o
ne_watt == "True"
%}
{% if
ors
%}
{%- if o
rs['one-watt']
%}
referenceSignalPower {{ (tx_gain | int) - 54 }}, /* patched by eNB */
{%- else %}
referenceSignalPower {{ (tx_gain | int) - 35 }}, /* patched by eNB */
...
...
software/ors-amarisoft/config/ue-nr.jinja2.cfg
deleted
100644 → 0
View file @
d6e69812
{
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', 60) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', 40) }},
cell_groups: [{
group_type: "nr",
multi_ue: false,
cells: [{
rf_port: 0,
bandwidth: {{ slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_nr_bandwidth']) }},
band: {{ slapparameter_dict.get('nr_band', 0) }},
dl_nr_arfcn: {{ slapparameter_dict.get('dl_nr_arfcn', 0) }},
ssb_nr_arfcn: {{ slapparameter_dict.get('ssb_nr_arfcn', 0) }},
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: [
{
sim_algo: "{{ slapparameter_dict.get('sim_algo', 'milenage') }}",
opc: "{{ slapparameter_dict.get('opc', '') }}",
amf: {{ slapparameter_dict.get('amf', '0x9001') }},
sqn: "{{ slapparameter_dict.get('sqn', '000000000000') }}",
impu: "{{ slapparameter_dict.get('impu', '') }}",
impi: "{{ slapparameter_dict.get('impi', '') }}",
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",
}
]
}
software/ors-amarisoft/config/ue
-lte
.jinja2.cfg
→
software/ors-amarisoft/config/ue.jinja2.cfg
View file @
d62ca771
{%- if slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '1.4 MHz' %}
#define N_RB_DL 6
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '3 MHz' %}
#define N_RB_DL 15
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '5 MHz' %}
#define N_RB_DL 25
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '10 MHz' %}
#define N_RB_DL 50
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '15 MHz' %}
#define N_RB_DL 75
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '20 MHz' %}
#define N_RB_DL 100
{%- endif %}
{#- do_lte/do_nr indicate whether we have LTE or NR UE/cells #}
{%- do assert(do_lte or do_nr) %}
{%- do assert(not (do_lte and do_nr)) %}
{
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",
...
...
@@ -25,11 +16,14 @@ rf_driver: {
},
tx_gain: {{ slapparameter_dict.get('tx_gain', 60) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', 40) }},
cell_groups: [{
cell_groups: [
{%- if do_lte %}
{
// LTE cell
multi_ue: true,
cells: [
{
bandwidth:
N_RB_DL
,
bandwidth:
{{ slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) .removesuffix(' MHz') }}
,
dl_earfcn: {{ slapparameter_dict.get('dl_earfcn', 0) }},
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']) }},
...
...
@@ -38,7 +32,27 @@ rf_driver: {
],
pdcch_decode_opt: false,
pdcch_decode_opt_threshold: 0.1,
}],
},
{%- endif %}
{%- if do_nr %}
{
// NR cell
group_type: "nr",
multi_ue: false,
cells: [{
rf_port: 0,
bandwidth: {{ slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_nr_bandwidth']) }},
band: {{ slapparameter_dict.get('nr_band', 0) }},
dl_nr_arfcn: {{ slapparameter_dict.get('dl_nr_arfcn', 0) }},
ssb_nr_arfcn: {{ slapparameter_dict.get('ssb_nr_arfcn', 0) }},
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']) }},
}
],
},
{%- endif %}
],
ue_list: [
{
sim_algo: "{{ slapparameter_dict.get('sim_algo', 'milenage') }}",
...
...
@@ -47,10 +61,18 @@ rf_driver: {
sqn: "{{ slapparameter_dict.get('sqn', '000000000000') }}",
impu: "{{ slapparameter_dict.get('impu', '') }}",
impi: "{{ slapparameter_dict.get('impi', '') }}",
{%- if do_lte %}
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,
{%- endif %}
{%- if do_nr %}
imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_nr_imsi']) }}",
K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_nr_k']) }}",
as_release: 15,
ue_category: "nr",
{%- endif %}
rue_addr: "{{ slapparameter_dict.get('rue_addr', '') }}",
tun_setup_script: "ue-ifup",
apn: "internet",
}
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
d62ca771
{#- enb_mode indicates with which mode enb is instantiated with - enb | gnb #}
{%- set enb_mode = slap_configuration['slap-software-type'] %}
{%- do assert(enb_mode in ('enb', 'gnb'), enb_mode) %}
{#- defaults for eNB radio parameters.
NOTE they are installed temporary and will go away after switch to generic multiRU. #}
{%- do RF.setdefault('tx_gain', slapparameter_dict.get('tx_gain', 0)) %}
{%- do RF.setdefault('rx_gain', slapparameter_dict.get('rx_gain', 0)) %}
{%- do RF.setdefault('dl_earfcn', slapparameter_dict.get('dl_earfcn', 0)) %}
{%- do RF.setdefault('dl_nr_arfcn', slapparameter_dict.get('dl_nr_arfcn', 0)) %}
{%- do RF.setdefault('nr_band', slapparameter_dict.get('nr_band', 0)) %}
[buildout]
parts =
directory
...
...
@@ -47,9 +59,13 @@ cert = {{ slap_connection['cert-file'] }}
configuration.com_ws_port = 9001
configuration.com_addr = 127.0.1.2
configuration.mme_addr = 127.0.1.100
configuration.amf_addr = 127.0.1.100
configuration.gtp_addr = 127.0.1.1
configuration.default_lte_bandwidth = {{ default_lte_bandwidth }}
configuration.default_lte_inactivity_timer = {{ default_lte_inactivity_timer }}
configuration.default_nr_bandwidth = {{ default_nr_bandwidth }}
configuration.default_nr_inactivity_timer = {{ default_nr_inactivity_timer }}
configuration.default_nr_ssb_pos_bitmap = {{ default_nr_ssb_pos_bitmap }}
configuration.default_n_antenna_dl = {{ default_n_antenna_dl }}
configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
...
...
@@ -142,7 +158,7 @@ logfile = ${xamari-xlog-script:logfile}
forward-host = {{ slapparameter_dict.get('xlog_fluentbit_forward_host', '') }}
forward-port = {{ slapparameter_dict.get('xlog_fluentbit_forward_port', '') }}
forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }}
forward-self-hostname = {{
ors_id['ors
-id'] }}
forward-self-hostname = {{
comp_id['comp
-id'] }}
inline =
[SERVICE]
flush 5
...
...
@@ -176,22 +192,29 @@ recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
extra-context =
context =
json ors false
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key gtp_addr_v6 slap-configuration:ipv6-random
raw gtp_addr_v4 {{ lan_ipv4 }}
raw one_watt {{ ors_version['one-watt'] }}
raw tx_gain {{ ors_version['current-tx-gain'] }}
raw rx_gain {{ ors_version['current-rx-gain'] }}
raw earfcn {{ ors_version['current-earfcn'] }}
raw tx_gain {{ RF.tx_gain }}
raw rx_gain {{ RF.rx_gain }}
raw earfcn {{ RF.dl_earfcn }}
raw nr_arfcn {{ RF.dl_nr_arfcn }}
raw nr_band {{ RF.nr_band }}
raw software_name {{ software_name }}
raw rf_mode {{ rf_mode }}
raw trx {{ trx }}
raw bbu {{ bbu }}
raw ru {{ ru }}
raw ru_type {{ ru }}
{%- if enb_mode == 'enb' %}
json do_lte true
json do_nr false
{%- elif enb_mode == 'gnb' %}
json do_lte false
json do_nr true
{%- endif %}
import netaddr netaddr
${:extra-context}
...
...
@@ -202,7 +225,11 @@ output = ${directory:etc}/sib23.cfg
[drb-config]
<= config-base
{%- if enb_mode == 'enb' %}
url = {{ drb_lte_template }}
{%- elif enb_mode == 'gnb' %}
url = {{ drb_nr_template }}
{%- endif %}
output = ${directory:etc}/drb.cfg
[enb-config]
...
...
@@ -214,6 +241,7 @@ url = {{ enb_template }}
{% endif %}
output = ${directory:etc}/enb.cfg
extra-context =
import json_module json
json cell_list {{ rulib.cell_list | tojson }}
key sib23_file sib-config:output
key drb_file drb-config:output
...
...
@@ -229,14 +257,12 @@ websocket_url = ws://[${slap-configuration:ipv6-random}]:9001
{%- endif %}
enb-ipv6 = ${slap-configuration:ipv6-random}
enb-ipv4 = {{ lan_ipv4 }}
{% if bbu == "ors" %}
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'] }}
{% endif %}
current-earfcn = {{ ors_version['current-earfcn'] }}
{%- if enb_mode == 'enb' %}
current-earfcn = {{ RF.dl_earfcn }}
{%- elif enb_mode == 'gnb' %}
current-nr-arfcn = {{ RF.dl_nr_arfcn }}
current-nr-band = {{ RF.nr_band }}
{%- endif %}
amarisoft-version = {{ lte_version }}
license-expiration = {{ lte_expiration }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
...
...
software/ors-amarisoft/instance-gnb.jinja2.cfg
deleted
100644 → 0
View file @
d6e69812
[buildout]
parts =
directory
gnb-config
enb-service
xamari-xlog-service
{% if slapparameter_dict.get('xlog_fluentbit_forward_host') %}
xlog-fluentbit-service
{% endif %}
amarisoft-stats-service
amarisoft-rf-info-service
check-sdr-busy.py
check-baseband-latency.py
check-amarisoft-stats-log.py
check-rx-saturated.py
monitor-base
publish-connection-information
extends = {{ monitor_template }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[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.com_ws_port = 9001
configuration.com_addr = 127.0.1.2
configuration.amf_addr = 127.0.1.100
configuration.gtp_addr = 127.0.1.1
configuration.default_nr_bandwidth = {{ default_nr_bandwidth }}
configuration.default_nr_inactivity_timer = {{ default_nr_inactivity_timer }}
configuration.default_nr_ssb_pos_bitmap = {{ default_nr_ssb_pos_bitmap }}
configuration.default_n_antenna_dl = {{ default_n_antenna_dl }}
configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
[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
{% if slapparameter_dict.get("gnb_config_link", None) %}
[gnb-config-dl]
recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("gnb_config_link") }}
version = {{ slapparameter_dict.get("gnb_config_version") }}
offline = false
{% endif %}
[enb-sh-wrapper]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
gnb-log = ${directory:log}/gnb-output.log
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo -n /opt/amarisoft/rm-tmp-lte;
sudo -n /opt/amarisoft/init-sdr;
sudo -n /opt/amarisoft/init-enb;
(echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting gNB software..." && echo) >> ${:gnb-log};
tail -c 1M ${:gnb-log} > ${:gnb-log}.tmp;
mv ${:gnb-log}.tmp ${:gnb-log};
{{ enb }}/lteenb ${directory:etc}/gnb.cfg >> ${:gnb-log} 2>> ${:gnb-log};
{% endif %}
### eNodeB (enb)
[enb-service]
recipe = slapos.cookbook:wrapper
command-line = ${enb-sh-wrapper:output}
wrapper-path = ${directory:service}/enb
mode = 0775
reserve-cpu = True
pidfile = ${directory:run}/enb.pid
hash-files =
${gnb-config:output}
${enb-sh-wrapper:output}
environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[xamari-xlog-script]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
period = {{ slapparameter_dict.get("gnb_stats_fetch_period", 60) }}
stats_logspec = stats[samples,rf]/${:period}s
{%- if slapparameter_dict.get("gnb_drb_stats_enabled", True) %}
drb_stats_logspec = x.drb_stats/${:period}s
{%- else %}
drb_stats_logspec =
{%- endif %}
rotatespec = 100MB.9
logspec = ${:stats_logspec} ${:drb_stats_logspec}
logspec = ${:stats_logspec} ${:drb_stats_logspec}
{% if slapparameter_dict.get("websocket_password", "") %}
websock = ws://[${slap-configuration:ipv6-random}]:9001
{% else %}
websock = ws://127.0.1.2:9001
{% endif %}
xamari = {{ buildout_directory }}/bin/xamari
logfile = ${monitor-directory:public}/gnb.xlog
inline =
#!/bin/sh
exec ${:xamari} xlog --rotate ${:rotatespec} ${:websock} ${:logfile} ${:logspec}
[xamari-xlog-service]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/${:_buildout_section_name_}
command-line = ${xamari-xlog-script:output}
hash-files = ${:command-line}
{% if slapparameter_dict.get('xlog_fluentbit_forward_host') %}
[xlog-fluentbit-config]
recipe = slapos.recipe.template
output = ${directory:etc}/${:_buildout_section_name_}.cfg
logfile = ${xamari-xlog-script:logfile}
forward-host = {{ slapparameter_dict.get('xlog_fluentbit_forward_host', '') }}
forward-port = {{ slapparameter_dict.get('xlog_fluentbit_forward_port', '') }}
forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }}
forward-self-hostname = {{ ors_id['ors-id'] }}
inline =
[SERVICE]
flush 5
[INPUT]
name tail
path ${:logfile}
Read_from_Head True
[OUTPUT]
name forward
match *
Host ${:forward-host}
{%- if slapparameter_dict.get('xlog_fluentbit_forward_port') %}
Port ${:forward-port}
{%- endif %}
Shared_Key ${:forward-shared-key}
Self_Hostname ${:forward-self-hostname}
tls on
tls.verify off
[xlog-fluentbit-service]
recipe = slapos.cookbook:wrapper
fluentbit = {{ fluent_bit_location }}/bin/fluent-bit
fluentbit-config = ${xlog-fluentbit-config:output}
command-line = ${:fluentbit} -c ${:fluentbit-config}
wrapper-path = ${directory:service}/${:_buildout_section_name_}
hash-files = ${:fluentbit-config}
{% endif %}
[amarisoft-stats-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/amarisoft-stats.json.log
context =
section directory directory
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
raw stats_period {{ slapparameter_dict.get("gnb_stats_fetch_period", 60) }}
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775
url = {{ ru_amarisoft_stats_template }}
output = ${directory:bin}/amarisoft-stats.py
[amarisoft-rf-info-template]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
log-output = ${directory:var}/log/amarisoft-rf-info.json.log
context =
section directory directory
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
raw stats_period {{ slapparameter_dict.get("gnb_stats_fetch_period", 60) }}
raw testing {{ slapparameter_dict.get("testing", False) }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775
url = {{ ru_amarisoft_rf_info_template }}
output = ${directory:bin}/amarisoft-rf-info.py
[amarisoft-stats-service]
recipe = slapos.cookbook:wrapper
command-line = ${amarisoft-stats-template:output}
wrapper-path = ${directory:service}/amarisoft-stats
mode = 0775
hash-files =
${amarisoft-stats-template:output}
[amarisoft-rf-info-service]
recipe = slapos.cookbook:wrapper
command-line = ${amarisoft-rf-info-template:output}
wrapper-path = ${directory:service}/amarisoft-rf-info
mode = 0775
hash-files =
${amarisoft-rf-info-template:output}
[config-base]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
extra-context =
context =
section directory directory
section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration
key gtp_addr_v6 slap-configuration:ipv6-random
raw gtp_addr_v4 {{ lan_ipv4 }}
raw one_watt {{ ors_version['one-watt'] }}
raw tx_gain {{ ors_version['current-tx-gain'] }}
raw rx_gain {{ ors_version['current-rx-gain'] }}
raw nr_arfcn {{ ors_version['current-nr-arfcn'] }}
raw nr_band {{ ors_version['current-nr-band'] }}
raw software_name {{ software_name }}
raw rf_mode {{ rf_mode }}
raw trx {{ trx }}
raw bbu {{ bbu }}
raw ru {{ ru }}
json do_lte false
json do_nr true
import netaddr netaddr
${:extra-context}
[drb-config]
<= config-base
url = {{ drb_nr_template }}
output = ${directory:etc}/drb.cfg
[gnb-config]
<= config-base
{% if slapparameter_dict.get("gnb_config_link", None) %}
url = ${gnb-config-dl:target}
{% else %}
url = {{ enb_template }}
{% endif %}
output = ${directory:etc}/gnb.cfg
extra-context =
key drb_file drb-config:output
import-list =
rawfile slaplte.jinja2 {{ slaplte_template }}
[publish-connection-information]
<= monitor-publish
recipe = slapos.cookbook:publish.serialised
{%- if slapparameter_dict.get("websocket_password", "") %}
websocket_url = ws://[${slap-configuration:ipv6-random}]:9001
{%- endif %}
gnb-ipv6 = ${slap-configuration:ipv6-random}
gnb-ipv4 = {{ lan_ipv4 }}
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-nr-arfcn = {{ ors_version['current-nr-arfcn'] }}
current-nr-band = {{ ors_version['current-nr-band'] }}
amarisoft-version = {{ lte_version }}
license-expiration = {{ lte_expiration }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[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 %}
[macro.promise]
<= monitor-promise-base
name = ${:_buildout_section_name_}
[check-sdr-busy.py]
<= macro.promise
promise = check_sdr_busy
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-sdr = {{ sdr }}
config-sdr_dev = 0
config-dma_chan = 0
[check-baseband-latency.py]
<= macro.promise
promise = check_baseband_latency
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-amarisoft-stats-log = ${amarisoft-stats-template:log-output}
config-stats-period = {{ slapparameter_dict.get("gnb_stats_fetch_period", 60) }}
config-min-rxtx-delay = {{ slapparameter_dict.get("min_rxtx_delay", 0) }}
[check-amarisoft-stats-log.py]
<= macro.promise
promise = check_amarisoft_stats_log
output = ${directory:plugins}/check-amarisoft-stats-log.py
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-amarisoft-stats-log = ${amarisoft-stats-template:log-output}
config-stats-period = {{ slapparameter_dict.get("gnb_stats_fetch_period", 60) }}
[check-rx-saturated.py]
<= macro.promise
promise = check_rx_saturated
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-rf-rx-chan-list = {{ list(range(0, int(slapparameter_dict.get('n_antenna_ul', default_n_antenna_ul)))) }}
config-amarisoft-stats-log = ${amarisoft-stats-template:log-output}
config-stats-period = {{ slapparameter_dict.get("gnb_stats_fetch_period", 60) }}
config-max-rx-sample-db = {{ slapparameter_dict.get("max_rx_sample_db", 0) }}
software/ors-amarisoft/instance-ors-enb.jinja2.cfg
0 → 100644
View file @
d62ca771
# instance-ors-enb translates ORS enb/gnb into base enb/gnb.
{#- enb_mode indicates with which mode ors' enb is instantiated with - enb | gnb #}
{%- set enb_mode = slap_configuration['slap-software-type'] %}
{%- do assert(enb_mode in ('enb', 'gnb'), enb_mode) %}
{#- inject ORS defaults #}
{%- do RF.setdefault('tx_gain', ors_version['current-tx-gain']) %}
{%- do RF.setdefault('rx_gain', ors_version['current-rx-gain']) %}
{%- do RF.setdefault('earfcn', ors_version['current-earfcn']) %}
{%- do RF.setdefault('nr_arfcn', ors_version['current-nr-arfcn']) %}
{%- do RF.setdefault('nr_band', ors_version['current-nr-band']) %}
{#- backward compatibility: if ORS is running in gnb mode, and gnb_* parameters
are present, replace their generic enb_* counterparts with gnb_* ones #}
{%- if enb_mode == 'gnb' %}
{%- 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 _ %}
{%- do _.update({'enb_stats_fetch_period': _.gnb_stats_fetch_period}) %}
{%- endif %}
{%- if 'gnb_drb_stats_enabled' in _ %}
{%- do _.update({'enb_drb_stats_enabled': _.gnb_drb_stats_enabled}) %}
{%- endif %}
{%- endif %}
# code of base enb
{% include 'instance-enb-base.jinja2.cfg' %}
# let all templates know we are running in ORS mode
[config-base]
context -=
json ors false
context +=
key ors :ors
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'] }}
{%- if enb_mode == 'enb' %}
current-earfcn = {{ ors_version['current-earfcn'] }}
{%- elif enb_mode == 'gnb' %}
current-nr-arfcn = {{ ors_version['current-nr-arfcn'] }}
current-nr-band = {{ ors_version['current-nr-band'] }}
{%- endif %}
software/ors-amarisoft/instance-ors.cfg
0 → 100644
View file @
d62ca771
[buildout]
extends =
${template:output}
[switch-softwaretype]
enb = dynamic-template-ors-enb:output
gnb = dynamic-template-ors-enb:output
obsolete = dynamic-template-obsolete:output
enb-epc = $${:obsolete}
gnb-epc = $${:obsolete}
epc = $${:obsolete}
mme = $${:obsolete}
ue-lte =
ue-nr =
[dynamic-template-obsolete]
< = jinja2-template-base
url = ${template-obsolete:target}
filename = instance-obsolete.cfg
extensions = jinja2.ext.do
extra-context =
key slave_instance_list slap-configuration:slave-instance-list
# ORS-specific enb and gnb
# both are served by instance-ors-enb
[dynamic-template-ors-enb]
< = dynamic-template-enb
url = ${template-ors-enb:target}
filename = instance-enb.cfg
extra-context +=
section ors ors-version
section ors_version ors-version
import-list +=
rawfile instance-enb-base.jinja2.cfg ${template-enb:target}
[ors-version]
recipe = slapos.recipe.build
configuration = $${slap-configuration:configuration}
init =
import subprocess
range_map = {
"B38": "2570MHz - 2620MHz",
"B39": "1880MHz - 1920MHz",
"B42": "3400MHz - 3600MHz",
"B43": "3600MHz - 3800MHz",
"B28": "758MHz - 803MHz",
"N77": "3300MHz - 4200MHz",
"N79": "4400MHz - 5000MHz",
"UNKNOWN": "Information not available for this band",
}
default_tx_gain_map = {
"B38": (59, 65),
"B39": (59, 64),
"B42": (63, 62),
"B43": (63, 62),
"B28": (60, 62),
"N77": (60, 62),
"N79": (60, 62),
"UNKNOWN": (60, 62),
}
default_rx_gain_map = {
"B38": (43, 43),
"B39": (43, 43),
"B42": (43, 43),
"B43": (43, 43),
"B28": (43, 43),
"N77": (43, 43),
"N79": (43, 43),
"UNKNOWN": (43, 43),
}
default_earfcn_map = {
"B38": 38050,
"B39": 38350,
"B42": 42590,
"B43": 44590,
"B28": 9550,
"N77": 0,
"N79": 0,
"UNKNOWN": 0,
}
default_nr_arfcn_map = {
"B38": 519000,
"B39": 378000,
"B42": 632628,
"B43": 646666,
"B28": 0,
"N77": 660000,
"N79": 720000,
"UNKNOWN": 0,
}
default_nr_band_map = {
"B38": 41,
"B39": 39,
"B42": 78,
"B43": 78,
"B28": 0,
"N77": 77,
"N79": 79,
"UNKNOWN": 0,
}
power_map = {
"B38": (
lambda x: (-0.008712931375092506) * x**2 + (2.1973585140044642) * x + (-94.29420762479742),
lambda x: (-0.004472751640641793) * x**2 + (1.6308290630103919) * x + (-81.84549245154561),
),
"B39": (
lambda x: (-0.008712931375092506) * x**2 + (2.1973585140044642) * x + (-94.29420762479742),
lambda x: (-0.0022523817802900985) * x**2 + (1.2674016231310092) * x + (-66.57165215468584),
),
"B42": (
lambda x: (-0.014198126839751619) * x**2 + (2.980758813262773) * x + (-125.25800492285738),
lambda x: (0.003977721774394756) * x**2 + (0.527208191717173) * x + (-42.761142655285376),
),
"B43": (
lambda x: (-0.014198126839751619) * x**2 + (2.980758813262773) * x + (-125.25800492285738),
lambda x: (-0.0036530114002551943) * x**2 + (1.510856844601873) * x + (-74.58790185136355),
),
"B28": (
lambda x: "UNKNOWN",
lambda x: "UNKNOWN",
),
"N77": (
lambda x: "UNKNOWN",
lambda x: "UNKNOWN",
),
"N79": (
lambda x: "UNKNOWN",
lambda x: "UNKNOWN",
),
"UNKNOWN": (
lambda x: "UNKNOWN",
lambda x: "UNKNOWN",
),
}
def get_sdr_info(cmd):
if options['configuration'].get('testing', False):
return {'t': 'TDD', 'b': 'B39', 'v': '4.2', 's': 'B53'}[cmd].encode()
return subprocess.check_output(
["sudo", "-n", "/opt/amarisoft/get-sdr-info", "-" + cmd]
)
version = get_sdr_info('v').decode()
options['version'] = float(version) if version != 'UNKNOWN' else 0
options['band'] = get_sdr_info('b').decode()
options['tdd'] = get_sdr_info('t').decode()
options['one-watt'] = bool(options['version'] >= 4)
options['ors-version'] = "{} {} {}".format(
options['tdd'],
options['band'],
"2x1W" if options['one-watt'] else "2x0.5W",
)
default_tx_gain = default_tx_gain_map [options['band']][int(options['one-watt'])]
default_rx_gain = default_rx_gain_map [options['band']][int(options['one-watt'])]
default_earfcn = default_earfcn_map [options['band']]
default_nr_arfcn = default_nr_arfcn_map[options['band']]
default_nr_band = default_nr_band_map [options['band']]
options['range'] = range_map [options['band']]
options['current-tx-gain'] = options['configuration'].get('tx_gain' , default_tx_gain )
options['current-rx-gain'] = options['configuration'].get('rx_gain' , default_rx_gain )
options['current-earfcn'] = options['configuration'].get('dl_earfcn' , default_earfcn )
options['current-nr-arfcn'] = options['configuration'].get('dl_nr_arfcn', default_nr_arfcn)
options['current-nr-band'] = options['configuration'].get('nr_band' , default_nr_band )
power_estimate_dbm = power_map[options['band']][int(options['one-watt'])](float(options['current-tx-gain']))
if power_estimate_dbm == "UNKNOWN":
power_estimate = "Information not available for this band"
else:
power_estimate_mw = 10 ** ( power_estimate_dbm / 10 )
if power_estimate_mw < 0.01:
power_estimate_s = "{:0.2f} µW".format(power_estimate_mw * 1000)
else:
power_estimate_s = "{:0.2f} mW".format(power_estimate_mw)
power_estimate = "{:0.2f} dBm ({})".format(power_estimate_dbm, power_estimate_s)
options['power-estimate'] = power_estimate
software/ors-amarisoft/instance-ue-nr.jinja2.cfg
deleted
100644 → 0
View file @
d6e69812
[buildout]
parts =
directory
lte-ue-nr-config
lte-ue-service
check-sdr-busy.py
monitor-base
publish-connection-information
extends = {{ monitor_template }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[monitor-httpd-conf-parameter]
httpd-include-file = {{ buildout_directory }}/etc/httpd-include-file.conf
port = ${monitor-instance-parameter:monitor-httpd-port}
url = https://[${monitor-instance-parameter:monitor-httpd-ipv6}]:${:port}
[monitor-instance-parameter]
monitor-httpd-port = ${monitor-address:port}
[monitor-address]
recipe = slapos.cookbook:free_port
minimum = 8035
maximum = 8055
ip = ${monitor-instance-parameter:monitor-httpd-ipv6}
[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_nr_bandwidth = {{ default_nr_bandwidth }}
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
{% 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_}
ue-log = ${directory:log}/ue-output.log
inline =
#!/bin/sh
{% if not slapparameter_dict.get("testing", False) %}
sudo /opt/amarisoft/rm-tmp-lte | true;
(echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting UE software..." && echo) >> ${:ue-log};
tail -c 1M ${:ue-log} > ${:ue-log}.tmp;
mv ${:ue-log}.tmp ${:ue-log};
{{ ue }}/lteue ${directory:etc}/ue.cfg >> ${:ue-log} 2>> ${:ue-log};
{% endif %}
### User Equipment (UE)
[lte-ue-service]
recipe = slapos.cookbook:wrapper
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-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
[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 %}
[macro.promise]
<= monitor-promise-base
name = ${:_buildout_section_name_}
[check-sdr-busy.py]
<= macro.promise
promise = check_sdr_busy
config-testing = {{ slapparameter_dict.get("testing", False) }}
config-sdr = {{ sdr }}
config-sdr_dev = 0
config-dma_chan = 0
software/ors-amarisoft/instance-ue
-lte
.jinja2.cfg
→
software/ors-amarisoft/instance-ue.jinja2.cfg
View file @
d62ca771
{#- rat indicates with which mode ue is instantiated with - lte | nr #}
{%- set rat = slap_configuration['slap-software-type'] .removeprefix('ue-') %}
{%- do assert(rat in ('lte', 'nr'), rat) %}
[buildout]
parts =
directory
lte-ue-
lte-
config
lte-ue-config
lte-ue-service
check-sdr-busy.py
monitor-base
...
...
@@ -36,10 +40,13 @@ key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
configuration.default_lte_bandwidth = {{ default_lte_bandwidth }}
configuration.default_nr_bandwidth = {{ default_nr_bandwidth }}
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_nr_imsi = {{ default_nr_imsi }}
configuration.default_lte_k = {{default_lte_k}}
configuration.default_nr_k = {{ default_nr_k }}
[directory]
recipe = slapos.cookbook:mkdirectory
...
...
@@ -56,11 +63,11 @@ service = ${:etc}/service
promise = ${:etc}/promise
log = ${:var}/log
{% if slapparameter_dict.get("ue_
lte_
config_link", None) %}
[ue-
lte-
config-dl]
{% if slapparameter_dict.get("ue_config_link", None) %}
[ue-config-dl]
recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("ue_
lte_
config_link") }}
version = {{ slapparameter_dict.get("ue_
lte_
config_version") }}
url = {{ slapparameter_dict.get("ue_config_link") }}
version = {{ slapparameter_dict.get("ue_config_version") }}
offline = false
{% endif %}
...
...
@@ -87,7 +94,7 @@ mode = 0775
reserve-cpu = True
pidfile = ${directory:run}/ue.pid
hash-files =
${lte-ue-
lte-
config:output}
${lte-ue-config:output}
${lte-ue-sh-wrapper:output}
environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib
...
...
@@ -101,13 +108,20 @@ context =
section slap_configuration slap-configuration
section pub_info publish-connection-information
key slapparameter_dict slap-configuration:configuration
[lte-ue-lte-config]
{%- if rat == 'lte' %}
json do_lte true
json do_nr false
{%- elif rat == 'nr' %}
json do_lte false
json do_nr true
{%- endif %}
[lte-ue-config]
<= config-base
{% if slapparameter_dict.get("ue_
lte_
config_link", None) %}
url = ${ue-
lte-
config-dl:target}
{% if slapparameter_dict.get("ue_config_link", None) %}
url = ${ue-config-dl:target}
{% else %}
url = {{ ue_
lte_
template }}
url = {{ ue_template }}
{% endif %}
output = ${directory:etc}/ue.cfg
...
...
software/ors-amarisoft/instance.cfg
View file @
d62ca771
...
...
@@ -26,6 +26,7 @@ output = $${buildout:directory}/$${:filename}
extra-context =
context =
import json_module json
import netaddr netaddr
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
raw buildout_directory ${buildout:directory}
...
...
@@ -78,144 +79,6 @@ init =
pass
options['lte-expiration'] = lte_expiration
[ors-version]
recipe = slapos.recipe.build
configuration = $${slap-configuration:configuration}
init =
import subprocess
range_map = {
"B38": "2570MHz - 2620MHz",
"B39": "1880MHz - 1920MHz",
"B42": "3400MHz - 3600MHz",
"B43": "3600MHz - 3800MHz",
"B28": "758MHz - 803MHz",
"N77": "3300MHz - 4200MHz",
"N79": "4400MHz - 5000MHz",
"UNKNOWN": "Information not available for this band",
}
default_tx_gain_map = {
"B38": (59, 65),
"B39": (59, 64),
"B42": (63, 62),
"B43": (63, 62),
"B28": (60, 62),
"N77": (60, 62),
"N79": (60, 62),
"UNKNOWN": (60, 62),
}
default_rx_gain_map = {
"B38": (43, 43),
"B39": (43, 43),
"B42": (43, 43),
"B43": (43, 43),
"B28": (43, 43),
"N77": (43, 43),
"N79": (43, 43),
"UNKNOWN": (43, 43),
}
default_earfcn_map = {
"B38": 38050,
"B39": 38350,
"B42": 42590,
"B43": 44590,
"B28": 9550,
"N77": 0,
"N79": 0,
"UNKNOWN": 0,
}
default_nr_arfcn_map = {
"B38": 519000,
"B39": 378000,
"B42": 632628,
"B43": 646666,
"B28": 0,
"N77": 660000,
"N79": 720000,
"UNKNOWN": 0,
}
default_nr_band_map = {
"B38": 41,
"B39": 39,
"B42": 78,
"B43": 78,
"B28": 0,
"N77": 77,
"N79": 79,
"UNKNOWN": 0,
}
power_map = {
"B38": (
lambda x: (-0.008712931375092506) * x**2 + (2.1973585140044642) * x + (-94.29420762479742),
lambda x: (-0.004472751640641793) * x**2 + (1.6308290630103919) * x + (-81.84549245154561),
),
"B39": (
lambda x: (-0.008712931375092506) * x**2 + (2.1973585140044642) * x + (-94.29420762479742),
lambda x: (-0.0022523817802900985) * x**2 + (1.2674016231310092) * x + (-66.57165215468584),
),
"B42": (
lambda x: (-0.014198126839751619) * x**2 + (2.980758813262773) * x + (-125.25800492285738),
lambda x: (0.003977721774394756) * x**2 + (0.527208191717173) * x + (-42.761142655285376),
),
"B43": (
lambda x: (-0.014198126839751619) * x**2 + (2.980758813262773) * x + (-125.25800492285738),
lambda x: (-0.0036530114002551943) * x**2 + (1.510856844601873) * x + (-74.58790185136355),
),
"B28": (
lambda x: "UNKNOWN",
lambda x: "UNKNOWN",
),
"N77": (
lambda x: "UNKNOWN",
lambda x: "UNKNOWN",
),
"N79": (
lambda x: "UNKNOWN",
lambda x: "UNKNOWN",
),
"UNKNOWN": (
lambda x: "UNKNOWN",
lambda x: "UNKNOWN",
),
}
def get_sdr_info(cmd):
if options['configuration'].get('testing', False):
return {'t': 'TDD', 'b': 'B39', 'v': '4.2', 's': 'B53'}[cmd].encode()
return subprocess.check_output(
["sudo", "-n", "/opt/amarisoft/get-sdr-info", "-" + cmd]
)
version = get_sdr_info('v').decode()
options['version'] = float(version) if version != 'UNKNOWN' else 0
options['band'] = get_sdr_info('b').decode()
options['tdd'] = get_sdr_info('t').decode()
options['one-watt'] = bool(options['version'] >= 4)
options['ors-version'] = "{} {} {}".format(
options['tdd'],
options['band'],
"2x1W" if options['one-watt'] else "2x0.5W",
)
default_tx_gain = default_tx_gain_map [options['band']][int(options['one-watt'])]
default_rx_gain = default_rx_gain_map [options['band']][int(options['one-watt'])]
default_earfcn = default_earfcn_map [options['band']]
default_nr_arfcn = default_nr_arfcn_map[options['band']]
default_nr_band = default_nr_band_map [options['band']]
options['range'] = range_map [options['band']]
options['current-tx-gain'] = options['configuration'].get('tx_gain' , default_tx_gain )
options['current-rx-gain'] = options['configuration'].get('rx_gain' , default_rx_gain )
options['current-earfcn'] = options['configuration'].get('dl_earfcn' , default_earfcn )
options['current-nr-arfcn'] = options['configuration'].get('dl_nr_arfcn', default_nr_arfcn)
options['current-nr-band'] = options['configuration'].get('nr_band' , default_nr_band )
power_estimate_dbm = power_map[options['band']][int(options['one-watt'])](float(options['current-tx-gain']))
if power_estimate_dbm == "UNKNOWN":
power_estimate = "Information not available for this band"
else:
power_estimate_mw = 10 ** ( power_estimate_dbm / 10 )
if power_estimate_mw < 0.01:
power_estimate_s = "{:0.2f} µW".format(power_estimate_mw * 1000)
else:
power_estimate_s = "{:0.2f} mW".format(power_estimate_mw)
power_estimate = "{:0.2f} dBm ({})".format(power_estimate_dbm, power_estimate_s)
options['power-estimate'] = power_estimate
[lan-ip]
recipe = slapos.recipe.build
init =
...
...
@@ -229,37 +92,24 @@ init =
except:
options['ipv4'] = "0.0.0.0"
[
ors
-id]
[
comp
-id]
recipe = slapos.recipe.build
computer = $${slap-connection:computer-id}
title = $${slap-configuration:root-instance-title}
init =
import socket
options['hostname'] = socket.gethostname()
ors
_id = '__'.join(options[x] for x in ('hostname', 'computer', 'title'))
options['
ors-id'] = ors
_id
comp
_id = '__'.join(options[x] for x in ('hostname', 'computer', 'title'))
options['
comp-id'] = comp
_id
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
enb = dynamic-template-enb:output
gnb = dynamic-template-
g
nb:output
gnb = dynamic-template-
e
nb:output
core-network = dynamic-template-core-network:output
ue-lte = dynamic-template-ue
-lte
:output
ue-nr = dynamic-template-ue
-nr
:output
ue-lte = dynamic-template-ue:output
ue-nr = dynamic-template-ue:output
RootSoftwareInstance = $${:core-network}
obsolete = dynamic-template-obsolete:output
enb-epc = $${:obsolete}
gnb-epc = $${:obsolete}
epc = $${:obsolete}
mme = $${:obsolete}
[dynamic-template-obsolete]
< = jinja2-template-base
url = ${template-obsolete:target}
filename = instance-obsolete.cfg
extensions = jinja2.ext.do
extra-context =
key slave_instance_list slap-configuration:slave-instance-list
[dynamic-template-enb]
< = jinja2-template-base
...
...
@@ -268,8 +118,8 @@ filename = instance-enb.cfg
extensions = jinja2.ext.do
extra-context =
raw monitor_template ${monitor2-template:output}
section ors_version ors-version
section
ors_id ors
-id
json RF {}
section
comp_id comp
-id
section slap_configuration slap-configuration
key lte_version amarisoft:lte-version
key lte_expiration amarisoft:lte-expiration
...
...
@@ -278,6 +128,7 @@ extra-context =
raw enb_template ${enb.jinja2.cfg:target}
raw slaplte_template ${slaplte.jinja2:target}
raw drb_lte_template ${drb_lte.jinja2.cfg:target}
raw drb_nr_template ${drb_nr.jinja2.cfg:target}
raw sib23_template ${sib23.jinja2.asn:target}
raw ru_amarisoft_stats_template ${ru_amarisoft-stats.jinja2.py:target}
raw ru_amarisoft_rf_info_template ${ru_amarisoft-rf-info.jinja2.py:target}
...
...
@@ -295,6 +146,9 @@ extra-context =
raw openssl_location ${openssl:location}
raw default_lte_bandwidth ${default-params:default-lte-bandwidth}
raw default_lte_inactivity_timer ${default-params:default-lte-inactivity-timer}
raw default_nr_bandwidth ${default-params:default-nr-bandwidth}
raw default_nr_ssb_pos_bitmap ${default-params:default-nr-ssb-pos-bitmap}
raw default_nr_inactivity_timer ${default-params:default-nr-inactivity-timer}
raw default_n_antenna_dl ${default-params:default-n-antenna-dl}
raw default_n_antenna_ul ${default-params:default-n-antenna-ul}
raw ru_dnsmasq_template ${ru_dnsmasq.jinja2.cfg:target}
...
...
@@ -303,33 +157,6 @@ extra-context =
raw openssh_location ${openssh:location}
raw openssh_output_keygen ${openssh-output:keygen}
[dynamic-template-gnb]
< = jinja2-template-base
url = ${template-gnb:target}
filename = instance-gnb.cfg
extensions = jinja2.ext.do
extra-context =
raw monitor_template ${monitor2-template:output}
section ors_version ors-version
section ors_id ors-id
key lte_version amarisoft:lte-version
key lte_expiration amarisoft:lte-expiration
key enb amarisoft:enb
key sdr amarisoft:sdr
raw enb_template ${enb.jinja2.cfg:target}
raw slaplte_template ${slaplte.jinja2:target}
raw drb_nr_template ${drb_nr.jinja2.cfg:target}
raw ru_amarisoft_stats_template ${ru_amarisoft-stats.jinja2.py:target}
raw ru_amarisoft_rf_info_template ${ru_amarisoft-rf-info.jinja2.py:target}
raw openssl_location ${openssl:location}
raw default_nr_bandwidth ${default-params:default-nr-bandwidth}
raw default_nr_ssb_pos_bitmap ${default-params:default-nr-ssb-pos-bitmap}
raw default_nr_inactivity_timer ${default-params:default-nr-inactivity-timer}
raw default_n_antenna_dl ${default-params:default-n-antenna-dl}
raw default_n_antenna_ul ${default-params:default-n-antenna-ul}
raw python_path ${python3:location}
raw fluent_bit_location ${fluent-bit:location}
[dynamic-template-core-network]
< = jinja2-template-base
url = ${template-core-network:target}
...
...
@@ -350,38 +177,25 @@ extra-context =
key ue_db_path ue-db-config:output
key slave_instance_list slap-configuration:slave-instance-list
[dynamic-template-ue
-lte
]
[dynamic-template-ue]
< = jinja2-template-base
url = ${template-ue
-lte
:target}
url = ${template-ue:target}
filename = instance-ue-lte.cfg
extensions = jinja2.ext.do
extra-context =
section slap_configuration slap-configuration
raw monitor_template ${monitor2-template:output}
key ue amarisoft:ue
key sdr amarisoft:sdr
raw ue_
lte_template ${ue-lt
e.jinja2.cfg:target}
raw ue_
template ${u
e.jinja2.cfg:target}
raw openssl_location ${openssl:location}
raw default_lte_bandwidth ${default-params:default-lte-bandwidth}
raw default_n_antenna_dl ${default-params:default-n-antenna-dl}
raw default_n_antenna_ul ${default-params:default-n-antenna-ul}
raw default_lte_imsi ${default-params:default-lte-imsi}
raw default_lte_k ${default-params:default-lte-k}
[dynamic-template-ue-nr]
< = jinja2-template-base
url = ${template-ue-nr:target}
filename = instance-ue-nr.cfg
extensions = jinja2.ext.do
extra-context =
raw monitor_template ${monitor2-template:output}
key ue amarisoft:ue
key sdr amarisoft:sdr
raw ue_nr_template ${ue-nr.jinja2.cfg:target}
raw openssl_location ${openssl:location}
raw default_nr_bandwidth ${default-params:default-nr-bandwidth}
raw default_n_antenna_dl ${default-params:default-n-antenna-dl}
raw default_n_antenna_ul ${default-params:default-n-antenna-ul}
raw default_lte_imsi ${default-params:default-lte-imsi}
raw default_nr_imsi ${default-params:default-nr-imsi}
raw default_lte_k ${default-params:default-lte-k}
raw default_nr_k ${default-params:default-nr-k}
[ue-db-config]
...
...
software/ors-amarisoft/ru/libinstance.jinja2.cfg
View file @
d62ca771
...
...
@@ -16,6 +16,8 @@
{%- macro buildout() %}
{%- set testing = slapparameter_dict.get("testing", False) %}
{#- part emits new buildout section and registers it into buildout.parts #}
{%- set parts_list = [] %}
{%- macro part(name) %}
...
...
@@ -28,7 +30,7 @@
{{ part('promise-'+name) }}
<= monitor-promise-base
name = {{ name }}.py
config-testing = {{
slapparameter_dict.get("testing", False)
}}
config-testing = {{
testing
}}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
{%- endmacro %}
...
...
@@ -56,6 +58,11 @@ ntap = {{ ntap }}
command = {{ netcapdo }} {{ pythonwitheggs }} {{ ru_tapsplit }} {{ slaplte.tap }} ${:ntap}
update-command = ${:command}
stop-on-error = true
{%- if testing %}
# StandaloneSlapOS does not provide slaptap
command = :
{%- endif %}
{%- set test_slapnet = netaddr.IPNetwork('1234::/71') %}
{%- if ntap <= 1 %}
[vtap]
...
...
@@ -65,10 +72,16 @@ stop-on-error = false
{%- if ntap == 1 %}
{%- do vtap_list.append(slaplte.tap) %}
[vtap.{{ slaplte.tap }}]
{%- if testing %}
network = {{ str(test_slapnet) }}
gateway = {{ str(test_slapnet[1]) }}
addr = {{ str(test_slapnet[-1]) }}
{%- else %}
network = {{ slap_configuration['tap-ipv6-network'] }}
gateway = {{ slap_configuration['tap-ipv6-gateway'] }}
addr = {{ slap_configuration['tap-ipv6-addr'] }}
{%- endif %}
{%- endif %}
{%- else %}
...
...
@@ -84,6 +97,7 @@ init =
with open(path) as f:
return f.read()
import netaddr
# ~ import tapsplit
tapsplit = types.ModuleType('tapsplit')
exec(readfile('{{ ru_tapsplit }}'), tapsplit.__dict__)
...
...
@@ -91,6 +105,9 @@ init =
# simulate what tapsplit would assign to the tap
# ( tap subinterface will be created for real later at install time - when it
# is too late to update section options )
if {{ testing }}:
slapnet = netaddr.IPNetwork('{{ str(test_slapnet) }}')
else:
slapnet = tapsplit.ifnet6('{{ slaplte.tap }}')
tapnet = tapsplit.netsplit(slapnet, {{ 1+ntap }}) [{{ i }}]
...
...
@@ -205,7 +222,7 @@ context =
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
raw testing {{
slapparameter_dict.get("testing", False)
}}
raw testing {{
testing
}}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775
url = {{ ru_amarisoft_rf_info_template }}
...
...
@@ -228,7 +245,7 @@ context =
key slapparameter_dict slap-configuration:configuration
key log_file :log-output
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
raw testing {{
slapparameter_dict.get("testing", False)
}}
raw testing {{
testing
}}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775
url = {{ ru_amarisoft_stats_template }}
...
...
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
View file @
d62ca771
...
...
@@ -4,10 +4,12 @@
{#- indicate whether RU is listening for netconf #}
{%- if not testing %}
{{ promise('%s-netconf-socket' % ru_ref) }}
promise = check_socket_listening
config-host = ${vtap.{{cell._tap}}:gateway}
config-port = 830
{%- endif %}
{#- push firmware to RU #}
...
...
@@ -27,7 +29,7 @@ context =
key log_file :log-output
key software_reply_json_log_file :software-reply-json-log-output
key remote_file_path :remote-file-path
raw testing {{
slapparameter_dict.get("testing", False)
}}
raw testing {{
testing
}}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
key is_firmware_updated :is_firmware_updated
...
...
@@ -37,9 +39,11 @@ mode = 0775
url = {{ ru_lopcomm_software_template }}
output = ${directory:script}/{{ru_ref}}-software.py
{%- if not testing %}
{{ promise('%s-firmware' % ru_ref) }}
promise = check_command_execute
config-command = [ -f ${ {{-ru_ref}}-software-template:is_firmware_updated} ]
{%- endif %}
{#- push config to RU #}
...
...
@@ -69,7 +73,7 @@ context =
section directory directory
section vtap vtap.{{ cell._tap }}
key log_file :log-output
raw testing {{
slapparameter_dict.get("testing", False)
}}
raw testing {{
testing
}}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
raw CreateProcessingEle_template {{ ru_lopcomm_CreateProcessingEle_template }}
...
...
@@ -110,7 +114,7 @@ context =
key is_netconf_connected :is_netconf_connected
key ncsession_json_log_file :ncsession-json-log-output
key software_json_log_file :software-json-log-output
raw testing {{
slapparameter_dict.get("testing", False)
}}
raw testing {{
testing
}}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }}
import netaddr netaddr
...
...
@@ -126,9 +130,11 @@ mode = 0775
hash-files =
${:command-line}
{%- if not testing %}
{{ promise('%s-netconf-connection' % ru_ref) }}
promise = check_command_execute
config-command = [ -f ${ {{-ru_ref}}-stats-template:is_netconf_connected} ]
{%- endif %}
{{ promise('%s-vswr' % ru_ref) }}
promise = check_lopcomm_vswr
...
...
@@ -174,7 +180,7 @@ context =
key log_file :log-output
key json_log_file :json-log-output
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
raw testing {{
slapparameter_dict.get("testing", False)
}}
raw testing {{
testing
}}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs
import netaddr netaddr
mode = 0775
...
...
software/ors-amarisoft/slaplte.jinja2
View file @
d62ca771
{#- Package slaplte provides helpers for configuring Amarisoft LTE services in SlapOS.
- load_cell initializes cell registry.
The following utilities are also provided:
- J should be used around macro calls to retrieve returned objects.
- error reports instantiation error.
-#}
{#- J is used around macro calls to retrieve returned objects.
It is needed to workaround jinja2 limitation that macro can return only
strings - not arbitrary objects: we return objects as JSON-encoded string
and J decodes them.
By convention macros that return JSON-encoded objects start with "j" prefix.
Usage example:
set obj = J(jmymacro(...))
#}
{%- set J = json_module.loads %}
{#- tap indicates tap interface, that slapos told us to use,
or 'xxx-notap-xxx' if slapos provided us either nothing or empty string. #}
{%- set tap = slap_configuration.get('tap-name', '') %}
...
...
@@ -12,6 +32,20 @@
{%- endif %}
{#- bug indicates an error in template logic.
it should not happen. #}
{%- macro bug(msg) %}
{%- do assert(False, 'BUG: %s' % (msg,)) %}
{%- endmacro %}
{#- error reports instantiation error. #}
{%- macro error(msg) %}
{%- set msg = 'Instantiation Error: %s\n' % msg %}
{%- do assert(False, msg) %}
{%- endmacro %}
{#- ---- loading ---- #}
{#- load_cell initializes cell registry.
...
...
software/ors-amarisoft/slapos-render-config.py
View file @
d62ca771
...
...
@@ -6,10 +6,10 @@
import
zc.buildout.buildout
# XXX workaround for https://lab.nexedi.com/nexedi/slapos.recipe.template/merge_requests/9
from
slapos.recipe.template
import
jinja2_template
import
json
import
json
,
os
,
glob
# j2render renders config/<src> into config/<out> with provided json parameters.
# j2render renders config/<src> into config/
out/
<out> with provided json parameters.
def
j2render
(
src
,
out
,
jcfg
):
ctx
=
json
.
loads
(
jcfg
)
assert
'_standalone'
not
in
ctx
...
...
@@ -17,11 +17,12 @@ def j2render(src, out, jcfg):
textctx
=
''
for
k
,
v
in
ctx
.
items
():
textctx
+=
'json %s %s
\
n
'
%
(
k
,
json
.
dumps
(
v
))
textctx
+=
'import json_module json
\
n
'
buildout
=
None
# stub
r
=
jinja2_template
.
Recipe
(
buildout
,
"recipe"
,
{
'extensions'
:
'jinja2.ext.do'
,
'url'
:
'config/{}'
.
format
(
src
),
'output'
:
'config/{}'
.
format
(
out
),
'output'
:
'config/
out/
{}'
.
format
(
out
),
'context'
:
textctx
,
'import-list'
:
'''
rawfile slaplte.jinja2 slaplte.jinja2'''
,
...
...
@@ -34,7 +35,7 @@ def j2render(src, out, jcfg):
return
f
.
read
()
r
.
_read
=
_read
with
open
(
'config/{}'
.
format
(
out
),
'w+'
)
as
f
:
with
open
(
'config/
out/
{}'
.
format
(
out
),
'w+'
)
as
f
:
f
.
write
(
r
.
_render
().
decode
())
...
...
@@ -57,11 +58,11 @@ def do(src, out, rat, slapparameter_dict):
"do_nr": %(jdo_nr)s,
"trx": "sdr",
"bbu": "ors",
"ru": "ors",
"o
ne_watt": "True"
,
"earfcn":
646666
,
"nr_arfcn":
646666
,
"nr_band":
43
,
"ru
_type
": "ors",
"o
rs": {"one-watt": true}
,
"earfcn":
36100
,
"nr_arfcn":
380000
,
"nr_band":
39
,
"tx_gain": 62,
"rx_gain": 43,
"sib23_file": "sib",
...
...
@@ -90,10 +91,53 @@ def do(src, out, rat, slapparameter_dict):
"etc": "etc",
"var": "var"
},
"pub_info": {
"rue_bind_addr": "::1",
"com_addr": "[::1]:9002"
},
"slapparameter_dict": %(jslapparameter_dict)s
}"""
j2render
(
src
,
out
,
json_params
%
locals
())
do
(
'enb.jinja2.cfg'
,
'enb.cfg'
,
'lte'
,
{
"tdd_ul_dl_config"
:
"[Configuration 6] 5ms 5UL 3DL (maximum uplink)"
})
do
(
'enb.jinja2.cfg'
,
'gnb.cfg'
,
'nr'
,
{
"tdd_ul_dl_config"
:
"5ms 8UL 1DL 2/10 (maximum uplink)"
})
def
do_enb
():
peer_lte
=
{
'cell_id'
:
'0x12345'
,
'pci'
:
35
,
'dl_earfcn'
:
700
,
'tac'
:
123
,
}
peer_nr
=
{
'nr_cell_id'
:
'0x77712'
,
'gnb_id_bits'
:
22
,
'dl_nr_arfcn'
:
520000
,
'nr_band'
:
38
,
'pci'
:
75
,
'tac'
:
321
,
}
do
(
'enb.jinja2.cfg'
,
'enb.cfg'
,
'lte'
,
{
"tdd_ul_dl_config"
:
"[Configuration 6] 5ms 5UL 3DL (maximum uplink)"
,
"ncell_list"
:
{
'1'
:
peer_lte
},
})
do
(
'enb.jinja2.cfg'
,
'gnb.cfg'
,
'nr'
,
{
"tdd_ul_dl_config"
:
"5ms 8UL 1DL 2/10 (maximum uplink)"
,
"ncell_list"
:
{
'1'
:
peer_nr
},
})
def
do_ue
():
do
(
'ue.jinja2.cfg'
,
'ue-lte.cfg'
,
'lte'
,
{
'rue_addr'
:
'host1'
})
do
(
'ue.jinja2.cfg'
,
'ue-nr.cfg'
,
'nr'
,
{
'rue_addr'
:
'host2'
})
def
main
():
os
.
makedirs
(
'config/out'
,
exist_ok
=
True
)
for
f
in
glob
.
glob
(
'config/out/*'
):
os
.
remove
(
f
)
do_enb
()
do_ue
()
if
__name__
==
'__main__'
:
main
()
software/ors-amarisoft/software-base.cfg
View file @
d62ca771
...
...
@@ -27,8 +27,7 @@ parts +=
ims.jinja2.cfg
enb.jinja2.cfg
ue_db.jinja2.cfg
ue-lte.jinja2.cfg
ue-nr.jinja2.cfg
ue.jinja2.cfg
drb_lte.jinja2.cfg
drb_nr.jinja2.cfg
sib23.jinja2.asn
...
...
@@ -60,16 +59,10 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template-enb]
<= download-base
[template-gnb]
<= download-base
[template-core-network]
<= download-base
[template-ue-lte]
<= download-base
[template-ue-nr]
[template-ue]
<= download-base
[template-obsolete]
...
...
@@ -128,12 +121,9 @@ filename = mme.jinja2.cfg
[ims.jinja2.cfg]
<= copy-config-to-instance
filename = ims.jinja2.cfg
[ue-lte.jinja2.cfg]
<= copy-config-to-instance
filename = ue-lte.jinja2.cfg
[ue-nr.jinja2.cfg]
[ue.jinja2.cfg]
<= copy-config-to-instance
filename = ue
-nr
.jinja2.cfg
filename = ue.jinja2.cfg
[slaplte.jinja2]
<= download-base
...
...
software/ors-amarisoft/software-fdd-ors.cfg
View file @
d62ca771
# This file was generated using a jinja2 template and the render-templates script, don't modify directly.
[buildout]
extends =
software-
base
.cfg
software-
ors
.cfg
[default-params]
default-lte-bandwidth = 20 MHz
...
...
software/ors-amarisoft/software-ors.cfg
0 → 100644
View file @
d62ca771
# software for Open Radio Station.
#
# It is a wrapper around base software which adds ORS-specific features.
[buildout]
extends =
software-base.cfg
parts +=
template-ors
# switch instance.cfg to be installed from instance-ors.cfg instead of template.cfg
# remember original template.cfg as template-base.cfg
[template]
output = ${buildout:directory}/template-base.cfg
[template-ors]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
[template-ors-enb]
<= download-base
software/ors-amarisoft/software-tdd-ors.cfg
View file @
d62ca771
# This file was generated using a jinja2 template and the render-templates script, don't modify directly.
[buildout]
extends =
software-
base
.cfg
software-
ors
.cfg
[default-params]
default-lte-bandwidth = 20 MHz
...
...
software/ors-amarisoft/software.jinja2.cfg
View file @
d62ca771
# {{ generated_file_message }}
[buildout]
extends =
{%- if bbu == 'ors' %}
software-ors.cfg
{%- else %}
software-base.cfg
{%- endif %}
[default-params]
default-lte-bandwidth = {{ default_lte_bandwidth }}
...
...
software/ors-amarisoft/test/setup.py
View file @
d62ca771
...
...
@@ -45,6 +45,7 @@ setup(
'slapos.core'
,
'slapos.libnetworkcache'
,
'slapos.cookbook'
,
'pcpp'
,
],
zip_safe
=
True
,
test_suite
=
'test'
,
...
...
software/ors-amarisoft/test/test.jinja2.py
View file @
d62ca771
...
...
@@ -26,11 +26,12 @@
##############################################################################
import
os
import
yaml
import
json
import
glob
import
requests
from
test
import
yamlpp_load
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
...
...
@@ -140,14 +141,18 @@ def test_enb_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
{
%-
if
rf_mode
==
'tdd'
%
}
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'uldl_config'
],
6
)
{
%-
else
%
}
self
.
assertNotIn
(
'uldl_config'
,
conf
[
'cell_list'
][
0
])
{
%-
endif
%
}
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_rb_dl'
],
50
)
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
))
...
...
@@ -169,26 +174,21 @@ def test_enb_conf(self):
self
.
assertEqual
(
p
[
'cell_id'
],
int
(
conf_ncell
[
'cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
def
test_gnb_conf1
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
gnb_param_dict1
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
gnb_param_dict1
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_
default'
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_
list'
][
0
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
gnb_param_dict1
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
gnb_param_dict1
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
gnb_param_dict1
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'bandwidth'
],
gnb_param_dict1
[
'nr_bandwidth'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
gnb_param_dict1
[
'gnb_id'
],
16
))
self
.
assertEqual
(
conf
[
'gnb_id_bits'
],
gnb_param_dict1
[
'gnb_id_bits'
])
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
...
...
@@ -211,25 +211,19 @@ def test_gnb_conf1(self):
self
.
assertEqual
(
p
[
'nr_cell_id'
],
int
(
conf_ncell
[
'nr_cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
self
.
assertEqual
(
p
[
'band'
],
conf_ncell
[
'nr_band'
])
tdd_config
=
conf
[
'nr_cell_
default'
][
'tdd_ul_dl_config'
][
'pattern1'
]
tdd_config
=
conf
[
'nr_cell_
list'
][
0
][
'tdd_ul_dl_config'
][
'pattern1'
]
self
.
assertEqual
(
float
(
tdd_config
[
'period'
]),
2.5
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_slots'
]),
3
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_symbols'
]),
10
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_slots'
]),
1
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_symbols'
]),
2
)
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
gnb_param_dict1
[
'nr_bandwidth'
]),
l
)
def
test_gnb_conf2
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
sd
=
hex
(
p
[
'sd'
])
...
...
@@ -241,8 +235,7 @@ def test_mme_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'plmn'
],
param_dict
[
'core_network_plmn'
])
def
test_sim_card
(
self
):
...
...
@@ -250,8 +243,7 @@ def test_sim_card(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
param_dict
[
'k'
])
...
...
@@ -418,9 +410,9 @@ class TestUELTEParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_earfcn'
],
param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
10
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_dl'
],
param_dict
[
'n_antenna_dl'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_ul'
],
param_dict
[
'n_antenna_ul'
])
self
.
assertEqual
(
conf
[
'ue_list'
][
0
][
'rue_addr'
],
param_dict
[
'rue_addr'
])
...
...
@@ -435,11 +427,6 @@ class TestUELTEParameters(ORSTestCase):
self
.
assertEqual
(
conf
[
'tx_gain'
],
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
param_dict
[
'rx_gain'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
class
TestUENRParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
...
...
@@ -451,8 +438,7 @@ class TestUENRParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'ssb_nr_arfcn'
],
param_dict
[
'ssb_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_nr_arfcn'
],
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
'10 MHz'
)
...
...
software/ors-amarisoft/test/test.py
0 → 100644
View file @
d62ca771
# Copyright (C) 2022-2024 Nexedi SA and Contributors.
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
# option) any later version, as published by the Free Software Foundation.
#
# You can also Link and Combine this program with other software covered by
# the terms of any of the Free Software licenses or any of the Open Source
# Initiative approved licenses and Convey the resulting work. Corresponding
# source of such a combination shall include the source code for all other
# software used.
#
# This program is distributed WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
import
io
import
yaml
import
pcpp
# ---- misc ----
# yamlpp_load loads yaml config file after preprocessing it.
#
# preprocessing is needed to e.g. remove // and /* comments.
def
yamlpp_load
(
path
):
with
open
(
path
,
'r'
)
as
f
:
data
=
f
.
read
()
# original input
p
=
pcpp
.
Preprocessor
()
p
.
parse
(
data
)
f
=
io
.
StringIO
()
p
.
write
(
f
)
data_
=
f
.
getvalue
()
# preprocessed input
return
yaml
.
load
(
data_
,
Loader
=
yaml
.
Loader
)
software/ors-amarisoft/test/testFDD-LOPCOMM.py
View file @
d62ca771
...
...
@@ -26,11 +26,12 @@
##############################################################################
import
os
import
yaml
import
json
import
glob
import
requests
from
test
import
yamlpp_load
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
...
...
@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_
default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assert
Equal
(
conf
[
'cell_default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_
list'
][
0
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assert
NotIn
(
'uldl_config'
,
conf
[
'cell_list'
][
0
]
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_rb_dl'
],
50
)
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
))
...
...
@@ -169,26 +170,21 @@ def test_enb_conf(self):
self
.
assertEqual
(
p
[
'cell_id'
],
int
(
conf_ncell
[
'cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
def
test_gnb_conf1
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
gnb_param_dict1
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
gnb_param_dict1
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_
default'
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_
list'
][
0
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
gnb_param_dict1
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
gnb_param_dict1
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
gnb_param_dict1
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'bandwidth'
],
gnb_param_dict1
[
'nr_bandwidth'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
gnb_param_dict1
[
'gnb_id'
],
16
))
self
.
assertEqual
(
conf
[
'gnb_id_bits'
],
gnb_param_dict1
[
'gnb_id_bits'
])
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
...
...
@@ -211,25 +207,19 @@ def test_gnb_conf1(self):
self
.
assertEqual
(
p
[
'nr_cell_id'
],
int
(
conf_ncell
[
'nr_cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
self
.
assertEqual
(
p
[
'band'
],
conf_ncell
[
'nr_band'
])
tdd_config
=
conf
[
'nr_cell_
default'
][
'tdd_ul_dl_config'
][
'pattern1'
]
tdd_config
=
conf
[
'nr_cell_
list'
][
0
][
'tdd_ul_dl_config'
][
'pattern1'
]
self
.
assertEqual
(
float
(
tdd_config
[
'period'
]),
2.5
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_slots'
]),
3
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_symbols'
]),
10
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_slots'
]),
1
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_symbols'
]),
2
)
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
gnb_param_dict1
[
'nr_bandwidth'
]),
l
)
def
test_gnb_conf2
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
sd
=
hex
(
p
[
'sd'
])
...
...
@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'plmn'
],
param_dict
[
'core_network_plmn'
])
def
test_sim_card
(
self
):
...
...
@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
param_dict
[
'k'
])
...
...
@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_earfcn'
],
param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
10
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_dl'
],
param_dict
[
'n_antenna_dl'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_ul'
],
param_dict
[
'n_antenna_ul'
])
self
.
assertEqual
(
conf
[
'ue_list'
][
0
][
'rue_addr'
],
param_dict
[
'rue_addr'
])
...
...
@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self
.
assertEqual
(
conf
[
'tx_gain'
],
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
param_dict
[
'rx_gain'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
class
TestUENRParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
...
...
@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'ssb_nr_arfcn'
],
param_dict
[
'ssb_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_nr_arfcn'
],
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
'10 MHz'
)
...
...
software/ors-amarisoft/test/testFDD-ORS.py
View file @
d62ca771
...
...
@@ -26,11 +26,12 @@
##############################################################################
import
os
import
yaml
import
json
import
glob
import
requests
from
test
import
yamlpp_load
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
...
...
@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_
default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assert
Equal
(
conf
[
'cell_default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_
list'
][
0
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assert
NotIn
(
'uldl_config'
,
conf
[
'cell_list'
][
0
]
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_rb_dl'
],
50
)
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
))
...
...
@@ -169,26 +170,21 @@ def test_enb_conf(self):
self
.
assertEqual
(
p
[
'cell_id'
],
int
(
conf_ncell
[
'cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
def
test_gnb_conf1
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
gnb_param_dict1
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
gnb_param_dict1
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_
default'
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_
list'
][
0
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
gnb_param_dict1
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
gnb_param_dict1
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
gnb_param_dict1
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'bandwidth'
],
gnb_param_dict1
[
'nr_bandwidth'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
gnb_param_dict1
[
'gnb_id'
],
16
))
self
.
assertEqual
(
conf
[
'gnb_id_bits'
],
gnb_param_dict1
[
'gnb_id_bits'
])
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
...
...
@@ -211,25 +207,19 @@ def test_gnb_conf1(self):
self
.
assertEqual
(
p
[
'nr_cell_id'
],
int
(
conf_ncell
[
'nr_cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
self
.
assertEqual
(
p
[
'band'
],
conf_ncell
[
'nr_band'
])
tdd_config
=
conf
[
'nr_cell_
default'
][
'tdd_ul_dl_config'
][
'pattern1'
]
tdd_config
=
conf
[
'nr_cell_
list'
][
0
][
'tdd_ul_dl_config'
][
'pattern1'
]
self
.
assertEqual
(
float
(
tdd_config
[
'period'
]),
2.5
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_slots'
]),
3
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_symbols'
]),
10
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_slots'
]),
1
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_symbols'
]),
2
)
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
gnb_param_dict1
[
'nr_bandwidth'
]),
l
)
def
test_gnb_conf2
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
sd
=
hex
(
p
[
'sd'
])
...
...
@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'plmn'
],
param_dict
[
'core_network_plmn'
])
def
test_sim_card
(
self
):
...
...
@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
param_dict
[
'k'
])
...
...
@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_earfcn'
],
param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
10
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_dl'
],
param_dict
[
'n_antenna_dl'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_ul'
],
param_dict
[
'n_antenna_ul'
])
self
.
assertEqual
(
conf
[
'ue_list'
][
0
][
'rue_addr'
],
param_dict
[
'rue_addr'
])
...
...
@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self
.
assertEqual
(
conf
[
'tx_gain'
],
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
param_dict
[
'rx_gain'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
class
TestUENRParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
...
...
@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'ssb_nr_arfcn'
],
param_dict
[
'ssb_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_nr_arfcn'
],
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
'10 MHz'
)
...
...
software/ors-amarisoft/test/testFDD.py
View file @
d62ca771
...
...
@@ -26,11 +26,12 @@
##############################################################################
import
os
import
yaml
import
json
import
glob
import
requests
from
test
import
yamlpp_load
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
...
...
@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_
default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assert
Equal
(
conf
[
'cell_default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_
list'
][
0
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assert
NotIn
(
'uldl_config'
,
conf
[
'cell_list'
][
0
]
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_rb_dl'
],
50
)
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
))
...
...
@@ -169,26 +170,21 @@ def test_enb_conf(self):
self
.
assertEqual
(
p
[
'cell_id'
],
int
(
conf_ncell
[
'cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
def
test_gnb_conf1
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
gnb_param_dict1
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
gnb_param_dict1
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_
default'
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_
list'
][
0
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
gnb_param_dict1
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
gnb_param_dict1
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
gnb_param_dict1
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'bandwidth'
],
gnb_param_dict1
[
'nr_bandwidth'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
gnb_param_dict1
[
'gnb_id'
],
16
))
self
.
assertEqual
(
conf
[
'gnb_id_bits'
],
gnb_param_dict1
[
'gnb_id_bits'
])
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
...
...
@@ -211,25 +207,19 @@ def test_gnb_conf1(self):
self
.
assertEqual
(
p
[
'nr_cell_id'
],
int
(
conf_ncell
[
'nr_cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
self
.
assertEqual
(
p
[
'band'
],
conf_ncell
[
'nr_band'
])
tdd_config
=
conf
[
'nr_cell_
default'
][
'tdd_ul_dl_config'
][
'pattern1'
]
tdd_config
=
conf
[
'nr_cell_
list'
][
0
][
'tdd_ul_dl_config'
][
'pattern1'
]
self
.
assertEqual
(
float
(
tdd_config
[
'period'
]),
2.5
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_slots'
]),
3
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_symbols'
]),
10
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_slots'
]),
1
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_symbols'
]),
2
)
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
gnb_param_dict1
[
'nr_bandwidth'
]),
l
)
def
test_gnb_conf2
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
sd
=
hex
(
p
[
'sd'
])
...
...
@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'plmn'
],
param_dict
[
'core_network_plmn'
])
def
test_sim_card
(
self
):
...
...
@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
param_dict
[
'k'
])
...
...
@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_earfcn'
],
param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
10
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_dl'
],
param_dict
[
'n_antenna_dl'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_ul'
],
param_dict
[
'n_antenna_ul'
])
self
.
assertEqual
(
conf
[
'ue_list'
][
0
][
'rue_addr'
],
param_dict
[
'rue_addr'
])
...
...
@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self
.
assertEqual
(
conf
[
'tx_gain'
],
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
param_dict
[
'rx_gain'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
class
TestUENRParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
...
...
@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'ssb_nr_arfcn'
],
param_dict
[
'ssb_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_nr_arfcn'
],
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
'10 MHz'
)
...
...
software/ors-amarisoft/test/testTDD-M2RU.py
View file @
d62ca771
...
...
@@ -26,11 +26,12 @@
##############################################################################
import
os
import
yaml
import
json
import
glob
import
requests
from
test
import
yamlpp_load
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
...
...
@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_
default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_
default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_
list'
][
0
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_
list'
][
0
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_rb_dl'
],
50
)
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
))
...
...
@@ -169,26 +170,21 @@ def test_enb_conf(self):
self
.
assertEqual
(
p
[
'cell_id'
],
int
(
conf_ncell
[
'cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
def
test_gnb_conf1
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
gnb_param_dict1
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
gnb_param_dict1
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_
default'
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_
list'
][
0
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
gnb_param_dict1
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
gnb_param_dict1
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
gnb_param_dict1
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'bandwidth'
],
gnb_param_dict1
[
'nr_bandwidth'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
gnb_param_dict1
[
'gnb_id'
],
16
))
self
.
assertEqual
(
conf
[
'gnb_id_bits'
],
gnb_param_dict1
[
'gnb_id_bits'
])
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
...
...
@@ -211,25 +207,19 @@ def test_gnb_conf1(self):
self
.
assertEqual
(
p
[
'nr_cell_id'
],
int
(
conf_ncell
[
'nr_cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
self
.
assertEqual
(
p
[
'band'
],
conf_ncell
[
'nr_band'
])
tdd_config
=
conf
[
'nr_cell_
default'
][
'tdd_ul_dl_config'
][
'pattern1'
]
tdd_config
=
conf
[
'nr_cell_
list'
][
0
][
'tdd_ul_dl_config'
][
'pattern1'
]
self
.
assertEqual
(
float
(
tdd_config
[
'period'
]),
2.5
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_slots'
]),
3
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_symbols'
]),
10
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_slots'
]),
1
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_symbols'
]),
2
)
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
gnb_param_dict1
[
'nr_bandwidth'
]),
l
)
def
test_gnb_conf2
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
sd
=
hex
(
p
[
'sd'
])
...
...
@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'plmn'
],
param_dict
[
'core_network_plmn'
])
def
test_sim_card
(
self
):
...
...
@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
param_dict
[
'k'
])
...
...
@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_earfcn'
],
param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
10
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_dl'
],
param_dict
[
'n_antenna_dl'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_ul'
],
param_dict
[
'n_antenna_ul'
])
self
.
assertEqual
(
conf
[
'ue_list'
][
0
][
'rue_addr'
],
param_dict
[
'rue_addr'
])
...
...
@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self
.
assertEqual
(
conf
[
'tx_gain'
],
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
param_dict
[
'rx_gain'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
class
TestUENRParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
...
...
@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'ssb_nr_arfcn'
],
param_dict
[
'ssb_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_nr_arfcn'
],
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
'10 MHz'
)
...
...
software/ors-amarisoft/test/testTDD-ORS.py
View file @
d62ca771
...
...
@@ -26,11 +26,12 @@
##############################################################################
import
os
import
yaml
import
json
import
glob
import
requests
from
test
import
yamlpp_load
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
...
...
@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_
default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_
default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_
list'
][
0
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_
list'
][
0
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_rb_dl'
],
50
)
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
))
...
...
@@ -169,26 +170,21 @@ def test_enb_conf(self):
self
.
assertEqual
(
p
[
'cell_id'
],
int
(
conf_ncell
[
'cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
def
test_gnb_conf1
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
gnb_param_dict1
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
gnb_param_dict1
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_
default'
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_
list'
][
0
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
gnb_param_dict1
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
gnb_param_dict1
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
gnb_param_dict1
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'bandwidth'
],
gnb_param_dict1
[
'nr_bandwidth'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
gnb_param_dict1
[
'gnb_id'
],
16
))
self
.
assertEqual
(
conf
[
'gnb_id_bits'
],
gnb_param_dict1
[
'gnb_id_bits'
])
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
...
...
@@ -211,25 +207,19 @@ def test_gnb_conf1(self):
self
.
assertEqual
(
p
[
'nr_cell_id'
],
int
(
conf_ncell
[
'nr_cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
self
.
assertEqual
(
p
[
'band'
],
conf_ncell
[
'nr_band'
])
tdd_config
=
conf
[
'nr_cell_
default'
][
'tdd_ul_dl_config'
][
'pattern1'
]
tdd_config
=
conf
[
'nr_cell_
list'
][
0
][
'tdd_ul_dl_config'
][
'pattern1'
]
self
.
assertEqual
(
float
(
tdd_config
[
'period'
]),
2.5
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_slots'
]),
3
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_symbols'
]),
10
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_slots'
]),
1
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_symbols'
]),
2
)
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
gnb_param_dict1
[
'nr_bandwidth'
]),
l
)
def
test_gnb_conf2
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
sd
=
hex
(
p
[
'sd'
])
...
...
@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'plmn'
],
param_dict
[
'core_network_plmn'
])
def
test_sim_card
(
self
):
...
...
@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
param_dict
[
'k'
])
...
...
@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_earfcn'
],
param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
10
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_dl'
],
param_dict
[
'n_antenna_dl'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_ul'
],
param_dict
[
'n_antenna_ul'
])
self
.
assertEqual
(
conf
[
'ue_list'
][
0
][
'rue_addr'
],
param_dict
[
'rue_addr'
])
...
...
@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self
.
assertEqual
(
conf
[
'tx_gain'
],
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
param_dict
[
'rx_gain'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
class
TestUENRParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
...
...
@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'ssb_nr_arfcn'
],
param_dict
[
'ssb_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_nr_arfcn'
],
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
'10 MHz'
)
...
...
software/ors-amarisoft/test/testTDD.py
View file @
d62ca771
...
...
@@ -26,11 +26,12 @@
##############################################################################
import
os
import
yaml
import
json
import
glob
import
requests
from
test
import
yamlpp_load
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
setUpModule
,
ORSTestCase
=
makeModuleSetUpAndTestCaseClass
(
...
...
@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'enb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
enb_param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
enb_param_dict
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'cell_
default'
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_
default'
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_
list'
][
0
][
'inactivity_timer'
],
enb_param_dict
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'cell_
list'
][
0
][
'uldl_config'
],
6
)
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'dl_earfcn'
],
enb_param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_rb_dl'
],
50
)
self
.
assertEqual
(
conf
[
'enb_id'
],
int
(
enb_param_dict
[
'enb_id'
],
16
))
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'n_id_cell'
],
enb_param_dict
[
'pci'
])
self
.
assertEqual
(
conf
[
'cell_list'
][
0
][
'tac'
],
int
(
enb_param_dict
[
'tac'
],
16
))
...
...
@@ -169,26 +170,21 @@ def test_enb_conf(self):
self
.
assertEqual
(
p
[
'cell_id'
],
int
(
conf_ncell
[
'cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
def
test_gnb_conf1
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
if
'tx_gain'
in
conf
and
'rx_gain'
in
conf
:
self
.
assertEqual
(
conf
[
'tx_gain'
],
gnb_param_dict1
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
gnb_param_dict1
[
'rx_gain'
])
self
.
assertEqual
(
conf
[
'nr_cell_
default'
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_
list'
][
0
][
'inactivity_timer'
],
gnb_param_dict1
[
'inactivity_timer'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'dl_nr_arfcn'
],
gnb_param_dict1
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'band'
],
gnb_param_dict1
[
'nr_band'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'ssb_pos_bitmap'
],
gnb_param_dict1
[
'ssb_pos_bitmap'
])
self
.
assertEqual
(
conf
[
'nr_cell_default'
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'bandwidth'
],
gnb_param_dict1
[
'nr_bandwidth'
])
self
.
assertEqual
(
conf
[
'nr_cell_list'
][
0
][
'n_id_cell'
],
gnb_param_dict1
[
'pci'
])
self
.
assertEqual
(
conf
[
'gnb_id'
],
int
(
gnb_param_dict1
[
'gnb_id'
],
16
))
self
.
assertEqual
(
conf
[
'gnb_id_bits'
],
gnb_param_dict1
[
'gnb_id_bits'
])
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
]:
...
...
@@ -211,25 +207,19 @@ def test_gnb_conf1(self):
self
.
assertEqual
(
p
[
'nr_cell_id'
],
int
(
conf_ncell
[
'nr_cell_id'
],
16
))
self
.
assertEqual
(
p
[
'tac'
],
conf_ncell
[
'tac'
])
self
.
assertEqual
(
p
[
'band'
],
conf_ncell
[
'nr_band'
])
tdd_config
=
conf
[
'nr_cell_
default'
][
'tdd_ul_dl_config'
][
'pattern1'
]
tdd_config
=
conf
[
'nr_cell_
list'
][
0
][
'tdd_ul_dl_config'
][
'pattern1'
]
self
.
assertEqual
(
float
(
tdd_config
[
'period'
]),
2.5
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_slots'
]),
3
)
self
.
assertEqual
(
int
(
tdd_config
[
'dl_symbols'
]),
10
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_slots'
]),
1
)
self
.
assertEqual
(
int
(
tdd_config
[
'ul_symbols'
]),
2
)
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define NR_BANDWIDTH'
):
self
.
assertIn
(
str
(
gnb_param_dict1
[
'nr_bandwidth'
]),
l
)
def
test_gnb_conf2
(
self
):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
g
nb.cfg'
))[
0
]
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'
e
nb.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
p
in
conf
[
'nr_cell_default'
][
'plmn_list'
][
0
][
'nssai'
]:
sd
=
hex
(
p
[
'sd'
])
...
...
@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'mme.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'plmn'
],
param_dict
[
'core_network_plmn'
])
def
test_sim_card
(
self
):
...
...
@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file
=
glob
.
glob
(
os
.
path
.
join
(
self
.
slap
.
instance_directory
,
'*'
,
'etc'
,
'ue_db.cfg'
))[
0
]
with
open
(
conf_file
,
'r'
)
as
f
:
conf
=
yaml
.
load
(
f
)
conf
=
yamlpp_load
(
conf_file
)
for
n
in
"sim_algo imsi opc sqn impu impi"
.
split
():
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
n
],
param_dict
[
n
])
self
.
assertEqual
(
conf
[
'ue_db'
][
0
][
'K'
],
param_dict
[
'k'
])
...
...
@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_earfcn'
],
param_dict
[
'dl_earfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
10
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_dl'
],
param_dict
[
'n_antenna_dl'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'n_antenna_ul'
],
param_dict
[
'n_antenna_ul'
])
self
.
assertEqual
(
conf
[
'ue_list'
][
0
][
'rue_addr'
],
param_dict
[
'rue_addr'
])
...
...
@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self
.
assertEqual
(
conf
[
'tx_gain'
],
param_dict
[
'tx_gain'
])
self
.
assertEqual
(
conf
[
'rx_gain'
],
param_dict
[
'rx_gain'
])
with
open
(
conf_file
,
'r'
)
as
f
:
for
l
in
f
:
if
l
.
startswith
(
'#define N_RB_DL'
):
self
.
assertIn
(
'50'
,
l
)
class
TestUENRParameters
(
ORSTestCase
):
@
classmethod
def
getInstanceParameterDict
(
cls
):
...
...
@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
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
)
conf
=
yamlpp_load
(
conf_file
)
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'ssb_nr_arfcn'
],
param_dict
[
'ssb_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'dl_nr_arfcn'
],
param_dict
[
'dl_nr_arfcn'
])
self
.
assertEqual
(
conf
[
'cell_groups'
][
0
][
'cells'
][
0
][
'bandwidth'
],
'10 MHz'
)
...
...
software/osie-coupler/buildout.hash.cfg
View file @
d62ca771
[instance-profile]
filename = instance.cfg.in
md5sum =
6610ce91964dda42edbcb5b7837777c2
md5sum =
cf6c11bc335c75139695008128f1565a
software/osie-coupler/instance.cfg.in
View file @
d62ca771
...
...
@@ -32,8 +32,8 @@ cert = ${slap-connection:cert-file}
configuration.coupler_block_device = /dev/i2c-1
configuration.coupler_i2c_slave_list = 0x58
configuration.mode = 0
configuration.username =
configuration.password =
configuration.username =
""
configuration.password =
""
configuration.interface = 0.0.0.0
configuration.opc_ua_port = 4840
configuration.id = 0
...
...
@@ -42,7 +42,7 @@ configuration.heart_beat_interval = 50
configuration.heart_beat_id_list =
configuration.network_address_url_data_type = opc.udp://224.0.0.22:4840/
configuration.heart_beat_timeout_interval = 100
configuration.network_interface =
configuration.network_interface =
""
[directory]
recipe = slapos.cookbook:mkdirectory
...
...
@@ -51,7 +51,6 @@ etc = ${:home}/etc
var = ${:home}/var
script = ${:etc}/run/
service = ${:etc}/service
log = ${:var}/log
[publish-connection-parameter]
recipe = slapos.cookbook:publish
...
...
software/osie-coupler/software.cfg
View file @
d62ca771
...
...
@@ -12,6 +12,15 @@ extends =
../../stack/monitor/buildout.cfg
../../stack/slapos.cfg
# disable warning for time_t type structure after 2038
# https://www.gnu.org/software/gnulib/manual/html_node/Avoiding-the-year-2038-problem.html
[coreutils]
configure-options =
--disable-libcap
--without-selinux
--prefix=@@LOCATION@@
--disable-year2038
# we need open62541's sources even after compiling and linking in [open62541]
# section. Reasons is that coupler's C application depends on it.
[open62541-source]
...
...
@@ -44,11 +53,11 @@ environment +=
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/nexedi/osie.git
revision =
a40573897e1ee9de7b3536daa58c6904384c10f9
revision =
5d193e57b50a7ebb3df147e403917201eb9cb6c6
[compile-coupler]
recipe = slapos.recipe.cmmi
path = ${osie-repository:location}/coupler
/
path = ${osie-repository:location}/coupler
bin_dir = ${:path}/bin/
environment =
OPEN62541_HOME = ${open62541:location}
...
...
software/rapid-cdn/buildout.hash.cfg
View file @
d62ca771
...
...
@@ -14,7 +14,7 @@
# not need these here).
[template]
filename = instance.cfg.in
md5sum =
c478478882232200fbe4bf3e7d2a4ff0
md5sum =
bbeb179b698975c1a88ea7604df6740e
[profile-common]
filename = instance-common.cfg.in
...
...
@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend]
filename = instance-frontend.cfg.in
md5sum =
9a33900d735ef074b5887d61bca54243
md5sum =
bb8129cdd89632c3c3ce86556496cb0f
[profile-master]
filename = instance-master.cfg.in
...
...
software/rapid-cdn/instance-frontend.cfg.in
View file @
d62ca771
...
...
@@ -44,7 +44,9 @@ parts =
monitor-base
monitor-ats-cache-stats-wrapper
monitor-traffic-summary-last-stats-wrapper
{%- if instance_parameter_dict.get('configuration.re6st-verification-url', None) %}
monitor-verify-re6st-connectivity
{%- endif %}
frontend-haproxy-rsyslogd-configuration
frontend-haproxy-rsyslogd
...
...
software/rapid-cdn/instance.cfg.in
View file @
d62ca771
...
...
@@ -93,7 +93,7 @@ configuration.apache-key =
configuration.apache-certificate =
configuration.disk-cache-size = 8G
configuration.ram-cache-size = 1G
configuration.re6st-verification-url =
http://[2001:67c:1254:4::1]/index.html
configuration.re6st-verification-url =
configuration.enable-http2-by-default = true
configuration.enable-http3 = false
configuration.http3-port = 443
...
...
software/rapid-cdn/test/test.py
View file @
d62ca771
...
...
@@ -87,6 +87,9 @@ KEDIFA_PORT = '15080'
SOURCE_IP
=
'127.0.0.1'
SOURCE_IPV6
=
'::1'
# URL used to check for network connectivity
RE6ST_URL
=
'http://[2001:67c:1254:4::1]/index.html'
# IP on which test run, in order to mimic HTTP[s] access
TEST_IP
=
os
.
environ
[
'SLAPOS_TEST_IPV4'
]
...
...
@@ -5034,6 +5037,7 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase,
'plain_http_port'
:
HTTP_PORT
,
'kedifa_port'
:
KEDIFA_PORT
,
'caucase_port'
:
CAUCASE_PORT
,
're6st-verification-url'
:
RE6ST_URL
,
}
@
classmethod
...
...
@@ -5064,7 +5068,7 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase,
self
.
assertEqual
(
getPromisePluginParameterDict
(
re6st_connectivity_promise_file
),
{
'url'
:
'http://[2001:67c:1254:4::1]/index.html'
,
'url'
:
RE6ST_URL
,
}
)
...
...
@@ -5077,6 +5081,7 @@ class TestRe6stVerificationUrlSlave(SlaveHttpFrontendTestCase,
'plain_http_port'
:
HTTP_PORT
,
'kedifa_port'
:
KEDIFA_PORT
,
'caucase_port'
:
CAUCASE_PORT
,
're6st-verification-url'
:
RE6ST_URL
,
}
@
classmethod
...
...
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultDefaultSlave.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultDefaultSlaveGlobalDisableHttp2.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultFalseSlave.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestEnableHttp2ByDefaultFalseSlaveGlobalDisableHttp2.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestMasterAIKCDisabledAIBCCDisabledRequest.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -46,7 +46,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestMasterRequest.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestMasterRequestDomain.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestRe6stVerificationUrlDefaultSlave.test00cluster_request_instance_parameter_dict.txt
View file @
d62ca771
...
...
@@ -7,6 +7,7 @@
"kedifa_port": "15080",
"plain_http_port": "11080",
"port": "11443",
"re6st-verification-url": "http://[2001:67c:1254:4::1]/index.html",
"root_instance_title": "testing partition 0",
"slap_computer_id": "local",
"slap_computer_partition_id": "T-0",
...
...
@@ -67,6 +68,7 @@
"monitor-username": "admin",
"plain_http_port": "11080",
"port": "11443",
"re6st-verification-url": "http://[2001:67c:1254:4::1]/index.html",
"slave-kedifa-information": "{\"_default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@default_key-generate-auth-url@@/@@default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@default_key-generate-auth-url@@?auth=\"}}"
},
"full_address_list": [],
...
...
software/rapid-cdn/test/test_data/test.TestRe6stVerificationUrlSlave.test00cluster_request_instance_parameter_dict.txt
View file @
d62ca771
...
...
@@ -7,6 +7,7 @@
"kedifa_port": "15080",
"plain_http_port": "11080",
"port": "11443",
"re6st-verification-url": "http://[2001:67c:1254:4::1]/index.html",
"root_instance_title": "testing partition 0",
"slap_computer_id": "local",
"slap_computer_partition_id": "T-0",
...
...
@@ -67,6 +68,7 @@
"monitor-username": "admin",
"plain_http_port": "11080",
"port": "11443",
"re6st-verification-url": "http://[2001:67c:1254:4::1]/index.html",
"slave-kedifa-information": "{\"_default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@default_key-generate-auth-url@@/@@default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@default_key-generate-auth-url@@?auth=\"}}"
},
"full_address_list": [],
...
...
software/rapid-cdn/test/test_data/test.TestReplicateSlave.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -51,7 +51,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
@@ -77,7 +76,6 @@ T-3/etc/plugin/monitor-http-frontend.py
T-3/etc/plugin/monitor-httpd-listening-on-tcp.py
T-3/etc/plugin/promise-key-download-url-ready.py
T-3/etc/plugin/promise-logrotate-setup.py
T-3/etc/plugin/re6st-connectivity.py
T-3/etc/plugin/slave-introspection-configuration.py
T-3/etc/plugin/slave_introspection_https.py
T-3/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestSlave.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestSlaveCiphers.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestSlaveGlobalDisableHttp2.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestSlaveHealthCheck.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestSlaveHostHaproxyClash.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestSlaveHttp3.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibility.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibilityOverrideMaster.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/rapid-cdn/test/test_data/test.TestSlaveSlapOSMasterCertificateCompatibilityUpdate.test_file_list_plugin.txt
View file @
d62ca771
...
...
@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py
T-2/etc/plugin/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.py
T-2/etc/plugin/re6st-connectivity.py
T-2/etc/plugin/slave-introspection-configuration.py
T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py
...
...
software/slapos-sr-testing/software.cfg
View file @
d62ca771
...
...
@@ -489,7 +489,6 @@ slapos.core =
# Various needed versions
Pillow = 9.2.0
forcediphttpsadapter = 1.0.1
httplib2 = 0.20.4
image = 1.5.25
plantuml = 0.3.0:whl
pysftp = 0.2.9
...
...
@@ -498,8 +497,8 @@ testfixtures = 6.11.0
mysqlclient = 2.1.1
pexpect = 4.8.0
ptyprocess = 0.6.0
psycopg2 = 2.8.6
paho-mqtt = 1.5.0
pcpp = 1.30
# Patched eggs
PyPDF2 = 1.26.0+SlapOSPatched001
...
...
software/slapos-testing/software.cfg
View file @
d62ca771
...
...
@@ -274,7 +274,6 @@ httmock = 1.2.6
testfixtures = 6.11.0
pyflakes = 2.0.0
zope.testing = 4.6.2
psycopg2 = 2.8.6
iniparse = 0.5
miniupnpc = 1.9
nemu = 0.3.1
...
...
software/theia/test/project_tests.py
View file @
d62ca771
...
...
@@ -520,17 +520,17 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience):
# The project name is sample-test, which we created above.
self
.
assertIn
(
"sample-test"
,
projects
[
0
][
'name_with_namespace'
])
# Get repo url, default one is http://lab.example.com/root/sample-test.git
# We need the path like http://[2001:67c:1254:e:c4::5041]:7777/root/sample-test
# Get repo url, default one is http
s
://lab.example.com/root/sample-test.git
# We need the path like http
s
://[2001:67c:1254:e:c4::5041]:7777/root/sample-test
project_1
=
projects
[
0
]
repo_url
=
backend_url
.
replace
(
"http://"
,
""
)
+
"/"
+
project_1
[
'path_with_namespace'
]
repo_url
=
backend_url
.
replace
(
"http
s
://"
,
""
)
+
"/"
+
project_1
[
'path_with_namespace'
]
# Clone the repo with token
clone_url
=
'http://oauth2:'
+
'SLurtnxPscPsU-SDm4oN@'
+
repo_url
clone_url
=
'http
s
://oauth2:'
+
'SLurtnxPscPsU-SDm4oN@'
+
repo_url
repo_path
=
os
.
path
.
join
(
os
.
getcwd
(),
project_1
[
'name'
])
print
(
repo_path
)
if
os
.
path
.
exists
(
repo_path
):
shutil
.
rmtree
(
repo_path
,
ignore_errors
=
True
)
output
=
subprocess
.
check_output
((
'git'
,
'clone'
,
clone_url
),
universal_newlines
=
True
)
output
=
subprocess
.
check_output
((
'git'
,
'clone'
,
'-c'
,
'http.sslVerify=false'
,
clone_url
),
universal_newlines
=
True
)
# Create a new file and push the commit
f
=
open
(
os
.
path
.
join
(
repo_path
,
'file.txt'
),
'x'
)
...
...
@@ -566,7 +566,7 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience):
print
(
repo_path
)
if
os
.
path
.
exists
(
repo_path
):
shutil
.
rmtree
(
repo_path
,
ignore_errors
=
True
)
output
=
subprocess
.
check_output
((
'git'
,
'clone'
,
clone_url
),
universal_newlines
=
True
)
output
=
subprocess
.
check_output
((
'git'
,
'clone'
,
'-c'
,
'http.sslVerify=false'
,
clone_url
),
universal_newlines
=
True
)
# Check the file we committed in exist and the content is matching.
output
=
subprocess
.
check_output
((
'git'
,
'show'
,
'origin/master:file.txt'
),
cwd
=
repo_path
,
universal_newlines
=
True
)
...
...
@@ -596,8 +596,8 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience):
# The project name is sample-test, which we created above.
self
.
assertIn
(
"sample-test"
,
projects
[
0
][
'name_with_namespace'
])
project_1
=
projects
[
0
]
repo_url
=
backend_url
.
replace
(
"http://"
,
""
)
+
"/"
+
project_1
[
'path_with_namespace'
]
clone_url
=
'http://oauth2:'
+
'SLurtnxPscPsU-SDm4oN@'
+
repo_url
repo_url
=
backend_url
.
replace
(
"http
s
://"
,
""
)
+
"/"
+
project_1
[
'path_with_namespace'
]
clone_url
=
'http
s
://oauth2:'
+
'SLurtnxPscPsU-SDm4oN@'
+
repo_url
repo_path
=
os
.
path
.
join
(
os
.
getcwd
(),
project_1
[
'name'
])
# Check the file we committed in the original theia is exist and the content is matching.
...
...
stack/erp5/buildout.cfg
View file @
d62ca771
...
...
@@ -777,7 +777,7 @@ dask = 0.18.1
deepdiff = 3.3.0
docutils = 0.17.1
erp5-coverage-plugin = 0.0.1
erp5diff = 0.8.1.
8
erp5diff = 0.8.1.
9
facebook-sdk = 2.0.0
five.formlib = 1.0.4
fpconst = 0.7.2
...
...
@@ -786,7 +786,6 @@ google-api-python-client = 1.6.1
graphviz = 0.5.2
haufe.requestmonitoring = 0.6.0
html5lib = 1.1
httplib2 = 0.10.3
huBarcode = 1.0.0
interval = 1.0.0
ipdb = 0.10.2
...
...
stack/slapos.cfg
View file @
d62ca771
...
...
@@ -180,7 +180,7 @@ cryptography = 3.3.2
dataclasses = 0.8
dateparser = 0.7.6
decorator = 4.3.0
defusedxml = 0.
6.0
defusedxml = 0.
7.1
distro = 1.7.0
dnspython = 1.16.0
entrypoints = 0.3
...
...
@@ -201,6 +201,7 @@ GitPython = 3.1.30
greenlet = 3.0.1
h11 = 0.14.0
h5py = 2.7.1
httplib2 = 0.22.0
idna = 3.4:whl
igmp = 1.0.4
Importing = 1.10
...
...
@@ -257,7 +258,7 @@ patsy = 0.5.3
pbr = 5.9.0
pexpect = 4.8.0
pickleshare = 0.7.4
pim-dm = 1.4.0nxd00
1
pim-dm = 1.4.0nxd00
2
pkgconfig = 1.5.1
pkgutil-resolve-name = 1.3.10
plone.recipe.command = 1.1
...
...
@@ -267,6 +268,7 @@ prettytable = 0.7.2
prometheus-client = 0.9.0
prompt-toolkit = 3.0.19
psutil = 5.8.0
psycopg2 = 2.9.9
ptyprocess = 0.5.1
py = 1.11.0:whl
py-mld = 1.0.3
...
...
@@ -278,7 +280,7 @@ pygls = 1.1.0:whl
Pygments = 2.9.0
PyNaCl = 1.3.0
pyOpenSSL = 19.1.0
pyparsing = 3.
0.9
:whl
pyparsing = 3.
1.1
:whl
pyroute2 = 0.6.9
pyrsistent = 0.18.1
PyRSS2Gen = 1.1
...
...
@@ -312,7 +314,7 @@ slapos.rebootstrap = 4.5
slapos.recipe.build = 0.56
slapos.recipe.cmmi = 0.19
slapos.recipe.template = 5.1
slapos.toolbox = 0.14
0
slapos.toolbox = 0.14
2
smmap = 5.0.0
sniffio = 1.3.0
sortedcontainers = 2.4.0
...
...
@@ -392,8 +394,9 @@ jsonschema = 3.0.2:whl
MarkupSafe = 1.0
msgpack = 0.6.2
packaging = 16.8
psycopg2 = 2.8.6
pycurl = 7.43.0
pyparsing = 2.
2.0
pyparsing = 2.
4.7
pyrsistent = 0.16.1
requests = 2.27.1
selectors34 = 1.2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment