From a3d59c128ab842fa3ffd172a11e2eb91bd2c1a82 Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Fri, 20 Apr 2018 13:57:02 +0200 Subject: FIX: Restart VPP in container before each test Change-Id: Iec7045aadc0675e04b8c74cbe28f8b3f193bcf1f Signed-off-by: Peter Mikus (cherry picked from commit f3d66d9ca20e7fb2b153d83d809f005a93b76a8f) --- resources/libraries/python/ContainerUtils.py | 6 ++++++ .../libraries/robot/performance/performance_configuration.robot | 2 ++ resources/libraries/robot/shared/container.robot | 6 ++++++ 3 files changed, 14 insertions(+) (limited to 'resources/libraries') diff --git a/resources/libraries/python/ContainerUtils.py b/resources/libraries/python/ContainerUtils.py index 3bf3516e6d..4b891048fd 100644 --- a/resources/libraries/python/ContainerUtils.py +++ b/resources/libraries/python/ContainerUtils.py @@ -156,6 +156,12 @@ class ContainerManager(object): self.engine.install_vpp() self.engine.restart_vpp() + def restart_vpp_in_all_containers(self): + """Restart VPP on all containers.""" + for container in self.containers: + self.engine.container = self.containers[container] + self.engine.restart_vpp() + def configure_vpp_in_all_containers(self, vat_template_file): """Configure VPP in all containers. diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot index b4f2fb7bae..46e0e5bb6c 100644 --- a/resources/libraries/robot/performance/performance_configuration.robot +++ b/resources/libraries/robot/performance/performance_configuration.robot @@ -2169,6 +2169,7 @@ | | | ... | ${dut1} | ${dut1-memif-${number}-if2} | ${dut1_if2} | | | Run Keyword If | ${number}==${nr} | Configure L2XC | | | ... | ${dut2} | ${dut2-memif-${number}-if2} | ${dut2_if2} +| | All Vpp Interfaces Ready Wait | ${nodes} | | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | Show Memif | ${nodes['${dut}']} @@ -2216,6 +2217,7 @@ | | | ... | ${dut2-memif-${number}-if1} | ${number} | | | Add interface to bridge domain | ${dut2} | | | ... | ${dut2-memif-${number}-if2} | ${bd_id2} +| | All Vpp Interfaces Ready Wait | ${nodes} | | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} | | | Show Memif | ${nodes['${dut}']} diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot index 4b23236a96..f3f55e2907 100644 --- a/resources/libraries/robot/shared/container.robot +++ b/resources/libraries/robot/shared/container.robot @@ -101,6 +101,12 @@ | | ... | | Run Keyword | ${group}.Install VPP In All Containers +| Restart VPP in all '${group}' containers +| | [Documentation] | Restart VPP on all container(s) in specific container +| | ... | group on all DUT nodes. +| | ... +| | Run Keyword | ${group}.Restart VPP In All Containers + | Configure VPP in all '${group}' containers | | [Documentation] | Configure VPP on all container(s) in specific container | | ... | group on all DUT nodes. -- cgit 1.2.3-korg