From 0c0217c3219f2a7e9273c830663a7d3374e4b5c5 Mon Sep 17 00:00:00 2001 From: Jan Gelety Date: Fri, 14 Sep 2018 11:00:33 +0200 Subject: Add dot1q-l2[bd|xc]base-[ndrpdr|mrr] perf tests for 2-node topology Jira: CSIT-1284 Change-Id: I8ce4ffc76adf55bf9a8423077b8639601c560c87 Signed-off-by: Jan Gelety --- resources/libraries/robot/l2/tagging.robot | 39 +++++++++++----------- .../performance/performance_configuration.robot | 36 ++++++++++++++------ 2 files changed, 46 insertions(+), 29 deletions(-) (limited to 'resources/libraries/robot') diff --git a/resources/libraries/robot/l2/tagging.robot b/resources/libraries/robot/l2/tagging.robot index aa10c1032c..80dada454e 100644 --- a/resources/libraries/robot/l2/tagging.robot +++ b/resources/libraries/robot/l2/tagging.robot @@ -23,8 +23,8 @@ | Initialize VLAN sub-interfaces in 3-node circular topology | | [Arguments] | ${DUT1} | ${INT1} | ${DUT2} | ${INT2} | ${SUB_ID} -| | ... | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID} | ${TYPE_SUBIF} -| | [Documentation] | *Create two subinterfaces on DUTs.* +| | ... | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID} | ${TYPE_SUBIF} +| | [Documentation] | Create two subinterfaces on DUTs. | | ... | | ... | *Arguments:* | | ... | - DUT1 - Node to add sub-interface. @@ -44,14 +44,12 @@ | | ... | | ${INT1_name}= | Get interface name | ${DUT1} | ${INT1} | | ${subif_name_1} | ${subif_index_1}= | Create subinterface | ${DUT1} -| | ... | ${INT1_name} | ${SUB_ID} -| | ... | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID} -| | ... | ${TYPE_SUBIF} +| | ... | ${INT1_name} | ${SUB_ID} | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID} +| | ... | ${TYPE_SUBIF} | | ${INT2_name}= | Get interface name | ${DUT2} | ${INT2} | | ${subif_name_2} | ${subif_index_2}= | Create subinterface | ${DUT2} -| | ... | ${INT2_name} | ${SUB_ID} -| | ... | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID} -| | ... | ${TYPE_SUBIF} +| | ... | ${INT2_name} | ${SUB_ID} | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID} +| | ... | ${TYPE_SUBIF} | | Set Interface State | ${DUT1} | ${subif_index_1} | up | | Set Interface State | ${DUT2} | ${subif_index_2} | up | | Set Test Variable | ${subif_name_1} @@ -62,7 +60,7 @@ | Initialize VLAN dot1q sub-interfaces in circular topology | | [Arguments] | ${DUT1} | ${INT1} | ${DUT2}=${None} | ${INT2}=${None} | | ... | ${SUB_ID}=10 -| | [Documentation] | *Create two dot1q subinterfaces on DUTs.* +| | [Documentation] | Create two dot1q subinterfaces on DUTs. | | ... | | ... | *Arguments:* | | ... | - DUT1 - Node to add sub-interface. @@ -104,7 +102,7 @@ | Configure L2 tag rewrite method on interfaces | | [Arguments] | ${DUT1} | ${SUB_INT1} | ${DUT2}=${None} | ${SUB_INT2}=${None} | | ... | ${TAG_REWRITE_METHOD}=${None} -| | [Documentation] | *Setup tag rewrite on sub-interfaces on DUTs.* +| | [Documentation] | Setup tag rewrite on sub-interfaces on DUTs. | | ... | | ... | *Arguments:* | | ... | - DUT1 - Node to rewrite tags. @@ -118,10 +116,10 @@ | | ... | L2 Vlan tag rewrite | ${DUT2} | ${SUB_INT2} | ${TAG_REWRITE_METHOD} | Connect interfaces and VLAN sub-interfaces using L2XC -| | [Arguments] | ${DUT1} | ${INT1} | ${SUB_INT1} -| | ... | ${DUT2} | ${INT2} | ${SUB_INT2} -| | [Documentation] | *Add interface and subinterface to bidirectional -| | ... | L2-xconnect on DUTs.* +| | [Arguments] | ${DUT1} | ${INT1} | ${SUB_INT1} | ${DUT2}=${None} +| | ... | ${INT2}=${None} | ${SUB_INT2}=${None} +| | [Documentation] | Add interface and subinterface to bidirectional +| | ... | L2-xconnect on DUTs. | | ... | | ... | *Arguments:* | | ... | - DUT1 - Node to add bidirectional cross-connect. @@ -132,7 +130,8 @@ | | ... | - SUB_INT2 - Sub-interface to add to the cross-connect. | | ... | | Configure L2XC | ${DUT1} | ${INT1} | ${SUB_INT1} -| | Configure L2XC | ${DUT2} | ${INT2} | ${SUB_INT2} +| | Run Keyword Unless | ${DUT2} == ${None} +| | ... | Configure L2XC | ${DUT2} | ${INT2} | ${SUB_INT2} | Create vlan sub-interface | | [Documentation] | Create VLAN sub-interface on DUT and set admin status up. @@ -220,7 +219,9 @@ | | [Arguments] | ${dut_node} | ${interface} | ${tag_rewrite_method} | | ... | ${push_dot1q}=${True} | ${tag1_id}=${None} | ${tag2_id}=${None} | | ${result}= | Evaluate | isinstance($interface, int) -| | ${interface_name}= | Run Keyword If | ${result} | Set Variable | ${interface} -| | ... | ELSE | Get interface name | ${dut_node} | ${interface} -| | L2 Vlan Tag Rewrite | ${dut_node} | ${interface_name} | ${tag_rewrite_method} -| | ... | push_dot1q=${push_dot1q} | tag1_id=${tag1_id} | tag2_id=${tag2_id} +| | ${interface_name}= | Run Keyword If | ${result} +| | ... | Set Variable | ${interface} +| | ... | ELSE | Get interface name | ${dut_node} | ${interface} +| | L2 Vlan Tag Rewrite | ${dut_node} | ${interface_name} +| | ... | ${tag_rewrite_method} | push_dot1q=${push_dot1q} | tag1_id=${tag1_id} +| | ... | tag2_id=${tag2_id} diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot index 543e76e56d..fef3fc89f7 100644 --- a/resources/libraries/robot/performance/performance_configuration.robot +++ b/resources/libraries/robot/performance/performance_configuration.robot @@ -1789,11 +1789,13 @@ | | Add interface to bridge domain | ${dut1} | ${vhost_if1} | ${dut1_bd_id1} | | Add interface to bridge domain | ${dut1} | ${vhost_if2} | ${dut1_bd_id2} -| Initialize L2 bridge domains with VLAN dot1q sub-interfaces in a 3-node circular topology +| Initialize L2 bridge domains with VLAN dot1q sub-interfaces in circular topology | | [Documentation] -| | ... | Setup L2 bridge domain topology with learning enabled with VLAN -| | ... | between DUTs by connecting physical and vlan interfaces on each DUT. -| | ... | All interfaces are brought up. +| | ... | Setup L2 bridge domain topology with learning enabled with VLAN by +| | ... | connecting physical and vlan interfaces on each DUT. In case of 3-node +| | ... | topology create VLAN sub-interfaces between DUTs. In case of 2-node +| | ... | topology create VLAN sub-interface on dut1-if2 interface. All +| | ... | interfaces are brought up. | | ... | | ... | *Arguments:* | | ... | - bd_id1 - Bridge domain ID. Type: integer @@ -1814,16 +1816,30 @@ | | ... | | [Arguments] | ${bd_id1} | ${bd_id2} | ${subid} | ${tag_rewrite} | | ... +| | ${dut2_status} | ${value}= | Run Keyword And Ignore Error +| | ... | Variable Should Exist | ${dut2} +| | ... | | Set interfaces in path up -| | Initialize VLAN dot1q sub-interfaces in circular topology +| | ... +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Initialize VLAN dot1q sub-interfaces in circular topology | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid} -| | Configure L2 tag rewrite method on interfaces -| | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2} -| | ... | ${tag_rewrite} +| | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology +| | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid} +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Configure L2 tag rewrite method on interfaces | ${dut1} +| | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite} +| | ... | ELSE | Configure L2 tag rewrite method on interfaces +| | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite} +| | ... | | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${bd_id1} | | Add interface to bridge domain | ${dut1} | ${subif_index_1} | ${bd_id1} -| | Add interface to bridge domain | ${dut2} | ${subif_index_2} | ${bd_id2} -| | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${bd_id2} +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Add interface to bridge domain | ${dut2} | ${subif_index_2} +| | ... | ${bd_id2} +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Add interface to bridge domain | ${dut2} | ${dut2_if2} +| | ... | ${bd_id2} | Initialize L2 bridge domains with Vhost-User and VLAN in a 3-node circular topology | | [Documentation] -- cgit 1.2.3-korg