Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
705bdcfe
authored
Sep 08, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: remove Instance.active_since
parent
2b450c1f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
20 deletions
+0
-20
circle/vm/migrations/0026_auto__del_field_instance_active_since.py
+0
-0
circle/vm/models/instance.py
+0
-20
No files found.
circle/vm/migrations/0026_auto__del_field_instance_active_since.py
0 → 100644
View file @
705bdcfe
This diff is collapsed.
Click to expand it.
circle/vm/models/instance.py
View file @
705bdcfe
...
@@ -244,10 +244,6 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
...
@@ -244,10 +244,6 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
verbose_name
=
_
(
'time of delete'
),
verbose_name
=
_
(
'time of delete'
),
help_text
=
_
(
"Proposed time of automatic "
help_text
=
_
(
"Proposed time of automatic "
"deletion."
))
"deletion."
))
active_since
=
DateTimeField
(
blank
=
True
,
null
=
True
,
help_text
=
_
(
"Time stamp of successful "
"boot report."
),
verbose_name
=
_
(
'active since'
))
node
=
ForeignKey
(
Node
,
blank
=
True
,
null
=
True
,
node
=
ForeignKey
(
Node
,
blank
=
True
,
null
=
True
,
related_name
=
'instance_set'
,
related_name
=
'instance_set'
,
help_text
=
_
(
"Current hypervisor of this instance."
),
help_text
=
_
(
"Current hypervisor of this instance."
),
...
@@ -532,15 +528,6 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
...
@@ -532,15 +528,6 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
return
self
.
primary_host
.
mac
if
self
.
primary_host
else
None
return
self
.
primary_host
.
mac
if
self
.
primary_host
else
None
@property
@property
def
uptime
(
self
):
"""Uptime of the instance.
"""
if
self
.
active_since
:
return
timezone
.
now
()
-
self
.
active_since
else
:
return
timedelta
()
# zero
@property
def
os_type
(
self
):
def
os_type
(
self
):
"""Get the type of the instance's operating system.
"""Get the type of the instance's operating system.
"""
"""
...
@@ -549,13 +536,6 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
...
@@ -549,13 +536,6 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
else
:
else
:
return
self
.
template
.
os_type
return
self
.
template
.
os_type
def
get_age
(
self
):
"""Deprecated. Use uptime instead.
Get age of VM in seconds.
"""
return
self
.
uptime
.
seconds
@property
@property
def
waiting
(
self
):
def
waiting
(
self
):
"""Indicates whether the instance's waiting for an operation to finish.
"""Indicates whether the instance's waiting for an operation to finish.
...
...
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