fixed issue for link data not including per/loss when it is a ptp node, for host to host links

This commit is contained in:
Blake Harnden 2019-06-05 09:54:11 -07:00
parent c262778209
commit 4381615f1d
3 changed files with 2 additions and 5 deletions

View file

@ -141,6 +141,7 @@ class CoreInterface(object):
:return: True if parameter changed, False otherwise
"""
# treat None and 0 as unchanged values
logging.debug("setting param: %s - %s", key, value)
if value is None or value <= 0:
return False

View file

@ -894,6 +894,7 @@ class PtpNet(CoreNetwork):
unidirectional=unidirectional,
delay=if1.getparam("delay"),
bandwidth=if1.getparam("bw"),
per=if1.getparam("loss"),
dup=if1.getparam("duplicate"),
jitter=if1.getparam("jitter"),
interface1_id=if1.node.getifindex(if1),