diff --git a/daemon/core/emane/nodes.py b/daemon/core/emane/nodes.py index a32814e1..5556bf68 100644 --- a/daemon/core/emane/nodes.py +++ b/daemon/core/emane/nodes.py @@ -9,13 +9,7 @@ from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Type from core.emulator.data import InterfaceData, LinkData, LinkOptions from core.emulator.distributed import DistributedServer -from core.emulator.enumerations import ( - EventTypes, - LinkTypes, - MessageFlags, - NodeTypes, - RegisterTlvs, -) +from core.emulator.enumerations import EventTypes, MessageFlags, NodeTypes, RegisterTlvs from core.errors import CoreCommandError, CoreError from core.nodes.base import CoreNetworkBase, CoreNode from core.nodes.interface import CoreInterface @@ -156,7 +150,6 @@ class EmaneNet(CoreNetworkBase): """ apitype: NodeTypes = NodeTypes.EMANE - linktype: LinkTypes = LinkTypes.WIRED type: str = "wlan" def __init__( diff --git a/daemon/core/nodes/base.py b/daemon/core/nodes/base.py index a9125df1..d9f4a7f2 100644 --- a/daemon/core/nodes/base.py +++ b/daemon/core/nodes/base.py @@ -14,7 +14,7 @@ import netaddr from core import utils from core.configservice.dependencies import ConfigServiceDependencies from core.emulator.data import InterfaceData, LinkOptions -from core.emulator.enumerations import LinkTypes, NodeTypes +from core.emulator.enumerations import NodeTypes from core.errors import CoreCommandError, CoreError from core.executables import BASH, MOUNT, TEST, VCMD, VNODED from core.nodes.interface import DEFAULT_MTU, CoreInterface @@ -796,8 +796,6 @@ class CoreNetworkBase(NodeBase): Base class for networks """ - linktype: LinkTypes = LinkTypes.WIRED - def __init__( self, session: "Session", diff --git a/daemon/core/nodes/network.py b/daemon/core/nodes/network.py index 73eda0da..0c8c6261 100644 --- a/daemon/core/nodes/network.py +++ b/daemon/core/nodes/network.py @@ -14,7 +14,6 @@ import netaddr from core import utils from core.emulator.data import InterfaceData, LinkData from core.emulator.enumerations import ( - LinkTypes, MessageFlags, NetworkPolicy, NodeTypes, @@ -690,7 +689,6 @@ class WlanNode(CoreNetwork): """ apitype: NodeTypes = NodeTypes.WIRELESS_LAN - linktype: LinkTypes = LinkTypes.WIRED policy: NetworkPolicy = NetworkPolicy.DROP def __init__( diff --git a/daemon/core/services/quagga.py b/daemon/core/services/quagga.py index 4c13d4e2..a2f06bec 100644 --- a/daemon/core/services/quagga.py +++ b/daemon/core/services/quagga.py @@ -6,7 +6,6 @@ from typing import Optional, Tuple import netaddr from core.emane.nodes import EmaneNet -from core.emulator.enumerations import LinkTypes from core.nodes.base import CoreNode, NodeBase from core.nodes.interface import DEFAULT_MTU, CoreInterface from core.nodes.network import PtpNet, WlanNode @@ -553,7 +552,7 @@ class Babel(QuaggaService): @classmethod def generate_quagga_iface_config(cls, node: CoreNode, iface: CoreInterface) -> str: - if iface.net and iface.net.linktype == LinkTypes.WIRELESS: + if is_wireless(iface.net): return " babel wireless\n no babel split-horizon\n" else: return " babel wired\n babel split-horizon\n"