diff options
author | 2017-11-23 22:03:43 +0100 | |
---|---|---|
committer | 2017-11-23 23:11:03 +0100 | |
commit | e0ddd33f9a1e6e41f1b768c6326983f902598d4c (patch) | |
tree | dc7dd0036fe035b0d2f460edcdb808e95a9eabd8 /functest/opnfv_tests/vnf/ims/ixia/utils | |
parent | fe92e6b54c2c756f6deacf6aea9dce9db2d0ee52 (diff) |
Fix relative imports in cloudify_ims_perf
It also fixes wrong indents.
JIRA: FUNCTEST-893
Change-Id: Ic54e01c03c14f39c69242c41922fc124c1b45c23
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/vnf/ims/ixia/utils')
-rw-r--r-- | functest/opnfv_tests/vnf/ims/ixia/utils/IxLoadUtils.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/functest/opnfv_tests/vnf/ims/ixia/utils/IxLoadUtils.py b/functest/opnfv_tests/vnf/ims/ixia/utils/IxLoadUtils.py index d8003e46..50dfbc66 100644 --- a/functest/opnfv_tests/vnf/ims/ixia/utils/IxLoadUtils.py +++ b/functest/opnfv_tests/vnf/ims/ixia/utils/IxLoadUtils.py @@ -11,7 +11,9 @@ import requests import sys import time import logging -from IxRestUtils import formatDictToJSONPayload + +from functest.opnfv_tests.vnf.ims.ixia.utils import IxRestUtils + kActionStateFinished = 'finished' kActionStatusSuccessful = 'Successful' @@ -80,7 +82,7 @@ def performGenericOperation(connection, url, payloadDict): it will wait for it to finish. """ - data = formatDictToJSONPayload(payloadDict) + data = IxRestUtils.formatDictToJSONPayload(payloadDict) reply = connection.httpPost(url=url, data=data) waitForActionToFinish(connection, reply, url) @@ -93,7 +95,7 @@ def performGenericPost(connection, listUrl, payloadDict): This will perform a generic POST method on a given url """ - data = formatDictToJSONPayload(payloadDict) + data = IxRestUtils.formatDictToJSONPayload(payloadDict) reply = connection.httpPost(url=listUrl, data=data) try: @@ -111,7 +113,7 @@ def performGenericDelete(connection, listUrl, payloadDict): This will perform a generic DELETE method on a given url """ - data = formatDictToJSONPayload(payloadDict) + data = IxRestUtils.formatDictToJSONPayload(payloadDict) reply = connection.httpDelete(url=listUrl, data=data) return reply @@ -122,7 +124,7 @@ def performGenericPatch(connection, url, payloadDict): This will perform a generic PATCH method on a given url """ - data = formatDictToJSONPayload(payloadDict) + data = IxRestUtils.formatDictToJSONPayload(payloadDict) reply = connection.httpPatch(url=url, data=data) return reply @@ -307,12 +309,11 @@ def pollStats(connection, sessionUrl, watchedStatsDict, pollingInterval=4): for timestamp in newTimestamps: timeStampStr = str(timestamp) - collectedTimestamps.setdefault(statSource, []).append( - timeStampStr) + collectedTimestamps.setdefault( + statSource, []).append(timeStampStr) - timestampDict = statsDict.setdefault(statSource, - {}).setdefault( - timestamp, {}) + timestampDict = statsDict.setdefault( + statSource, {}).setdefault(timestamp, {}) # save the values for the current timestamp, # and later print them |