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
2fc3ff12
authored
Feb 26, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-extra-buttons'
parents
479b2ce0
ecd67ff5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
circle/common/models.py
+2
-1
circle/storage/models.py
+1
-1
circle/vm/models/instance.py
+5
-4
No files found.
circle/common/models.py
View file @
2fc3ff12
...
...
@@ -64,7 +64,8 @@ class ActivityModel(TimeStampedModel):
if
not
self
.
finished
:
self
.
finished
=
timezone
.
now
()
self
.
succeeded
=
succeeded
self
.
result
=
result
if
result
is
not
None
:
self
.
result
=
result
if
event_handler
is
not
None
:
event_handler
(
self
)
self
.
save
()
...
...
circle/storage/models.py
View file @
2fc3ff12
...
...
@@ -150,7 +150,7 @@ class Disk(AclBase, TimeStampedModel):
return
{
'source'
:
self
.
path
,
'driver_type'
:
self
.
format
,
'driver_cache'
:
'
default
'
,
'driver_cache'
:
'
none
'
,
'target_device'
:
self
.
device_type
+
self
.
dev_num
,
'disk_device'
:
'cdrom'
if
self
.
type
==
'iso'
else
'disk'
}
...
...
circle/vm/models/instance.py
View file @
2fc3ff12
...
...
@@ -607,9 +607,10 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
queue_name
=
self
.
get_remote_queue_name
(
'vm'
)
# Deploy VM on remote machine
with
act
.
sub_activity
(
'deploying_vm'
):
vm_tasks
.
deploy
.
apply_async
(
args
=
[
self
.
get_vm_desc
()],
queue
=
queue_name
)
.
get
(
timeout
=
timeout
)
with
act
.
sub_activity
(
'deploying_vm'
)
as
deploy_act
:
deploy_act
.
result
=
vm_tasks
.
deploy
.
apply_async
(
args
=
[
self
.
get_vm_desc
()],
queue
=
queue_name
)
.
get
(
timeout
=
timeout
)
# Estabilish network connection (vmdriver)
with
act
.
sub_activity
(
'deploying_net'
):
...
...
@@ -671,7 +672,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
return
local_tasks
.
deploy
.
apply_async
(
args
=
[
self
,
user
],
queue
=
"localhost.man"
)
def
__destroy_vm
(
self
,
act
,
timeout
):
def
__destroy_vm
(
self
,
act
,
timeout
=
15
):
"""Destroy the virtual machine and its associated networks.
:param self: The virtual machine.
...
...
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