revert loss pack to using floats in all related places

This commit is contained in:
bharnden 2019-07-03 23:09:55 -07:00
parent 02d9418808
commit ae5d718737
5 changed files with 7 additions and 7 deletions

View file

@ -459,7 +459,7 @@ class CoreNetwork(CoreNetworkBase):
netem = ["netem"]
changed = max(changed, netif.setparam("delay", delay))
if loss is not None:
loss = int(loss)
loss = float(loss)
changed = max(changed, netif.setparam("loss", loss))
if duplicate is not None:
duplicate = int(duplicate)

View file

@ -225,7 +225,7 @@ class OvsNet(CoreNetworkBase):
delay_changed = netif.setparam("delay", delay)
if loss is not None:
loss = int(loss)
loss = float(loss)
loss_changed = netif.setparam("loss", loss)
if duplicate is not None:

View file

@ -782,7 +782,7 @@ class CoreXmlReader(object):
link_options.mburst = get_int(options_element, "mburst")
link_options.jitter = get_int(options_element, "jitter")
link_options.key = get_int(options_element, "key")
link_options.per = get_int(options_element, "per")
link_options.per = get_float(options_element, "per")
link_options.unidirectional = get_int(options_element, "unidirectional")
link_options.session = options_element.get("session")
link_options.emulation_id = get_int(options_element, "emulation_id")