diff options
| author | Juraj Linkeš <[email protected]> | 2023-07-19 16:13:03 +0200 |
|---|---|---|
| committer | Thomas Monjalon <[email protected]> | 2023-07-24 16:21:41 +0200 |
| commit | d99250aad1175f152ff1dd13639362f0a207c784 (patch) | |
| tree | d1fce7c65a8c87c9065d29a8853c556456f3e1f9 /dts/framework/testbed_model/node.py | |
| parent | 06079190dc230a36d2c8ec3497c483e425db97fd (diff) | |
dts: add basic UDP test case
The test cases showcases the scapy traffic generator code.
Signed-off-by: Juraj Linkeš <[email protected]>
Acked-by: Jeremy Spewock <[email protected]>
Diffstat (limited to 'dts/framework/testbed_model/node.py')
| -rw-r--r-- | dts/framework/testbed_model/node.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/dts/framework/testbed_model/node.py b/dts/framework/testbed_model/node.py index c666dfbf4e..fc01e0bf8e 100644 --- a/dts/framework/testbed_model/node.py +++ b/dts/framework/testbed_model/node.py @@ -8,7 +8,8 @@ A node is a generic host that DTS connects to and manages. """ from abc import ABC -from typing import Any, Callable, Type +from ipaddress import IPv4Interface, IPv6Interface +from typing import Any, Callable, Type, Union from framework.config import ( BuildTargetConfiguration, @@ -221,6 +222,17 @@ class Node(ABC): """ self.main_session.configure_port_state(port, enable) + def configure_port_ip_address( + self, + address: Union[IPv4Interface, IPv6Interface], + port: Port, + delete: bool = False, + ) -> None: + """ + Configure the IP address of a port on this node. + """ + self.main_session.configure_port_ip_address(address, port, delete) + def close(self) -> None: """ Close all connections and free other resources. |
