Adding explicit error message in verifyNetworkState function in case network is not in desired state

This commit is contained in:
Girish Shilamkar 2014-08-13 20:19:26 +05:30
parent 5f893daa2c
commit 6115a90c70

View File

@ -1167,6 +1167,9 @@ def verifyNetworkState(apiclient, networkid, state, listall=True):
break
retriesCount -= 1
time.sleep(60)
if not isNetworkInDesiredState:
exceptionMessage = "Network state should be %s, it is %s" %\
(state, networks[0].state)
except Exception as e:
exceptionOccured = True
exceptionMessage = e