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

wip

parent 3916d796
......@@ -11,26 +11,43 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
try:
super().setUpClass()
create_instances = False
if create_instances:
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'
# Component GUIDs and configurations
cls.comp_enb = "COMP-4296"
# 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)
else:
cls.enb_instance_name = 'e2e-ors70-enb-1733404208'
cls.ue_instance_name = 'e2e-sb005-ue-1733403458'
cls.waitUntilGreen(cls.enb_instance_name)
cls.waitUntilGreen(cls.ue_instance_name)
cls.setup_websocket_connection()
cls.enb_instance_name = 'e2e-ors70-enb-1733404208'
cls.ue_instance_name = 'e2e-sb005-ue-1733403458'
cls.update_parameters("enb",
{
"bandwidth": "10 MHz",
"dl_earfcn": 38350,
"enb_drb_stats_enabled": False,
"xlog_forwarding_enabled": False
})
cls.update_parameters("ue",
{
"cell_type": "lte",
"cell_kind": "ue",
"rf_mode": "tdd",
"ru": {
"ru_type": "sdr",
"ru_link_type": "sdr",
"sdr_dev_list": [
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:
cls.logger.error("Error during setup: " + str(e))
......@@ -63,6 +80,19 @@ class WebsocketTestClass(e2e.EndToEndTestCase):
cls.logger.info("Websocket authentication established.")
@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):
for attempt in range(cls.max_retries):
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