daemon: added usage of ABC to NodeBase, CoreNodeBase, and CoreNetworkBase to help enforce accounting for abstract functions

This commit is contained in:
Blake Harnden 2020-06-14 13:35:06 -07:00
parent f5916fab5b
commit 0462c1b084
3 changed files with 92 additions and 76 deletions

View file

@ -88,6 +88,9 @@ class EmaneNet(CoreNetworkBase):
def unlink(self, netif1: CoreInterface, netif2: CoreInterface) -> None:
pass
def linknet(self, net: "CoreNetworkBase") -> CoreInterface:
raise CoreError("emane networks cannot be linked to other networks")
def updatemodel(self, config: Dict[str, str]) -> None:
if not self.model:
raise CoreError(f"no model set to update for node({self.name})")