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
This commit is contained in:
parent
65a6c40b6e
commit
a7adc35e0e
@ -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']
|
||||
|
@ -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:
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user