diff options
author | xudan <xudan16@huawei.com> | 2018-05-04 05:48:28 -0400 |
---|---|---|
committer | xudan <xudan16@huawei.com> | 2018-05-04 05:54:02 -0400 |
commit | e112118754bbd297de52538d003fc21273e9cf3d (patch) | |
tree | 0d8851d57003b1b6a01a5db8c215d2ef472507d8 /dovetail/utils/dovetail_utils.py | |
parent | 5c6f12ac2324be2cd61bdd365045e6e94417c418 (diff) |
Remove local DB
Remove local DB and can just report without launch local DB.
Need to do a little modification with the web portal code.
JIRA: DOVETAIL-593
Change-Id: I595db39cce4156596ee0522d4b7e642a23d78ab9
Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'dovetail/utils/dovetail_utils.py')
-rw-r--r-- | dovetail/utils/dovetail_utils.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/dovetail/utils/dovetail_utils.py b/dovetail/utils/dovetail_utils.py index 4a3d8528..02ffa798 100644 --- a/dovetail/utils/dovetail_utils.py +++ b/dovetail/utils/dovetail_utils.py @@ -15,7 +15,6 @@ import re import subprocess from collections import Mapping, Set, Sequence import json -import urllib2 from datetime import datetime from distutils.version import LooseVersion import yaml @@ -165,23 +164,6 @@ def get_ext_net_name(env_file, logger=None): return None -def store_db_results(db_url, build_tag, testcase, dest_file, logger): - url = "%s?build_tag=%s-%s" % (db_url, build_tag, testcase) - logger.debug("Query to rest api: {}".format(url)) - try: - data = json.load(urllib2.urlopen(url)) - if data['results']: - with open(dest_file, 'a') as f: - f.write(json.dumps(data['results'][0]) + '\n') - return True - else: - return False - except Exception as e: - logger.exception( - "Cannot read content from {}, exception: {}".format(url, e)) - return False - - def get_duration(start_date, stop_date, logger): fmt = '%Y-%m-%d %H:%M:%S' try: |