X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fl2%2Fl2_xconnect.robot;h=efe148c40003a28d4b9db37b6b45bfdf4a49d1f9;hb=2896038b90897258842a5b8fe9582d84fe532644;hp=a0c1c24a5d30f47ed5fca0fc56e453531093718b;hpb=d68951ac245150eeefa6e0f4156e4c1b5c9e9325;p=csit.git diff --git a/resources/libraries/robot/l2/l2_xconnect.robot b/resources/libraries/robot/l2/l2_xconnect.robot index a0c1c24a5d..efe148c400 100644 --- a/resources/libraries/robot/l2/l2_xconnect.robot +++ b/resources/libraries/robot/l2/l2_xconnect.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2020 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -122,8 +122,8 @@ | | [Arguments] | ${dut} | ${nf_nodes}=${1} | | | | FOR | ${number} | IN RANGE | 1 | ${nf_nodes}+1 -| | | ${sock1}= | Set Variable | /var/run/vpp/sock-${number}-1 -| | | ${sock2}= | Set Variable | /var/run/vpp/sock-${number}-2 +| | | ${sock1}= | Set Variable | /run/vpp/sock-${number}-1 +| | | ${sock2}= | Set Variable | /run/vpp/sock-${number}-2 | | | ${prev_index}= | Evaluate | ${number}-1 | | | Configure vhost interfaces | ${nodes['${dut}']} | | | ... | ${sock1} | ${sock2} | ${dut}-vhost-${number}-if1 @@ -156,7 +156,7 @@ | | | ... | nf_nodes=${nf_nodes} | | END -| Initialize L2 xconnect with Vhost-User and VLAN in 3-node circular topology +| Initialize L2 xconnect with Vhost-User and VLAN in circular topology | | [Documentation] | | ... | Create two Vhost-User interfaces on all defined VPP nodes. Cross | | ... | connect each Vhost interface with one physical interface. @@ -173,20 +173,34 @@ | | | | [Arguments] | ${subid} | ${tag_rewrite} | | +| | ${dut2_status} | ${value}= | Run Keyword And Ignore Error +| | ... | Variable Should Exist | ${dut2} +| | | | Set interfaces in path up -| | Initialize VLAN dot1q sub-interfaces in circular topology +| | +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Initialize VLAN dot1q sub-interfaces in circular topology | | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid} -| | Configure L2 tag rewrite method on interfaces -| | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2} -| | ... | ${tag_rewrite} +| | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology +| | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid} +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Configure L2 tag rewrite method on interfaces | ${dut1} +| | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite} +| | ... | ELSE | Configure L2 tag rewrite method on interfaces +| | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite} +| | | | Configure vhost interfaces -| | ... | ${dut1} | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2 +| | ... | ${dut1} | /run/vpp/sock-1-1 | /run/vpp/sock-1-2 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1} | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2} -| | Configure vhost interfaces -| | ... | ${dut2} | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2 -| | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1} -| | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2} +| | +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Configure vhost interfaces +| | ... | ${dut2} | /run/vpp/sock-1-1 | /run/vpp/sock-1-2 +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1} +| | Run Keyword If | '${dut2_status}' == 'PASS' +| | ... | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2} | Initialize L2 xconnect with Vhost-User and VLAN with VPP link bonding in 3-node circular topology | | [Documentation] @@ -249,11 +263,11 @@ | | ... | ${dut1} | ${subif_index_1} | ${dut2} | ${subif_index_2} | | ... | ${tag_rewrite} | | Configure vhost interfaces -| | ... | ${dut1} | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2 +| | ... | ${dut1} | /run/vpp/sock-1-1 | /run/vpp/sock-1-2 | | Configure L2XC | ${dut1} | ${dut1_if1} | ${vhost_if1} | | Configure L2XC | ${dut1} | ${subif_index_1} | ${vhost_if2} | | Configure vhost interfaces -| | ... | ${dut2} | /var/run/vpp/sock-1-1 | /var/run/vpp/sock-1-2 +| | ... | ${dut2} | /run/vpp/sock-1-1 | /run/vpp/sock-1-2 | | Configure L2XC | ${dut2} | ${subif_index_2} | ${vhost_if1} | | Configure L2XC | ${dut2} | ${dut2_if2} | ${vhost_if2}