daemon/grpc/gui: further updates for a new working wireless node, added grpc support for control and additions to gui for creation

This commit is contained in:
Blake Harnden 2022-03-30 21:13:28 -07:00
parent e4a6ecf3c2
commit 84acb82c18
19 changed files with 399 additions and 90 deletions

View file

@ -4,14 +4,25 @@ from typing import Any, Dict, List
from core.config import Configuration
from core.configservice.base import ConfigService, ConfigServiceMode
from core.emane.nodes import EmaneNet
from core.nodes.base import CoreNodeBase
from core.nodes.base import CoreNodeBase, NodeBase
from core.nodes.interface import DEFAULT_MTU, CoreInterface
from core.nodes.network import WlanNode
from core.nodes.wireless import WirelessNode
GROUP: str = "FRR"
FRR_STATE_DIR: str = "/var/run/frr"
def is_wireless(node: NodeBase) -> bool:
"""
Check if the node is a wireless type node.
:param node: node to check type for
:return: True if wireless type, False otherwise
"""
return isinstance(node, (WlanNode, EmaneNet, WirelessNode))
def has_mtu_mismatch(iface: CoreInterface) -> bool:
"""
Helper to detect MTU mismatch and add the appropriate FRR
@ -324,7 +335,7 @@ class FRRBabel(FrrService, ConfigService):
return self.render_text(text, data)
def frr_iface_config(self, iface: CoreInterface) -> str:
if isinstance(iface.net, (WlanNode, EmaneNet)):
if is_wireless(iface.net):
text = """
babel wireless
no babel split-horizon