avoid writing link options to xml for emane/wlan links
This commit is contained in:
parent
62c0011caa
commit
47ef5ec14d
1 changed files with 26 additions and 21 deletions
|
@ -13,7 +13,7 @@ from core.errors import CoreXmlError
|
||||||
from core.nodes.base import CoreNetworkBase, CoreNodeBase, NodeBase
|
from core.nodes.base import CoreNetworkBase, CoreNodeBase, NodeBase
|
||||||
from core.nodes.docker import DockerNode
|
from core.nodes.docker import DockerNode
|
||||||
from core.nodes.lxd import LxcNode
|
from core.nodes.lxd import LxcNode
|
||||||
from core.nodes.network import CtrlNet
|
from core.nodes.network import CtrlNet, WlanNode
|
||||||
from core.services.coreservices import CoreService
|
from core.services.coreservices import CoreService
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
@ -559,7 +559,12 @@ class CoreXmlWriter:
|
||||||
)
|
)
|
||||||
link_element.append(interface_two)
|
link_element.append(interface_two)
|
||||||
|
|
||||||
# check for options
|
# check for options, don't write for emane/wlan links
|
||||||
|
node_one = self.session.get_node(link_data.node1_id)
|
||||||
|
node_two = self.session.get_node(link_data.node2_id)
|
||||||
|
is_node_one_wireless = isinstance(node_one, (WlanNode, EmaneNet))
|
||||||
|
is_node_two_wireless = isinstance(node_two, (WlanNode, EmaneNet))
|
||||||
|
if not any([is_node_one_wireless, is_node_two_wireless]):
|
||||||
options = etree.Element("options")
|
options = etree.Element("options")
|
||||||
add_attribute(options, "delay", link_data.delay)
|
add_attribute(options, "delay", link_data.delay)
|
||||||
add_attribute(options, "bandwidth", link_data.bandwidth)
|
add_attribute(options, "bandwidth", link_data.bandwidth)
|
||||||
|
|
Loading…
Reference in a new issue