diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py
index f1e49bc0a7..fe6b648975 100644
--- a/ci-scripts/cls_containerize.py
+++ b/ci-scripts/cls_containerize.py
@@ -789,7 +789,7 @@ class Containerize():
logging.error('\u001B[1m Undeploying objects Failed\u001B[0m')
return success
- def AnalyzeRTStatsObject(self, HTML, node, ctx, thresholds):
+ def AnalyzeRTStatsObject(self, HTML, node, ctx, thresholds, service=None):
logging.info(f'Analyzing realtime stats from server: {node}')
yaml = self.yamlPath.strip('/')
wd = f'{self.eNBSourceCodePath}/{yaml}'
@@ -797,7 +797,13 @@ class Containerize():
with cls_cmd.getConnection(node) as cmd:
services = GetDeployedServices(cmd, wd_yaml)
- s, _ = services[0] # we simply assume something is deployed, if not Exception will report
+ if not services:
+ raise RuntimeError("No deployed docker compose services found")
+ deployed_services = [s for s, _ in services]
+ s = service or deployed_services[0] # choose first service if not provided
+ if s not in deployed_services:
+ raise RuntimeError(f"Requested service {s} not found among services: {deployed_services}")
+ logging.info(f"Analyzing deployed service '{s}'")
# similar to BuildRunTests(), use docker cp to avoid problems with permissions
cmd.run(f'docker compose -f {wd_yaml} cp {s}:/opt/oai-gnb/nrL1_stats.log {wd}/')
l1_file = archiveArtifact(cmd, ctx, f"{wd}/nrL1_stats.log")
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index 9e1401fcf0..2087c2da5c 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -259,7 +259,8 @@ def ExecuteActionWithParam(action, ctx, node):
elif action == 'AnalyzeRTStats_Object':
yaml = test.findtext('stats_cfg')
- success = CONTAINERS.AnalyzeRTStatsObject(HTML, node, ctx, yaml)
+ service = test.findtext('service')
+ success = CONTAINERS.AnalyzeRTStatsObject(HTML, node, ctx, yaml, service)
else:
logging.warning(f"unknown action {action}, skip step")
diff --git a/ci-scripts/xml_files/gnb_phytest_fhi7.2_docker.xml b/ci-scripts/xml_files/gnb_phytest_fhi7.2_docker.xml
index 309f1784b6..aa7985ad9d 100644
--- a/ci-scripts/xml_files/gnb_phytest_fhi7.2_docker.xml
+++ b/ci-scripts/xml_files/gnb_phytest_fhi7.2_docker.xml
@@ -56,6 +56,7 @@
AnalyzeRTStats_Object
Analyze Real-Time Stats
datalog_rt_stats.100.4x4.fhi72.yaml
+ oai-gnb
bulbul