git://git.onelab.eu
/
nepi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added configurable DCE dlm loader (not yet working)
[nepi.git]
/
src
/
nepi
/
resources
/
linux
/
ns3
/
ns3simulation.py
diff --git
a/src/nepi/resources/linux/ns3/ns3simulation.py
b/src/nepi/resources/linux/ns3/ns3simulation.py
index
dae024f
..
cb5c6c5
100644
(file)
--- a/
src/nepi/resources/linux/ns3/ns3simulation.py
+++ b/
src/nepi/resources/linux/ns3/ns3simulation.py
@@
-104,8
+104,8
@@
class LinuxNS3Simulation(LinuxApplication, NS3Simulation):
dce_version = Attribute("dceVersion",
"Version of dce to install from nsam repo (tag branch for repo)",
dce_version = Attribute("dceVersion",
"Version of dce to install from nsam repo (tag branch for repo)",
- default = "dce-1.3",
-
#
default = "dce-dev",
+
#
default = "dce-1.3",
+ default = "dce-dev",
flags = Flags.Design)
populate_routing_tables = Attribute("populateRoutingTables",
flags = Flags.Design)
populate_routing_tables = Attribute("populateRoutingTables",
@@
-114,7
+114,7
@@
class LinuxNS3Simulation(LinuxApplication, NS3Simulation):
type = Types.Bool,
flags = Flags.Design)
type = Types.Bool,
flags = Flags.Design)
- stoptime = Attribute("
s
topTime",
+ stoptime = Attribute("
S
topTime",
"Time at which the simulation will stop",
flags = Flags.Design)
"Time at which the simulation will stop",
flags = Flags.Design)
@@
-306,6
+306,10
@@
class LinuxNS3Simulation(LinuxApplication, NS3Simulation):
if self.get("populateRoutingTables") == True:
self.invoke(IPV4_GLOBAL_ROUTING_HELPER_UUID, "PopulateRoutingTables")
if self.get("populateRoutingTables") == True:
self.invoke(IPV4_GLOBAL_ROUTING_HELPER_UUID, "PopulateRoutingTables")
+ time = self.get("StopTime")
+ if time:
+ self._client.stop(time=time)
+
self._client.start()
self.set_started()
self._client.start()
self.set_started()
@@
-319,11
+323,8
@@
class LinuxNS3Simulation(LinuxApplication, NS3Simulation):
"""
if self.state == ResourceState.STARTED:
"""
if self.state == ResourceState.STARTED:
- time = None
- if self.get("stopTime"):
- time = self.get("stopTime")
-
- self._client.stop(time=time)
+ if not self.get("StopTime"):
+ self._client.stop()
self.set_stopped()
def do_release(self):
self.set_stopped()
def do_release(self):