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
Commit
93a898e7
authored
Nov 18, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: cache Node.online state
parent
7967e361
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
circle/vm/models.py
+4
-4
No files found.
circle/vm/models.py
View file @
93a898e7
...
@@ -18,9 +18,10 @@ from taggit.managers import TaggableManager
...
@@ -18,9 +18,10 @@ from taggit.managers import TaggableManager
from
.tasks
import
local_tasks
,
vm_tasks
,
net_tasks
from
.tasks
import
local_tasks
,
vm_tasks
,
net_tasks
from
acl.models
import
AclBase
from
acl.models
import
AclBase
from
common.models
import
ActivityModel
,
activitycontextimpl
from
firewall.models
import
Vlan
,
Host
from
firewall.models
import
Vlan
,
Host
from
storage.models
import
Disk
from
storage.models
import
Disk
from
common.models
import
ActivityModel
,
activitycontextimpl
,
method_cache
from
acl.models
import
AclBase
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
pwgen
=
User
.
objects
.
make_random_password
pwgen
=
User
.
objects
.
make_random_password
...
@@ -123,10 +124,9 @@ class Node(TimeStampedModel):
...
@@ -123,10 +124,9 @@ class Node(TimeStampedModel):
permissions
=
()
permissions
=
()
@property
@property
@method_cache
(
30
)
def
online
(
self
):
def
online
(
self
):
"""Indicates whether the node is connected and functional.
return
True
"""
pass
# TODO implement check
def
__unicode__
(
self
):
def
__unicode__
(
self
):
return
self
.
name
return
self
.
name
...
...
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