Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
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
Show 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 _
from
celery.exceptions
import
TimeLimitExceeded
from
common.operations
import
Operation
,
register_operation
from
storage.models
import
Disk
from
.tasks.local_tasks
import
(
abortable_async_instance_operation
,
abortable_async_node_operation
,
)
...
...
@@ -114,6 +113,8 @@ class CreateDiskOperation(InstanceOperation):
def
_operation
(
self
,
user
,
size
,
name
=
None
):
# TODO implement with hot-attach when it'll be available
from
storage.models
import
Disk
if
not
name
:
name
=
"new disk"
disk
=
Disk
.
create
(
size
=
size
,
name
=
name
,
type
=
"qcow2-norm"
)
...
...
@@ -138,6 +139,8 @@ class DownloadDiskOperation(InstanceOperation):
def
_operation
(
self
,
user
,
url
,
task
,
name
=
None
):
# TODO implement with hot-attach when it'll be available
from
storage.models
import
Disk
disk
=
Disk
.
download
(
url
=
url
,
name
=
name
,
task
=
task
)
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