aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/l2/l2_bridge_domain.robot20
-rw-r--r--resources/libraries/robot/shared/default.robot6
-rw-r--r--resources/libraries/robot/vm/qemu.robot27
3 files changed, 12 insertions, 41 deletions
diff --git a/resources/libraries/robot/l2/l2_bridge_domain.robot b/resources/libraries/robot/l2/l2_bridge_domain.robot
index 3d6f48328b..b69d449a10 100644
--- a/resources/libraries/robot/l2/l2_bridge_domain.robot
+++ b/resources/libraries/robot/l2/l2_bridge_domain.robot
@@ -222,22 +222,12 @@
| | ... | \| Configure VM for vhost L2BD forwarding \| ${nodes['DUT2']} \
| | ... | \| /tmp/sock1 \| /tmp/sock2 \| qemu_instance_2 \|
| | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${qemu_name}=vm_node
-| | Run Keyword Unless | "${qemu_name}" == "vm_node" | Import Library
-| | ... | resources.libraries.python.QemuUtils | WITH NAME | ${qemu_name}
+| | Import Library | resources.libraries.python.QemuUtils | node=${dut_node} |
+| | ... | WITH NAME | ${qemu_name}
| | Set Test Variable | ${${qemu_name}} | ${None}
-| | ${qemu_set_node}= | Run Keyword If | "${qemu_name}" == "vm_node"
-| | | ... | Set Variable | Qemu Set Node
-| | ... | ELSE | Replace Variables | ${qemu_name}.Qemu Set Node
-| | Run keyword | ${qemu_set_node} | ${dut_node}
-| | ${qemu_add_vhost}= | Run Keyword If | "${qemu_name}" == "vm_node"
-| | | ... | Set Variable | Qemu Add Vhost User If
-| | ... | ELSE | Replace Variables | ${qemu_name}.Qemu Add Vhost User If
-| | Run keyword | ${qemu_add_vhost} | ${sock1}
-| | Run keyword | ${qemu_add_vhost} | ${sock2}
-| | ${qemu_start}= | Run Keyword If | "${qemu_name}" == "vm_node"
-| | | ... | Set Variable | Qemu Start
-| | ... | ELSE | Replace Variables | ${qemu_name}.Qemu Start
-| | ${vm}= | Run keyword | ${qemu_start}
+| | Run Keyword | ${qemu_name}.Qemu Add Vhost User If | ${sock1}
+| | Run Keyword | ${qemu_name}.Qemu Add Vhost User If | ${sock2}
+| | ${vm}= | Run keyword | ${qemu_name}.Qemu Start
| | ${br}= | Set Variable | br0
| | ${vhost1}= | Get Vhost User If Name By Sock | ${vm} | ${sock1}
| | ${vhost2}= | Get Vhost User If Name By Sock | ${vm} | ${sock2}
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 6d99b959d3..954f88109a 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -523,7 +523,7 @@
| | Show Vpp Settings | ${nodes['DUT1']}
| | Show Vpp Settings | ${nodes['DUT2']}
| | Vpp Show Errors On All DUTs | ${nodes}
-| | Stop and clear QEMU | ${nodes['DUT1']}
+| | Tear down QEMU
| | Verify VPP PID in Teardown
| Set up TAP functional test
@@ -608,8 +608,8 @@
| | [Arguments] | ${dut1_node} | ${dut2_node}
| | ...
| | Tear down functional test
-| | Tear down QEMU | ${dut1_node} | qemu_node1
-| | Tear down QEMU | ${dut2_node} | qemu_node2
+| | Tear down QEMU | qemu_node1
+| | Tear down QEMU | qemu_node2
| Tear down functional test with container
| | [Documentation]
diff --git a/resources/libraries/robot/vm/qemu.robot b/resources/libraries/robot/vm/qemu.robot
index 528b7fbe8c..765a6cf398 100644
--- a/resources/libraries/robot/vm/qemu.robot
+++ b/resources/libraries/robot/vm/qemu.robot
@@ -12,7 +12,6 @@
# limitations under the License.
*** Settings ***
| Library | resources.libraries.python.IPUtil
-| Library | resources.libraries.python.QemuUtils
*** Keywords ***
| Configure QEMU vhost and run it
@@ -44,7 +43,7 @@
| | ...
| | [Arguments] | ${dut_node} | ${sock1} | ${sock2} | ${sock3} | ${sock4}
| | ... | ${ip1} | ${ip2} | ${ip3} | ${ip4} | ${prefix_length}
-| | ... | ${qemu_name} | ${mac_ID}=${None}
+| | ... | ${qemu_name}=vm_node | ${mac_ID}=${None}
| | ...
| | Import Library | resources.libraries.python.QemuUtils \
| | ... | node=${dut_node} | WITH NAME | ${qemu_name}
@@ -73,33 +72,15 @@
| Tear down QEMU
| | [Documentation]
-| | ... | Stop specific qemu instance running on ${dut_node}.
+| | ... | Stop specific qemu instance running on DUT.
| | ...
| | ... | *Arguments:*
-| | ... | - dut_node - Node where to clean qemu. Type: dict
| | ... | - qemu_name - Qemu instance by name. Type: string
| | ...
| | ... | *Example:*
| | ...
-| | ... | \| Tear down QEMU \| ${node['DUT1']} \| qemu_node_1 \|
+| | ... | \| Tear down QEMU \| qemu_node_1 \|
| | ...
-| | [Arguments] | ${dut_node} | ${qemu_name}
+| | [Arguments] | ${qemu_name}=vm_node
| | ...
-| | Run Keyword | ${qemu_name}.Qemu Set Node | ${dut_node}
| | Run Keyword | ${qemu_name}.Qemu Kill
-
-| Stop and clear QEMU
-| | [Documentation]
-| | ... | Stop QEMU, clear used sockets running on ${dut}.
-| | ...
-| | ... | *Arguments:*
-| | ... | - dut_node - Node where to clean qemu. Type: dict
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Tear down QEMU \| ${node['DUT1']} \|
-| | ...
-| | [Arguments] | ${dut}
-| | ...
-| | Qemu Set Node | ${dut}
-| | Qemu Kill