Merge remote-tracking branch 'origin/ci-refactor-cn-fixes' into integration_2025_w15 (!3375)

CI CoreNetwork fixes

Some minor fixes after !3322
This commit is contained in:
Robert Schmidt
2025-04-14 17:00:59 +02:00
2 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -49,7 +49,7 @@ class CoreNetwork:
self._host = c.get('Host').strip() self._host = c.get('Host').strip()
if self._host == "%%current_host%%": if self._host == "%%current_host%%":
if node is None: if node is None:
raise Exception(f"core network {self} requires node, but none provided (cannot replace %%current_host%%)") raise Exception(f"core network {cn_name} requires node, but none provided (cannot replace %%current_host%%)")
self._host = node self._host = node
if d is not None: if d is not None:
raise Exception("directory handling not implemented") raise Exception("directory handling not implemented")
@@ -66,7 +66,7 @@ class CoreNetwork:
logging.info(f'initialized core {self} from {filename}') logging.info(f'initialized core {self} from {filename}')
def __str__(self): def __str__(self):
return f"{self._cn_name}@{self._host} [IP: {self.getIP()}]" return f"{self._cn_name}@{self._host}"
def __repr__(self): def __repr__(self):
return self.__str__() return self.__str__()
@@ -162,6 +162,9 @@ class CoreNetwork:
def getCmdPrefix(self): def getCmdPrefix(self):
return self._cmd_prefix or "" return self._cmd_prefix or ""
def getName(self):
return self._cn_name
def getHost(self): def getHost(self):
return self._host return self._host
+2 -2
View File
@@ -464,7 +464,7 @@ class OaiCiTest():
return (False, f"UE {ue.getName()} has no IP address") return (False, f"UE {ue.getName()} has no IP address")
svrIP = cn.getIP() svrIP = cn.getIP()
if not svrIP: if not svrIP:
return (False, f"Iperf server {ue.getName()} has no IP address") return (False, f"Iperf server {cn.getName()} has no IP address")
iperf_opt = self.iperf_args iperf_opt = self.iperf_args
jsonReport = "--json" jsonReport = "--json"
@@ -862,7 +862,7 @@ class OaiCiTest():
success, output = cn.deploy() success, output = cn.deploy()
logging.info(f"deployment core network {core_name} success {success}, output:\n{output}") logging.info(f"deployment core network {core_name} success {success}, output:\n{output}")
if success: if success:
msg = f"Started {cn}" msg = f"Started {cn} [{cn.getIP()}]"
HTML.CreateHtmlTestRowQueue(core_name, 'OK', [msg]) HTML.CreateHtmlTestRowQueue(core_name, 'OK', [msg])
else: else:
msg = f"deployment of core network {core_name} FAILED" msg = f"deployment of core network {core_name} FAILED"