From: Eric Harney Date: Mon, 16 Dec 2013 22:50:49 +0000 (-0500) Subject: Remove unused code from volume manager (reset_stats) X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=53c49d08ad33afeae46e50f261171d0032670b12;p=openstack-build%2Fcinder-build.git Remove unused code from volume manager (reset_stats) self._last_volume_stats appears to be unused, now that we don't use _volume_stats_changed(). This means reset_stats() also does nothing. This triggered a pylint 'attribute-defined-outside-init' warning. Change-Id: I4c4f7497e72f726f3430f90df61188bf2f1073c1 --- diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 88b6db220..0c238072a 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -363,7 +363,6 @@ class VolumeManager(manager.SchedulerDependentManager): reason=_("volume is not local to this node")) self._notify_about_volume_usage(context, volume_ref, "delete.start") - self._reset_stats() try: LOG.debug(_("volume %s: removing export"), volume_ref['id']) self.driver.remove_export(context, volume_ref) @@ -919,13 +918,8 @@ class VolumeManager(manager.SchedulerDependentManager): self._report_driver_status(context) self._publish_service_capabilities(context) - def _reset_stats(self): - LOG.info(_("Clear capabilities")) - self._last_volume_stats = [] - def notification(self, context, event): LOG.info(_("Notification {%s} received"), event) - self._reset_stats() def _notify_about_volume_usage(self, context,