removed devname from linkconfig as the only usage was of it was using a parametr that was already being passed in
This commit is contained in:
parent
dd13bc8379
commit
26b0868f65
8 changed files with 9 additions and 45 deletions
|
@ -23,7 +23,6 @@ def link_config(
|
|||
node: Union[CoreNetworkBase, PhysicalNode],
|
||||
interface: CoreInterface,
|
||||
link_options: LinkOptions,
|
||||
devname: str = None,
|
||||
interface_two: CoreInterface = None,
|
||||
) -> None:
|
||||
"""
|
||||
|
@ -32,7 +31,6 @@ def link_config(
|
|||
:param node: network to configure link for
|
||||
:param interface: interface to configure
|
||||
:param link_options: data to configure link with
|
||||
:param devname: device name, default is None
|
||||
:param interface_two: other interface associated, default is None
|
||||
:return: nothing
|
||||
"""
|
||||
|
@ -44,7 +42,6 @@ def link_config(
|
|||
link_options.dup,
|
||||
link_options.jitter,
|
||||
interface_two,
|
||||
devname,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -394,9 +394,7 @@ class Session:
|
|||
|
||||
if not link_options.unidirectional:
|
||||
interface.swapparams("_params_up")
|
||||
link_config(
|
||||
net_two, interface, link_options, devname=interface.name
|
||||
)
|
||||
link_config(net_two, interface, link_options)
|
||||
interface.swapparams("_params_up")
|
||||
|
||||
# a tunnel node was found for the nodes
|
||||
|
@ -606,9 +604,7 @@ class Session:
|
|||
|
||||
if upstream:
|
||||
interface.swapparams("_params_up")
|
||||
link_config(
|
||||
net_one, interface, link_options, devname=interface.name
|
||||
)
|
||||
link_config(net_one, interface, link_options)
|
||||
interface.swapparams("_params_up")
|
||||
else:
|
||||
link_config(net_one, interface, link_options)
|
||||
|
@ -618,12 +614,7 @@ class Session:
|
|||
link_config(net_two, interface, link_options)
|
||||
else:
|
||||
interface.swapparams("_params_up")
|
||||
link_config(
|
||||
net_two,
|
||||
interface,
|
||||
link_options,
|
||||
devname=interface.name,
|
||||
)
|
||||
link_config(net_two, interface, link_options)
|
||||
interface.swapparams("_params_up")
|
||||
else:
|
||||
raise CoreError("modify link for unknown nodes")
|
||||
|
@ -647,18 +638,10 @@ class Session:
|
|||
):
|
||||
continue
|
||||
|
||||
link_config(
|
||||
net_one,
|
||||
interface_one,
|
||||
link_options,
|
||||
interface_two=interface_two,
|
||||
)
|
||||
link_config(net_one, interface_one, link_options, interface_two)
|
||||
if not link_options.unidirectional:
|
||||
link_config(
|
||||
net_one,
|
||||
interface_two,
|
||||
link_options,
|
||||
interface_two=interface_one,
|
||||
net_one, interface_two, link_options, interface_one
|
||||
)
|
||||
finally:
|
||||
if node_one:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue