X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fdouble_qemu_setup.robot;h=377e2228040c012ed3930ffd783d504c311b0ba9;hb=859157b5db45927c7b4bb0b2d575e68805777a86;hp=167605e94301062662bd970cf9028572fb8f68b3;hpb=6000b2abc3d6b8bb8ff2941aacf005a04a33be60;p=csit.git diff --git a/resources/libraries/robot/double_qemu_setup.robot b/resources/libraries/robot/double_qemu_setup.robot index 167605e943..377e222804 100644 --- a/resources/libraries/robot/double_qemu_setup.robot +++ b/resources/libraries/robot/double_qemu_setup.robot @@ -10,9 +10,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +*** Settings *** +| Library | resources.libraries.python.IPUtil *** Keywords *** -| Setup QEMU Vhost and Run +| Configure QEMU vhost and run it | | [Documentation] | Setup Qemu with 4 vhost-user interfaces and 4 namespaces. | | ... | Each call will be different object instance. | | ... @@ -56,10 +58,10 @@ | | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2} | | ${vhost3}= | Get Vhost User If Name By Sock | ${vm} | ${sock3} | | ${vhost4}= | Get Vhost User If Name By Sock | ${vm} | ${sock4} -| | Set Interface State | ${vm} | ${vhost1} | up -| | Set Interface State | ${vm} | ${vhost2} | up -| | Set Interface State | ${vm} | ${vhost3} | up -| | Set Interface State | ${vm} | ${vhost4} | up +| | Set Interface State | ${vm} | ${vhost1} | up | if_type=name +| | Set Interface State | ${vm} | ${vhost2} | up | if_type=name +| | Set Interface State | ${vm} | ${vhost3} | up | if_type=name +| | Set Interface State | ${vm} | ${vhost4} | up | if_type=name | | Setup Network Namespace | | ... | ${vm} | nmspace1 | ${vhost1} | ${ip1} | ${prefix_length} | | Setup Network Namespace @@ -70,7 +72,7 @@ | | ... | ${vm} | nmspace4 | ${vhost4} | ${ip4} | ${prefix_length} | | Set Test Variable | ${${qemu_name}} | ${vm} -| Qemu Teardown +| Tear down QEMU | | [Documentation] | Stop specific qemu instance | | ... | running on ${dut_node}, ${vm} is VM node info dictionary | | ... | returned by qemu_start or None. @@ -81,19 +83,13 @@ | | ... | | ... | *Example:* | | ... -| | ... | \| Qemu Teardown \| ${node['DUT1']} \| ${vm} \| qemu_node_1 \| +| | ... | \| Tear down QEMU \| ${node['DUT1']} \| ${vm} \| qemu_node_1 \| | | ... | | [Arguments] | ${dut_node} | ${vm} | ${qemu_name} | | ${set_node}= | Replace Variables | ${qemu_name}.Qemu Set Node -| | ${sys_status}= | Replace Variables | ${qemu_name}.Qemu System Status | | ${kill}= | Replace Variables | ${qemu_name}.Qemu Kill -| | ${sys_pd}= | Replace Variables | ${qemu_name}.Qemu System Powerdown -| | ${quit}= | Replace Variables | ${qemu_name}.Qemu Quit | | ${clear_socks}= | Replace Variables | ${qemu_name}.Qemu Clear Socks | | Run Keyword | ${set_node} | ${dut_node} -| | ${status} | ${value}= | Run Keyword And Ignore Error | ${sys_status} -| | Run Keyword If | "${status}" == "FAIL" | ${kill} -| | ... | ELSE IF | "${value}" == "running" | ${sys_pd} -| | ... | ELSE | ${quit} +| | Run Keyword | ${kill} | | Run Keyword | ${clear_socks} | | Run Keyword If | ${vm} is not None | Disconnect | ${vm}