Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
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
b2b4580c
authored
Mar 14, 2014
by
Bach Dániel
Committed by
cloud
Mar 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: add Instance.cached_state property
parent
3d9dba6d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
circle/vm/models/instance.py
+6
-0
No files found.
circle/vm/models/instance.py
View file @
b2b4580c
...
...
@@ -25,6 +25,7 @@ from ..tasks import local_tasks, vm_tasks, agent_tasks
from
.activity
import
(
ActivityInProgressError
,
instance_activity
,
InstanceActivity
)
from
.common
import
BaseResourceConfigModel
,
Lease
from
common.models
import
method_cache
from
.network
import
Interface
from
.node
import
Node
,
Trait
...
...
@@ -257,6 +258,11 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
return
self
.
state
==
'RUNNING'
@property
@method_cache
(
10
,
5
)
def
cached_state
(
self
):
return
self
.
state
@property
def
state
(
self
):
"""State of the virtual machine instance.
"""
...
...
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