Commit 72dddbf6 by Bach Dániel

vm: fix imports

parent 4f1d9ed1
...@@ -26,7 +26,6 @@ from django.utils.translation import ugettext_lazy as _ ...@@ -26,7 +26,6 @@ from django.utils.translation import ugettext_lazy as _
from celery.exceptions import TimeLimitExceeded from celery.exceptions import TimeLimitExceeded
from common.operations import Operation, register_operation from common.operations import Operation, register_operation
from storage.models import Disk
from .tasks.local_tasks import ( from .tasks.local_tasks import (
abortable_async_instance_operation, abortable_async_node_operation, abortable_async_instance_operation, abortable_async_node_operation,
) )
...@@ -114,6 +113,8 @@ class CreateDiskOperation(InstanceOperation): ...@@ -114,6 +113,8 @@ class CreateDiskOperation(InstanceOperation):
def _operation(self, user, size, name=None): def _operation(self, user, size, name=None):
# TODO implement with hot-attach when it'll be available # TODO implement with hot-attach when it'll be available
from storage.models import Disk
if not name: if not name:
name = "new disk" name = "new disk"
disk = Disk.create(size=size, name=name, type="qcow2-norm") disk = Disk.create(size=size, name=name, type="qcow2-norm")
...@@ -138,6 +139,8 @@ class DownloadDiskOperation(InstanceOperation): ...@@ -138,6 +139,8 @@ class DownloadDiskOperation(InstanceOperation):
def _operation(self, user, url, task, name=None): def _operation(self, user, url, task, name=None):
# TODO implement with hot-attach when it'll be available # TODO implement with hot-attach when it'll be available
from storage.models import Disk
disk = Disk.download(url=url, name=name, task=task) disk = Disk.download(url=url, name=name, task=task)
self.instance.disks.add(disk) self.instance.disks.add(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