From 7cb84dea04ef7db9174e83bfe3d8dd553e38319b Mon Sep 17 00:00:00 2001 From: Michael Marchetti Date: Wed, 31 Oct 2018 21:32:21 +0000 Subject: [PATCH] Add additional logging on failure of ns-create Signed-off-by: Michael Marchetti --- systest/testcases/vnfs/test_vnfs.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/systest/testcases/vnfs/test_vnfs.py b/systest/testcases/vnfs/test_vnfs.py index 6a122686..3eee94d6 100644 --- a/systest/testcases/vnfs/test_vnfs.py +++ b/systest/testcases/vnfs/test_vnfs.py @@ -18,7 +18,7 @@ import pytest import pprint import time from osmclient.common import utils - +import pprint class TestClass(object): @@ -86,10 +86,16 @@ class TestClass(object): assert osm.get_api().ns.create(nsd_desc['name'],ns_name,vim.vim_name) - assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='init', wait_time=10) + if not utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='init', wait_time=10): + nsr=osm.get_api().ns.get(ns_name) + pprint.pprint(nsr) + assert Fail, "operational-status != init" # make sure ns is running - assert utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='running',wait_time=30) + if not utils.wait_for_value(lambda: osm.get_api().ns.get_field(ns_name,'operational-status'),result='running',wait_time=30): + nsr=osm.get_api().ns.get(ns_name) + pprint.pprint(nsr) + assert Fail, "operational-status != running" if ns_scale: # for each descriptor, scale it -- 2.25.1