3.14. tldk

3.14.1. tldk_utils suite

3.14.1.1. Path for 2-node testing is set

Compute the path for the 2 node testing.

Arguments: - tg_node - TG node. Type: dictionary - dut_node - DUT node. Type: dictionary

Return: - No value returned.

Example:

| Path for 2-node testing is set | ${nodes[‘TG’]} | ${nodes[‘DUT1’] |


Append Nodes  ${tg_node}  ${dut_node}
Compute Path

3.14.1.2. Pick out the port used to execute test

Pick out the port used to execute the test.

Arguments: - No arguments.

Return: - No value returned.

Example:

| Pick out the port used to execute test |


${tg_port}  ${tg_node}=  First Interface
${dut_port}  ${dut_node}=  Last Interface
set suite variable  ${tg_node}
set suite variable  ${dut_node}
set suite variable  ${tg_port}
set suite variable  ${dut_port}

3.14.1.3. Get the pcap data

Get the pcap file detailed data.

Arguments: - file_prefix - file prefix. Type: dictionary

Return: - packet_num, dest_ip, is_ipv4 - a tuple of packet_num dest_ip, is_ipv4. Type: tuple(int, str, bool)

Example:

| Get the pcap data | ${tc01_file_prefix} |


${packet_num}  ${dest_ip}  ${is_ipv4}=  Get Pcap Info  ${file_prefix}
set suite variable  ${packet_num}
set suite variable  ${dest_ip}
set suite variable  ${is_ipv4}