Add: avf-dot1q testcases
[csit.git] / resources / libraries / robot / shared / interfaces.robot
index 2ec44cc..55d0a3d 100644 (file)
 | | ... | ${${dut}_if2_vf0}
 | | ${dut_eth_vf_if1}= | VPP Create AVF Interface | ${nodes['${dut}']}
 | | ... | ${if1_pci} | ${rxq_count_int}
+| | ${dut_eth_vf_if1_mac}= | Get Interface MAC | ${nodes['${dut}']}
+| | ... | ${dut_eth_vf_if1}
 | | ${dut_eth_vf_if2}= | VPP Create AVF Interface | ${nodes['${dut}']}
 | | ... | ${if2_pci} | ${rxq_count_int}
+| | ${dut_eth_vf_if2_mac}= | Get Interface MAC | ${nodes['${dut}']}
+| | ... | ${dut_eth_vf_if2}
 | | Set Test Variable | ${${dut_str}_if1} | ${dut_eth_vf_if1}
 | | Set Test Variable | ${${dut_str}_if2} | ${dut_eth_vf_if2}
+| | Set Test Variable | ${${dut_str}_if1_mac} | ${dut_eth_vf_if1_mac}
+| | Set Test Variable | ${${dut_str}_if2_mac} | ${dut_eth_vf_if2_mac}
 
 | Initialize AVF interfaces
 | | [Documentation]
 | | ...
 | | ${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}
+| | | ${if1_vlan}= | Get Variable Value | \${${dut_str}_vlan1}
+| | | ${default}= | Evaluate | ${100} + ${id} - ${1}
+| | | ${if1_vlan}= | Set Variable If | '${if1_vlan}' == '${NONE}'
+| | | ... | ${default} | ${if1_vlan}
+| | | ${if2_vlan}= | Get Variable Value | \${${dut_str}_vlan2}
+| | | ${default}= | Evaluate | ${200} + ${id} - ${1}
+| | | ${if2_vlan}= | Set Variable If | '${if2_vlan}' == '${NONE}'
+| | | ... | ${default} | ${if2_vlan}
 | | | ${if1_name} | ${if1_index}= | Run Keyword If
 | | | ... | ${create} or ${id} == ${1}
 | | | ... | Create Vlan Subinterface