Npdu Configuration Module

class mtf.network_port.npdu_configuration.NPduConfiguration

Represents the configuration for NPDU

__init__()
start_npdu_manager()

Starts the NPDU manager using the current configuration.

Returns:

bool: The result of start_npdu_manager method from configuration, typically indicating success True or failure False

configure_npu_tunnel(channel_name, tunnel_id, is_multi_cast, is_output, is_input, local_ip, local_port, remote_ips, remote_port, transmission_timeout)

Configures an NPDU tunnel with specified parameters.

Args:

channel_name (str): The name of the channel to configure. tunnel_id (str): The identifier for the tunnel. is_multi_cast (bool): Indicates whether the tunnel is set for multicast. is_output (bool): Specifies if this tunnel is intended for output. is_input (bool): Specifies if this tunnel is intended for input. local_ip (str): The local IP address used by the tunnel. local_port (int): The local port number for the tunnel. remote_ips (list[str]): A list of remote IP addresses to connect to. remote_port (int): The remote port number for the connection. transmission_timeout (int): The timeout period for transmission, in milliseconds.

assign_vlan_tag(channel, tunnel, vlan_id, cfi, priority, is_outer_tag=False, data_link_ethertype=37120)

Assigns a VLAN tag to a tunnel.

Args:

channel (str): The name or identifier of the channel. tunnel (str): The identifier of the tunnel to which the VLAN tag should be assigned. vlan_id (int): The VLAN ID to assign to the tunnel. cfi (bool): The Canonical Format Indicator CFI for the VLAN tag. priority (int): The priority level associated with the VLAN tag. is_outer_tag (bool, optional): Whether to add an outer VLAN tag (default is False) data_link_ethertype (int, optional): The ethertype for the outer VLAN tag (default is 0x9100)

remove_tunnel(tunnel_id)

Removes the configuration for a specified tunnel.

Args:

tunnel_id (str): The identifier of the tunnel to remove from the configuration.

stop_npdu_manager()

Stops the NPDU manager using the current configuration.

Returns:

bool: The result of the stop_npdu_manager method from configuration, typically indicating success (True) or failure (False).

set_listener_channel_name(tunnel_id: str, listener_channel_name: str)

Sets the listener channel name for a specified tunnel.

Args:

tunnel_id (str): The identifier of the tunnel for which to set the listener channel. listener_channel_name (str): The name of the listener channel to assign to the tunnel.

Returns:

bool: The result of the set_npdu_listener_channel_name method from configuration, indicating success (True) or failure (False).

get_listener_channel_name(tunnel_id: str)

Retrieves the listener channel name for a specified tunnel.

Args:

tunnel_id (str): The identifier of the tunnel for which to set the listener channel.

Returns:

str: The listener channel name associated with the tunnel, or an error message if retrieval fails.