#236 fix for missing loss/per values in xml and other cases
This commit is contained in:
parent
4a5398aa21
commit
3c8b4ab0a5
2 changed files with 8 additions and 3 deletions
|
@ -320,13 +320,16 @@ class CoreHandler(SocketServer.BaseRequestHandler):
|
|||
:return: nothing
|
||||
"""
|
||||
logging.debug("handling broadcast link: %s", link_data)
|
||||
per = ""
|
||||
if link_data.per is not None:
|
||||
per = str(link_data.per)
|
||||
|
||||
tlv_data = structutils.pack_values(coreapi.CoreLinkTlv, [
|
||||
(LinkTlvs.N1_NUMBER, link_data.node1_id),
|
||||
(LinkTlvs.N2_NUMBER, link_data.node2_id),
|
||||
(LinkTlvs.DELAY, link_data.delay),
|
||||
(LinkTlvs.BANDWIDTH, link_data.bandwidth),
|
||||
(LinkTlvs.PER, link_data.per),
|
||||
(LinkTlvs.PER, per),
|
||||
(LinkTlvs.DUP, link_data.dup),
|
||||
(LinkTlvs.JITTER, link_data.jitter),
|
||||
(LinkTlvs.MER, link_data.mer),
|
||||
|
|
|
@ -570,7 +570,8 @@ class PyCoreNet(PyCoreObj):
|
|||
delay=netif.getparam("delay"),
|
||||
bandwidth=netif.getparam("bw"),
|
||||
dup=netif.getparam("duplicate"),
|
||||
jitter=netif.getparam("jitter")
|
||||
jitter=netif.getparam("jitter"),
|
||||
per=netif.getparam("loss")
|
||||
)
|
||||
|
||||
all_links.append(link_data)
|
||||
|
@ -587,7 +588,8 @@ class PyCoreNet(PyCoreObj):
|
|||
delay=netif.getparam("delay"),
|
||||
bandwidth=netif.getparam("bw"),
|
||||
dup=netif.getparam("duplicate"),
|
||||
jitter=netif.getparam("jitter")
|
||||
jitter=netif.getparam("jitter"),
|
||||
per=netif.getparam("loss")
|
||||
)
|
||||
netif.swapparams('_params_up')
|
||||
|
||||
|
|
Loading…
Reference in a new issue