]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove unused code from volume manager (reset_stats)
authorEric Harney <eharney@redhat.com>
Mon, 16 Dec 2013 22:50:49 +0000 (17:50 -0500)
committerEric Harney <eharney@redhat.com>
Mon, 16 Dec 2013 22:54:53 +0000 (17:54 -0500)
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

cinder/volume/manager.py

index 88b6db220c861145918ab7b3c84a8f407c6dbbb6..0c238072abbdf7f46b78e60ec626f91d90215a4f 100644 (file)
@@ -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,