Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
72dddbf6
authored
Jun 17, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix imports
parent
4f1d9ed1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
circle/vm/operations.py
+4
-1
No files found.
circle/vm/operations.py
View file @
72dddbf6
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment