Commit c1b9265c authored by Joanne Hugé's avatar Joanne Hugé

wip

parent 3916d796
...@@ -11,26 +11,43 @@ class WebsocketTestClass(e2e.EndToEndTestCase): ...@@ -11,26 +11,43 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
try: try:
super().setUpClass() super().setUpClass()
create_instances = False cls.enb_instance_name = 'e2e-ors70-enb-1733404208'
if create_instances: cls.ue_instance_name = 'e2e-sb005-ue-1733403458'
cls.enb_instance_name = time.strftime('e2e-ors70-enb-%Y-%B-%d-%H:%M:%S')
cls.product = 'https://lab.nexedi.com/nexedi/slapos/-/raw/1.0.371/software/simpleran/software-ors.cfg' cls.update_parameters("enb",
# Component GUIDs and configurations {
cls.comp_enb = "COMP-4296" "bandwidth": "10 MHz",
# Retry configurations "dl_earfcn": 38350,
cls.max_retries = 10 "enb_drb_stats_enabled": False,
cls.retry_delay = 180 # seconds "xlog_forwarding_enabled": False
# Setup instances })
cls.setup_instances() cls.update_parameters("ue",
cls.waitUntilGreen(cls.enb_instance_name) {
cls.waitUntilGreen(cls.cn_instance_name) "cell_type": "lte",
else: "cell_kind": "ue",
cls.enb_instance_name = 'e2e-ors70-enb-1733404208' "rf_mode": "tdd",
cls.ue_instance_name = 'e2e-sb005-ue-1733403458' "ru": {
"ru_type": "sdr",
cls.waitUntilGreen(cls.enb_instance_name) "ru_link_type": "sdr",
cls.waitUntilGreen(cls.ue_instance_name) "sdr_dev_list": [
cls.setup_websocket_connection() 0
],
"n_antenna_dl": 2,
"n_antenna_ul": 2,
"tx_gain": 90,
"rx_gain": 60,
"txrx_active": "ACTIVE"
},
"dl_earfcn": 38350,
"ul_earfcn": 38350,
"bandwidth": 10
})
time.sleep(60)
cls.waitUntilGreen(cls.enb_instance_name)
cls.waitUntilGreen(cls.ue_instance_name)
cls.setup_websocket_connection()
except Exception as e: except Exception as e:
cls.logger.error("Error during setup: " + str(e)) cls.logger.error("Error during setup: " + str(e))
...@@ -63,6 +80,19 @@ class WebsocketTestClass(e2e.EndToEndTestCase): ...@@ -63,6 +80,19 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
cls.logger.info("Websocket authentication established.") cls.logger.info("Websocket authentication established.")
@classmethod @classmethod
def update_parameters(cls, name, parameters):
instance_name = cls.get(f"{name}_instance_name")
instance_infos = cls.getInstanceInfos()
cls.logger.info(f"Update parameters for {instance_name}")
json_parameters = json.dumps(parameters)
cls.retry_request(cls.request, instance_infos.software_url,
instance_name
partition_parameter_kw={'_': json_parameters},
software_type=name)
@classmethod
def retry_request(cls, func, *args, **kwargs): def retry_request(cls, func, *args, **kwargs):
for attempt in range(cls.max_retries): for attempt in range(cls.max_retries):
try: try:
......
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