Merge pull request #158 from stuartmarsden/rel/5.1

update_link had wrong arg order
This commit is contained in:
bharnden 2018-05-22 20:17:48 -07:00 committed by GitHub
commit 88ffcaac3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -378,7 +378,7 @@ class EmuSession(Session):
if node_two: if node_two:
node_two.lock.release() node_two.lock.release()
def update_link(self, node_one_id, node_two_id, link_options, interface_one_id=None, interface_two_id=None): def update_link(self, node_one_id, node_two_id, interface_one_id=None, interface_two_id=None, link_options=LinkOptions()):
""" """
Update link information between nodes. Update link information between nodes.

View file

@ -248,10 +248,10 @@ class OvsNet(PyCoreNet):
if jitter is not None: if jitter is not None:
netem += ["%sus" % jitter, "25%"] netem += ["%sus" % jitter, "25%"]
if loss is not None: if loss is not None and loss > 0:
netem += ["loss", "%s%%" % min(loss, 100)] netem += ["loss", "%s%%" % min(loss, 100)]
if duplicate is not None: if duplicate is not None and duplicate > 0:
netem += ["duplicate", "%s%%" % min(duplicate, 100)] netem += ["duplicate", "%s%%" % min(duplicate, 100)]
if delay <= 0 and jitter <= 0 and loss <= 0 and duplicate <= 0: if delay <= 0 and jitter <= 0 and loss <= 0 and duplicate <= 0:

View file

@ -475,9 +475,9 @@ class LxBrNet(PyCoreNet):
else: else:
netem += ["%sus" % jitter, "25%"] netem += ["%sus" % jitter, "25%"]
if loss is not None: if loss is not None and loss > 0:
netem += ["loss", "%s%%" % min(loss, 100)] netem += ["loss", "%s%%" % min(loss, 100)]
if duplicate is not None: if duplicate is not None and duplicate > 0:
netem += ["duplicate", "%s%%" % min(duplicate, 100)] netem += ["duplicate", "%s%%" % min(duplicate, 100)]
if delay <= 0 and jitter <= 0 and loss <= 0 and duplicate <= 0: if delay <= 0 and jitter <= 0 and loss <= 0 and duplicate <= 0:
# possibly remove netem if it exists and parent queue wasn't removed # possibly remove netem if it exists and parent queue wasn't removed