X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fshared%2Finterfaces.robot;h=2ec44cca733eb0a60bc3d3f148b98860c5e85b3a;hp=ae2aa7b9a84c22aaa1514485fed75e2aff9db659;hb=67d683ebfc222d63d79b883fe7cf94027dbde00c;hpb=d1f514dc71e263761ad5688c76d6cdd40ac1308b diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot index ae2aa7b9a8..2ec44cca73 100644 --- a/resources/libraries/robot/shared/interfaces.robot +++ b/resources/libraries/robot/shared/interfaces.robot @@ -370,3 +370,38 @@ | | :FOR | ${dut} | IN | @{duts} | | | Initialize layer ip4vxlan on node | ${dut} | count=${count} | | Set Test Variable | ${prev_layer} | ip4vxlan + +| Configure vhost interfaces +| | [Documentation] +| | ... | Create two Vhost-User interfaces on defined VPP node. +| | ... +| | ... | *Arguments:* +| | ... | - ${dut_node} - DUT node. Type: dictionary +| | ... | - ${sock1} - Socket path for first Vhost-User interface. Type: string +| | ... | - ${sock2} - Socket path for second Vhost-User interface. Type: string +| | ... | - ${vhost_if1} - Name of the first Vhost-User interface (Optional). +| | ... | Type: string +| | ... | - ${vhost_if2} - Name of the second Vhost-User interface (Optional). +| | ... | Type: string +| | ... +| | ... | _NOTE:_ This KW sets following test case variable: +| | ... | - ${${vhost_if1}} - First Vhost-User interface. +| | ... | - ${${vhost_if2}} - Second Vhost-User interface. +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Configure vhost interfaces \ +| | ... | \| ${nodes['DUT1']} \| /tmp/sock1 \| /tmp/sock2 \| +| | ... | \| Configure vhost interfaces \ +| | ... | \| ${nodes['DUT2']} \| /tmp/sock1 \| /tmp/sock2 \| dut2_vhost_if1 \ +| | ... | \| dut2_vhost_if2 \| +| | ... +| | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${vhost_if1}=vhost_if1 +| | ... | ${vhost_if2}=vhost_if2 +| | ... +| | ${vhost_1}= | Vpp Create Vhost User Interface | ${dut_node} | ${sock1} +| | ${vhost_2}= | Vpp Create Vhost User Interface | ${dut_node} | ${sock2} +| | Set Interface State | ${dut_node} | ${vhost_1} | up +| | Set Interface State | ${dut_node} | ${vhost_2} | up +| | Set Test Variable | ${${vhost_if1}} | ${vhost_1} +| | Set Test Variable | ${${vhost_if2}} | ${vhost_2}