X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fresources%2Fns3%2Fns3wrapper.py;h=3306b30d8a79f85940c2cf6b6a737a863d40e066;hb=3cac49d9806194eb9a442cca3a0131eb71cbb490;hp=58da68ed45be2570d141cf075c915158a83ac334;hpb=3c4a5dac5faabde3aabcab72adc1d9be1af32643;p=nepi.git diff --git a/src/nepi/resources/ns3/ns3wrapper.py b/src/nepi/resources/ns3/ns3wrapper.py index 58da68ed..3306b30d 100644 --- a/src/nepi/resources/ns3/ns3wrapper.py +++ b/src/nepi/resources/ns3/ns3wrapper.py @@ -176,6 +176,10 @@ class NS3Wrapper(object): def is_running(self): return self._started and not self.ns3.Simulator.IsFinished() + @property + def is_finished(self): + return self.ns3.Simulator.IsFinished() + def make_uuid(self): return "uuid%s" % uuid.uuid4() @@ -260,6 +264,8 @@ class NS3Wrapper(object): if operation == "isRunning": result = self.is_running + elif operation == "isFinished": + result = self.is_finished elif operation == "isAppRunning": result = self._is_app_running(uuid) elif operation == "addStaticRoute":