Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
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
Hide 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
from
celery.exceptions
import
TimeoutError
from
manager.mancelery
import
celery
from
common.models
import
(
ActivityModel
,
activitycontextimpl
,
WorkerNotFound
,
method_cache
)
WorkerNotFound
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -357,18 +357,17 @@ class Disk(AclBase, TimeStampedModel):
:type instance: vm.models.Instance or InstanceTemplate or NoneType
:param user: owner of the disk
:type user: django.contrib.auth.User
:param task_uuid:
TODO
:param abortable_task:
TODO
:param task_uuid:
UUID of the local task
:param abortable_task:
UUID of the remote running abortable task.
:return: The created Disk object
:rtype: Disk
"""
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
disk
.
datastore
=
DataStore
.
objects
.
get
()
if
instance
:
instance
.
disks
.
add
(
disk
)
queue_name
=
disk
.
get_remote_queue_name
(
'storage'
)
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