daemon: fixed sdt icons due to legacy gui removal, updated node.type to node.model to avoid variables with the same names with different meanings

This commit is contained in:
Blake Harnden 2022-04-05 13:39:57 -07:00
parent ea751727b4
commit 5ee561b210
15 changed files with 73 additions and 93 deletions

View file

@ -62,11 +62,9 @@ class NodeBase(abc.ABC):
if _id is None:
_id = session.next_node_id()
self.id: int = _id
if name is None:
name = f"o{self.id}"
self.name: str = name
self.name: str = name or f"o{self.id}"
self.server: "DistributedServer" = server
self.type: Optional[str] = None
self.model: Optional[str] = None
self.services: CoreServices = []
self.ifaces: Dict[int, CoreInterface] = {}
self.iface_id: int = 0

View file

@ -663,7 +663,6 @@ class SwitchNode(CoreNetwork):
apitype: NodeTypes = NodeTypes.SWITCH
policy: NetworkPolicy = NetworkPolicy.ACCEPT
type: str = "lanswitch"
class HubNode(CoreNetwork):
@ -674,7 +673,6 @@ class HubNode(CoreNetwork):
apitype: NodeTypes = NodeTypes.HUB
policy: NetworkPolicy = NetworkPolicy.ACCEPT
type: str = "hub"
def startup(self) -> None:
"""
@ -694,7 +692,6 @@ class WlanNode(CoreNetwork):
apitype: NodeTypes = NodeTypes.WIRELESS_LAN
linktype: LinkTypes = LinkTypes.WIRED
policy: NetworkPolicy = NetworkPolicy.DROP
type: str = "wlan"
def __init__(
self,
@ -794,4 +791,3 @@ class TunnelNode(GreTapBridge):
apitype: NodeTypes = NodeTypes.TUNNEL
policy: NetworkPolicy = NetworkPolicy.ACCEPT
type: str = "tunnel"

View file

@ -29,7 +29,6 @@ class Rj45Node(CoreNodeBase):
"""
apitype: NodeTypes = NodeTypes.RJ45
type: str = "rj45"
def __init__(
self,