Commit d62ca771 authored by Thomas Gambier's avatar Thomas Gambier

Update Release Candidate

parents d6e69812 73f44633
...@@ -58,7 +58,7 @@ egg-versions = ...@@ -58,7 +58,7 @@ egg-versions =
[ZODB5] [ZODB5]
<= _ZODB <= _ZODB
egg-versions = egg-versions =
ZODB = 5.8.0 ZODB = 5.8.1
transaction = 3.0.1 transaction = 3.0.1
......
[buildout] [buildout]
extends = extends =
../gmp/buildout.cfg ../gmp/buildout.cfg
../patch/buildout.cfg
../perl/buildout.cfg ../perl/buildout.cfg
../xz-utils/buildout.cfg ../xz-utils/buildout.cfg
parts = parts =
...@@ -16,15 +17,11 @@ configure-options = ...@@ -16,15 +17,11 @@ configure-options =
--without-selinux --without-selinux
--prefix=@@LOCATION@@ --prefix=@@LOCATION@@
environment = environment =
PATH=${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s PATH=${patch:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
LDFLAGS=-Wl,--as-needed -L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib LDFLAGS=-Wl,--as-needed -L${gmp:location}/lib -Wl,-rpath=${gmp:location}/lib
patches =
# Latest version of command split in coreutils is not working in gitlab backup https://github.com/coreutils/coreutils/commit/c4c5ed8f4e9cd55a12966d4f520e3a13101637d9.patch#b6810d7559ffbc5e24636a860f02e836
# For more details, see: https://lab.nexedi.com/nexedi/slapos/merge_requests/1503/diffs#note_197515 patch-options = -p1
[coreutils-9.1]
<= coreutils
url = https://ftp.gnu.org/gnu/coreutils/coreutils-9.1.tar.xz
md5sum = 8b1ca4e018a7dce9bb937faec6618671
[coreutils-output] [coreutils-output]
# Shared binary location to ease migration # Shared binary location to ease migration
......
...@@ -24,7 +24,7 @@ parts = ...@@ -24,7 +24,7 @@ parts =
<= go-git-package <= go-git-package
go.importpath = lab.nexedi.com/nexedi/helloweb go.importpath = lab.nexedi.com/nexedi/helloweb
repository = https://lab.nexedi.com/nexedi/helloweb.git repository = https://lab.nexedi.com/nexedi/helloweb.git
revision = a7c788ae71 revision = 1d9bcbe1
[gowork] [gowork]
install = install =
......
...@@ -79,7 +79,6 @@ tornado = 4.4.2 ...@@ -79,7 +79,6 @@ tornado = 4.4.2
nbconvert = 4.1.0 nbconvert = 4.1.0
pathlib2 = 2.2.1 pathlib2 = 2.2.1
patsy = 0.4.1 patsy = 0.4.1
pexpect = 4.2.1
scandir = 1.5 scandir = 1.5
wcwidth = 0.1.7 wcwidth = 0.1.7
jupyter-console = 5.1.0 jupyter-console = 5.1.0
...@@ -52,10 +52,7 @@ inline = ...@@ -52,10 +52,7 @@ inline =
ipython = 5.10.0 ipython = 5.10.0
ipython-genutils = 0.2.0 ipython-genutils = 0.2.0
simplegeneric = 0.8.1
Pygments = 2.5.2 Pygments = 2.5.2
prompt-toolkit = 1.0.18 prompt-toolkit = 1.0.18
pickleshare = 0.7.5 pickleshare = 0.7.5
pexpect = 4.8.0
backports.shutil-get-terminal-size = 1.0.0
ptyprocess = 0.6.0 ptyprocess = 0.6.0
...@@ -78,5 +78,5 @@ md5sum = 8847dc6458d1431d0ae0f55942deeb89 ...@@ -78,5 +78,5 @@ md5sum = 8847dc6458d1431d0ae0f55942deeb89
[python3.11] [python3.11]
<= python3-common <= python3-common
version = 3.11 version = 3.11
package_version = 3.11.5 package_version = 3.11.8
md5sum = 393856f1b7713aa8bba4b642ab9985d3 md5sum = b353b8433e560e1af2b130f56dfbd973
...@@ -27,7 +27,7 @@ environment = ...@@ -27,7 +27,7 @@ environment =
[ruby2.6] [ruby2.6]
<= ruby-common <= ruby-common
url = http://ftp.ruby-lang.org/pub/ruby/2.6/ruby-2.6.5.tar.xz url = https://ftp.ruby-lang.org/pub/ruby/2.6/ruby-2.6.5.tar.xz
md5sum = b8a4e2bdbb76485c3d6690e57be67750 md5sum = b8a4e2bdbb76485c3d6690e57be67750
[ruby] [ruby]
......
...@@ -13,8 +13,8 @@ parts = ...@@ -13,8 +13,8 @@ parts =
[dufs] [dufs]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
shared = true shared = true
url = https://github.com/sigoden/dufs/archive/refs/tags/v0.39.0.tar.gz url = https://github.com/sigoden/dufs/archive/refs/tags/v0.40.0.tar.gz
md5sum = e0fca35530c043c5dff7fcbe415ed35d md5sum = 3b71b3d07af69d6ba92c054625dc0dd2
configure-command = : configure-command = :
make-binary = cargo install --root=%(location)s --path . --locked make-binary = cargo install --root=%(location)s --path . --locked
make-targets = make-targets =
......
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)
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)
[buildout] [buildout]
extends = extends =
../../stack/erp5-zope2/buildout.cfg ../../stack/erp5-zope2/buildout.cfg
[erp5]
branch = zope2
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[instance.cfg] [instance.cfg]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = ea1d4fb7b2330ae9d94df07f74b934b4 md5sum = d1ca30a1b910b6b775f4f95bd91123a6
[watcher] [watcher]
_update_hash_filename_ = watcher.in _update_hash_filename_ = watcher.in
...@@ -34,7 +34,7 @@ md5sum = eb1230fee50067924ba89f4dc6e82fa9 ...@@ -34,7 +34,7 @@ md5sum = eb1230fee50067924ba89f4dc6e82fa9
[gitlab-parameters.cfg] [gitlab-parameters.cfg]
_update_hash_filename_ = gitlab-parameters.cfg _update_hash_filename_ = gitlab-parameters.cfg
md5sum = c2e23c0f7baa1633df0436ca4e728424 md5sum = cfda6d959bb90bf0b9c947383f45ce0a
[gitlab-shell-config.yml.in] [gitlab-shell-config.yml.in]
_update_hash_filename_ = template/gitlab-shell-config.yml.in _update_hash_filename_ = template/gitlab-shell-config.yml.in
...@@ -54,7 +54,7 @@ md5sum = 58e3d5bbda32583d00cd8f44ec0525b0 ...@@ -54,7 +54,7 @@ md5sum = 58e3d5bbda32583d00cd8f44ec0525b0
[instance-gitlab.cfg.in] [instance-gitlab.cfg.in]
_update_hash_filename_ = instance-gitlab.cfg.in _update_hash_filename_ = instance-gitlab.cfg.in
md5sum = 8e5b0ddb1b79679b4162f302aa438b62 md5sum = 9303fa3912e6eaea04add760b55521f3
[instance-gitlab-export.cfg.in] [instance-gitlab-export.cfg.in]
_update_hash_filename_ = instance-gitlab-export.cfg.in _update_hash_filename_ = instance-gitlab-export.cfg.in
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# (last updated for omnibus-gitlab 8.8.9+ce.0-g25376053) # (last updated for omnibus-gitlab 8.8.9+ce.0-g25376053)
[gitlab-parameters] [gitlab-parameters]
configuration.external_url = http://lab.example.com configuration.external_url = https://lab.example.com
# db advanced # db advanced
configuration.db_pool = 10 configuration.db_pool = 10
......
...@@ -49,16 +49,32 @@ offline = true ...@@ -49,16 +49,32 @@ offline = true
# GitLab instance parameters # # 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] [instance-parameter]
{#- There are dangerous keys like recipe, etc #} {#- There are dangerous keys like recipe, etc #}
{#- XXX: Some other approach would be useful #} {#- 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() -%} {%- for key, value in instance_parameter_dict.items() -%}
{%- if key not in DROP_KEY_LIST %} {%- if key not in DROP_KEY_LIST %}
{{ key }} = {{ value }} {{ key }} = {{ value }}
{%- endif -%} {%- endif -%}
{%- endfor %} {%- 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 # for convenience
...@@ -171,7 +187,7 @@ mode = 0700 ...@@ -171,7 +187,7 @@ mode = 0700
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
gitaly = ${directory:var}/gitaly gitaly = ${directory:var}/gitaly
sockets = ${:gitaly}/sockets sockets = ${:gitaly}/sockets
internal = ${:sockets}/internal internal = ${directory:var}/int
log = ${directory:log}/gitaly log = ${directory:log}/gitaly
[gitaly] [gitaly]
......
...@@ -19,16 +19,6 @@ RootSoftwareInstance = $${:gitlab} ...@@ -19,16 +19,6 @@ RootSoftwareInstance = $${:gitlab}
# TODO -import, -pull-backup # 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] [slap-configuration]
# std stuff to fetch slapos instance parameters # std stuff to fetch slapos instance parameters
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration
...@@ -41,11 +31,6 @@ cert = $${slap-connection:cert-file} ...@@ -41,11 +31,6 @@ cert = $${slap-connection:cert-file}
# autogenerated gitlab instance parameters # autogenerated gitlab instance parameters
<= gitlab-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 # gitlab non-native parameters
configuration.icp_license = configuration.icp_license =
...@@ -72,7 +57,7 @@ context = ...@@ -72,7 +57,7 @@ context =
raw bzip2_location ${bzip2:location} raw bzip2_location ${bzip2:location}
raw bundler_4gitlab ${bundler-4gitlab:bundle} raw bundler_4gitlab ${bundler-4gitlab:bundle}
raw bundler_1_17_3_dir ${bundler-4gitlab:bundle1.17.3} 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 curl_bin ${curl:location}/bin/curl
raw dcron_bin ${dcron-output:crond} raw dcron_bin ${dcron-output:crond}
raw git ${git:location}/bin/git raw git ${git:location}/bin/git
......
...@@ -145,8 +145,7 @@ bundle1.17.3 = ${buildout:parts-directory}/${:_buildout_section_name_}/lib/ruby/ ...@@ -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 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 # 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 ) # 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) # gitlab (via github-markup) wants to convert rst -> html via running: python (with docutils egg)
# (python-4gitlab puts interpreter into ${buildout:bin-directory})
environment = 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 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 ...@@ -161,7 +160,7 @@ git-executable = ${git:location}/bin/git
[gitlab-repository] [gitlab-repository]
<= git-repository <= git-repository
repository = https://lab.nexedi.com/nexedi/gitlab-ce.git repository = https://lab.nexedi.com/nexedi/gitlab-ce.git
revision = v12.10.14-8-gd7e78e9013 revision = v12.10.14-12-g7ce27b49193
location = ${buildout:parts-directory}/gitlab location = ${buildout:parts-directory}/gitlab
[gitlab-shell-repository] [gitlab-shell-repository]
...@@ -239,7 +238,7 @@ environment = ...@@ -239,7 +238,7 @@ environment =
[gowork.goinstall] [gowork.goinstall]
git2go = ${go_github.com_libgit2_git2go_prepare:path}/vendor/libgit2/install 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] [gowork]
golang = ${golang1.13:location} golang = ${golang1.13:location}
...@@ -264,6 +263,7 @@ make-targets = ...@@ -264,6 +263,7 @@ make-targets =
[gitlab-backup] [gitlab-backup]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = true
command = command =
cp -a ${go_lab.nexedi.com_kirr_git-backup:location}/contrib/gitlab-backup ${gowork:bin} cp -a ${go_lab.nexedi.com_kirr_git-backup:location}/contrib/gitlab-backup ${gowork:bin}
update-command = ${:command} update-command = ${:command}
......
...@@ -20,8 +20,8 @@ parts = ...@@ -20,8 +20,8 @@ parts =
[metabase.jar] [metabase.jar]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = https://downloads.metabase.com/v0.48.2/metabase.jar url = https://downloads.metabase.com/v0.48.6/metabase.jar
md5sum = d708a85436da3d5751f0e48ebd10c142 md5sum = 7d75ee710f9518148999b69b7a7e9d79
[instance-profile] [instance-profile]
recipe = slapos.recipe.template recipe = slapos.recipe.template
......
...@@ -16,11 +16,15 @@ ...@@ -16,11 +16,15 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = 12591aca22ddc61f9fb1ec7e596873e3 md5sum = fa81cd744e5a9382aa203c3777adc3a8
[template-ors]
filename = instance-ors.cfg
md5sum = 56a2c2b8245e86f3a8ed2eebeb8e88d9
[slaplte.jinja2] [slaplte.jinja2]
_update_hash_filename_ = slaplte.jinja2 _update_hash_filename_ = slaplte.jinja2
md5sum = c31dffa87765d93327f18ffd89ce36ca md5sum = 566efd38f12e6d42769399f421e77d6c
[ru_amarisoft-stats.jinja2.py] [ru_amarisoft-stats.jinja2.py]
_update_hash_filename_ = ru/amarisoft-stats.jinja2.py _update_hash_filename_ = ru/amarisoft-stats.jinja2.py
...@@ -32,7 +36,7 @@ md5sum = ab666fdfadbfc7d8a16ace38d295c883 ...@@ -32,7 +36,7 @@ md5sum = ab666fdfadbfc7d8a16ace38d295c883
[ru_libinstance.jinja2.cfg] [ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg _update_hash_filename_ = ru/libinstance.jinja2.cfg
md5sum = d3ae8839b1a7b7a225bc69c3910c0b35 md5sum = 30c262a427de2132d6d66d9fb3597426
[ru_sdr_libinstance.jinja2.cfg] [ru_sdr_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg _update_hash_filename_ = ru/sdr/libinstance.jinja2.cfg
...@@ -40,7 +44,7 @@ md5sum = de71c63b8df940207409de7e948f7c8c ...@@ -40,7 +44,7 @@ md5sum = de71c63b8df940207409de7e948f7c8c
[ru_lopcomm_libinstance.jinja2.cfg] [ru_lopcomm_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/lopcomm/libinstance.jinja2.cfg _update_hash_filename_ = ru/lopcomm/libinstance.jinja2.cfg
md5sum = b2af1e70141216a4db07cca655aa63a7 md5sum = 71508d94a47db493f30af30188c48d64
[ru_sunwave_libinstance.jinja2.cfg] [ru_sunwave_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sunwave/libinstance.jinja2.cfg _update_hash_filename_ = ru/sunwave/libinstance.jinja2.cfg
...@@ -80,23 +84,19 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e ...@@ -80,23 +84,19 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e
[template-enb] [template-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg _update_hash_filename_ = instance-enb.jinja2.cfg
md5sum = ae49a3a9a97407f9aea30981403ee1a2 md5sum = c8096440bfc2a1ed0e2821ef71e0bd1c
[template-gnb] [template-ors-enb]
_update_hash_filename_ = instance-gnb.jinja2.cfg _update_hash_filename_ = instance-ors-enb.jinja2.cfg
md5sum = 54a0c7c3a2a1c905a15c58c650ee1095 md5sum = f1e6e2fb8854482d570fc3eee4935f84
[template-core-network] [template-core-network]
_update_hash_filename_ = instance-core-network.jinja2.cfg _update_hash_filename_ = instance-core-network.jinja2.cfg
md5sum = c807be73b9304f5a4c7483a3776bbc17 md5sum = c807be73b9304f5a4c7483a3776bbc17
[template-ue-lte] [template-ue]
_update_hash_filename_ = instance-ue-lte.jinja2.cfg _update_hash_filename_ = instance-ue.jinja2.cfg
md5sum = b444f859248778e18c5eba60f5670f6c md5sum = d8153dd5e0978afea018498b29f06fd5
[template-ue-nr]
_update_hash_filename_ = instance-ue-nr.jinja2.cfg
md5sum = bc65fdce1c453d92310d53928dcaaa7a
[template-obsolete] [template-obsolete]
_update_hash_filename_ = instance-obsolete.jinja2.cfg _update_hash_filename_ = instance-obsolete.jinja2.cfg
...@@ -108,7 +108,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149 ...@@ -108,7 +108,7 @@ md5sum = dcaac06553a3222b14c0013a13f4a149
[enb.jinja2.cfg] [enb.jinja2.cfg]
filename = config/enb.jinja2.cfg filename = config/enb.jinja2.cfg
md5sum = 914d781af63f4214e6cc3be4ffe93215 md5sum = a7f898b48b15992b2c4a64a925f007aa
[drb_lte.jinja2.cfg] [drb_lte.jinja2.cfg]
filename = config/drb_lte.jinja2.cfg filename = config/drb_lte.jinja2.cfg
...@@ -120,7 +120,7 @@ md5sum = 84d3cef8fc7f1c2aed7c348d500f5636 ...@@ -120,7 +120,7 @@ md5sum = 84d3cef8fc7f1c2aed7c348d500f5636
[sib23.jinja2.asn] [sib23.jinja2.asn]
filename = config/sib23.jinja2.asn filename = config/sib23.jinja2.asn
md5sum = a1973ba6e43d40e510d61d461c2d13ac md5sum = 0d709fafde394dc05441d110c2e41858
[mme.jinja2.cfg] [mme.jinja2.cfg]
filename = config/mme.jinja2.cfg filename = config/mme.jinja2.cfg
...@@ -138,13 +138,9 @@ md5sum = 9bd5b08f23640f71ad109d186d060f2d ...@@ -138,13 +138,9 @@ md5sum = 9bd5b08f23640f71ad109d186d060f2d
filename = config/ims.jinja2.cfg filename = config/ims.jinja2.cfg
md5sum = 36281b03597252cf75169417d02fc28c md5sum = 36281b03597252cf75169417d02fc28c
[ue-lte.jinja2.cfg] [ue.jinja2.cfg]
filename = config/ue-lte.jinja2.cfg filename = config/ue.jinja2.cfg
md5sum = c0313f9d15543361f7c8e19af96c737a md5sum = 1d55e896236f7ee08a10cd58182a9a76
[ue-nr.jinja2.cfg]
filename = config/ue-nr.jinja2.cfg
md5sum = 824233ab4d53ec428d358fb67bca8ba2
[ru_lopcomm_CreateProcessingEle.jinja2.xml] [ru_lopcomm_CreateProcessingEle.jinja2.xml]
_update_hash_filename_ = ru/lopcomm/CreateProcessingEle.jinja2.xml _update_hash_filename_ = ru/lopcomm/CreateProcessingEle.jinja2.xml
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
} }
}, },
pdsch-ConfigCommon { pdsch-ConfigCommon {
{% if bbu == "ors" %} {% if ors %}
{%- if one_watt == "True" %} {%- if ors['one-watt'] %}
referenceSignalPower {{ (tx_gain | int) - 54 }}, /* patched by eNB */ referenceSignalPower {{ (tx_gain | int) - 54 }}, /* patched by eNB */
{%- else %} {%- else %}
referenceSignalPower {{ (tx_gain | int) - 35 }}, /* patched by eNB */ referenceSignalPower {{ (tx_gain | int) - 35 }}, /* patched by eNB */
......
{
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",
}
]
}
{%- if slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '1.4 MHz' %} {#- do_lte/do_nr indicate whether we have LTE or NR UE/cells #}
#define N_RB_DL 6 {%- do assert(do_lte or do_nr) %}
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '3 MHz' %} {%- do assert(not (do_lte and do_nr)) %}
#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 %}
{ {
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
log_filename: "{{ directory['log'] }}/ue.log", log_filename: "{{ directory['log'] }}/ue.log",
...@@ -25,11 +16,14 @@ rf_driver: { ...@@ -25,11 +16,14 @@ rf_driver: {
}, },
tx_gain: {{ slapparameter_dict.get('tx_gain', 60) }}, tx_gain: {{ slapparameter_dict.get('tx_gain', 60) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', 40) }}, rx_gain: {{ slapparameter_dict.get('rx_gain', 40) }},
cell_groups: [{ cell_groups: [
{%- if do_lte %}
{
// LTE cell
multi_ue: true, multi_ue: true,
cells: [ 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) }}, 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_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']) }}, n_antenna_ul: {{ slapparameter_dict.get('n_antenna_ul', slap_configuration['configuration.default_n_antenna_ul']) }},
...@@ -38,7 +32,27 @@ rf_driver: { ...@@ -38,7 +32,27 @@ rf_driver: {
], ],
pdcch_decode_opt: false, pdcch_decode_opt: false,
pdcch_decode_opt_threshold: 0.1, 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: [ ue_list: [
{ {
sim_algo: "{{ slapparameter_dict.get('sim_algo', 'milenage') }}", sim_algo: "{{ slapparameter_dict.get('sim_algo', 'milenage') }}",
...@@ -47,10 +61,18 @@ rf_driver: { ...@@ -47,10 +61,18 @@ rf_driver: {
sqn: "{{ slapparameter_dict.get('sqn', '000000000000') }}", sqn: "{{ slapparameter_dict.get('sqn', '000000000000') }}",
impu: "{{ slapparameter_dict.get('impu', '') }}", impu: "{{ slapparameter_dict.get('impu', '') }}",
impi: "{{ slapparameter_dict.get('impi', '') }}", impi: "{{ slapparameter_dict.get('impi', '') }}",
{%- if do_lte %}
imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_lte_imsi']) }}", imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_lte_imsi']) }}",
K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_lte_k']) }}", K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_lte_k']) }}",
rue_addr: "{{ slapparameter_dict.get('rue_addr', '') }}",
ue_category: 12, 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", tun_setup_script: "ue-ifup",
apn: "internet", apn: "internet",
} }
......
{#- 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] [buildout]
parts = parts =
directory directory
...@@ -47,9 +59,13 @@ cert = {{ slap_connection['cert-file'] }} ...@@ -47,9 +59,13 @@ cert = {{ slap_connection['cert-file'] }}
configuration.com_ws_port = 9001 configuration.com_ws_port = 9001
configuration.com_addr = 127.0.1.2 configuration.com_addr = 127.0.1.2
configuration.mme_addr = 127.0.1.100 configuration.mme_addr = 127.0.1.100
configuration.amf_addr = 127.0.1.100
configuration.gtp_addr = 127.0.1.1 configuration.gtp_addr = 127.0.1.1
configuration.default_lte_bandwidth = {{ default_lte_bandwidth }} configuration.default_lte_bandwidth = {{ default_lte_bandwidth }}
configuration.default_lte_inactivity_timer = {{ default_lte_inactivity_timer }} 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_dl = {{ default_n_antenna_dl }}
configuration.default_n_antenna_ul = {{ default_n_antenna_ul }} configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
...@@ -142,7 +158,7 @@ logfile = ${xamari-xlog-script:logfile} ...@@ -142,7 +158,7 @@ logfile = ${xamari-xlog-script:logfile}
forward-host = {{ slapparameter_dict.get('xlog_fluentbit_forward_host', '') }} forward-host = {{ slapparameter_dict.get('xlog_fluentbit_forward_host', '') }}
forward-port = {{ slapparameter_dict.get('xlog_fluentbit_forward_port', '') }} forward-port = {{ slapparameter_dict.get('xlog_fluentbit_forward_port', '') }}
forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }} forward-shared-key = {{ slapparameter_dict.get('xlog_fluentbit_forward_shared_key', '') }}
forward-self-hostname = {{ ors_id['ors-id'] }} forward-self-hostname = {{ comp_id['comp-id'] }}
inline = inline =
[SERVICE] [SERVICE]
flush 5 flush 5
...@@ -176,22 +192,29 @@ recipe = slapos.recipe.template:jinja2 ...@@ -176,22 +192,29 @@ recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
extra-context = extra-context =
context = context =
json ors false
section directory directory section directory directory
section slap_configuration slap-configuration section slap_configuration slap-configuration
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key gtp_addr_v6 slap-configuration:ipv6-random key gtp_addr_v6 slap-configuration:ipv6-random
raw gtp_addr_v4 {{ lan_ipv4 }} raw gtp_addr_v4 {{ lan_ipv4 }}
raw one_watt {{ ors_version['one-watt'] }} raw tx_gain {{ RF.tx_gain }}
raw tx_gain {{ ors_version['current-tx-gain'] }} raw rx_gain {{ RF.rx_gain }}
raw rx_gain {{ ors_version['current-rx-gain'] }} raw earfcn {{ RF.dl_earfcn }}
raw earfcn {{ ors_version['current-earfcn'] }} raw nr_arfcn {{ RF.dl_nr_arfcn }}
raw nr_band {{ RF.nr_band }}
raw software_name {{ software_name }} raw software_name {{ software_name }}
raw rf_mode {{ rf_mode }} raw rf_mode {{ rf_mode }}
raw trx {{ trx }} raw trx {{ trx }}
raw bbu {{ bbu }} raw bbu {{ bbu }}
raw ru {{ ru }} raw ru_type {{ ru }}
{%- if enb_mode == 'enb' %}
json do_lte true json do_lte true
json do_nr false json do_nr false
{%- elif enb_mode == 'gnb' %}
json do_lte false
json do_nr true
{%- endif %}
import netaddr netaddr import netaddr netaddr
${:extra-context} ${:extra-context}
...@@ -202,7 +225,11 @@ output = ${directory:etc}/sib23.cfg ...@@ -202,7 +225,11 @@ output = ${directory:etc}/sib23.cfg
[drb-config] [drb-config]
<= config-base <= config-base
{%- if enb_mode == 'enb' %}
url = {{ drb_lte_template }} url = {{ drb_lte_template }}
{%- elif enb_mode == 'gnb' %}
url = {{ drb_nr_template }}
{%- endif %}
output = ${directory:etc}/drb.cfg output = ${directory:etc}/drb.cfg
[enb-config] [enb-config]
...@@ -214,6 +241,7 @@ url = {{ enb_template }} ...@@ -214,6 +241,7 @@ url = {{ enb_template }}
{% endif %} {% endif %}
output = ${directory:etc}/enb.cfg output = ${directory:etc}/enb.cfg
extra-context = extra-context =
import json_module json
json cell_list {{ rulib.cell_list | tojson }} json cell_list {{ rulib.cell_list | tojson }}
key sib23_file sib-config:output key sib23_file sib-config:output
key drb_file drb-config:output key drb_file drb-config:output
...@@ -229,14 +257,12 @@ websocket_url = ws://[${slap-configuration:ipv6-random}]:9001 ...@@ -229,14 +257,12 @@ websocket_url = ws://[${slap-configuration:ipv6-random}]:9001
{%- endif %} {%- endif %}
enb-ipv6 = ${slap-configuration:ipv6-random} enb-ipv6 = ${slap-configuration:ipv6-random}
enb-ipv4 = {{ lan_ipv4 }} enb-ipv4 = {{ lan_ipv4 }}
{% if bbu == "ors" %} {%- if enb_mode == 'enb' %}
ors-version = {{ ors_version['ors-version'] }} current-earfcn = {{ RF.dl_earfcn }}
frequency-range-rating = {{ ors_version['range'] }} {%- elif enb_mode == 'gnb' %}
current-tx-power-estimate = {{ ors_version['power-estimate'] }} current-nr-arfcn = {{ RF.dl_nr_arfcn }}
current-tx-gain = {{ ors_version['current-tx-gain'] }} current-nr-band = {{ RF.nr_band }}
current-rx-gain = {{ ors_version['current-rx-gain'] }} {%- endif %}
{% endif %}
current-earfcn = {{ ors_version['current-earfcn'] }}
amarisoft-version = {{ lte_version }} amarisoft-version = {{ lte_version }}
license-expiration = {{ lte_expiration }} license-expiration = {{ lte_expiration }}
monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html monitor-gadget-url = ${:monitor-base-url}/gadget/software.cfg.html
......
This diff is collapsed.
# 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 %}
[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
[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
{#- 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] [buildout]
parts = parts =
directory directory
lte-ue-lte-config lte-ue-config
lte-ue-service lte-ue-service
check-sdr-busy.py check-sdr-busy.py
monitor-base monitor-base
...@@ -36,10 +40,13 @@ key = {{ slap_connection['key-file'] }} ...@@ -36,10 +40,13 @@ key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }} cert = {{ slap_connection['cert-file'] }}
configuration.default_lte_bandwidth = {{ default_lte_bandwidth }} 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_dl = {{ default_n_antenna_dl }}
configuration.default_n_antenna_ul = {{ default_n_antenna_ul }} configuration.default_n_antenna_ul = {{ default_n_antenna_ul }}
configuration.default_lte_imsi = {{ default_lte_imsi }} configuration.default_lte_imsi = {{ default_lte_imsi }}
configuration.default_nr_imsi = {{ default_nr_imsi }}
configuration.default_lte_k = {{default_lte_k}} configuration.default_lte_k = {{default_lte_k}}
configuration.default_nr_k = {{ default_nr_k }}
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -56,11 +63,11 @@ service = ${:etc}/service ...@@ -56,11 +63,11 @@ service = ${:etc}/service
promise = ${:etc}/promise promise = ${:etc}/promise
log = ${:var}/log log = ${:var}/log
{% if slapparameter_dict.get("ue_lte_config_link", None) %} {% if slapparameter_dict.get("ue_config_link", None) %}
[ue-lte-config-dl] [ue-config-dl]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = {{ slapparameter_dict.get("ue_lte_config_link") }} url = {{ slapparameter_dict.get("ue_config_link") }}
version = {{ slapparameter_dict.get("ue_lte_config_version") }} version = {{ slapparameter_dict.get("ue_config_version") }}
offline = false offline = false
{% endif %} {% endif %}
...@@ -87,7 +94,7 @@ mode = 0775 ...@@ -87,7 +94,7 @@ mode = 0775
reserve-cpu = True reserve-cpu = True
pidfile = ${directory:run}/ue.pid pidfile = ${directory:run}/ue.pid
hash-files = hash-files =
${lte-ue-lte-config:output} ${lte-ue-config:output}
${lte-ue-sh-wrapper:output} ${lte-ue-sh-wrapper:output}
environment = environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib LD_LIBRARY_PATH={{ openssl_location }}/lib
...@@ -101,13 +108,20 @@ context = ...@@ -101,13 +108,20 @@ context =
section slap_configuration slap-configuration section slap_configuration slap-configuration
section pub_info publish-connection-information section pub_info publish-connection-information
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
{%- if rat == 'lte' %}
[lte-ue-lte-config] 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 <= config-base
{% if slapparameter_dict.get("ue_lte_config_link", None) %} {% if slapparameter_dict.get("ue_config_link", None) %}
url = ${ue-lte-config-dl:target} url = ${ue-config-dl:target}
{% else %} {% else %}
url = {{ ue_lte_template }} url = {{ ue_template }}
{% endif %} {% endif %}
output = ${directory:etc}/ue.cfg output = ${directory:etc}/ue.cfg
......
This diff is collapsed.
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
{%- macro buildout() %} {%- macro buildout() %}
{%- set testing = slapparameter_dict.get("testing", False) %}
{#- part emits new buildout section and registers it into buildout.parts #} {#- part emits new buildout section and registers it into buildout.parts #}
{%- set parts_list = [] %} {%- set parts_list = [] %}
{%- macro part(name) %} {%- macro part(name) %}
...@@ -28,7 +30,7 @@ ...@@ -28,7 +30,7 @@
{{ part('promise-'+name) }} {{ part('promise-'+name) }}
<= monitor-promise-base <= monitor-promise-base
name = {{ name }}.py name = {{ name }}.py
config-testing = {{ slapparameter_dict.get("testing", False) }} config-testing = {{ testing }}
config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }} config-stats-period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
{%- endmacro %} {%- endmacro %}
...@@ -56,6 +58,11 @@ ntap = {{ ntap }} ...@@ -56,6 +58,11 @@ ntap = {{ ntap }}
command = {{ netcapdo }} {{ pythonwitheggs }} {{ ru_tapsplit }} {{ slaplte.tap }} ${:ntap} command = {{ netcapdo }} {{ pythonwitheggs }} {{ ru_tapsplit }} {{ slaplte.tap }} ${:ntap}
update-command = ${:command} update-command = ${:command}
stop-on-error = true stop-on-error = true
{%- if testing %}
# StandaloneSlapOS does not provide slaptap
command = :
{%- endif %}
{%- set test_slapnet = netaddr.IPNetwork('1234::/71') %}
{%- if ntap <= 1 %} {%- if ntap <= 1 %}
[vtap] [vtap]
...@@ -65,9 +72,15 @@ stop-on-error = false ...@@ -65,9 +72,15 @@ stop-on-error = false
{%- if ntap == 1 %} {%- if ntap == 1 %}
{%- do vtap_list.append(slaplte.tap) %} {%- do vtap_list.append(slaplte.tap) %}
[vtap.{{ 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'] }} network = {{ slap_configuration['tap-ipv6-network'] }}
gateway = {{ slap_configuration['tap-ipv6-gateway'] }} gateway = {{ slap_configuration['tap-ipv6-gateway'] }}
addr = {{ slap_configuration['tap-ipv6-addr'] }} addr = {{ slap_configuration['tap-ipv6-addr'] }}
{%- endif %}
{%- endif %} {%- endif %}
{%- else %} {%- else %}
...@@ -84,6 +97,7 @@ init = ...@@ -84,6 +97,7 @@ init =
with open(path) as f: with open(path) as f:
return f.read() return f.read()
import netaddr
# ~ import tapsplit # ~ import tapsplit
tapsplit = types.ModuleType('tapsplit') tapsplit = types.ModuleType('tapsplit')
exec(readfile('{{ ru_tapsplit }}'), tapsplit.__dict__) exec(readfile('{{ ru_tapsplit }}'), tapsplit.__dict__)
...@@ -91,7 +105,10 @@ init = ...@@ -91,7 +105,10 @@ init =
# simulate what tapsplit would assign to the tap # simulate what tapsplit would assign to the tap
# ( tap subinterface will be created for real later at install time - when it # ( tap subinterface will be created for real later at install time - when it
# is too late to update section options ) # is too late to update section options )
slapnet = tapsplit.ifnet6('{{ slaplte.tap }}') if {{ testing }}:
slapnet = netaddr.IPNetwork('{{ str(test_slapnet) }}')
else:
slapnet = tapsplit.ifnet6('{{ slaplte.tap }}')
tapnet = tapsplit.netsplit(slapnet, {{ 1+ntap }}) [{{ i }}] tapnet = tapsplit.netsplit(slapnet, {{ 1+ntap }}) [{{ i }}]
options['network'] = str(tapnet) options['network'] = str(tapnet)
...@@ -205,7 +222,7 @@ context = ...@@ -205,7 +222,7 @@ context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key log_file :log-output key log_file :log-output
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }} 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 raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775 mode = 0775
url = {{ ru_amarisoft_rf_info_template }} url = {{ ru_amarisoft_rf_info_template }}
...@@ -228,7 +245,7 @@ context = ...@@ -228,7 +245,7 @@ context =
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key log_file :log-output key log_file :log-output
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }} 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 raw python_path {{ buildout_directory}}/bin/pythonwitheggs
mode = 0775 mode = 0775
url = {{ ru_amarisoft_stats_template }} url = {{ ru_amarisoft_stats_template }}
......
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
{#- indicate whether RU is listening for netconf #} {#- indicate whether RU is listening for netconf #}
{%- if not testing %}
{{ promise('%s-netconf-socket' % ru_ref) }} {{ promise('%s-netconf-socket' % ru_ref) }}
promise = check_socket_listening promise = check_socket_listening
config-host = ${vtap.{{cell._tap}}:gateway} config-host = ${vtap.{{cell._tap}}:gateway}
config-port = 830 config-port = 830
{%- endif %}
{#- push firmware to RU #} {#- push firmware to RU #}
...@@ -27,7 +29,7 @@ context = ...@@ -27,7 +29,7 @@ context =
key log_file :log-output key log_file :log-output
key software_reply_json_log_file :software-reply-json-log-output key software_reply_json_log_file :software-reply-json-log-output
key remote_file_path :remote-file-path 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 python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }} raw buildout_directory_path {{ buildout_directory }}
key is_firmware_updated :is_firmware_updated key is_firmware_updated :is_firmware_updated
...@@ -37,9 +39,11 @@ mode = 0775 ...@@ -37,9 +39,11 @@ mode = 0775
url = {{ ru_lopcomm_software_template }} url = {{ ru_lopcomm_software_template }}
output = ${directory:script}/{{ru_ref}}-software.py output = ${directory:script}/{{ru_ref}}-software.py
{%- if not testing %}
{{ promise('%s-firmware' % ru_ref) }} {{ promise('%s-firmware' % ru_ref) }}
promise = check_command_execute promise = check_command_execute
config-command = [ -f ${ {{-ru_ref}}-software-template:is_firmware_updated} ] config-command = [ -f ${ {{-ru_ref}}-software-template:is_firmware_updated} ]
{%- endif %}
{#- push config to RU #} {#- push config to RU #}
...@@ -69,7 +73,7 @@ context = ...@@ -69,7 +73,7 @@ context =
section directory directory section directory directory
section vtap vtap.{{ cell._tap }} section vtap vtap.{{ cell._tap }}
key log_file :log-output key log_file :log-output
raw testing {{ slapparameter_dict.get("testing", False) }} raw testing {{ testing }}
raw python_path {{ buildout_directory}}/bin/pythonwitheggs raw python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }} raw buildout_directory_path {{ buildout_directory }}
raw CreateProcessingEle_template {{ ru_lopcomm_CreateProcessingEle_template }} raw CreateProcessingEle_template {{ ru_lopcomm_CreateProcessingEle_template }}
...@@ -110,7 +114,7 @@ context = ...@@ -110,7 +114,7 @@ context =
key is_netconf_connected :is_netconf_connected key is_netconf_connected :is_netconf_connected
key ncsession_json_log_file :ncsession-json-log-output key ncsession_json_log_file :ncsession-json-log-output
key software_json_log_file :software-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 python_path {{ buildout_directory}}/bin/pythonwitheggs
raw buildout_directory_path {{ buildout_directory }} raw buildout_directory_path {{ buildout_directory }}
import netaddr netaddr import netaddr netaddr
...@@ -126,9 +130,11 @@ mode = 0775 ...@@ -126,9 +130,11 @@ mode = 0775
hash-files = hash-files =
${:command-line} ${:command-line}
{%- if not testing %}
{{ promise('%s-netconf-connection' % ru_ref) }} {{ promise('%s-netconf-connection' % ru_ref) }}
promise = check_command_execute promise = check_command_execute
config-command = [ -f ${ {{-ru_ref}}-stats-template:is_netconf_connected} ] config-command = [ -f ${ {{-ru_ref}}-stats-template:is_netconf_connected} ]
{%- endif %}
{{ promise('%s-vswr' % ru_ref) }} {{ promise('%s-vswr' % ru_ref) }}
promise = check_lopcomm_vswr promise = check_lopcomm_vswr
...@@ -174,7 +180,7 @@ context = ...@@ -174,7 +180,7 @@ context =
key log_file :log-output key log_file :log-output
key json_log_file :json-log-output key json_log_file :json-log-output
raw stats_period {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }} 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 raw python_path {{ buildout_directory}}/bin/pythonwitheggs
import netaddr netaddr import netaddr netaddr
mode = 0775 mode = 0775
......
{#- Package slaplte provides helpers for configuring Amarisoft LTE services in SlapOS. {#- Package slaplte provides helpers for configuring Amarisoft LTE services in SlapOS.
- load_cell initializes cell registry. - 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, {#- tap indicates tap interface, that slapos told us to use,
or 'xxx-notap-xxx' if slapos provided us either nothing or empty string. #} or 'xxx-notap-xxx' if slapos provided us either nothing or empty string. #}
{%- set tap = slap_configuration.get('tap-name', '') %} {%- set tap = slap_configuration.get('tap-name', '') %}
...@@ -12,6 +32,20 @@ ...@@ -12,6 +32,20 @@
{%- endif %} {%- 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 ---- #} {#- ---- loading ---- #}
{#- load_cell initializes cell registry. {#- load_cell initializes cell registry.
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
import zc.buildout.buildout # XXX workaround for https://lab.nexedi.com/nexedi/slapos.recipe.template/merge_requests/9 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 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): def j2render(src, out, jcfg):
ctx = json.loads(jcfg) ctx = json.loads(jcfg)
assert '_standalone' not in ctx assert '_standalone' not in ctx
...@@ -17,11 +17,12 @@ def j2render(src, out, jcfg): ...@@ -17,11 +17,12 @@ def j2render(src, out, jcfg):
textctx = '' textctx = ''
for k, v in ctx.items(): for k, v in ctx.items():
textctx += 'json %s %s\n' % (k, json.dumps(v)) textctx += 'json %s %s\n' % (k, json.dumps(v))
textctx += 'import json_module json\n'
buildout = None # stub buildout = None # stub
r = jinja2_template.Recipe(buildout, "recipe", { r = jinja2_template.Recipe(buildout, "recipe", {
'extensions': 'jinja2.ext.do', 'extensions': 'jinja2.ext.do',
'url': 'config/{}'.format(src), 'url': 'config/{}'.format(src),
'output': 'config/{}'.format(out), 'output': 'config/out/{}'.format(out),
'context': textctx, 'context': textctx,
'import-list': ''' 'import-list': '''
rawfile slaplte.jinja2 slaplte.jinja2''', rawfile slaplte.jinja2 slaplte.jinja2''',
...@@ -34,7 +35,7 @@ def j2render(src, out, jcfg): ...@@ -34,7 +35,7 @@ def j2render(src, out, jcfg):
return f.read() return f.read()
r._read = _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()) f.write(r._render().decode())
...@@ -57,11 +58,11 @@ def do(src, out, rat, slapparameter_dict): ...@@ -57,11 +58,11 @@ def do(src, out, rat, slapparameter_dict):
"do_nr": %(jdo_nr)s, "do_nr": %(jdo_nr)s,
"trx": "sdr", "trx": "sdr",
"bbu": "ors", "bbu": "ors",
"ru": "ors", "ru_type": "ors",
"one_watt": "True", "ors": {"one-watt": true},
"earfcn": 646666, "earfcn": 36100,
"nr_arfcn": 646666, "nr_arfcn": 380000,
"nr_band": 43, "nr_band": 39,
"tx_gain": 62, "tx_gain": 62,
"rx_gain": 43, "rx_gain": 43,
"sib23_file": "sib", "sib23_file": "sib",
...@@ -90,10 +91,53 @@ def do(src, out, rat, slapparameter_dict): ...@@ -90,10 +91,53 @@ def do(src, out, rat, slapparameter_dict):
"etc": "etc", "etc": "etc",
"var": "var" "var": "var"
}, },
"pub_info": {
"rue_bind_addr": "::1",
"com_addr": "[::1]:9002"
},
"slapparameter_dict": %(jslapparameter_dict)s "slapparameter_dict": %(jslapparameter_dict)s
}""" }"""
j2render(src, out, json_params % locals()) j2render(src, out, json_params % locals())
do('enb.jinja2.cfg', 'enb.cfg', 'lte', {"tdd_ul_dl_config": "[Configuration 6] 5ms 5UL 3DL (maximum uplink)"}) def do_enb():
do('enb.jinja2.cfg', 'gnb.cfg', 'nr', {"tdd_ul_dl_config": "5ms 8UL 1DL 2/10 (maximum uplink)"}) 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()
...@@ -27,8 +27,7 @@ parts += ...@@ -27,8 +27,7 @@ parts +=
ims.jinja2.cfg ims.jinja2.cfg
enb.jinja2.cfg enb.jinja2.cfg
ue_db.jinja2.cfg ue_db.jinja2.cfg
ue-lte.jinja2.cfg ue.jinja2.cfg
ue-nr.jinja2.cfg
drb_lte.jinja2.cfg drb_lte.jinja2.cfg
drb_nr.jinja2.cfg drb_nr.jinja2.cfg
sib23.jinja2.asn sib23.jinja2.asn
...@@ -60,16 +59,10 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_} ...@@ -60,16 +59,10 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[template-enb] [template-enb]
<= download-base <= download-base
[template-gnb]
<= download-base
[template-core-network] [template-core-network]
<= download-base <= download-base
[template-ue-lte] [template-ue]
<= download-base
[template-ue-nr]
<= download-base <= download-base
[template-obsolete] [template-obsolete]
...@@ -128,12 +121,9 @@ filename = mme.jinja2.cfg ...@@ -128,12 +121,9 @@ filename = mme.jinja2.cfg
[ims.jinja2.cfg] [ims.jinja2.cfg]
<= copy-config-to-instance <= copy-config-to-instance
filename = ims.jinja2.cfg filename = ims.jinja2.cfg
[ue-lte.jinja2.cfg] [ue.jinja2.cfg]
<= copy-config-to-instance
filename = ue-lte.jinja2.cfg
[ue-nr.jinja2.cfg]
<= copy-config-to-instance <= copy-config-to-instance
filename = ue-nr.jinja2.cfg filename = ue.jinja2.cfg
[slaplte.jinja2] [slaplte.jinja2]
<= download-base <= download-base
......
# This file was generated using a jinja2 template and the render-templates script, don't modify directly. # This file was generated using a jinja2 template and the render-templates script, don't modify directly.
[buildout] [buildout]
extends = extends =
software-base.cfg software-ors.cfg
[default-params] [default-params]
default-lte-bandwidth = 20 MHz default-lte-bandwidth = 20 MHz
......
# 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
# This file was generated using a jinja2 template and the render-templates script, don't modify directly. # This file was generated using a jinja2 template and the render-templates script, don't modify directly.
[buildout] [buildout]
extends = extends =
software-base.cfg software-ors.cfg
[default-params] [default-params]
default-lte-bandwidth = 20 MHz default-lte-bandwidth = 20 MHz
......
# {{ generated_file_message }} # {{ generated_file_message }}
[buildout] [buildout]
extends = extends =
{%- if bbu == 'ors' %}
software-ors.cfg
{%- else %}
software-base.cfg software-base.cfg
{%- endif %}
[default-params] [default-params]
default-lte-bandwidth = {{ default_lte_bandwidth }} default-lte-bandwidth = {{ default_lte_bandwidth }}
......
...@@ -45,6 +45,7 @@ setup( ...@@ -45,6 +45,7 @@ setup(
'slapos.core', 'slapos.core',
'slapos.libnetworkcache', 'slapos.libnetworkcache',
'slapos.cookbook', 'slapos.cookbook',
'pcpp',
], ],
zip_safe=True, zip_safe=True,
test_suite='test', test_suite='test',
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
############################################################################## ##############################################################################
import os import os
import yaml
import json import json
import glob import glob
import requests import requests
from test import yamlpp_load
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -140,14 +141,18 @@ def test_enb_conf(self): ...@@ -140,14 +141,18 @@ def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_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_list'][0]['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_default']['uldl_config'], 6) {%- 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]['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['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]['n_id_cell'], enb_param_dict['pci'])
self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16)) self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16))
...@@ -169,26 +174,21 @@ def test_enb_conf(self): ...@@ -169,26 +174,21 @@ def test_enb_conf(self):
self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16)) self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) 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): def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_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]['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]['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_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'], int(gnb_param_dict1['gnb_id'], 16))
self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits']) self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits'])
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
...@@ -211,25 +211,19 @@ def test_gnb_conf1(self): ...@@ -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['nr_cell_id'], int(conf_ncell['nr_cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) self.assertEqual(p['tac'], conf_ncell['tac'])
self.assertEqual(p['band'], conf_ncell['nr_band']) 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(float(tdd_config['period']), 2.5)
self.assertEqual(int(tdd_config['dl_slots']), 3) self.assertEqual(int(tdd_config['dl_slots']), 3)
self.assertEqual(int(tdd_config['dl_symbols']), 10) self.assertEqual(int(tdd_config['dl_symbols']), 10)
self.assertEqual(int(tdd_config['ul_slots']), 1) self.assertEqual(int(tdd_config['ul_slots']), 1)
self.assertEqual(int(tdd_config['ul_symbols']), 2) 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): def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']: for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
sd = hex(p['sd']) sd = hex(p['sd'])
...@@ -241,8 +235,7 @@ def test_mme_conf(self): ...@@ -241,8 +235,7 @@ def test_mme_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['core_network_plmn']) self.assertEqual(conf['plmn'], param_dict['core_network_plmn'])
def test_sim_card(self): def test_sim_card(self):
...@@ -250,8 +243,7 @@ def test_sim_card(self): ...@@ -250,8 +243,7 @@ def test_sim_card(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): 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][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
...@@ -418,9 +410,9 @@ class TestUELTEParameters(ORSTestCase): ...@@ -418,9 +410,9 @@ class TestUELTEParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn']) 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_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['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']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
...@@ -435,11 +427,6 @@ class TestUELTEParameters(ORSTestCase): ...@@ -435,11 +427,6 @@ class TestUELTEParameters(ORSTestCase):
self.assertEqual(conf['tx_gain'], param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], param_dict['rx_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): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -451,8 +438,7 @@ class TestUENRParameters(ORSTestCase): ...@@ -451,8 +438,7 @@ class TestUENRParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn']) 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]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz') self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz')
......
# 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)
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
############################################################################## ##############################################################################
import os import os
import yaml
import json import json
import glob import glob
import requests import requests
from test import yamlpp_load
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -140,14 +141,14 @@ def test_enb_conf(self): ...@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_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_list'][0]['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_default']['uldl_config'], 6) self.assertNotIn('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]['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['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]['n_id_cell'], enb_param_dict['pci'])
self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16)) self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16))
...@@ -169,26 +170,21 @@ def test_enb_conf(self): ...@@ -169,26 +170,21 @@ def test_enb_conf(self):
self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16)) self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) 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): def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_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]['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]['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_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'], int(gnb_param_dict1['gnb_id'], 16))
self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits']) self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits'])
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
...@@ -211,25 +207,19 @@ def test_gnb_conf1(self): ...@@ -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['nr_cell_id'], int(conf_ncell['nr_cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) self.assertEqual(p['tac'], conf_ncell['tac'])
self.assertEqual(p['band'], conf_ncell['nr_band']) 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(float(tdd_config['period']), 2.5)
self.assertEqual(int(tdd_config['dl_slots']), 3) self.assertEqual(int(tdd_config['dl_slots']), 3)
self.assertEqual(int(tdd_config['dl_symbols']), 10) self.assertEqual(int(tdd_config['dl_symbols']), 10)
self.assertEqual(int(tdd_config['ul_slots']), 1) self.assertEqual(int(tdd_config['ul_slots']), 1)
self.assertEqual(int(tdd_config['ul_symbols']), 2) 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): def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']: for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
sd = hex(p['sd']) sd = hex(p['sd'])
...@@ -241,8 +231,7 @@ def test_mme_conf(self): ...@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['core_network_plmn']) self.assertEqual(conf['plmn'], param_dict['core_network_plmn'])
def test_sim_card(self): def test_sim_card(self):
...@@ -250,8 +239,7 @@ def test_sim_card(self): ...@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): 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][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase): ...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn']) 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_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['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']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase): ...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self.assertEqual(conf['tx_gain'], param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], param_dict['rx_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): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase): ...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn']) 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]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz') self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz')
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
############################################################################## ##############################################################################
import os import os
import yaml
import json import json
import glob import glob
import requests import requests
from test import yamlpp_load
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -140,14 +141,14 @@ def test_enb_conf(self): ...@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_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_list'][0]['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_default']['uldl_config'], 6) self.assertNotIn('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]['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['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]['n_id_cell'], enb_param_dict['pci'])
self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16)) self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16))
...@@ -169,26 +170,21 @@ def test_enb_conf(self): ...@@ -169,26 +170,21 @@ def test_enb_conf(self):
self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16)) self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) 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): def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_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]['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]['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_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'], int(gnb_param_dict1['gnb_id'], 16))
self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits']) self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits'])
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
...@@ -211,25 +207,19 @@ def test_gnb_conf1(self): ...@@ -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['nr_cell_id'], int(conf_ncell['nr_cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) self.assertEqual(p['tac'], conf_ncell['tac'])
self.assertEqual(p['band'], conf_ncell['nr_band']) 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(float(tdd_config['period']), 2.5)
self.assertEqual(int(tdd_config['dl_slots']), 3) self.assertEqual(int(tdd_config['dl_slots']), 3)
self.assertEqual(int(tdd_config['dl_symbols']), 10) self.assertEqual(int(tdd_config['dl_symbols']), 10)
self.assertEqual(int(tdd_config['ul_slots']), 1) self.assertEqual(int(tdd_config['ul_slots']), 1)
self.assertEqual(int(tdd_config['ul_symbols']), 2) 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): def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']: for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
sd = hex(p['sd']) sd = hex(p['sd'])
...@@ -241,8 +231,7 @@ def test_mme_conf(self): ...@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['core_network_plmn']) self.assertEqual(conf['plmn'], param_dict['core_network_plmn'])
def test_sim_card(self): def test_sim_card(self):
...@@ -250,8 +239,7 @@ def test_sim_card(self): ...@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): 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][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase): ...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn']) 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_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['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']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase): ...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self.assertEqual(conf['tx_gain'], param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], param_dict['rx_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): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase): ...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn']) 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]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz') self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz')
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
############################################################################## ##############################################################################
import os import os
import yaml
import json import json
import glob import glob
import requests import requests
from test import yamlpp_load
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -140,14 +141,14 @@ def test_enb_conf(self): ...@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_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_list'][0]['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_default']['uldl_config'], 6) self.assertNotIn('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]['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['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]['n_id_cell'], enb_param_dict['pci'])
self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16)) self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16))
...@@ -169,26 +170,21 @@ def test_enb_conf(self): ...@@ -169,26 +170,21 @@ def test_enb_conf(self):
self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16)) self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) 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): def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_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]['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]['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_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'], int(gnb_param_dict1['gnb_id'], 16))
self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits']) self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits'])
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
...@@ -211,25 +207,19 @@ def test_gnb_conf1(self): ...@@ -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['nr_cell_id'], int(conf_ncell['nr_cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) self.assertEqual(p['tac'], conf_ncell['tac'])
self.assertEqual(p['band'], conf_ncell['nr_band']) 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(float(tdd_config['period']), 2.5)
self.assertEqual(int(tdd_config['dl_slots']), 3) self.assertEqual(int(tdd_config['dl_slots']), 3)
self.assertEqual(int(tdd_config['dl_symbols']), 10) self.assertEqual(int(tdd_config['dl_symbols']), 10)
self.assertEqual(int(tdd_config['ul_slots']), 1) self.assertEqual(int(tdd_config['ul_slots']), 1)
self.assertEqual(int(tdd_config['ul_symbols']), 2) 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): def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']: for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
sd = hex(p['sd']) sd = hex(p['sd'])
...@@ -241,8 +231,7 @@ def test_mme_conf(self): ...@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['core_network_plmn']) self.assertEqual(conf['plmn'], param_dict['core_network_plmn'])
def test_sim_card(self): def test_sim_card(self):
...@@ -250,8 +239,7 @@ def test_sim_card(self): ...@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): 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][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase): ...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn']) 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_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['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']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase): ...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self.assertEqual(conf['tx_gain'], param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], param_dict['rx_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): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase): ...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn']) 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]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz') self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz')
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
############################################################################## ##############################################################################
import os import os
import yaml
import json import json
import glob import glob
import requests import requests
from test import yamlpp_load
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -140,14 +141,14 @@ def test_enb_conf(self): ...@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_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_list'][0]['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_default']['uldl_config'], 6) 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]['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['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]['n_id_cell'], enb_param_dict['pci'])
self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16)) self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16))
...@@ -169,26 +170,21 @@ def test_enb_conf(self): ...@@ -169,26 +170,21 @@ def test_enb_conf(self):
self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16)) self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) 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): def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_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]['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]['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_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'], int(gnb_param_dict1['gnb_id'], 16))
self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits']) self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits'])
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
...@@ -211,25 +207,19 @@ def test_gnb_conf1(self): ...@@ -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['nr_cell_id'], int(conf_ncell['nr_cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) self.assertEqual(p['tac'], conf_ncell['tac'])
self.assertEqual(p['band'], conf_ncell['nr_band']) 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(float(tdd_config['period']), 2.5)
self.assertEqual(int(tdd_config['dl_slots']), 3) self.assertEqual(int(tdd_config['dl_slots']), 3)
self.assertEqual(int(tdd_config['dl_symbols']), 10) self.assertEqual(int(tdd_config['dl_symbols']), 10)
self.assertEqual(int(tdd_config['ul_slots']), 1) self.assertEqual(int(tdd_config['ul_slots']), 1)
self.assertEqual(int(tdd_config['ul_symbols']), 2) 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): def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']: for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
sd = hex(p['sd']) sd = hex(p['sd'])
...@@ -241,8 +231,7 @@ def test_mme_conf(self): ...@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['core_network_plmn']) self.assertEqual(conf['plmn'], param_dict['core_network_plmn'])
def test_sim_card(self): def test_sim_card(self):
...@@ -250,8 +239,7 @@ def test_sim_card(self): ...@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): 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][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase): ...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn']) 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_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['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']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase): ...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self.assertEqual(conf['tx_gain'], param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], param_dict['rx_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): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase): ...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn']) 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]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz') self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz')
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
############################################################################## ##############################################################################
import os import os
import yaml
import json import json
import glob import glob
import requests import requests
from test import yamlpp_load
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -140,14 +141,14 @@ def test_enb_conf(self): ...@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_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_list'][0]['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_default']['uldl_config'], 6) 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]['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['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]['n_id_cell'], enb_param_dict['pci'])
self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16)) self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16))
...@@ -169,26 +170,21 @@ def test_enb_conf(self): ...@@ -169,26 +170,21 @@ def test_enb_conf(self):
self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16)) self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) 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): def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_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]['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]['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_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'], int(gnb_param_dict1['gnb_id'], 16))
self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits']) self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits'])
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
...@@ -211,25 +207,19 @@ def test_gnb_conf1(self): ...@@ -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['nr_cell_id'], int(conf_ncell['nr_cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) self.assertEqual(p['tac'], conf_ncell['tac'])
self.assertEqual(p['band'], conf_ncell['nr_band']) 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(float(tdd_config['period']), 2.5)
self.assertEqual(int(tdd_config['dl_slots']), 3) self.assertEqual(int(tdd_config['dl_slots']), 3)
self.assertEqual(int(tdd_config['dl_symbols']), 10) self.assertEqual(int(tdd_config['dl_symbols']), 10)
self.assertEqual(int(tdd_config['ul_slots']), 1) self.assertEqual(int(tdd_config['ul_slots']), 1)
self.assertEqual(int(tdd_config['ul_symbols']), 2) 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): def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']: for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
sd = hex(p['sd']) sd = hex(p['sd'])
...@@ -241,8 +231,7 @@ def test_mme_conf(self): ...@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['core_network_plmn']) self.assertEqual(conf['plmn'], param_dict['core_network_plmn'])
def test_sim_card(self): def test_sim_card(self):
...@@ -250,8 +239,7 @@ def test_sim_card(self): ...@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): 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][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase): ...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn']) 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_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['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']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase): ...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self.assertEqual(conf['tx_gain'], param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], param_dict['rx_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): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase): ...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn']) 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]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz') self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz')
......
...@@ -26,11 +26,12 @@ ...@@ -26,11 +26,12 @@
############################################################################## ##############################################################################
import os import os
import yaml
import json import json
import glob import glob
import requests import requests
from test import yamlpp_load
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass( setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
...@@ -140,14 +141,14 @@ def test_enb_conf(self): ...@@ -140,14 +141,14 @@ def test_enb_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_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_list'][0]['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_default']['uldl_config'], 6) 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]['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['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]['n_id_cell'], enb_param_dict['pci'])
self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16)) self.assertEqual(conf['cell_list'][0]['tac'], int(enb_param_dict['tac'], 16))
...@@ -169,26 +170,21 @@ def test_enb_conf(self): ...@@ -169,26 +170,21 @@ def test_enb_conf(self):
self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16)) self.assertEqual(p['cell_id'], int(conf_ncell['cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) 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): def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
if 'tx_gain' in conf and 'rx_gain' in conf: if 'tx_gain' in conf and 'rx_gain' in conf:
self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain']) self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_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]['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]['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_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'], int(gnb_param_dict1['gnb_id'], 16))
self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits']) self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits'])
for p in conf['nr_cell_default']['plmn_list']: for p in conf['nr_cell_default']['plmn_list']:
...@@ -211,25 +207,19 @@ def test_gnb_conf1(self): ...@@ -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['nr_cell_id'], int(conf_ncell['nr_cell_id'], 16))
self.assertEqual(p['tac'], conf_ncell['tac']) self.assertEqual(p['tac'], conf_ncell['tac'])
self.assertEqual(p['band'], conf_ncell['nr_band']) 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(float(tdd_config['period']), 2.5)
self.assertEqual(int(tdd_config['dl_slots']), 3) self.assertEqual(int(tdd_config['dl_slots']), 3)
self.assertEqual(int(tdd_config['dl_symbols']), 10) self.assertEqual(int(tdd_config['dl_symbols']), 10)
self.assertEqual(int(tdd_config['ul_slots']), 1) self.assertEqual(int(tdd_config['ul_slots']), 1)
self.assertEqual(int(tdd_config['ul_symbols']), 2) 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): def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for p in conf['nr_cell_default']['plmn_list'][0]['nssai']: for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
sd = hex(p['sd']) sd = hex(p['sd'])
...@@ -241,8 +231,7 @@ def test_mme_conf(self): ...@@ -241,8 +231,7 @@ def test_mme_conf(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['core_network_plmn']) self.assertEqual(conf['plmn'], param_dict['core_network_plmn'])
def test_sim_card(self): def test_sim_card(self):
...@@ -250,8 +239,7 @@ def test_sim_card(self): ...@@ -250,8 +239,7 @@ def test_sim_card(self):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split(): 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][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k']) self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase): ...@@ -418,9 +406,9 @@ class TestUELTEParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn']) 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_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['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']) self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase): ...@@ -435,11 +423,6 @@ class TestUELTEParameters(ORSTestCase):
self.assertEqual(conf['tx_gain'], param_dict['tx_gain']) self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], param_dict['rx_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): class TestUENRParameters(ORSTestCase):
@classmethod @classmethod
def getInstanceParameterDict(cls): def getInstanceParameterDict(cls):
...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase): ...@@ -451,8 +434,7 @@ class TestUENRParameters(ORSTestCase):
conf_file = glob.glob(os.path.join( conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0] self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]
with open(conf_file, 'r') as f: conf = yamlpp_load(conf_file)
conf = yaml.load(f)
self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn']) 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]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz') self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], '10 MHz')
......
[instance-profile] [instance-profile]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 6610ce91964dda42edbcb5b7837777c2 md5sum = cf6c11bc335c75139695008128f1565a
...@@ -32,8 +32,8 @@ cert = ${slap-connection:cert-file} ...@@ -32,8 +32,8 @@ cert = ${slap-connection:cert-file}
configuration.coupler_block_device = /dev/i2c-1 configuration.coupler_block_device = /dev/i2c-1
configuration.coupler_i2c_slave_list = 0x58 configuration.coupler_i2c_slave_list = 0x58
configuration.mode = 0 configuration.mode = 0
configuration.username = configuration.username = ""
configuration.password = configuration.password = ""
configuration.interface = 0.0.0.0 configuration.interface = 0.0.0.0
configuration.opc_ua_port = 4840 configuration.opc_ua_port = 4840
configuration.id = 0 configuration.id = 0
...@@ -42,7 +42,7 @@ configuration.heart_beat_interval = 50 ...@@ -42,7 +42,7 @@ configuration.heart_beat_interval = 50
configuration.heart_beat_id_list = configuration.heart_beat_id_list =
configuration.network_address_url_data_type = opc.udp://224.0.0.22:4840/ configuration.network_address_url_data_type = opc.udp://224.0.0.22:4840/
configuration.heart_beat_timeout_interval = 100 configuration.heart_beat_timeout_interval = 100
configuration.network_interface = configuration.network_interface = ""
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -51,7 +51,6 @@ etc = ${:home}/etc ...@@ -51,7 +51,6 @@ etc = ${:home}/etc
var = ${:home}/var var = ${:home}/var
script = ${:etc}/run/ script = ${:etc}/run/
service = ${:etc}/service service = ${:etc}/service
log = ${:var}/log
[publish-connection-parameter] [publish-connection-parameter]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
......
...@@ -12,6 +12,15 @@ extends = ...@@ -12,6 +12,15 @@ extends =
../../stack/monitor/buildout.cfg ../../stack/monitor/buildout.cfg
../../stack/slapos.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] # we need open62541's sources even after compiling and linking in [open62541]
# section. Reasons is that coupler's C application depends on it. # section. Reasons is that coupler's C application depends on it.
[open62541-source] [open62541-source]
...@@ -44,11 +53,11 @@ environment += ...@@ -44,11 +53,11 @@ environment +=
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/nexedi/osie.git repository = https://lab.nexedi.com/nexedi/osie.git
revision = a40573897e1ee9de7b3536daa58c6904384c10f9 revision = 5d193e57b50a7ebb3df147e403917201eb9cb6c6
[compile-coupler] [compile-coupler]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
path = ${osie-repository:location}/coupler/ path = ${osie-repository:location}/coupler
bin_dir = ${:path}/bin/ bin_dir = ${:path}/bin/
environment = environment =
OPEN62541_HOME = ${open62541:location} OPEN62541_HOME = ${open62541:location}
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = c478478882232200fbe4bf3e7d2a4ff0 md5sum = bbeb179b698975c1a88ea7604df6740e
[profile-common] [profile-common]
filename = instance-common.cfg.in filename = instance-common.cfg.in
...@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68 ...@@ -22,7 +22,7 @@ md5sum = 5784bea3bd608913769ff9a8afcccb68
[profile-frontend] [profile-frontend]
filename = instance-frontend.cfg.in filename = instance-frontend.cfg.in
md5sum = 9a33900d735ef074b5887d61bca54243 md5sum = bb8129cdd89632c3c3ce86556496cb0f
[profile-master] [profile-master]
filename = instance-master.cfg.in filename = instance-master.cfg.in
......
...@@ -44,7 +44,9 @@ parts = ...@@ -44,7 +44,9 @@ parts =
monitor-base monitor-base
monitor-ats-cache-stats-wrapper monitor-ats-cache-stats-wrapper
monitor-traffic-summary-last-stats-wrapper monitor-traffic-summary-last-stats-wrapper
{%- if instance_parameter_dict.get('configuration.re6st-verification-url', None) %}
monitor-verify-re6st-connectivity monitor-verify-re6st-connectivity
{%- endif %}
frontend-haproxy-rsyslogd-configuration frontend-haproxy-rsyslogd-configuration
frontend-haproxy-rsyslogd frontend-haproxy-rsyslogd
......
...@@ -93,7 +93,7 @@ configuration.apache-key = ...@@ -93,7 +93,7 @@ configuration.apache-key =
configuration.apache-certificate = configuration.apache-certificate =
configuration.disk-cache-size = 8G configuration.disk-cache-size = 8G
configuration.ram-cache-size = 1G 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-http2-by-default = true
configuration.enable-http3 = false configuration.enable-http3 = false
configuration.http3-port = 443 configuration.http3-port = 443
......
...@@ -87,6 +87,9 @@ KEDIFA_PORT = '15080' ...@@ -87,6 +87,9 @@ KEDIFA_PORT = '15080'
SOURCE_IP = '127.0.0.1' SOURCE_IP = '127.0.0.1'
SOURCE_IPV6 = '::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 # IP on which test run, in order to mimic HTTP[s] access
TEST_IP = os.environ['SLAPOS_TEST_IPV4'] TEST_IP = os.environ['SLAPOS_TEST_IPV4']
...@@ -5034,6 +5037,7 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase, ...@@ -5034,6 +5037,7 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase,
'plain_http_port': HTTP_PORT, 'plain_http_port': HTTP_PORT,
'kedifa_port': KEDIFA_PORT, 'kedifa_port': KEDIFA_PORT,
'caucase_port': CAUCASE_PORT, 'caucase_port': CAUCASE_PORT,
're6st-verification-url': RE6ST_URL,
} }
@classmethod @classmethod
...@@ -5064,7 +5068,7 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase, ...@@ -5064,7 +5068,7 @@ class TestRe6stVerificationUrlDefaultSlave(SlaveHttpFrontendTestCase,
self.assertEqual( self.assertEqual(
getPromisePluginParameterDict(re6st_connectivity_promise_file), getPromisePluginParameterDict(re6st_connectivity_promise_file),
{ {
'url': 'http://[2001:67c:1254:4::1]/index.html', 'url': RE6ST_URL,
} }
) )
...@@ -5077,6 +5081,7 @@ class TestRe6stVerificationUrlSlave(SlaveHttpFrontendTestCase, ...@@ -5077,6 +5081,7 @@ class TestRe6stVerificationUrlSlave(SlaveHttpFrontendTestCase,
'plain_http_port': HTTP_PORT, 'plain_http_port': HTTP_PORT,
'kedifa_port': KEDIFA_PORT, 'kedifa_port': KEDIFA_PORT,
'caucase_port': CAUCASE_PORT, 'caucase_port': CAUCASE_PORT,
're6st-verification-url': RE6ST_URL,
} }
@classmethod @classmethod
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -46,7 +46,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
"kedifa_port": "15080", "kedifa_port": "15080",
"plain_http_port": "11080", "plain_http_port": "11080",
"port": "11443", "port": "11443",
"re6st-verification-url": "http://[2001:67c:1254:4::1]/index.html",
"root_instance_title": "testing partition 0", "root_instance_title": "testing partition 0",
"slap_computer_id": "local", "slap_computer_id": "local",
"slap_computer_partition_id": "T-0", "slap_computer_partition_id": "T-0",
...@@ -67,6 +68,7 @@ ...@@ -67,6 +68,7 @@
"monitor-username": "admin", "monitor-username": "admin",
"plain_http_port": "11080", "plain_http_port": "11080",
"port": "11443", "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=\"}}" "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": [], "full_address_list": [],
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
"kedifa_port": "15080", "kedifa_port": "15080",
"plain_http_port": "11080", "plain_http_port": "11080",
"port": "11443", "port": "11443",
"re6st-verification-url": "http://[2001:67c:1254:4::1]/index.html",
"root_instance_title": "testing partition 0", "root_instance_title": "testing partition 0",
"slap_computer_id": "local", "slap_computer_id": "local",
"slap_computer_partition_id": "T-0", "slap_computer_partition_id": "T-0",
...@@ -67,6 +68,7 @@ ...@@ -67,6 +68,7 @@
"monitor-username": "admin", "monitor-username": "admin",
"plain_http_port": "11080", "plain_http_port": "11080",
"port": "11443", "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=\"}}" "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": [], "full_address_list": [],
......
...@@ -51,7 +51,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
...@@ -77,7 +76,6 @@ T-3/etc/plugin/monitor-http-frontend.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/monitor-httpd-listening-on-tcp.py
T-3/etc/plugin/promise-key-download-url-ready.py T-3/etc/plugin/promise-key-download-url-ready.py
T-3/etc/plugin/promise-logrotate-setup.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-configuration.py
T-3/etc/plugin/slave_introspection_https.py T-3/etc/plugin/slave_introspection_https.py
T-3/etc/plugin/trafficserver-cache-availability.py T-3/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -50,7 +50,6 @@ T-2/etc/plugin/monitor-http-frontend.py ...@@ -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/monitor-httpd-listening-on-tcp.py
T-2/etc/plugin/promise-key-download-url-ready.py T-2/etc/plugin/promise-key-download-url-ready.py
T-2/etc/plugin/promise-logrotate-setup.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-configuration.py
T-2/etc/plugin/slave_introspection_https.py T-2/etc/plugin/slave_introspection_https.py
T-2/etc/plugin/trafficserver-cache-availability.py T-2/etc/plugin/trafficserver-cache-availability.py
......
...@@ -489,7 +489,6 @@ slapos.core = ...@@ -489,7 +489,6 @@ slapos.core =
# Various needed versions # Various needed versions
Pillow = 9.2.0 Pillow = 9.2.0
forcediphttpsadapter = 1.0.1 forcediphttpsadapter = 1.0.1
httplib2 = 0.20.4
image = 1.5.25 image = 1.5.25
plantuml = 0.3.0:whl plantuml = 0.3.0:whl
pysftp = 0.2.9 pysftp = 0.2.9
...@@ -498,8 +497,8 @@ testfixtures = 6.11.0 ...@@ -498,8 +497,8 @@ testfixtures = 6.11.0
mysqlclient = 2.1.1 mysqlclient = 2.1.1
pexpect = 4.8.0 pexpect = 4.8.0
ptyprocess = 0.6.0 ptyprocess = 0.6.0
psycopg2 = 2.8.6
paho-mqtt = 1.5.0 paho-mqtt = 1.5.0
pcpp = 1.30
# Patched eggs # Patched eggs
PyPDF2 = 1.26.0+SlapOSPatched001 PyPDF2 = 1.26.0+SlapOSPatched001
......
...@@ -274,7 +274,6 @@ httmock = 1.2.6 ...@@ -274,7 +274,6 @@ httmock = 1.2.6
testfixtures = 6.11.0 testfixtures = 6.11.0
pyflakes = 2.0.0 pyflakes = 2.0.0
zope.testing = 4.6.2 zope.testing = 4.6.2
psycopg2 = 2.8.6
iniparse = 0.5 iniparse = 0.5
miniupnpc = 1.9 miniupnpc = 1.9
nemu = 0.3.1 nemu = 0.3.1
......
...@@ -520,17 +520,17 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience): ...@@ -520,17 +520,17 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience):
# The project name is sample-test, which we created above. # The project name is sample-test, which we created above.
self.assertIn("sample-test", projects[0]['name_with_namespace']) self.assertIn("sample-test", projects[0]['name_with_namespace'])
# Get repo url, default one is http://lab.example.com/root/sample-test.git # Get repo url, default one is https://lab.example.com/root/sample-test.git
# We need the path like http://[2001:67c:1254:e:c4::5041]:7777/root/sample-test # We need the path like https://[2001:67c:1254:e:c4::5041]:7777/root/sample-test
project_1 = projects[0] project_1 = projects[0]
repo_url = backend_url.replace("http://", "") + "/" + project_1['path_with_namespace'] repo_url = backend_url.replace("https://", "") + "/" + project_1['path_with_namespace']
# Clone the repo with token # Clone the repo with token
clone_url = 'http://oauth2:' + 'SLurtnxPscPsU-SDm4oN@' + repo_url clone_url = 'https://oauth2:' + 'SLurtnxPscPsU-SDm4oN@' + repo_url
repo_path = os.path.join(os.getcwd(), project_1['name']) repo_path = os.path.join(os.getcwd(), project_1['name'])
print(repo_path) print(repo_path)
if os.path.exists(repo_path): if os.path.exists(repo_path):
shutil.rmtree(repo_path, ignore_errors=True) 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 # Create a new file and push the commit
f = open(os.path.join(repo_path, 'file.txt'), 'x') f = open(os.path.join(repo_path, 'file.txt'), 'x')
...@@ -566,7 +566,7 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience): ...@@ -566,7 +566,7 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience):
print(repo_path) print(repo_path)
if os.path.exists(repo_path): if os.path.exists(repo_path):
shutil.rmtree(repo_path, ignore_errors=True) 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. # 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) 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): ...@@ -596,8 +596,8 @@ class TestTheiaResilienceGitlab(test_resiliency.TestTheiaResilience):
# The project name is sample-test, which we created above. # The project name is sample-test, which we created above.
self.assertIn("sample-test", projects[0]['name_with_namespace']) self.assertIn("sample-test", projects[0]['name_with_namespace'])
project_1 = projects[0] project_1 = projects[0]
repo_url = backend_url.replace("http://", "") + "/" + project_1['path_with_namespace'] repo_url = backend_url.replace("https://", "") + "/" + project_1['path_with_namespace']
clone_url = 'http://oauth2:' + 'SLurtnxPscPsU-SDm4oN@' + repo_url clone_url = 'https://oauth2:' + 'SLurtnxPscPsU-SDm4oN@' + repo_url
repo_path = os.path.join(os.getcwd(), project_1['name']) 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. # Check the file we committed in the original theia is exist and the content is matching.
......
...@@ -777,7 +777,7 @@ dask = 0.18.1 ...@@ -777,7 +777,7 @@ dask = 0.18.1
deepdiff = 3.3.0 deepdiff = 3.3.0
docutils = 0.17.1 docutils = 0.17.1
erp5-coverage-plugin = 0.0.1 erp5-coverage-plugin = 0.0.1
erp5diff = 0.8.1.8 erp5diff = 0.8.1.9
facebook-sdk = 2.0.0 facebook-sdk = 2.0.0
five.formlib = 1.0.4 five.formlib = 1.0.4
fpconst = 0.7.2 fpconst = 0.7.2
...@@ -786,7 +786,6 @@ google-api-python-client = 1.6.1 ...@@ -786,7 +786,6 @@ google-api-python-client = 1.6.1
graphviz = 0.5.2 graphviz = 0.5.2
haufe.requestmonitoring = 0.6.0 haufe.requestmonitoring = 0.6.0
html5lib = 1.1 html5lib = 1.1
httplib2 = 0.10.3
huBarcode = 1.0.0 huBarcode = 1.0.0
interval = 1.0.0 interval = 1.0.0
ipdb = 0.10.2 ipdb = 0.10.2
......
...@@ -180,7 +180,7 @@ cryptography = 3.3.2 ...@@ -180,7 +180,7 @@ cryptography = 3.3.2
dataclasses = 0.8 dataclasses = 0.8
dateparser = 0.7.6 dateparser = 0.7.6
decorator = 4.3.0 decorator = 4.3.0
defusedxml = 0.6.0 defusedxml = 0.7.1
distro = 1.7.0 distro = 1.7.0
dnspython = 1.16.0 dnspython = 1.16.0
entrypoints = 0.3 entrypoints = 0.3
...@@ -201,6 +201,7 @@ GitPython = 3.1.30 ...@@ -201,6 +201,7 @@ GitPython = 3.1.30
greenlet = 3.0.1 greenlet = 3.0.1
h11 = 0.14.0 h11 = 0.14.0
h5py = 2.7.1 h5py = 2.7.1
httplib2 = 0.22.0
idna = 3.4:whl idna = 3.4:whl
igmp = 1.0.4 igmp = 1.0.4
Importing = 1.10 Importing = 1.10
...@@ -257,7 +258,7 @@ patsy = 0.5.3 ...@@ -257,7 +258,7 @@ patsy = 0.5.3
pbr = 5.9.0 pbr = 5.9.0
pexpect = 4.8.0 pexpect = 4.8.0
pickleshare = 0.7.4 pickleshare = 0.7.4
pim-dm = 1.4.0nxd001 pim-dm = 1.4.0nxd002
pkgconfig = 1.5.1 pkgconfig = 1.5.1
pkgutil-resolve-name = 1.3.10 pkgutil-resolve-name = 1.3.10
plone.recipe.command = 1.1 plone.recipe.command = 1.1
...@@ -267,6 +268,7 @@ prettytable = 0.7.2 ...@@ -267,6 +268,7 @@ prettytable = 0.7.2
prometheus-client = 0.9.0 prometheus-client = 0.9.0
prompt-toolkit = 3.0.19 prompt-toolkit = 3.0.19
psutil = 5.8.0 psutil = 5.8.0
psycopg2 = 2.9.9
ptyprocess = 0.5.1 ptyprocess = 0.5.1
py = 1.11.0:whl py = 1.11.0:whl
py-mld = 1.0.3 py-mld = 1.0.3
...@@ -278,7 +280,7 @@ pygls = 1.1.0:whl ...@@ -278,7 +280,7 @@ pygls = 1.1.0:whl
Pygments = 2.9.0 Pygments = 2.9.0
PyNaCl = 1.3.0 PyNaCl = 1.3.0
pyOpenSSL = 19.1.0 pyOpenSSL = 19.1.0
pyparsing = 3.0.9:whl pyparsing = 3.1.1:whl
pyroute2 = 0.6.9 pyroute2 = 0.6.9
pyrsistent = 0.18.1 pyrsistent = 0.18.1
PyRSS2Gen = 1.1 PyRSS2Gen = 1.1
...@@ -312,7 +314,7 @@ slapos.rebootstrap = 4.5 ...@@ -312,7 +314,7 @@ slapos.rebootstrap = 4.5
slapos.recipe.build = 0.56 slapos.recipe.build = 0.56
slapos.recipe.cmmi = 0.19 slapos.recipe.cmmi = 0.19
slapos.recipe.template = 5.1 slapos.recipe.template = 5.1
slapos.toolbox = 0.140 slapos.toolbox = 0.142
smmap = 5.0.0 smmap = 5.0.0
sniffio = 1.3.0 sniffio = 1.3.0
sortedcontainers = 2.4.0 sortedcontainers = 2.4.0
...@@ -392,8 +394,9 @@ jsonschema = 3.0.2:whl ...@@ -392,8 +394,9 @@ jsonschema = 3.0.2:whl
MarkupSafe = 1.0 MarkupSafe = 1.0
msgpack = 0.6.2 msgpack = 0.6.2
packaging = 16.8 packaging = 16.8
psycopg2 = 2.8.6
pycurl = 7.43.0 pycurl = 7.43.0
pyparsing = 2.2.0 pyparsing = 2.4.7
pyrsistent = 0.16.1 pyrsistent = 0.16.1
requests = 2.27.1 requests = 2.27.1
selectors34 = 1.2 selectors34 = 1.2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment