From: Alina Quereilhac Date: Mon, 15 Dec 2014 16:25:52 +0000 (+0100) Subject: CCN Peek/Poke across linux/ns3 X-Git-Tag: nepi-3.2.0~38 X-Git-Url: http://git.onelab.eu/?p=nepi.git;a=commitdiff_plain;h=1718dbd1b5558f36bae96ac613dc7980128bb52e CCN Peek/Poke across linux/ns3 --- diff --git a/src/nepi/resources/ns3/ns3dceapplication.py b/src/nepi/resources/ns3/ns3dceapplication.py index d4ae7eb1..89725c36 100644 --- a/src/nepi/resources/ns3/ns3dceapplication.py +++ b/src/nepi/resources/ns3/ns3dceapplication.py @@ -199,7 +199,7 @@ class NS3BaseDceApplication(NS3BaseApplication): else: is_app_running = self.simulation.invoke(self.uuid, "isAppRunning") - if is_app_running or self.simulation.state > Resource.STARTED: + if is_app_running or self.simulation.state > ResourceState.STARTED: super(NS3BaseApplication, self).do_start() self._start_time = self.simulation.start_time else: diff --git a/src/nepi/resources/ns3/ns3fdnetdevice.py b/src/nepi/resources/ns3/ns3fdnetdevice.py index e4fdbd76..b8aabe6a 100644 --- a/src/nepi/resources/ns3/ns3fdnetdevice.py +++ b/src/nepi/resources/ns3/ns3fdnetdevice.py @@ -26,7 +26,7 @@ class NS3BaseFdNetDevice(NS3BaseNetDevice): @property def _rms_to_wait(self): - rms = set([self.node, self.node.ipv4]) + rms = set([self.node]) return rms def _configure_mac_address(self): diff --git a/src/nepi/resources/ns3/ns3wrapper.py b/src/nepi/resources/ns3/ns3wrapper.py index d8fa96fe..7c26ac21 100644 --- a/src/nepi/resources/ns3/ns3wrapper.py +++ b/src/nepi/resources/ns3/ns3wrapper.py @@ -598,8 +598,9 @@ class NS3Wrapper(object): app.GetAttribute("StartTime", start_time_value) start_time = start_time_value.Get() - if now.Compare(start_time) >= 0 and now.Compare(stop_time) < 0: - return True + if now.Compare(start_time) >= 0: + if stop_time.IsZero() or now.Compare(stop_time) < 0: + return True return False