Commit 086490a4 by Guba Sándor

add md5sum to activity result

parent 345a3659
......@@ -416,6 +416,7 @@ class Disk(TimeStampedModel):
"Operation aborted by user."), e)
disk.size = result['size']
disk.type = result['type']
disk.checksum = result.get('checksum', None)
disk.is_ready = True
return disk
......@@ -280,7 +280,6 @@ class DownloadDiskOperation(InstanceOperation):
async_queue = ""
def _operation(self, user, url, task, activity, name=None):
activity.result = url
from storage.models import Disk
disk =, name=name, task=task)
......@@ -294,6 +293,10 @@ class DownloadDiskOperation(InstanceOperation):
activity.readable_name = create_readable(
ugettext_noop("download %(name)s"),
activity.result = create_readable(ugettext_noop(
"Downloading %(url)s is finished. The file md5sum "
"is: '%(checksum)s'."),
url=url, checksum=disk.checksum)
# TODO iso (cd) hot-plug is not supported by kvm/guests
if self.instance.is_running and disk.type not in ["iso"]:
self.instance._attach_disk(parent_activity=activity, disk=disk)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment