Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f2fc6c3e
authored
Oct 09, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: track destruction status of VMs
parent
a56303f9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
circle/vm/migrations/0004_auto__add_field_instance_destoryed.py
+0
-0
circle/vm/models.py
+5
-0
No files found.
circle/vm/migrations/0004_auto__add_field_instance_destoryed.py
0 → 100644
View file @
f2fc6c3e
This diff is collapsed.
Click to expand it.
circle/vm/models.py
View file @
f2fc6c3e
...
...
@@ -318,6 +318,9 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
vnc_port
=
IntegerField
(
verbose_name
=
_
(
'vnc_port'
),
help_text
=
_
(
"TCP port where VNC console listens."
))
owner
=
ForeignKey
(
User
)
destoryed
=
DateTimeField
(
blank
=
True
,
null
=
True
,
help_text
=
_
(
"The virtual machine's time of "
"destruction."
))
class
Meta
:
ordering
=
[
'pk'
,
]
...
...
@@ -598,6 +601,8 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
for
disk
in
self
.
disks
.
all
():
disk
.
destroy
()
self
.
destoryed
=
timezone
.
now
()
self
.
save
()
act
.
finish
(
result
=
"SUCCESS"
)
def
destroy_async
(
self
,
user
=
None
):
...
...
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