daemon: fixed naming issues with wireless/emane model attributes, fixed issue with emane controlnet updown script
This commit is contained in:
parent
2e4d0e0cea
commit
8ba169c758
10 changed files with 64 additions and 57 deletions
|
@ -245,9 +245,14 @@ class DeviceElement(NodeElement):
|
|||
class NetworkElement(NodeElement):
|
||||
def __init__(self, session: "Session", node: NodeBase) -> None:
|
||||
super().__init__(session, node, "network")
|
||||
if isinstance(self.node, (WlanNode, EmaneNet)):
|
||||
if self.node.model:
|
||||
add_attribute(self.element, "model", self.node.model.name)
|
||||
if isinstance(self.node, WlanNode):
|
||||
if self.node.wireless_model:
|
||||
add_attribute(self.element, "model", self.node.wireless_model.name)
|
||||
if self.node.mobility:
|
||||
add_attribute(self.element, "mobility", self.node.mobility.name)
|
||||
if isinstance(self.node, EmaneNet):
|
||||
if self.node.wireless_model:
|
||||
add_attribute(self.element, "model", self.node.wireless_model.name)
|
||||
if self.node.mobility:
|
||||
add_attribute(self.element, "mobility", self.node.mobility.name)
|
||||
if isinstance(self.node, GreTapBridge):
|
||||
|
|
|
@ -162,12 +162,14 @@ def build_platform_xml(
|
|||
"""
|
||||
# create top level platform element
|
||||
platform_element = etree.Element("platform")
|
||||
for configuration in emane_net.model.platform_config:
|
||||
for configuration in emane_net.wireless_model.platform_config:
|
||||
name = configuration.id
|
||||
value = config[configuration.id]
|
||||
add_param(platform_element, name, value)
|
||||
add_param(
|
||||
platform_element, emane_net.model.platform_controlport, f"0.0.0.0:{nem_port}"
|
||||
platform_element,
|
||||
emane_net.wireless_model.platform_controlport,
|
||||
f"0.0.0.0:{nem_port}",
|
||||
)
|
||||
|
||||
# build nem xml
|
||||
|
@ -177,7 +179,7 @@ def build_platform_xml(
|
|||
)
|
||||
|
||||
# create model based xml files
|
||||
emane_net.model.build_xml_files(config, iface)
|
||||
emane_net.wireless_model.build_xml_files(config, iface)
|
||||
|
||||
# check if this is an external transport
|
||||
if is_external(config):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue