X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fl2_xconnect.robot;h=4266234e10770c940fbe342647c724149c8fde58;hp=001062c61678f1eb8bc0454ca0694c5ed89432c8;hb=a114591eac9f52502048db886da2fb228c62254d;hpb=b92a827b1c7f48da4214e992e5503ebe1c182416 diff --git a/resources/libraries/robot/l2_xconnect.robot b/resources/libraries/robot/l2_xconnect.robot index 001062c616..4266234e10 100644 --- a/resources/libraries/robot/l2_xconnect.robot +++ b/resources/libraries/robot/l2_xconnect.robot @@ -12,39 +12,13 @@ # limitations under the License. *** Settings *** - -| Library | resources.libraries.python.VatExecutor -| Library | resources.libraries.python.CrossConnectSetup -| Library | resources.libraries.python.topology.Topology -| Library | resources.libraries.python.TrafficScriptExecutor -| Variables | resources/libraries/python/constants.py +| Library | resources.libraries.python.L2Util +| Library | resources.libraries.python.InterfaceUtil *** Keywords *** - -| L2 setup xconnect on DUTs +| L2 setup xconnect on DUT | | [Documentation] | Setup Bidirectional Cross Connect on DUTs -# TODO: rewrite with dynamic path selection -| | Vpp Setup Bidirectional Cross Connect | ${nodes['DUT1']} -| | ... | ${nodes['DUT1']['interfaces']['port1']['name']} -| | ... | ${nodes['DUT1']['interfaces']['port3']['name']} -| | Vpp Setup Bidirectional Cross Connect | ${nodes['DUT2']} -| | ... | ${nodes['DUT2']['interfaces']['port1']['name']} -| | ... | ${nodes['DUT2']['interfaces']['port3']['name']} - - -| Get traffic links between TG "${tg}" and DUT1 "${dut1}" and DUT2 "${dut2}" -| | ${DUT1_TG_link}= | Get first active connecting link between node "${dut1}" and "${tg}" -| | ${DUT2_TG_link}= | Get first active connecting link between node "${dut2}" and "${tg}" -| | ${tg_traffic_links}= | Create List | ${DUT1_TG_link} | ${DUT2_TG_link} -| | [Return] | ${tg_traffic_links} - - -| Send traffic on node "${node}" from link "${link1}" to link "${link2}" -| | ${src_port}= | Get Interface By Link Name | ${node} | ${link1} -| | ${dst_port}= | Get Interface By Link Name | ${node} | ${link2} -| | ${src_ip}= | Set Variable | 192.168.100.1 -| | ${dst_ip}= | Set Variable | 192.168.100.2 -| | ${src_mac}= | Get Node Link Mac | ${node} | ${link1} -| | ${dst_mac}= | Get Node Link Mac | ${node} | ${link2} -| | ${args}= | Traffic Script Gen Arg | ${src_port} | ${src_port} | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip} -| | Run Traffic Script On Node | send_ip_icmp.py | ${node} | ${args} +| | [Arguments] | ${node} | ${if1} | ${if2} | +| | Set Interface State | ${node} | ${if1} | up +| | Set Interface State | ${node} | ${if2} | up +| | Vpp Setup Bidirectional Cross Connect | ${node} | ${if1} | ${if2}