From: Ross Brattain Date: Wed, 23 Nov 2016 06:19:49 +0000 (-0800) Subject: influx: use urlsplit.hostname instead of netloc X-Git-Tag: danube.1.0~212^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=e6d468e6a2d055be230a58e1741976eb86d54c5d;p=yardstick.git influx: use urlsplit.hostname instead of netloc turns out urlsplit supports .hostname so we don't have to split netloc Change-Id: I09614812296a216a369559bf55d66d94380feb94 Signed-off-by: Ross Brattain --- diff --git a/api/utils/influx.py b/api/utils/influx.py index 52a90b61c..1d56c95fd 100644 --- a/api/utils/influx.py +++ b/api/utils/influx.py @@ -29,7 +29,7 @@ def get_data_db_client(): def _get_ip(url): - return urlsplit(url).netloc.split(':')[0] + return urlsplit(url).hostname def _write_data(measurement, field, timestamp, tags):