aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-08-20 16:25:51 +0200
committerPeter Mikus <pmikus@cisco.com>2019-08-21 05:54:35 +0000
commit5fe08ea21f16d1a24ac82d990c48d212d312b4f9 (patch)
tree84edd1de1c3b84aa514cbf001de02fca49c655ba /resources/libraries/robot
parentc45663ee4021100a1639e5e8b03d7dbe4b07a3af (diff)
Fix Initialize layer dot1q on node
By using Get Variable Value keyword. Change-Id: I3a9650b6f802d60422ffa6b6b00d444ebb050d89 Signed-off-by: Vratko Polak <vrpolak@cisco.com> (cherry picked from commit b6cd8aba14026ee89178714171d2890a2796ca31)
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/shared/interfaces.robot12
1 files changed, 4 insertions, 8 deletions
diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot
index 29698dddb0..e249cd5d4e 100644
--- a/resources/libraries/robot/shared/interfaces.robot
+++ b/resources/libraries/robot/shared/interfaces.robot
@@ -252,14 +252,10 @@
| | ...
| | ${dut_str}= | Convert To Lowercase | ${dut}
| | :FOR | ${id} | IN RANGE | 1 | ${count} + 1
-| | | ${if1_vlan}= | Run Keyword If | ${${dut_str}_vlan1}
-| | | ... | Set Variable | ${${dut_str}_vlan1}
-| | | ... | ELSE
-| | | ... | Evaluate | ${100} + ${id} - ${1}
-| | | ${if2_vlan}= | Run Keyword If | ${${dut_str}_vlan2}
-| | | ... | Set Variable | ${${dut_str}_vlan2}
-| | | ... | ELSE
-| | | ... | Evaluate | ${200} + ${id} - ${1}
+| | | ${default}= | Evaluate | ${100} + ${id} - ${1}
+| | | ${if1_vlan}= | Get Variable Value | \${${dut_str}_vlan1} | ${default}
+| | | ${default}= | Evaluate | ${200} + ${id} - ${1}
+| | | ${if2_vlan}= | Get Variable Value | \${${dut_str}_vlan2} | ${default}
| | | ${if1_name} | ${if1_index}= | Run Keyword If
| | | ... | ${create} or ${id} == ${1}
| | | ... | Create Vlan Subinterface