From a7adc35e0e3462841be4142a95548d70bea5f664 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Fri, 27 Nov 2015 13:03:50 -0600 Subject: [PATCH] Cleanup orphaned code from image and manager There were several methods in the image module and manager code that were no longer being used anywhere. While some of these have potential for being useful, they are not in use and should not be sitting around the codebase waiting for someone to need them. Change-Id: Id3f3320c4153dabad309699698b0e52f8312c081 --- cinder/image/cache.py | 3 --- cinder/image/glance.py | 10 ---------- cinder/manager.py | 10 ---------- 3 files changed, 23 deletions(-) diff --git a/cinder/image/cache.py b/cinder/image/cache.py index 54a5b2b0d70..ef765f1d53a 100644 --- a/cinder/image/cache.py +++ b/cinder/image/cache.py @@ -196,9 +196,6 @@ class ImageVolumeCache(object): # Delete will evict the cache entry. self.volume_api.delete(context, volume_ref) - def _get_image_volume_name(self, image_id): - return 'image-volume-' + image_id - def _should_update_entry(self, cache_entry, image_meta): """Ensure that the cache entry image data is still valid.""" image_updated_utc = (image_meta['updated_at'] diff --git a/cinder/image/glance.py b/cinder/image/glance.py index d0785718f75..fbf34b6b6ae 100644 --- a/cinder/image/glance.py +++ b/cinder/image/glance.py @@ -285,16 +285,6 @@ class GlanceImageService(object): except Exception: _reraise_translated_image_exception(image_id) - def delete_locations(self, context, image_id, url_set): - """Delete backend location urls from an image.""" - if CONF.glance_api_version != 2: - raise exception.Invalid("Image API version 2 is disabled.") - client = GlanceClientWrapper(version=2) - try: - return client.call(context, 'delete_locations', image_id, url_set) - except Exception: - _reraise_translated_image_exception(image_id) - def download(self, context, image_id, data=None): """Calls out to Glance for data and writes data.""" if data and 'file' in CONF.allowed_direct_url_schemes: diff --git a/cinder/manager.py b/cinder/manager.py index 45f9e1452b0..8814c081da4 100644 --- a/cinder/manager.py +++ b/cinder/manager.py @@ -59,7 +59,6 @@ from oslo_service import periodic_task from cinder.db import base from cinder.scheduler import rpcapi as scheduler_rpcapi -from cinder import version from eventlet import greenpool @@ -110,15 +109,6 @@ class Manager(base.Base, PeriodicTasks): """ pass - def service_version(self): - return version.version_string() - - def service_config(self): - config = {} - for key in CONF: - config[key] = CONF.get(key, None) - return config - def is_working(self): """Method indicating if service is working correctly.