X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=inline;f=resources%2Flibraries%2Frobot%2Fl2%2Ftagging.robot;fp=resources%2Flibraries%2Frobot%2Fl2%2Ftagging.robot;h=aa10c1032c3cd18bef74d3b532d6c22fa981300d;hb=3e8a10ce9f0481d610aafa41f3195b0900122eb4;hp=7731ed193e6484d6ae8675202a94be24e563a93e;hpb=4e92926132e55972a956be7b854e6e698c62857a;p=csit.git diff --git a/resources/libraries/robot/l2/tagging.robot b/resources/libraries/robot/l2/tagging.robot index 7731ed193e..aa10c1032c 100644 --- a/resources/libraries/robot/l2/tagging.robot +++ b/resources/libraries/robot/l2/tagging.robot @@ -59,8 +59,9 @@ | | Set Test Variable | ${subif_name_2} | | Set Test Variable | ${subif_index_2} -| Initialize VLAN dot1q sub-interfaces in 3-node circular topology -| | [Arguments] | ${DUT1} | ${INT1} | ${DUT2} | ${INT2} | ${SUB_ID} +| 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.* | | ... | | ... | *Arguments:* @@ -78,26 +79,31 @@ | | ... | | ... | *Example:* | | ... -| | ... | \| Initialize VLAN dot1q sub-interfaces in 3-node circular topology \ +| | ... | \| Initialize VLAN dot1q sub-interfaces in circular topology \ | | ... | \| ${nodes['DUT1']} \| ${dut1_if2} \| ${nodes['DUT2']} \ | | ... | \| ${dut1_if2} \| 10 \| | | ... | | ${INT1_NAME}= | Get interface name | ${DUT1} | ${INT1} -| | ${INT2_NAME}= | Get interface name | ${DUT2} | ${INT2} +| | ${INT2_NAME}= | Run Keyword Unless | ${DUT2} == ${None} +| | ... | Get interface name | ${DUT2} | ${INT2} | | ${subif_name_1} | ${subif_index_1}= | Create Vlan Subinterface -| | | ... | ${DUT1} | ${INT1_NAME} | ${SUB_ID} -| | ${subif_name_2} | ${subif_index_2}= | Create Vlan Subinterface -| | | ... | ${DUT2} | ${INT2_NAME} | ${SUB_ID} +| | ... | ${DUT1} | ${INT1_NAME} | ${SUB_ID} +| | ${subif_name_2} | ${subif_index_2}= +| | ... | Run Keyword Unless | ${DUT2} == ${None} +| | ... | Create Vlan Subinterface | ${DUT2} | ${INT2_NAME} | ${SUB_ID} | | Set Interface State | ${DUT1} | ${subif_index_1} | up -| | Set Interface State | ${DUT2} | ${subif_index_2} | up +| | Run Keyword Unless | ${DUT2} == ${None} +| | ... | Set Interface State | ${DUT2} | ${subif_index_2} | up | | Set Test Variable | ${subif_name_1} | | Set Test Variable | ${subif_index_1} -| | Set Test Variable | ${subif_name_2} -| | Set Test Variable | ${subif_index_2} +| | Run Keyword Unless | ${DUT2} == ${None} +| | ... | Set Test Variable | ${subif_name_2} +| | Run Keyword Unless | ${DUT2} == ${None} +| | ... | Set Test Variable | ${subif_index_2} | Configure L2 tag rewrite method on interfaces -| | [Arguments] | ${DUT1} | ${SUB_INT1} | ${DUT2} | ${SUB_INT2} -| | ... | ${TAG_REWRITE_METHOD} +| | [Arguments] | ${DUT1} | ${SUB_INT1} | ${DUT2}=${None} | ${SUB_INT2}=${None} +| | ... | ${TAG_REWRITE_METHOD}=${None} | | [Documentation] | *Setup tag rewrite on sub-interfaces on DUTs.* | | ... | | ... | *Arguments:* @@ -108,7 +114,8 @@ | | ... | - TAG_REWRITE_METHOD - Method of tag rewrite. | | ... | | L2 Vlan tag rewrite | ${DUT1} | ${SUB_INT1} | ${TAG_REWRITE_METHOD} -| | L2 Vlan tag rewrite | ${DUT2} | ${SUB_INT2} | ${TAG_REWRITE_METHOD} +| | Run Keyword Unless | ${DUT2} == ${None} +| | ... | L2 Vlan tag rewrite | ${DUT2} | ${SUB_INT2} | ${TAG_REWRITE_METHOD} | Connect interfaces and VLAN sub-interfaces using L2XC | | [Arguments] | ${DUT1} | ${INT1} | ${SUB_INT1}