Commit 19ca28b9 by Guba Sándor

storage: allow custom filename for disk

parent b75671cc
...@@ -301,7 +301,8 @@ class Disk(AclBase, TimeStampedModel): ...@@ -301,7 +301,8 @@ class Disk(AclBase, TimeStampedModel):
"""Create disk with activity. """Create disk with activity.
""" """
datastore = params.pop('datastore', DataStore.objects.get()) datastore = params.pop('datastore', DataStore.objects.get())
disk = cls(filename=str(uuid.uuid4()), datastore=datastore, **params) filename = params.pop('filename', str(uuid.uuid4()))
disk = cls(filename=filename, datastore=datastore, **params)
disk.save() disk.save()
with disk_activity(code_suffix="create", with disk_activity(code_suffix="create",
user=user, user=user,
......
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