From 2929a3d08f47caa2316f60f4426ca8eb6f4704f4 Mon Sep 17 00:00:00 2001 From: Anh Tran Date: Mon, 20 Feb 2017 14:23:16 +0700 Subject: [PATCH] Remove unused logging import Change-Id: Ia449eaa87765a72a400e870807e9a8799d233802 --- vitrage/api/controllers/rest.py | 3 --- vitrage/datasources/alarm_transformer_base.py | 4 ---- vitrage/datasources/cinder/volume/transformer.py | 5 ----- vitrage/datasources/collectd/transformer.py | 4 ---- vitrage/datasources/nagios/transformer.py | 4 ---- vitrage/datasources/nova/instance/transformer.py | 5 ----- vitrage/datasources/resource_transformer_base.py | 5 ----- vitrage/datasources/static_physical/transformer.py | 4 ---- vitrage/datasources/zabbix/transformer.py | 4 ---- vitrage/tests/functional/evaluator/test_action_executor.py | 3 --- .../tests/functional/evaluator/test_scenario_evaluator.py | 3 --- vitrage/tests/unit/datasources/aodh/test_aodh_driver.py | 3 --- .../unit/datasources/collectd/test_collectd_transformer.py | 3 --- .../tests/unit/datasources/doctor/test_doctor_transformer.py | 3 --- vitrage/tests/unit/datasources/nagios/test_nagios_config.py | 3 --- vitrage/tests/unit/datasources/nagios/test_nagios_driver.py | 3 --- vitrage/tests/unit/datasources/nagios/test_nagios_parser.py | 3 --- vitrage/tests/unit/datasources/static/test_static_driver.py | 4 ---- .../tests/unit/datasources/static/test_static_transformer.py | 3 --- .../static_physical/test_static_physical_driver.py | 4 ---- .../tests/unit/datasources/test_alarm_transformer_base.py | 3 --- .../tests/unit/datasources/test_datasource_update_method.py | 2 -- vitrage/tests/unit/datasources/test_transformer_base.py | 4 ---- .../unit/datasources/zabbix/test_zabbix_configuration.py | 4 ---- vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py | 3 --- vitrage_tempest_tests/tests/api/alarms/base.py | 4 ---- vitrage_tempest_tests/tests/api/topology/base.py | 5 ----- 27 files changed, 98 deletions(-) diff --git a/vitrage/api/controllers/rest.py b/vitrage/api/controllers/rest.py index f48bb1c25..76eabec83 100644 --- a/vitrage/api/controllers/rest.py +++ b/vitrage/api/controllers/rest.py @@ -14,13 +14,10 @@ import networkx as nx from networkx.readwrite import json_graph -from oslo_log import log from pecan import rest from vitrage.datasources import OPENSTACK_CLUSTER -LOG = log.getLogger(__name__) - class RootRestController(rest.RestController): diff --git a/vitrage/datasources/alarm_transformer_base.py b/vitrage/datasources/alarm_transformer_base.py index c9fc8299c..e477f70e1 100644 --- a/vitrage/datasources/alarm_transformer_base.py +++ b/vitrage/datasources/alarm_transformer_base.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from vitrage.common.constants import DatasourceAction from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import GraphAction @@ -21,8 +19,6 @@ from vitrage.common.exception import VitrageTransformerError from vitrage.datasources.alarm_properties import AlarmProperties as AlarmProps from vitrage.datasources import transformer_base as tbase -LOG = logging.getLogger(__name__) - class AlarmTransformerBase(tbase.TransformerBase): diff --git a/vitrage/datasources/cinder/volume/transformer.py b/vitrage/datasources/cinder/volume/transformer.py index 52ce2d198..eb98d62bc 100644 --- a/vitrage/datasources/cinder/volume/transformer.py +++ b/vitrage/datasources/cinder/volume/transformer.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import EdgeLabel from vitrage.common.constants import EntityCategory @@ -31,9 +29,6 @@ from vitrage.datasources.transformer_base import extract_field_value import vitrage.graph.utils as graph_utils -LOG = logging.getLogger(__name__) - - class CinderVolumeTransformer(ResourceTransformerBase): # graph actions which need to refer them differently diff --git a/vitrage/datasources/collectd/transformer.py b/vitrage/datasources/collectd/transformer.py index 43cae4e2b..2de72aa58 100644 --- a/vitrage/datasources/collectd/transformer.py +++ b/vitrage/datasources/collectd/transformer.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import EdgeLabel from vitrage.common.constants import EntityCategory @@ -27,8 +25,6 @@ from vitrage.datasources import transformer_base as tbase import vitrage.graph.utils as graph_utils from vitrage.utils.datetime import format_unix_timestamp -LOG = logging.getLogger(__name__) - class CollectdTransformer(AlarmTransformerBase): diff --git a/vitrage/datasources/nagios/transformer.py b/vitrage/datasources/nagios/transformer.py index 1c4cd253a..8d910e2f5 100644 --- a/vitrage/datasources/nagios/transformer.py +++ b/vitrage/datasources/nagios/transformer.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import EdgeLabel from vitrage.common.constants import EntityCategory @@ -26,8 +24,6 @@ from vitrage.datasources import transformer_base as tbase import vitrage.graph.utils as graph_utils from vitrage.utils import datetime as datetime_utils -LOG = logging.getLogger(__name__) - class NagiosTransformer(AlarmTransformerBase): diff --git a/vitrage/datasources/nova/instance/transformer.py b/vitrage/datasources/nova/instance/transformer.py index b971a6562..2cb8a667f 100644 --- a/vitrage/datasources/nova/instance/transformer.py +++ b/vitrage/datasources/nova/instance/transformer.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import EdgeLabel from vitrage.common.constants import EntityCategory @@ -28,9 +26,6 @@ from vitrage.datasources.transformer_base import extract_field_value import vitrage.graph.utils as graph_utils -LOG = logging.getLogger(__name__) - - class InstanceTransformer(ResourceTransformerBase): # graph actions which need to refer them differently diff --git a/vitrage/datasources/resource_transformer_base.py b/vitrage/datasources/resource_transformer_base.py index 8682d0c72..229e21777 100644 --- a/vitrage/datasources/resource_transformer_base.py +++ b/vitrage/datasources/resource_transformer_base.py @@ -12,14 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from vitrage.datasources import transformer_base as tbase -LOG = logging.getLogger(__name__) - - class ResourceTransformerBase(tbase.TransformerBase): def __init__(self, transformers, conf): diff --git a/vitrage/datasources/static_physical/transformer.py b/vitrage/datasources/static_physical/transformer.py index a6dd7367c..0c7b3ceeb 100644 --- a/vitrage/datasources/static_physical/transformer.py +++ b/vitrage/datasources/static_physical/transformer.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import EntityCategory from vitrage.common.constants import GraphAction @@ -26,8 +24,6 @@ from vitrage.datasources.static_physical import SWITCH from vitrage.datasources import transformer_base import vitrage.graph.utils as graph_utils -LOG = logging.getLogger(__name__) - class StaticPhysicalTransformer(ResourceTransformerBase): diff --git a/vitrage/datasources/zabbix/transformer.py b/vitrage/datasources/zabbix/transformer.py index aec18f4c2..9f53abe1c 100644 --- a/vitrage/datasources/zabbix/transformer.py +++ b/vitrage/datasources/zabbix/transformer.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import EdgeLabel from vitrage.common.constants import EntityCategory @@ -31,8 +29,6 @@ import vitrage.graph.utils as graph_utils from vitrage.utils.datetime import change_time_str_format from vitrage.utils.datetime import format_unix_timestamp -LOG = logging.getLogger(__name__) - class ZabbixTransformer(AlarmTransformerBase): diff --git a/vitrage/tests/functional/evaluator/test_action_executor.py b/vitrage/tests/functional/evaluator/test_action_executor.py index 7b479e473..73b72238b 100644 --- a/vitrage/tests/functional/evaluator/test_action_executor.py +++ b/vitrage/tests/functional/evaluator/test_action_executor.py @@ -14,7 +14,6 @@ from oslo_config import cfg -from oslo_log import log as logging from six.moves import queue from vitrage.common.constants import EdgeLabel @@ -34,8 +33,6 @@ from vitrage.evaluator.template_fields import TemplateFields as TFields from vitrage.opts import register_opts from vitrage.tests.functional.base import TestFunctionalBase -LOG = logging.getLogger(__name__) - class TestActionExecutor(TestFunctionalBase): diff --git a/vitrage/tests/functional/evaluator/test_scenario_evaluator.py b/vitrage/tests/functional/evaluator/test_scenario_evaluator.py index 67bd86b0d..a8dfdf12a 100644 --- a/vitrage/tests/functional/evaluator/test_scenario_evaluator.py +++ b/vitrage/tests/functional/evaluator/test_scenario_evaluator.py @@ -13,7 +13,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from six.moves import queue from vitrage.common.constants import DatasourceAction @@ -28,8 +27,6 @@ from vitrage.tests.functional.base import \ import vitrage.tests.mocks.mock_driver as mock_driver from vitrage.tests.mocks import utils -LOG = logging.getLogger(__name__) - _TARGET_HOST = 'host-2' _NAGIOS_TEST_INFO = {'resource_name': _TARGET_HOST, DSProps.DATASOURCE_ACTION: DatasourceAction.SNAPSHOT} diff --git a/vitrage/tests/unit/datasources/aodh/test_aodh_driver.py b/vitrage/tests/unit/datasources/aodh/test_aodh_driver.py index a6f13ff9f..e7378c202 100644 --- a/vitrage/tests/unit/datasources/aodh/test_aodh_driver.py +++ b/vitrage/tests/unit/datasources/aodh/test_aodh_driver.py @@ -13,7 +13,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import UpdateMethod @@ -24,8 +23,6 @@ from vitrage.tests import base from vitrage.tests.mocks import mock_driver from vitrage.tests.unit.datasources.aodh.mock_driver import MockAodhDriver -LOG = logging.getLogger(__name__) - class AodhDriverTest(base.BaseTest): diff --git a/vitrage/tests/unit/datasources/collectd/test_collectd_transformer.py b/vitrage/tests/unit/datasources/collectd/test_collectd_transformer.py index 2409a2504..50b648504 100644 --- a/vitrage/tests/unit/datasources/collectd/test_collectd_transformer.py +++ b/vitrage/tests/unit/datasources/collectd/test_collectd_transformer.py @@ -15,7 +15,6 @@ import time from oslo_config import cfg -from oslo_log import log as logging from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import UpdateMethod @@ -30,8 +29,6 @@ from vitrage.tests.unit.datasources.test_alarm_transformer_base import \ BaseAlarmTransformerTest from vitrage.utils.datetime import format_unix_timestamp -LOG = logging.getLogger(__name__) - # noinspection PyProtectedMember class TestCollectdTransformer(BaseAlarmTransformerTest): diff --git a/vitrage/tests/unit/datasources/doctor/test_doctor_transformer.py b/vitrage/tests/unit/datasources/doctor/test_doctor_transformer.py index 00521e407..e067730a7 100644 --- a/vitrage/tests/unit/datasources/doctor/test_doctor_transformer.py +++ b/vitrage/tests/unit/datasources/doctor/test_doctor_transformer.py @@ -14,7 +14,6 @@ from datetime import datetime from oslo_config import cfg -from oslo_log import log as logging from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import EventProperties as EventProps @@ -31,8 +30,6 @@ from vitrage.tests.mocks import mock_transformer from vitrage.tests.unit.datasources.test_alarm_transformer_base import \ BaseAlarmTransformerTest -LOG = logging.getLogger(__name__) - # noinspection PyProtectedMember class DoctorTransformerTest(BaseAlarmTransformerTest): diff --git a/vitrage/tests/unit/datasources/nagios/test_nagios_config.py b/vitrage/tests/unit/datasources/nagios/test_nagios_config.py index eb6b97607..ab92e551a 100644 --- a/vitrage/tests/unit/datasources/nagios/test_nagios_config.py +++ b/vitrage/tests/unit/datasources/nagios/test_nagios_config.py @@ -13,7 +13,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from vitrage.datasources.nagios.config import NagiosConfig from vitrage.datasources.nagios.config import NagiosHostMapping @@ -22,8 +21,6 @@ from vitrage.datasources.nova.instance import NOVA_INSTANCE_DATASOURCE from vitrage.tests import base from vitrage.tests.mocks import utils -LOG = logging.getLogger(__name__) - class TestNagiosConfig(base.BaseTest): diff --git a/vitrage/tests/unit/datasources/nagios/test_nagios_driver.py b/vitrage/tests/unit/datasources/nagios/test_nagios_driver.py index 352ac3e41..110afe5bc 100644 --- a/vitrage/tests/unit/datasources/nagios/test_nagios_driver.py +++ b/vitrage/tests/unit/datasources/nagios/test_nagios_driver.py @@ -13,7 +13,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import GraphAction from vitrage.datasources.nagios.properties import NagiosProperties as \ @@ -23,8 +22,6 @@ from vitrage.tests.unit.datasources.nagios.mock_driver import MockNagiosDriver from vitrage.tests.unit.datasources.nagios.nagios_base_test import \ NagiosBaseTest -LOG = logging.getLogger(__name__) - # noinspection PyProtectedMember class NagiosDriverTest(NagiosBaseTest): diff --git a/vitrage/tests/unit/datasources/nagios/test_nagios_parser.py b/vitrage/tests/unit/datasources/nagios/test_nagios_parser.py index 128919de1..6a961a77f 100644 --- a/vitrage/tests/unit/datasources/nagios/test_nagios_parser.py +++ b/vitrage/tests/unit/datasources/nagios/test_nagios_parser.py @@ -11,7 +11,6 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging from vitrage.datasources.nagios.parser import NagiosParser from vitrage.datasources.nagios.properties import NagiosProperties @@ -19,8 +18,6 @@ from vitrage.tests.mocks import utils from vitrage.tests.unit.datasources.nagios.nagios_base_test \ import NagiosBaseTest -LOG = logging.getLogger(__name__) - class NagiosParserTest(NagiosBaseTest): diff --git a/vitrage/tests/unit/datasources/static/test_static_driver.py b/vitrage/tests/unit/datasources/static/test_static_driver.py index 6ca5c9e94..33b28d35e 100644 --- a/vitrage/tests/unit/datasources/static/test_static_driver.py +++ b/vitrage/tests/unit/datasources/static/test_static_driver.py @@ -13,7 +13,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from vitrage.common.constants import DatasourceAction from vitrage.common.constants import GraphAction @@ -25,9 +24,6 @@ from vitrage.tests import base from vitrage.tests.mocks import utils -LOG = logging.getLogger(__name__) - - class TestStaticDriver(base.BaseTest): OPTS = [ diff --git a/vitrage/tests/unit/datasources/static/test_static_transformer.py b/vitrage/tests/unit/datasources/static/test_static_transformer.py index 4788f29db..a001a9de4 100644 --- a/vitrage/tests/unit/datasources/static/test_static_transformer.py +++ b/vitrage/tests/unit/datasources/static/test_static_transformer.py @@ -15,7 +15,6 @@ import datetime from oslo_config import cfg -from oslo_log import log as logging from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import EntityCategory @@ -29,8 +28,6 @@ from vitrage.datasources.static.transformer import StaticTransformer from vitrage.tests import base from vitrage.tests.mocks import mock_driver -LOG = logging.getLogger(__name__) - class TestStaticTransformer(base.BaseTest): diff --git a/vitrage/tests/unit/datasources/static_physical/test_static_physical_driver.py b/vitrage/tests/unit/datasources/static_physical/test_static_physical_driver.py index 46e2724bf..ec6bffca0 100644 --- a/vitrage/tests/unit/datasources/static_physical/test_static_physical_driver.py +++ b/vitrage/tests/unit/datasources/static_physical/test_static_physical_driver.py @@ -15,7 +15,6 @@ import os from oslo_config import cfg -from oslo_log import log as logging from vitrage.common.constants import DatasourceAction from vitrage.common.constants import DatasourceProperties as DSProps @@ -29,9 +28,6 @@ from vitrage.tests.mocks import utils from vitrage.utils import file as file_utils -LOG = logging.getLogger(__name__) - - class TestStaticPhysicalDriver(base.BaseTest): OPTS = [ diff --git a/vitrage/tests/unit/datasources/test_alarm_transformer_base.py b/vitrage/tests/unit/datasources/test_alarm_transformer_base.py index 0b6477e1f..0c23439c3 100644 --- a/vitrage/tests/unit/datasources/test_alarm_transformer_base.py +++ b/vitrage/tests/unit/datasources/test_alarm_transformer_base.py @@ -13,7 +13,6 @@ # under the License. import abc -from oslo_log import log as logging from vitrage.common.constants import EdgeLabel from vitrage.common.constants import EntityCategory @@ -24,8 +23,6 @@ from vitrage.datasources.nova.host import NOVA_HOST_DATASOURCE from vitrage.tests.unit.datasources.test_transformer_base import \ BaseTransformerTest -LOG = logging.getLogger(__name__) - # noinspection PyProtectedMember class BaseAlarmTransformerTest(BaseTransformerTest): diff --git a/vitrage/tests/unit/datasources/test_datasource_update_method.py b/vitrage/tests/unit/datasources/test_datasource_update_method.py index f3ef6823a..f41efc5a9 100644 --- a/vitrage/tests/unit/datasources/test_datasource_update_method.py +++ b/vitrage/tests/unit/datasources/test_datasource_update_method.py @@ -13,7 +13,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from oslo_utils import importutils as utils from vitrage.common.constants import UpdateMethod @@ -27,7 +26,6 @@ from vitrage.tests import base CHANGES_INTERVAL = 'changes_interval' -LOG = logging.getLogger(__name__) ZABBIX_DATASOURCE_NONE = '_'.join((ZABBIX_DATASOURCE, UpdateMethod.NONE)) ZABBIX_DATASOURCE_PULL = '_'.join((ZABBIX_DATASOURCE, UpdateMethod.PULL)) ZABBIX_DATASOURCE_PUSH = ZABBIX_DATASOURCE diff --git a/vitrage/tests/unit/datasources/test_transformer_base.py b/vitrage/tests/unit/datasources/test_transformer_base.py index b243be285..5fed85564 100644 --- a/vitrage/tests/unit/datasources/test_transformer_base.py +++ b/vitrage/tests/unit/datasources/test_transformer_base.py @@ -12,13 +12,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_log import log as logging - from vitrage.common.constants import VertexProperties as VProps from vitrage.tests import base -LOG = logging.getLogger(__name__) - # noinspection PyProtectedMember class BaseTransformerTest(base.BaseTest): diff --git a/vitrage/tests/unit/datasources/zabbix/test_zabbix_configuration.py b/vitrage/tests/unit/datasources/zabbix/test_zabbix_configuration.py index e819e7e89..e56c0d9ab 100644 --- a/vitrage/tests/unit/datasources/zabbix/test_zabbix_configuration.py +++ b/vitrage/tests/unit/datasources/zabbix/test_zabbix_configuration.py @@ -13,7 +13,6 @@ # under the License. from oslo_config import cfg -from oslo_log import log as logging from vitrage.datasources.nova.host import NOVA_HOST_DATASOURCE from vitrage.datasources.zabbix.driver import ZabbixDriver @@ -23,9 +22,6 @@ from vitrage.tests import base from vitrage.tests.mocks import utils -LOG = logging.getLogger(__name__) - - class TestZabbixConfig(base.BaseTest): OPTS = [ diff --git a/vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py b/vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py index c4f3bcf99..e3ad61d8b 100644 --- a/vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py +++ b/vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py @@ -15,7 +15,6 @@ import copy from oslo_config import cfg -from oslo_log import log as logging from vitrage.common.constants import DatasourceProperties as DSProps from vitrage.common.constants import GraphAction @@ -25,8 +24,6 @@ from vitrage.tests.unit.datasources.zabbix.mock_driver import MockZabbixDriver from vitrage.tests.unit.datasources.zabbix.zabbix_base_test import \ ZabbixBaseTest -LOG = logging.getLogger(__name__) - # noinspection PyProtectedMember class ZabbixDriverTest(ZabbixBaseTest): diff --git a/vitrage_tempest_tests/tests/api/alarms/base.py b/vitrage_tempest_tests/tests/api/alarms/base.py index a3bd6a5ff..a71c3fb18 100644 --- a/vitrage_tempest_tests/tests/api/alarms/base.py +++ b/vitrage_tempest_tests/tests/api/alarms/base.py @@ -15,13 +15,9 @@ import random import time -from oslo_log import log as logging - from vitrage import os_clients from vitrage_tempest_tests.tests.api.base import BaseApiTest -LOG = logging.getLogger(__name__) - TEMPLATES_RESOURCES_PATH = 'resources/templates/' TEMPLATES_SOURCES_PATH = '/etc/vitrage/templates/' diff --git a/vitrage_tempest_tests/tests/api/topology/base.py b/vitrage_tempest_tests/tests/api/topology/base.py index 7cb6efb6a..72f1773d5 100644 --- a/vitrage_tempest_tests/tests/api/topology/base.py +++ b/vitrage_tempest_tests/tests/api/topology/base.py @@ -15,15 +15,10 @@ import json import time -from oslo_log import log as logging - from vitrage.common.constants import VertexProperties as VProps from vitrage_tempest_tests.tests.api.base import BaseApiTest -LOG = logging.getLogger(__name__) - - class BaseTopologyTest(BaseApiTest): """Topology test class for Vitrage API tests."""