From 7da7968a4a4ac54772ab809091d7b305bc1b985d Mon Sep 17 00:00:00 2001 From: yuyafei Date: Sat, 9 Jul 2016 11:24:05 +0800 Subject: [PATCH] Remove unused LOG to keep code clean Remove redundant usage of rally.common.logging. Change-Id: I344224e0e177bde7c41ac6e5e93b65be35bbdc01 --- rally/plugins/common/runners/constant.py | 3 --- rally/plugins/common/scenarios/dummy/dummy.py | 3 --- rally/plugins/openstack/context/api_versions.py | 3 --- rally/plugins/openstack/context/cleanup/base.py | 4 ---- rally/plugins/openstack/context/quotas/cinder_quotas.py | 5 ----- rally/plugins/openstack/context/quotas/designate_quotas.py | 5 ----- rally/plugins/openstack/context/quotas/neutron_quotas.py | 5 ----- rally/plugins/openstack/context/quotas/nova_quotas.py | 5 ----- rally/plugins/openstack/scenarios/cinder/volumes.py | 2 -- rally/plugins/openstack/scenarios/ec2/servers.py | 4 ---- rally/plugins/openstack/scenarios/murano/environments.py | 3 --- rally/plugins/openstack/scenarios/nova/agents.py | 4 ---- rally/plugins/openstack/scenarios/nova/aggregates.py | 4 ---- rally/plugins/openstack/scenarios/nova/availability_zones.py | 4 ---- rally/plugins/openstack/scenarios/nova/hosts.py | 4 ---- rally/plugins/openstack/scenarios/nova/hypervisors.py | 4 ---- rally/plugins/openstack/scenarios/nova/services.py | 4 ---- 17 files changed, 66 deletions(-) mode change 100755 => 100644 rally/plugins/openstack/scenarios/cinder/volumes.py diff --git a/rally/plugins/common/runners/constant.py b/rally/plugins/common/runners/constant.py index cbc3e8d543..81fa289a4d 100644 --- a/rally/plugins/common/runners/constant.py +++ b/rally/plugins/common/runners/constant.py @@ -20,14 +20,11 @@ import time from six.moves import queue as Queue -from rally.common import logging from rally.common import utils from rally import consts from rally.task import runner from rally.task import utils as butils -LOG = logging.getLogger(__name__) - def _worker_process(queue, iteration_gen, timeout, concurrency, times, context, cls, method_name, args, aborted, info): diff --git a/rally/plugins/common/scenarios/dummy/dummy.py b/rally/plugins/common/scenarios/dummy/dummy.py index 54cfc4fb5d..ba93fc601d 100644 --- a/rally/plugins/common/scenarios/dummy/dummy.py +++ b/rally/plugins/common/scenarios/dummy/dummy.py @@ -21,9 +21,6 @@ from rally.task import scenario from rally.task import validation -LOG = logging.getLogger(__name__) - - class DummyScenarioException(exceptions.RallyException): msg_fmt = _("Dummy scenario expected exception: '%(message)s'") diff --git a/rally/plugins/openstack/context/api_versions.py b/rally/plugins/openstack/context/api_versions.py index 12c441f8d6..e680682e0a 100644 --- a/rally/plugins/openstack/context/api_versions.py +++ b/rally/plugins/openstack/context/api_versions.py @@ -15,14 +15,11 @@ import random import six from rally.common.i18n import _, _LE -from rally.common import logging from rally import consts from rally import exceptions from rally import osclients from rally.task import context -LOG = logging.getLogger(__name__) - @context.configure(name="api_versions", order=150) class OpenStackAPIVersions(context.Context): diff --git a/rally/plugins/openstack/context/cleanup/base.py b/rally/plugins/openstack/context/cleanup/base.py index c092f1a0d5..7d0b43bfe8 100644 --- a/rally/plugins/openstack/context/cleanup/base.py +++ b/rally/plugins/openstack/context/cleanup/base.py @@ -14,14 +14,10 @@ # under the License. from rally.common.i18n import _ -from rally.common import logging from rally import consts from rally import exceptions -LOG = logging.getLogger(__name__) - - class NoSuchCleanupResources(exceptions.RallyException): msg_fmt = _("Missing cleanup resource managers: %(message)s") diff --git a/rally/plugins/openstack/context/quotas/cinder_quotas.py b/rally/plugins/openstack/context/quotas/cinder_quotas.py index 7426c8503b..4571c44e74 100644 --- a/rally/plugins/openstack/context/quotas/cinder_quotas.py +++ b/rally/plugins/openstack/context/quotas/cinder_quotas.py @@ -12,11 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging - - -LOG = logging.getLogger(__name__) - class CinderQuotas(object): """Management of Cinder quotas.""" diff --git a/rally/plugins/openstack/context/quotas/designate_quotas.py b/rally/plugins/openstack/context/quotas/designate_quotas.py index 0d46643452..f3b609af7a 100644 --- a/rally/plugins/openstack/context/quotas/designate_quotas.py +++ b/rally/plugins/openstack/context/quotas/designate_quotas.py @@ -12,11 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging - - -LOG = logging.getLogger(__name__) - class DesignateQuotas(object): """Management of Designate quotas.""" diff --git a/rally/plugins/openstack/context/quotas/neutron_quotas.py b/rally/plugins/openstack/context/quotas/neutron_quotas.py index 94463c06de..08a5bcd31a 100644 --- a/rally/plugins/openstack/context/quotas/neutron_quotas.py +++ b/rally/plugins/openstack/context/quotas/neutron_quotas.py @@ -12,11 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging - - -LOG = logging.getLogger(__name__) - class NeutronQuotas(object): """Management of Neutron quotas.""" diff --git a/rally/plugins/openstack/context/quotas/nova_quotas.py b/rally/plugins/openstack/context/quotas/nova_quotas.py index 19f7948072..e56fa77d4c 100644 --- a/rally/plugins/openstack/context/quotas/nova_quotas.py +++ b/rally/plugins/openstack/context/quotas/nova_quotas.py @@ -12,11 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging - - -LOG = logging.getLogger(__name__) - class NovaQuotas(object): """Management of Nova quotas.""" diff --git a/rally/plugins/openstack/scenarios/cinder/volumes.py b/rally/plugins/openstack/scenarios/cinder/volumes.py old mode 100755 new mode 100644 index de4aea60d7..1de023ed11 --- a/rally/plugins/openstack/scenarios/cinder/volumes.py +++ b/rally/plugins/openstack/scenarios/cinder/volumes.py @@ -26,8 +26,6 @@ from rally.task import atomic from rally.task import types from rally.task import validation -LOG = logging.getLogger(__name__) - class CinderVolumes(cinder_utils.CinderScenario, nova_utils.NovaScenario, diff --git a/rally/plugins/openstack/scenarios/ec2/servers.py b/rally/plugins/openstack/scenarios/ec2/servers.py index 714d141987..aa1d14f232 100644 --- a/rally/plugins/openstack/scenarios/ec2/servers.py +++ b/rally/plugins/openstack/scenarios/ec2/servers.py @@ -12,7 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.ec2 import utils @@ -20,9 +19,6 @@ from rally.task import types from rally.task import validation -LOG = logging.getLogger(__name__) - - class EC2Servers(utils.EC2Scenario): """Benchmark scenarios for servers using EC2.""" diff --git a/rally/plugins/openstack/scenarios/murano/environments.py b/rally/plugins/openstack/scenarios/murano/environments.py index 273b182041..b6e6cf46b8 100644 --- a/rally/plugins/openstack/scenarios/murano/environments.py +++ b/rally/plugins/openstack/scenarios/murano/environments.py @@ -13,15 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.murano import utils from rally.task import atomic from rally.task import validation -LOG = logging.getLogger(__name__) - class MuranoEnvironments(utils.MuranoScenario): """Benchmark scenarios for Murano environments.""" diff --git a/rally/plugins/openstack/scenarios/nova/agents.py b/rally/plugins/openstack/scenarios/nova/agents.py index d1946a6551..ccad2825cf 100644 --- a/rally/plugins/openstack/scenarios/nova/agents.py +++ b/rally/plugins/openstack/scenarios/nova/agents.py @@ -13,16 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.nova import utils from rally.task import validation -LOG = logging.getLogger(__name__) - - class NovaAgents(utils.NovaScenario): """Benchmark scenarios for Nova agents.""" diff --git a/rally/plugins/openstack/scenarios/nova/aggregates.py b/rally/plugins/openstack/scenarios/nova/aggregates.py index c0000b38ce..bd01b779e2 100644 --- a/rally/plugins/openstack/scenarios/nova/aggregates.py +++ b/rally/plugins/openstack/scenarios/nova/aggregates.py @@ -13,16 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.nova import utils from rally.task import validation -LOG = logging.getLogger(__name__) - - class NovaAggregates(utils.NovaScenario): """Benchmark scenarios for Nova aggregates.""" diff --git a/rally/plugins/openstack/scenarios/nova/availability_zones.py b/rally/plugins/openstack/scenarios/nova/availability_zones.py index 80d46be2a3..c4c4f308d1 100644 --- a/rally/plugins/openstack/scenarios/nova/availability_zones.py +++ b/rally/plugins/openstack/scenarios/nova/availability_zones.py @@ -13,16 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.nova import utils from rally.task import validation -LOG = logging.getLogger(__name__) - - class NovaAvailabilityZones(utils.NovaScenario): """Benchmark scenarios for Nova availability-zones.""" diff --git a/rally/plugins/openstack/scenarios/nova/hosts.py b/rally/plugins/openstack/scenarios/nova/hosts.py index 7114fb1a74..027f1b5403 100644 --- a/rally/plugins/openstack/scenarios/nova/hosts.py +++ b/rally/plugins/openstack/scenarios/nova/hosts.py @@ -13,16 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.nova import utils from rally.task import validation -LOG = logging.getLogger(__name__) - - class NovaHosts(utils.NovaScenario): """Benchmark scenarios for Nova hosts.""" diff --git a/rally/plugins/openstack/scenarios/nova/hypervisors.py b/rally/plugins/openstack/scenarios/nova/hypervisors.py index 6af0ca4f72..34978d01d2 100644 --- a/rally/plugins/openstack/scenarios/nova/hypervisors.py +++ b/rally/plugins/openstack/scenarios/nova/hypervisors.py @@ -13,16 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.nova import utils from rally.task import validation -LOG = logging.getLogger(__name__) - - class NovaHypervisors(utils.NovaScenario): """Benchmark scenarios for Nova hypervisors.""" diff --git a/rally/plugins/openstack/scenarios/nova/services.py b/rally/plugins/openstack/scenarios/nova/services.py index ec8b6d6ec6..19c4d4c23d 100644 --- a/rally/plugins/openstack/scenarios/nova/services.py +++ b/rally/plugins/openstack/scenarios/nova/services.py @@ -13,16 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. -from rally.common import logging from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.nova import utils from rally.task import validation -LOG = logging.getLogger(__name__) - - class NovaServices(utils.NovaScenario): """Benchmark scenarios for Nova agents."""