aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMicha? Jagie??o <michal.jagiello@t-mobile.pl>2023-05-24 07:23:40 +0000
committerGerrit Code Review <gerrit@onap.org>2023-05-24 07:23:40 +0000
commitb7d4808b153c8c7271d57d1fc3970f43368a7f07 (patch)
treea2381feb6d5e9b765dfd370226d444f0f78fdb9b /src
parent2b54543bb7682af1f41cf2d664d7606c0039572c (diff)
parentb766e7663a66ad93f3495bcec0769fe0a5e910c6 (diff)
Merge "Fix VES client simulator image and pod verification method"
Diffstat (limited to 'src')
-rw-r--r--src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py11
-rw-r--r--src/onaptests/templates/artifacts/pnf-simulator.tar.gzbin1237 -> 1223 bytes
2 files changed, 7 insertions, 4 deletions
diff --git a/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py b/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py
index 3180733..0e6e001 100644
--- a/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py
+++ b/src/onaptests/steps/simulator/pnf_simulator_cnf/pnf_register.py
@@ -49,6 +49,7 @@ class PnfSimulatorCnfRegisterStep(BaseStep):
config.load_kube_config(settings.K8S_CONFIG)
k8s_client: "CoreV1API" = client.CoreV1Api()
k8s_watch: "Watch" = watch.Watch()
+ status = False
try:
for event in k8s_watch.stream(k8s_client.list_namespaced_pod,
namespace=settings.K8S_ADDITIONAL_RESOURCES_NAMESPACE,
@@ -57,8 +58,9 @@ class PnfSimulatorCnfRegisterStep(BaseStep):
if not event["object"].status.phase in ["Pending", "Running"]:
# Invalid pod state
return False
- return event["object"].status.phase == "Running"
- return False
+ if event["object"].status.phase == "Running":
+ return True
+ return status
except urllib3.exceptions.HTTPError:
self._logger.error("Can't connect with k8s")
raise OnapTestException
@@ -91,8 +93,9 @@ class PnfSimulatorCnfRegisterStep(BaseStep):
def execute(self) -> None:
"""Send PNF registration event."""
super().execute()
- if not self.is_pnf_pod_running():
- EnvironmentPreparationException("PNF simulator is not running")
+ status = self.is_pnf_pod_running()
+ if not status:
+ raise EnvironmentPreparationException("PNF simulator is not running")
time.sleep(settings.PNF_WAIT_TIME) # Let's still wait for PNF simulator to make sure it's initialized
ves_proto, ves_ip, ves_port = self.get_ves_protocol_ip_and_port()
registration_number: int = 0
diff --git a/src/onaptests/templates/artifacts/pnf-simulator.tar.gz b/src/onaptests/templates/artifacts/pnf-simulator.tar.gz
index 605490f..b715b1c 100644
--- a/src/onaptests/templates/artifacts/pnf-simulator.tar.gz
+++ b/src/onaptests/templates/artifacts/pnf-simulator.tar.gz
Binary files differ