diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-08-05 12:25:19 +0000 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2019-08-06 08:22:05 +0000 |
commit | 916de0c14aae522b889c3f824659f56a39490b48 (patch) | |
tree | ce7667bc16d626c26a3b29a99eab97408c1020d2 /resources/libraries/robot | |
parent | 38bbf1ef06bedfb4b9058afcf6685c77538818a6 (diff) |
FIX: Layer dot1q logic
Bug found by vrpolak
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: Ibf61f14a838d0b49220ab8079a2d999f860a18e7
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r-- | resources/libraries/robot/shared/interfaces.robot | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot index a3b4223c48..d24b2fba3c 100644 --- a/resources/libraries/robot/shared/interfaces.robot +++ b/resources/libraries/robot/shared/interfaces.robot @@ -152,22 +152,32 @@ | | ... | | ${dut_str}= | Convert To Lowercase | ${dut} | | :FOR | ${id} | IN RANGE | 1 | ${count} + 1 -| | | ${vlan_west}= | Evaluate | 100 + ${id} - 1 -| | | ${vlan_east}= | Evaluate | 200 + ${id} - 1 -| | | ${if1_name} | ${if1_index}= | Run Keyword Unless -| | | ... | ${create} and ${id} > ${1} +| | | ${if1_vlan}= | Evaluate | ${100} + ${id} - ${1} +| | | ${if2_vlan}= | Evaluate | ${200} + ${id} - ${1} +| | | ${if1_name} | ${if1_index}= | Run Keyword If +| | | ... | ${create} or ${id} == ${1} | | | ... | Create Vlan Subinterface | | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_1} -| | | ... | ${vlan_west} -| | | ${if2_name} | ${if2_index}= | Run Keyword Unless -| | | ... | ${create} and ${id} > ${1} +| | | ... | ${if1_vlan} +| | | ${if2_name} | ${if2_index}= | Run Keyword If +| | | ... | ${create} or ${id} == ${1} | | | ... | Create Vlan Subinterface | | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${id}_2} -| | | ... | ${vlan_east} -| | | Run Keyword Unless | ${create} and ${id} > ${1} +| | | ... | ${if2_vlan} +| | | Run Keyword If | ${create} or ${id} == ${1} | | | ... | Set Interface State | ${nodes['${dut}']} | ${if1_index} | up -| | | Run Keyword Unless | ${create} and ${id} > ${1} +| | | Run Keyword If | ${create} or ${id} == ${1} | | | ... | Set Interface State | ${nodes['${dut}']} | ${if2_index} | up +| | | Run Keyword If | ${create} or ${id} == ${1} +| | | ... | Configure L2 tag rewrite method on interfaces +| | | ... | ${nodes['${dut}']} | ${if1_index} | TAG_REWRITE_METHOD=pop-1 +| | | Run Keyword If | ${create} or ${id} == ${1} +| | | ... | Configure L2 tag rewrite method on interfaces +| | | ... | ${nodes['${dut}']} | ${if2_index} | TAG_REWRITE_METHOD=pop-1 +| | | ${if1_index}= | Set Variable If | '${if1_index}' == '${NONE}' +| | | ... | ${${dut_str}_dot1q_1_1} | ${if1_index} +| | | ${if2_index}= | Set Variable If | '${if2_index}' == '${NONE}' +| | | ... | ${${dut_str}_dot1q_1_2} | ${if2_index} | | | Set Test Variable | ${${dut_str}_dot1q_${id}_1} | ${if1_index} | | | Set Test Variable | ${${dut_str}_dot1q_${id}_2} | ${if2_index} |