Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fb475b8b
authored
Mar 14, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: code_style and docstring
parent
b7f7ac68
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
circle/storage/models.py
+5
-6
No files found.
circle/storage/models.py
View file @
fb475b8b
...
@@ -18,7 +18,7 @@ from .tasks import local_tasks, remote_tasks
...
@@ -18,7 +18,7 @@ from .tasks import local_tasks, remote_tasks
from
celery.exceptions
import
TimeoutError
from
celery.exceptions
import
TimeoutError
from
manager.mancelery
import
celery
from
manager.mancelery
import
celery
from
common.models
import
(
ActivityModel
,
activitycontextimpl
,
from
common.models
import
(
ActivityModel
,
activitycontextimpl
,
WorkerNotFound
,
method_cache
)
WorkerNotFound
)
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
@@ -357,18 +357,17 @@ class Disk(AclBase, TimeStampedModel):
...
@@ -357,18 +357,17 @@ class Disk(AclBase, TimeStampedModel):
:type instance: vm.models.Instance or InstanceTemplate or NoneType
:type instance: vm.models.Instance or InstanceTemplate or NoneType
:param user: owner of the disk
:param user: owner of the disk
:type user: django.contrib.auth.User
:type user: django.contrib.auth.User
:param task_uuid:
TODO
:param task_uuid:
UUID of the local task
:param abortable_task:
TODO
:param abortable_task:
UUID of the remote running abortable task.
:return: The created Disk object
:return: The created Disk object
:rtype: Disk
:rtype: Disk
"""
"""
kwargs
.
setdefault
(
'name'
,
url
.
split
(
'/'
)[
-
1
])
kwargs
.
setdefault
(
'name'
,
url
.
split
(
'/'
)[
-
1
])
disk
=
Disk
.
create
(
type
=
"iso"
,
size
=
1
,
**
kwargs
)
disk
=
Disk
.
create
(
type
=
"iso"
,
instance
=
instance
,
user
=
user
,
size
=
1
,
**
kwargs
)
# TODO get proper datastore
# TODO get proper datastore
disk
.
datastore
=
DataStore
.
objects
.
get
()
disk
.
datastore
=
DataStore
.
objects
.
get
()
if
instance
:
instance
.
disks
.
add
(
disk
)
queue_name
=
disk
.
get_remote_queue_name
(
'storage'
)
queue_name
=
disk
.
get_remote_queue_name
(
'storage'
)
def
__on_abort
(
activity
,
error
):
def
__on_abort
(
activity
,
error
):
...
...
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