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:
parent
c262778209
commit
4381615f1d
3 changed files with 2 additions and 5 deletions
|
@ -159,7 +159,6 @@ class ConfigurableManager(object):
|
|||
:param int node_id: node id to clear configurations for, default is None and clears all configurations
|
||||
:return: nothing
|
||||
"""
|
||||
logging.debug("resetting all configurations: %s", self.__class__.__name__)
|
||||
if not node_id:
|
||||
self.node_configurations.clear()
|
||||
elif node_id in self.node_configurations:
|
||||
|
@ -175,7 +174,6 @@ class ConfigurableManager(object):
|
|||
:param str config_type: configuration type to store configuration for
|
||||
:return: nothing
|
||||
"""
|
||||
logging.debug("setting config for node(%s) type(%s): %s=%s", node_id, config_type, _id, value)
|
||||
node_configs = self.node_configurations.setdefault(node_id, OrderedDict())
|
||||
node_type_configs = node_configs.setdefault(config_type, OrderedDict())
|
||||
node_type_configs[_id] = value
|
||||
|
@ -204,7 +202,6 @@ class ConfigurableManager(object):
|
|||
:return: configuration value
|
||||
:rtype str
|
||||
"""
|
||||
logging.debug("getting config for node(%s) type(%s): %s", node_id, config_type, _id)
|
||||
result = default
|
||||
node_type_configs = self.get_configs(node_id, config_type)
|
||||
if node_type_configs:
|
||||
|
@ -220,7 +217,6 @@ class ConfigurableManager(object):
|
|||
:return: configurations
|
||||
:rtype: dict
|
||||
"""
|
||||
logging.debug("getting configs for node(%s) type(%s)", node_id, config_type)
|
||||
result = None
|
||||
node_configs = self.node_configurations.get(node_id)
|
||||
if node_configs:
|
||||
|
@ -235,7 +231,6 @@ class ConfigurableManager(object):
|
|||
:return: all configuration types for a node
|
||||
:rtype: dict
|
||||
"""
|
||||
logging.debug("getting all configs for node(%s)", node_id)
|
||||
return self.node_configurations.get(node_id)
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue