daemon: refactored NodeData to reference a node instead of replicating fields as an intermediate passthrough, removed data() functions from nodes due to this change

This commit is contained in:
Blake Harnden 2020-06-18 09:06:31 -07:00
parent 1702fe256f
commit ecc3eb1c89
10 changed files with 52 additions and 129 deletions

View file

@ -11,7 +11,7 @@ import netaddr
from core import utils
from core.constants import EBTABLES_BIN, TC_BIN
from core.emulator.data import InterfaceData, LinkData, LinkOptions, NodeData
from core.emulator.data import InterfaceData, LinkData, LinkOptions
from core.emulator.enumerations import (
LinkTypes,
MessageFlags,
@ -862,19 +862,6 @@ class PtpNet(CoreNetwork):
)
super().attach(iface)
def data(
self, message_type: MessageFlags = MessageFlags.NONE, source: str = None
) -> Optional[NodeData]:
"""
Do not generate a Node Message for point-to-point links. They are
built using a link message instead.
:param message_type: purpose for the data object we are creating
:param source: source of node data
:return: node data object
"""
return None
def all_link_data(self, flags: MessageFlags = MessageFlags.NONE) -> List[LinkData]:
"""
Build CORE API TLVs for a point-to-point link. One Link message