Merge "Add context information to download plugins"

This commit is contained in:
Jenkins
2013-08-29 20:20:12 +00:00
committed by Gerrit Code Review
3 changed files with 3 additions and 3 deletions

View File

@@ -20,6 +20,6 @@ from nova import exception
class TransferBase(object):
def download(self, url_parts, dst_path, metadata, **kwargs):
def download(self, context, url_parts, dst_path, metadata, **kwargs):
raise exception.ImageDownloadModuleNotImplementedError(
method_name='download')

View File

@@ -141,7 +141,7 @@ class FileTransfer(xfer_base.TransferBase):
new_path = path.replace(glance_mount, nova_mount, 1)
return new_path
def download(self, url_parts, dst_file, metadata, **kwargs):
def download(self, context, url_parts, dst_file, metadata, **kwargs):
self.filesystems = self._get_options()
if not self.filesystems:
#NOTE(jbresnah) when nothing is configured assume legacy behavior

View File

@@ -326,7 +326,7 @@ class GlanceImageService(object):
xfer_mod = self._get_transfer_module(o.scheme)
if xfer_mod:
try:
xfer_mod.download(o, dst_path, loc_meta)
xfer_mod.download(context, o, dst_path, loc_meta)
msg = _("Successfully transferred "
"using %s") % o.scheme
LOG.info(msg)