import re
import urllib2
import functest.utils.functest_logger as ft_logger
+import functest.utils.functest_utils as ft_utils
COL_1_LEN = 25
def get_results_from_db():
- url = 'http://testresults.opnfv.org/test/api/v1/results?build_tag=' + \
- BUILD_TAG
+ url = ft_utils.get_db_url() + '/results?build_tag=' + BUILD_TAG
logger.debug("Query to rest api: %s" % url)
try:
data = json.load(urllib2.urlopen(url))
for test_db in results:
if test['test_name'] in test_db['case_name']:
id = test_db['_id']
- url = 'http://testresults.opnfv.org/test/api/v1/results/' + id
+ url = ft_utils.get_db_url() + '/results/' + id
test_result = test_db['criteria']
return {"url": url, "result": test_result}