diff --git a/pacman/model/resources/iptag_resource.py b/pacman/model/resources/iptag_resource.py index 72a5d2ead..4e6ea3206 100644 --- a/pacman/model/resources/iptag_resource.py +++ b/pacman/model/resources/iptag_resource.py @@ -36,7 +36,7 @@ class IPtagResource(object): "_traffic_identifier") def __init__( - self, ip_address: Optional[str], port: Optional[int], + self, ip_address: str, port: int, strip_sdp: bool, tag: Optional[int] = None, traffic_identifier: str = "DEFAULT"): """ @@ -60,7 +60,7 @@ def __init__( self._traffic_identifier = traffic_identifier @property - def ip_address(self) -> Optional[str]: + def ip_address(self) -> str: """ The IP address to assign to the tag. @@ -69,7 +69,7 @@ def ip_address(self) -> Optional[str]: return self._ip_address @property - def port(self) -> Optional[int]: + def port(self) -> int: """ The port of the tag. diff --git a/pacman/operations/tag_allocator_algorithms/basic_tag_allocator.py b/pacman/operations/tag_allocator_algorithms/basic_tag_allocator.py index b4fa35a18..39a62065a 100644 --- a/pacman/operations/tag_allocator_algorithms/basic_tag_allocator.py +++ b/pacman/operations/tag_allocator_algorithms/basic_tag_allocator.py @@ -127,11 +127,9 @@ def __create_tag( tag: int) -> IPTag: ethernet_ip = eth_chip.ip_address assert ethernet_ip is not None - tag_ip = iptag.ip_address - assert tag_ip is not None return IPTag( ethernet_ip, placement.x, placement.y, - tag, tag_ip, iptag.port, + tag, iptag.ip_address, iptag.port, iptag.strip_sdp, iptag.traffic_identifier)