diff options
author | Vratko Polak <vrpolak@cisco.com> | 2019-04-16 16:32:59 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2019-04-17 10:39:18 +0000 |
commit | 258f2666143138f20d84665fcfed53475bc88041 (patch) | |
tree | be45d45e1913bd0c9c738662efea52deb16ffa9c /resources/libraries/robot | |
parent | c481185ca0662f4e7800af2ae6a8f3f81c753470 (diff) |
Clean up traffic_profile vs osi_layer
The two types were not well distinguished before.
Error introduced in:
https://gerrit.fd.io/r/#/c/17811/84/resources/libraries/robot/performance/performance_setup.robot@255
Error hotfixed in:
https://gerrit.fd.io/r/#/c/18847/4/resources/libraries/robot/shared/default.robot@109
+ Rename some arguments and improve method docstrings.
Newly introduced argument name osi_layer should be dissimilar enough.
Change-Id: Ie0f6f97dc010fc6477f09c54574970f1d15462e2
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/robot')
3 files changed, 61 insertions, 57 deletions
diff --git a/resources/libraries/robot/performance/performance_setup.robot b/resources/libraries/robot/performance/performance_setup.robot index 11ce560fd6..4f3b0bd01a 100644 --- a/resources/libraries/robot/performance/performance_setup.robot +++ b/resources/libraries/robot/performance/performance_setup.robot @@ -240,19 +240,19 @@ | | ... | argument. Initializes traffic generator. | | ... | | ... | *Arguments:* -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string | | ... | - nic_name - Interface model. Type: string | | ... | | ... | *Example:* | | ... | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \| | | ... -| | [Arguments] | ${traffic_profile} | ${nic_name} +| | [Arguments] | ${osi_layer} | ${nic_name} | | ... | | Set variables in 2-node circular topology with DUT interface model | | ... | ${nic_name} | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2} -| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${traffic_profile} +| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer} | Set up 2-node-switched performance topology with DUT's NIC model | | [Documentation] @@ -262,7 +262,7 @@ | | ... | argument. Initializes traffic generator. | | ... | | ... | *Arguments:* -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string | | ... | - nic_name - Interface model. Type: string | | ... | - tg_if1_dest_mac - Interface 1 destination MAC address. Type: string | | ... | - tg_if2_dest_mac - Interface 2 destination MAC address. Type: string @@ -272,13 +272,13 @@ | | ... | \| 2-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \ | | ... | \| 22:22:33:44:55:66 \| 22:22:33:44:55:55 \| | | ... -| | [Arguments] | ${traffic_profile} | ${nic_name} | ${tg_if1_dest_mac} +| | [Arguments] | ${osi_layer} | ${nic_name} | ${tg_if1_dest_mac} | | ... | ${tg_if2_dest_mac} | | ... | | Set variables in 2-node circular topology with DUT interface model | | ... | ${nic_name} | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2} -| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${traffic_profile} +| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer} | | ... | ${tg_if1_dest_mac} | ${tg_if2_dest_mac} | Set up 3-node performance topology with DUT's NIC model @@ -289,7 +289,7 @@ | | ... | argument. Initializes traffic generator. | | ... | | ... | *Arguments:* -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string | | ... | - nic_name - Interface model. Type: string | | ... | | ... | *Example:* @@ -297,12 +297,12 @@ | | ... | \| Set up 3-node performance topology with DUT's NIC model \| L2 \ | | ... | \| Intel-X520-DA2 \| | | ... -| | [Arguments] | ${traffic_profile} | ${nic_name} +| | [Arguments] | ${osi_layer} | ${nic_name} | | ... | | Set variables in 3-node circular topology with DUT interface model | | ... | ${nic_name} | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2} -| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${traffic_profile} +| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer} | Set up 3-node performance topology with DUT's NIC model with double link between DUTs | | [Documentation] @@ -312,7 +312,7 @@ | | ... | argument. Initializes traffic generator. | | ... | | ... | *Arguments:* -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string | | ... | - nic_name - Interface model. Type: string | | ... | | ... | *Example:* @@ -320,12 +320,12 @@ | | ... | \| Set up 3-node performance topology with DUT's NIC model with \ | | ... | double link between DUTs \| L2 \| Intel-X520-DA2 \| | | ... -| | [Arguments] | ${traffic_profile} | ${nic_name} +| | [Arguments] | ${osi_layer} | ${nic_name} | | ... | | Set variables in 3-node circular topology with DUT interface model with double link between DUTs | | ... | ${nic_name} | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2} -| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${traffic_profile} +| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer} | Set up DPDK 2-node performance topology with DUT's NIC model | | [Documentation] @@ -335,7 +335,7 @@ | | ... | environment. | | ... | | ... | *Arguments:* -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string | | ... | - nic_name - Interface model. Type: string | | ... | | ... | *Example:* @@ -343,12 +343,12 @@ | | ... | \| Set up DPDK 2-node performance topology with DUT's NIC model \ | | ... | \| L2 \| Intel-X520-DA2 \| | | ... -| | [Arguments] | ${traffic_profile} | ${nic_name} +| | [Arguments] | ${osi_layer} | ${nic_name} | | ... | | Set variables in 2-node circular topology with DUT interface model | | ... | ${nic_name} | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2} -| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${traffic_profile} +| | ... | ${dut1} | ${dut1_if1} | ${dut1} | ${dut1_if2} | ${osi_layer} | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2} | Set up DPDK 3-node performance topology with DUT's NIC model @@ -359,19 +359,19 @@ | | ... | environment. | | ... | | ... | *Arguments:* -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string | | ... | - nic_name - Interface model. Type: string | | ... | | ... | *Example:* | | ... | | ... | \| 3-node Performance Suite Setup \| L2 \| Intel-X520-DA2 \| | | ... -| | [Arguments] | ${traffic_profile} | ${nic_name} +| | [Arguments] | ${osi_layer} | ${nic_name} | | ... | | Set variables in 3-node circular topology with DUT interface model | | ... | ${nic_name} | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2} -| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${traffic_profile} +| | ... | ${dut1} | ${dut1_if1} | ${dut2} | ${dut2_if2} | ${osi_layer} | | Initialize DPDK Environment | ${dut1} | ${dut1_if1} | ${dut1_if2} | | Initialize DPDK Environment | ${dut2} | ${dut2_if1} | ${dut2_if2} @@ -384,7 +384,7 @@ | | ... | It configures PCI device with VFs on all DUTs. | | ... | | ... | *Arguments:* -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string | | ... | - nic_name - Interface model. Type: string | | ... | - vf_driver - Virtual function driver. Type: string | | ... | - numvfs - Number of VFs. Type: integer @@ -394,17 +394,17 @@ | | ... | \| Set up SRIOV 2-node performance topology with DUT's NIC model \ | | ... | \| L2 \| Intel-X520-DA2 \| AVF \| | | ... -| | [Arguments] | ${traffic_profile} | ${nic_name} | ${vf_driver} +| | [Arguments] | ${osi_layer} | ${nic_name} | ${vf_driver} | | ... | ${numvfs}=${1} | | ... | | Set variables in 2-node circular topology with DUT interface model | | ... | ${nic_name} | | Run Keyword If | '${vf_driver}' == 'AVF' | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs} -| | ... | traffic_profile=${traffic_profile} +| | ... | osi_layer=${osi_layer} | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2} | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut1} | ${dut1_if2_vf0} -| | ... | ${traffic_profile} +| | ... | ${osi_layer} | Set up SRIOV 3-node performance topology with DUT's NIC model | | [Documentation] @@ -415,7 +415,7 @@ | | ... | It configures PCI device with VFs on all DUTs. | | ... | | ... | *Arguments:* -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string | | ... | - nic_name - Interface model. Type: string | | ... | - vf_driver - Virtual function driver. Type: string | | ... | - numvfs - Number of VFs. Type: integer @@ -425,17 +425,17 @@ | | ... | \| Set up SRIOV 3-node performance topology with DUT's NIC model \ | | ... | \| L2 \| Intel-X520-DA2 \| AVF \| | | ... -| | [Arguments] | ${traffic_profile} | ${nic_name} | ${vf_driver} +| | [Arguments] | ${osi_layer} | ${nic_name} | ${vf_driver} | | ... | ${numvfs}=${1} | | ... | | Set variables in 3-node circular topology with DUT interface model | | ... | ${nic_name} | | Run Keyword If | '${vf_driver}' == 'AVF' | | ... | Configure AVF interfaces on all DUTs | numvfs=${numvfs} -| | ... | traffic_profile=${traffic_profile} +| | ... | osi_layer=${osi_layer} | | Initialize traffic generator | ${tg} | ${tg_if1} | ${tg_if2} | | ... | ${dut1} | ${dut1_if1_vf0} | ${dut2} | ${dut2_if2_vf0} -| | ... | ${traffic_profile} +| | ... | ${osi_layer} | Set up IPSec performance test suite | | [Documentation] @@ -448,7 +448,7 @@ | | ... | TODO CSIT-1481: Crypto HW should be read from topology file instead. | | ... | | ... | *Arguments:* -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - osi_layer - OSI Layer type to initialize TG with. Type: string | | ... | - nic_name - Interface model. Type: string | | ... | - crypto_type - Crypto device type - HW_DH895xcc or HW_C3xxx or | | ... | SW_cryptodev. Type: string, default value: HW_DH895xcc @@ -458,10 +458,10 @@ | | ... | \| Set up IPSec performance test suite \| L2 \ | | ... | \| Intel-X520-DA2 \| HW_DH895xcc \| | | ... -| | [Arguments] | ${traffic_profile} | ${nic_name} | ${crypto_type}=HW_DH895xcc +| | [Arguments] | ${osi_layer} | ${nic_name} | ${crypto_type}=HW_DH895xcc | | ... | | Set up 3-node performance topology with DUT's NIC model -| | ... | ${traffic_profile} | ${nic_name} +| | ... | ${osi_layer} | ${nic_name} | | Return From Keyword If | '${crypto_type}' == 'SW_cryptodev' | | ${numvfs}= | Set Variable If | | ... | '${crypto_type}' == 'HW_DH895xcc' | ${32} @@ -663,7 +663,7 @@ | | ... | | ... | *Test Variables needed:* | | ... | - frame_size - L2 Frame Size [B]. Type: integer -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - traffic_profile - Profile name to run debug trial with. Type: string | | ... | - nodes - Parsed information object. Type: dict | | ... | | ... | *Example:* @@ -703,7 +703,7 @@ | | ... | | ... | *Test Variables needed:* | | ... | - frame_size - L2 Frame Size [B]. Type: integer -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - traffic_profile - Profile name to run debug trial with. Type: string | | ... | | ... | *Arguments:* | | ... | - dut1_node - Node where to clean qemu. Type: dictionary @@ -733,7 +733,7 @@ | | ... | | ... | *Test Variables needed:* | | ... | - frame_size - L2 Frame Size [B]. Type: integer -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - traffic_profile - Profile name to run debug trial with. Type: string | | ... | | ... | *Arguments:* | | ... | - dut1_node - Node where to clean qemu. Type: dictionary @@ -780,7 +780,7 @@ | | ... | | ... | *Test Variables needed:* | | ... | - frame_size - L2 Frame Size [B]. Type: integer -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - traffic_profile - Profile name to run debug trial with. Type: string | | ... | | ... | *Example:* | | ... @@ -796,7 +796,7 @@ | | ... | | ... | *Test Variables needed:* | | ... | - frame_size - L2 Frame Size [B]. Type: integer -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - traffic_profile - Profile name to run debug trial with. Type: string | | ... | | ... | *Example:* | | ... @@ -813,7 +813,7 @@ | | ... | | ... | *Test Variables needed:* | | ... | - frame_size - L2 Frame Size [B]. Type: integer -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - traffic_profile - Profile name to run debug trial with. Type: string | | ... | | ... | *Example:* | | ... @@ -843,7 +843,7 @@ | | ... | | ... | *Test Variables needed:* | | ... | - frame_size - L2 Frame Size [B]. Type: integer -| | ... | - traffic_profile - Profile name to initialize TG with. Type: string +| | ... | - traffic_profile - Profile name to run debug trial with. Type: string | | ... | | ... | *Example:* | | ... diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot index 80fddc671a..45d8efe535 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -53,10 +53,11 @@ | | ... | Some inputs are read from variables to streamline suites. | | ... | | ... | *Test (or broader scope) variables read:* -| | ... | - traffic_profile - Topology type. Type: string -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str -| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. -| | ... | Type: float +| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | Type: string +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str +| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | Type: float | | ... | | ... | *Arguments:* | | ... | - packet_loss_ratio - Accepted loss during search. Type: float @@ -101,10 +102,11 @@ | | ... | Some inputs are read from variables to streamline suites. | | ... | | ... | *Test (or broader scope) variables read:* -| | ... | - traffic_profile - Topology type. Type: string -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str -| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. -| | ... | Type: float +| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | Type: string +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str +| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | Type: float | | ... | | ... | *Arguments:* | | ... | - packet_loss_ratio - Accepted loss during search. Type: float @@ -261,7 +263,8 @@ | | ... | - duration - Duration of traffic run [s]. Type: integer | | ... | - rate - Rate for sending packets. Type: string | | ... | - frame_size - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string -| | ... | - traffic_profile - Topology type. Type: string +| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | Type: string | | ... | - fail_on_loss - If True, the keyword fails if loss occurred. | | ... | Type: boolean | | ... @@ -284,10 +287,11 @@ | | ... | Some inputs are read from variables to streamline suites. | | ... | | ... | *Test (or broader scope) variables read:* -| | ... | - traffic_profile - Topology type. Type: string -| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str -| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. -| | ... | Type: float +| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | Type: string +| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str +| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps]. +| | ... | Type: float | | ... | | ... | *Arguments:* | | ... | - subsamples - How many trials in this measurement. Type: int @@ -326,7 +330,8 @@ | | ... | - trial_duration - Duration of single trial [s]. Type: float | | ... | - rate - Rate for sending packets. Type: string | | ... | - frame_size - L2 Frame Size [B]. Type: integer/string -| | ... | - traffic_profile - Topology type. Type: string +| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | Type: string | | ... | - subsamples - How many trials in this measurement. Type: int | | ... | - unidirection - False if traffic is bidirectional. Type: boolean | | ... | - tx_port - TX port of TG, default 0. Type: integer @@ -377,7 +382,8 @@ | | ... | - duration - Duration of traffic run [s]. Type: integer | | ... | - rate - Rate for sending packets. Type: string | | ... | - frame_size - L2 Frame Size [B] or IMIX_v4_1. Type: integer/string -| | ... | - traffic_profile - Topology type. Type: string +| | ... | - traffic_profile - Name of module defining traffc for measurements. +| | ... | Type: string | | ... | - unidirection - False if traffic is bidirectional. Type: boolean | | ... | - tx_port - TX port of TG, default 0. Type: integer | | ... | - rx_port - RX port of TG, default 1. Type: integer diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index 42c4f28cdc..dd4fb63c3f 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -106,23 +106,21 @@ | | ... | *Arguments:* | | ... | - numvfs - Number of VFs to initialize, 0 - disable the VFs | | ... | (Optional). Type: integer, default value: ${1} -| | ... | - traffic_profile - A value affecting behavior, such as spoofing. +| | ... | - osi_layer - OSI Layer type to initialize TG with. | | ... | (Optional). Type: string, default value: L2 -| | ... | Note: This is NOT the usual traffic profile -| | ... | (which is python module name to initialize TG with). | | ... | | ... | *Example:* | | ... | | ... | \| Configure AVF device on all DUTs \| ${1} \| L2 \| | | ... -| | [Arguments] | ${numvfs}=${1} | ${traffic_profile}=L2 +| | [Arguments] | ${numvfs}=${1} | ${osi_layer}=L2 | | ... | | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | ${if1_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if1} -| | | ... | numvfs=${numvfs} | traffic_type=${traffic_profile} +| | | ... | numvfs=${numvfs} | osi_layer=${osi_layer} | | | ${if2_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if2} -| | | ... | numvfs=${numvfs} | traffic_type=${traffic_profile} +| | | ... | numvfs=${numvfs} | osi_layer=${osi_layer} # Currently only one AVF is supported. | | | Set Suite Variable | ${${dut}_if1_vf0} | ${if1_avf_arr[0]} | | | Set Suite Variable | ${${dut}_if2_vf0} | ${if2_avf_arr[0]} |