Skip to content

Commit

Permalink
removed get_value
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Nov 13, 2024
1 parent c7c1409 commit ea86fd9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
10 changes: 0 additions & 10 deletions pacman/model/resources/iptag_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,6 @@ def tag(self) -> Optional[int]:
"""
return self._tag

def get_value(self):
"""
:return: The description of the IP tag.
:rtype: list(str, int, bool, int, str)
"""
return [
self._ip_address, self._port, self._strip_sdp, self._tag,
self._traffic_identifier
]

def __repr__(self) -> str:
return (
f"IPTagResource(ip_address={self._ip_address}, port={self._port}, "
Expand Down
7 changes: 0 additions & 7 deletions pacman/model/resources/reverse_iptag_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@ def tag(self) -> Optional[int]:
"""
return self._tag

def get_value(self):
"""
:return: The description of the reverse IP tag.
:rtype: list(int, int, int)
"""
return [self._port, self._sdp_port, self._tag]

def __repr__(self) -> str:
return (f"ReverseIPTagResource(port={self._port}, "
f"sdp_port={self._sdp_port}, tag={self._tag})")
Expand Down
2 changes: 0 additions & 2 deletions unittests/model_tests/resources_tests/test_resources_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ def test_tags_resources(self):
self.assertEqual(iptr.strip_sdp, 3)
self.assertEqual(iptr.tag, 4)
self.assertEqual(iptr.traffic_identifier, 5)
self.assertEqual(iptr.get_value(), ['1.2.3.4', 2, 3, 4, 5])
self.assertEqual(str(iptr),
"IPTagResource(ip_address=1.2.3.4, port=2, "
"strip_sdp=3, tag=4, traffic_identifier=5)")
Expand All @@ -136,7 +135,6 @@ def test_tags_resources(self):
self.assertEqual(riptr.port, 1)
self.assertEqual(riptr.sdp_port, 2)
self.assertEqual(riptr.tag, 3)
self.assertEqual(riptr.get_value(), [1, 2, 3])
self.assertEqual(str(riptr),
"ReverseIPTagResource(port=1, sdp_port=2, tag=3)")
riptr2 = ReverseIPtagResource(1, 2, 3)
Expand Down

0 comments on commit ea86fd9

Please sign in to comment.