From 8f1739920fa9a276b2428bc4b6bb161ed614489d Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Fri, 3 Jul 2020 16:45:18 +0200 Subject: [PATCH] update changing commands --- core/topo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/topo.py b/core/topo.py index e7753fc..2a371c3 100644 --- a/core/topo.py +++ b/core/topo.py @@ -89,7 +89,7 @@ class LinkCharacteristics(object): "change" if change else "add", ifname, self.bandwidth, self.buffer_size()) def build_changing_bandwidth_cmd(self, ifname): - return "&&".join( + return "&& ".join( ["sleep {} && {} ".format( n.delta, self.build_bandwidth_cmd(ifname, change=True)) for n in self.netem_at] + ["true &"] @@ -100,7 +100,7 @@ class LinkCharacteristics(object): "change" if change else "add", ifname, cmd, "delay {}ms limit 50000".format(self.delay) if not change else "") def build_changing_netem_cmd(self, ifname): - return "&&".join( + return "&& ".join( ["sleep {} && {} ".format( n.delta, self.build_netem_cmd(ifname, n.cmd, change=True)) for n in self.netem_at] + ["true &"] @@ -113,7 +113,7 @@ class LinkCharacteristics(object): self.bandwidth, int(self.buffer_size()) * 1.2) def build_changing_policing_cmd(self, ifname): - return "&&".join( + return "&& ".join( ["sleep {} && {} ".format( n.delta, self.build_policing_cmd(ifname, change=True)) for n in self.netem_at] + ["true &"]