From 9047c458bc4059e21b5e360131967072e806b832 Mon Sep 17 00:00:00 2001 From: "Q.hongtao" Date: Tue, 1 Dec 2020 13:54:48 +0800 Subject: [PATCH] Remove unicode from datasource Change-Id: Ie8426b50595b87539bef42520c78a138db32ac7f --- vitrage/datasources/prometheus/driver.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vitrage/datasources/prometheus/driver.py b/vitrage/datasources/prometheus/driver.py index b010c39a1..a8bfebf1b 100644 --- a/vitrage/datasources/prometheus/driver.py +++ b/vitrage/datasources/prometheus/driver.py @@ -305,8 +305,8 @@ class PrometheusDriver(AlarmDriverBase): ":rtype: dict For the example above. The function returns: - {u'instance_name': 'instance-00000004', - u'host_id': 'my-host-name'} + {'instance_name': 'instance-00000004', + 'host_id': 'my-host-name'} """ resource_labels = self._get_conf_resource(alert) vitrage_entity_unique_props = {} @@ -362,7 +362,7 @@ class PrometheusDriver(AlarmDriverBase): """Get values of the alert labels from alert's resource in config file. For the example above. The function returns: - {u'instance': u'1.1.1.1:9999', u'domain': u'instance-00000004'} + {'instance': '1.1.1.1:9999', 'domain': 'instance-00000004'} """ resource_alert_labels = self._get_conf_resource(alert).values() @@ -387,7 +387,7 @@ class PrometheusDriver(AlarmDriverBase): and its values are the corresponding alert labels. For the example above. The function returns: - {u'instance_name': u'domain', u'host_id': u'instance'} + {'instance_name': 'domain', 'host_id': 'instance'} """ if self.conf_map: for conf_alert in self.conf_map: