From bb3f207237a3c0791bf3169a9be96d891a106c90 Mon Sep 17 00:00:00 2001 From: Felipe Vicens Date: Mon, 6 Apr 2020 20:06:09 +0200 Subject: [PATCH] Implementing --wait option for ns deletion in systest Change-Id: I79e25dc98a195bbbba70feb1bf65e545b6fb9e8e Signed-off-by: Felipe Vicens --- systest/lib/osm/osm.py | 2 +- systest/testcases/vnfs/test_vnfs.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/systest/lib/osm/osm.py b/systest/lib/osm/osm.py index 35b6144b..a3549949 100644 --- a/systest/lib/osm/osm.py +++ b/systest/lib/osm/osm.py @@ -19,7 +19,7 @@ from osmclient import client class Osm(): def __init__(self,osmhost,sol005=None,ro_host=None,descriptors_dir=None,vnfd_descriptors_list=None,nsd_descriptors_list=None,ns_name_prefix=None): - self._OsmApi=client.Client(host=osmhost,sol005=sol005,ro_host=ro_host) + self._OsmApi=client.Client(host=osmhost,sol005=sol005,ro_host=ro_host, verbose=2) self._descriptors_dir = descriptors_dir self.vnfd_descriptors_list = vnfd_descriptors_list self.nsd_descriptors_list = nsd_descriptors_list diff --git a/systest/testcases/vnfs/test_vnfs.py b/systest/testcases/vnfs/test_vnfs.py index ab3a1621..58fc2400 100644 --- a/systest/testcases/vnfs/test_vnfs.py +++ b/systest/testcases/vnfs/test_vnfs.py @@ -116,13 +116,13 @@ class TestClass(object): time.sleep(10) - assert not osm.get_api().ns.delete(ns_name) + assert not osm.get_api().ns.delete(ns_name, wait=True) #wait for the ns to delete - try: - utils.wait_for_value( lambda: osm.get_api().ns.get(ns_name), result=False, wait_time=180) - except: - print("Exception: Failed to get NAME after NS DELETE ... ") + #try: + # utils.wait_for_value( lambda: osm.get_api().ns.get(ns_name), result=False, wait_time=180) + #except: + # print("Exception: Failed to get NAME after NS DELETE ... ") #TODO find the reason for 502 exception from osmclient/nbi try: -- 2.25.1