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
Commit
086490a4
authored
Oct 15, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add md5sum to activity result
parent
345a3659
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
+5
-1
circle/storage/models.py
+1
-0
circle/vm/operations.py
+4
-1
No files found.
circle/storage/models.py
View file @
086490a4
...
@@ -416,6 +416,7 @@ class Disk(TimeStampedModel):
...
@@ -416,6 +416,7 @@ class Disk(TimeStampedModel):
"Operation aborted by user."
),
e
)
"Operation aborted by user."
),
e
)
disk
.
size
=
result
[
'size'
]
disk
.
size
=
result
[
'size'
]
disk
.
type
=
result
[
'type'
]
disk
.
type
=
result
[
'type'
]
disk
.
checksum
=
result
.
get
(
'checksum'
,
None
)
disk
.
is_ready
=
True
disk
.
is_ready
=
True
disk
.
save
()
disk
.
save
()
return
disk
return
disk
...
...
circle/vm/operations.py
View file @
086490a4
...
@@ -280,7 +280,6 @@ class DownloadDiskOperation(InstanceOperation):
...
@@ -280,7 +280,6 @@ class DownloadDiskOperation(InstanceOperation):
async_queue
=
"localhost.man.slow"
async_queue
=
"localhost.man.slow"
def
_operation
(
self
,
user
,
url
,
task
,
activity
,
name
=
None
):
def
_operation
(
self
,
user
,
url
,
task
,
activity
,
name
=
None
):
activity
.
result
=
url
from
storage.models
import
Disk
from
storage.models
import
Disk
disk
=
Disk
.
download
(
url
=
url
,
name
=
name
,
task
=
task
)
disk
=
Disk
.
download
(
url
=
url
,
name
=
name
,
task
=
task
)
...
@@ -294,6 +293,10 @@ class DownloadDiskOperation(InstanceOperation):
...
@@ -294,6 +293,10 @@ class DownloadDiskOperation(InstanceOperation):
activity
.
readable_name
=
create_readable
(
activity
.
readable_name
=
create_readable
(
ugettext_noop
(
"download
%(name)
s"
),
name
=
disk
.
name
)
ugettext_noop
(
"download
%(name)
s"
),
name
=
disk
.
name
)
activity
.
result
=
create_readable
(
ugettext_noop
(
"Downloading
%(url)
s is finished. The file md5sum "
"is: '
%(checksum)
s'."
),
url
=
url
,
checksum
=
disk
.
checksum
)
# TODO iso (cd) hot-plug is not supported by kvm/guests
# TODO iso (cd) hot-plug is not supported by kvm/guests
if
self
.
instance
.
is_running
and
disk
.
type
not
in
[
"iso"
]:
if
self
.
instance
.
is_running
and
disk
.
type
not
in
[
"iso"
]:
self
.
instance
.
_attach_disk
(
parent_activity
=
activity
,
disk
=
disk
)
self
.
instance
.
_attach_disk
(
parent_activity
=
activity
,
disk
=
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