# Julien Tribino <julien.tribino@inria.fr>
import os, time
+from nepi.util.timefuncs import tnow
from nepi.execution.resource import ResourceManager, clsinit_copy, \
- ResourceState, reschedule_delay
+ ResourceState
from nepi.execution.attribute import Attribute, Flags
from nepi.resources.omf.node import OMFNode, confirmation_counter, reschedule_check
:type guid: int
"""
- _rtype = "OMFWifiInterface"
- _authorized_connections = ["OMFNode" , "OMFChannel", "WilabtSfaNode"]
+ _rtype = "omf::WifiInterface"
+ _authorized_connections = ["omf::Node" , "omf::Channel", "wilabt::sfa::Node"]
@classmethod
def _register_attributes(cls):
self._omf_api = None
self._type = ""
+ # For performance tests
+ self.perf = True
+ self.begin_deploy_time = None
def valid_connection(self, guid):
""" Check if the connection with the guid in parameter is possible.
"""
if self.node.state < ResourceState.READY:
- self.ec.schedule(reschedule_delay, self.deploy)
+ self.ec.schedule(self.reschedule_delay, self.deploy)
return False
for attrname in ["mode", "type", "essid"]:
"""
if self.channel.state < ResourceState.READY:
- self.ec.schedule(reschedule_delay, self.deploy)
+ self.ec.schedule(self.reschedule_delay, self.deploy)
return False
attrval = self.get("ip")
if not self.node or self.node.state < ResourceState.READY:
self.debug("---- RESCHEDULING DEPLOY ---- node state %s "
% self.node.state )
- self.ec.schedule(reschedule_delay, self.deploy)
+ self.ec.schedule(self.reschedule_delay, self.deploy)
return
if not self.channel or self.channel.state < ResourceState.READY:
self.debug("---- RESCHEDULING DEPLOY ---- channel state %s "
% self.channel.state )
- self.ec.schedule(reschedule_delay, self.deploy)
+ self.ec.schedule(self.reschedule_delay, self.deploy)
return
+ ## For performance test
+ if self.perf:
+ self.begin_deploy_time = tnow()
+ self.perf = False
+
self.set('xmppUser',self.node.get('xmppUser'))
self.set('xmppServer',self.node.get('xmppServer'))
self.set('xmppPort',self.node.get('xmppPort'))