daemon: removed node.linktype as it is not needed, updated the one usage to align with other cases
This commit is contained in:
parent
5ee561b210
commit
7440c1d949
4 changed files with 3 additions and 15 deletions
|
@ -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__(
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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__(
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue