added test script and test for mobility script testing
This commit is contained in:
parent
05ce19b0c0
commit
b62076c240
5 changed files with 67 additions and 3 deletions
|
@ -212,7 +212,7 @@ class MobilityManager(ConfigurableManager):
|
|||
try:
|
||||
n = self.session.get_object(nodenum)
|
||||
except KeyError:
|
||||
logger.exception("error getting session object")
|
||||
logger.exception("error getting session object, this was ignored before")
|
||||
continue
|
||||
if n.model:
|
||||
n.model.update(moved, moved_netifs)
|
||||
|
@ -759,6 +759,7 @@ class WayPointMobility(WirelessModel):
|
|||
|
||||
:return: nothing
|
||||
"""
|
||||
logger.info("running mobility scenario")
|
||||
self.timezero = time.time()
|
||||
self.lasttime = self.timezero - (0.001 * self.refresh_ms)
|
||||
self.movenodesinitial()
|
||||
|
@ -1194,6 +1195,7 @@ class Ns2ScriptedMobility(WayPointMobility):
|
|||
|
||||
:return: nothing
|
||||
"""
|
||||
logger.info("starting script")
|
||||
laststate = self.state
|
||||
super(Ns2ScriptedMobility, self).start()
|
||||
if laststate == self.STATE_PAUSED:
|
||||
|
|
|
@ -382,7 +382,7 @@ class WlanNode(LxBrNet):
|
|||
:param config: model configuration
|
||||
:return: nothing
|
||||
"""
|
||||
logger.info("adding model %s" % model.name)
|
||||
logger.info("adding model: %s", model.name)
|
||||
if model.config_type == RegisterTlvs.WIRELESS.value:
|
||||
self.model = model(session=self.session, object_id=self.objid, values=config)
|
||||
if self.model.position_callback:
|
||||
|
|
|
@ -865,6 +865,7 @@ class Session(object):
|
|||
# this is called from instantiate() after receiving an event message
|
||||
# for the instantiation state, and from the broker when distributed
|
||||
# nodes have been started
|
||||
logger.info("checking runtime: %s", self.state)
|
||||
if self.state == EventTypes.RUNTIME_STATE.value:
|
||||
logger.info("valid runtime state found, returning")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue