Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
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
3619582b
authored
Jan 08, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: only destroy node dependent entities when node is available
parent
6487ae94
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
circle/vm/models/instance.py
+5
-1
No files found.
circle/vm/models/instance.py
View file @
3619582b
...
@@ -437,7 +437,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
...
@@ -437,7 +437,7 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
"""Get the remote worker queue name of this instance with the specified
"""Get the remote worker queue name of this instance with the specified
queue ID.
queue ID.
"""
"""
return
self
.
node
.
get_remote_queue_name
(
queue_id
)
return
self
.
node
.
get_remote_queue_name
(
queue_id
)
if
self
.
node
else
None
def
renew
(
self
,
which
=
'both'
):
def
renew
(
self
,
which
=
'both'
):
"""Renew virtual machine instance leases.
"""Renew virtual machine instance leases.
...
@@ -535,9 +535,13 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
...
@@ -535,9 +535,13 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
asynchronously.
asynchronously.
:type task_uuid: str
:type task_uuid: str
"""
"""
if
self
.
destroyed
:
return
# already destroyed, nothing to do here
with
instance_activity
(
code_suffix
=
'destroy'
,
instance
=
self
,
with
instance_activity
(
code_suffix
=
'destroy'
,
instance
=
self
,
task_uuid
=
task_uuid
,
user
=
user
)
as
act
:
task_uuid
=
task_uuid
,
user
=
user
)
as
act
:
if
self
.
node
:
# Destroy networks
# Destroy networks
with
act
.
sub_activity
(
'destroying_net'
):
with
act
.
sub_activity
(
'destroying_net'
):
for
net
in
self
.
interface_set
.
all
():
for
net
in
self
.
interface_set
.
all
():
...
...
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