turned transport type usages of raw and virtual across the board to an enumerated type

This commit is contained in:
Blake Harnden 2020-05-29 22:48:00 -07:00
parent 8ad3f7961a
commit b034ba6cc3
8 changed files with 61 additions and 49 deletions

View file

@ -8,7 +8,13 @@ from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Type
from core.emulator.data import LinkData
from core.emulator.distributed import DistributedServer
from core.emulator.enumerations import LinkTypes, MessageFlags, NodeTypes, RegisterTlvs
from core.emulator.enumerations import (
LinkTypes,
MessageFlags,
NodeTypes,
RegisterTlvs,
TransportType,
)
from core.nodes.base import CoreNetworkBase
from core.nodes.interface import CoreInterface
@ -173,7 +179,7 @@ class EmaneNet(CoreNetworkBase):
emanetransportd terminates.
"""
for netif in self.netifs():
if "virtual" in netif.transport_type.lower():
if netif.transport_type == TransportType.VIRTUAL:
netif.shutdown()
netif.poshook = None