WattsonNetworkNAT#
- class wattson.cosimulation.simulators.network.components.wattson_network_nat.WattsonNetworkNAT(*, id: str, system_name: str | None = None, display_name: str | None = None, network_emulator: ForwardRef('NetworkEmulator') | None = None, emulation_instance: Any | None = None, segment: str = 'main', config: dict = <factory>, _is_started: bool = False, logger: logging.Logger | None = None, interfaces: List[ForwardRef('WattsonNetworkInterface')] = <factory>, priority: float = 4, _services: Dict[int, wattson.services.wattson_service.WattsonService]=<factory>, _processes: List[subprocess.Popen] = <factory>, _min_interface_id: int = 0, _is_outside_namespace: bool = False, _child_nodes: List[ForwardRef('WattsonNetworkNode')] = <factory>, _parent: ForwardRef('WattsonNetworkNode') | None = None)#
Bases:
WattsonNetworkHost,NetworkNATMethods
allow_all_trafficallow_traffic_from_hostallow_traffic_from_subnetblock_all_trafficblock_traffic_from_hostclear_internet_routeget_class_idif self.nat_interface is not None:
get_prefixset_class_idset_internet_routestartstopCreates a dictionary for synchronization with a RemoteNetworkEntity.
update_allowed_hostsupdate_allowed_networksupdate_default_routeAttributes
class_idinterfacesconfigid- __init__(*, id: str, system_name: str | None = None, display_name: str | None = None, network_emulator: NetworkEmulator | None = None, emulation_instance: Any | None = None, segment: str = 'main', config: dict = <factory>, _is_started: bool = False, logger: Logger | None = None, interfaces: List[WattsonNetworkInterface] = <factory>, priority: float = 4, _services: Dict[int, ~wattson.services.wattson_service.WattsonService]=<factory>, _processes: List[Popen] = <factory>, _min_interface_id: int = 0, _is_outside_namespace: bool = False, _child_nodes: List[WattsonNetworkNode] = <factory>, _parent: WattsonNetworkNode | None = None) None#
- get_nat_interface() WattsonNetworkInterface | None#
if self.nat_interface is not None:
- to_remote_representation(force_state_synchronization: bool = True) RemoteNetworkEntityRepresentation#
Creates a dictionary for synchronization with a RemoteNetworkEntity.
- Parameters:
force_state_synchronization (bool, optional) – Whether to force a synchronization of the internal state with the actual state (Default value = True)
- Returns:
A dictionary representation of this WattsonNetworkEntity for synchronization with a RemoteNetworkEntity.
- Return type: