Commit 93a898e7 by Őry Máté

vm: cache Node.online state

parent 7967e361
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment