aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/ims/ixia
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-11-23 22:03:43 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2017-11-23 23:11:03 +0100
commite0ddd33f9a1e6e41f1b768c6326983f902598d4c (patch)
treedc7dd0036fe035b0d2f460edcdb808e95a9eabd8 /functest/opnfv_tests/vnf/ims/ixia
parentfe92e6b54c2c756f6deacf6aea9dce9db2d0ee52 (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')
-rw-r--r--functest/opnfv_tests/vnf/ims/ixia/utils/IxLoadUtils.py21
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