Remove old VPP Restart sequence 80/19380/8
authorPeter Mikus <pmikus@cisco.com>
Mon, 6 May 2019 15:29:52 +0000 (15:29 +0000)
committerPeter Mikus <pmikus@cisco.com>
Thu, 9 May 2019 11:34:01 +0000 (11:34 +0000)
Change-Id: I7f71a9709ad55ce03d73e23cc8a9f5064947ed51
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/libraries/bash/dut_setup.sh [deleted file]
resources/libraries/python/DUTSetup.py
resources/libraries/robot/ip/ip6.robot
resources/libraries/robot/shared/default.robot
tests/honeycomb/func/__init__.robot
tests/nsh_sfc/func/__init__.robot
tests/vpp/func/__init__.robot
tests/vpp/func/ip4/eth2p-ethip4-ip4base-func.robot
tests/vpp/perf/__init__.robot

diff --git a/resources/libraries/bash/dut_setup.sh b/resources/libraries/bash/dut_setup.sh
deleted file mode 100755 (executable)
index d0b2fab..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2018 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:
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# 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.
-
-function cmd {
-    echo "[Command_start_exec] '$1'"
-    echo -n "[Command_outputs] "
-    eval ${@}
-    echo "[Command_done_exec] '$1'"
-    echo
-}
-
-echo
-echo "[Command_desc] Starting ${0}"
-
-if [ -f "/etc/redhat-release" ]; then
-    cmd 'rpm -qai *vpp*'
-else
-    cmd 'dpkg -l | grep vpp'
-fi
-
-cmd 'ps aux | grep vpp'
-
-cmd 'cat /etc/vpp/startup.conf'
-
-cmd 'if fgrep docker /proc/1/cgroup; then supervisorctl restart vpp; else sudo -S service vpp restart; fi'
-
-echo "[Command_desc] SLEEP for three seconds, so that VPP is up for sure"
-cmd 'sleep 3'
-
-cmd "sudo journalctl --no-pager --unit=vpp --since=\"$(echo `systemctl show -p ActiveEnterTimestamp vpp` | awk '{print $2 $3}')\""
-
-cmd 'cat /proc/meminfo'
-
-cmd 'free -m'
-
-cmd 'ps aux | grep vpp'
-
-cmd 'sudo dmidecode | grep UUID'
-
-cmd 'lspci -Dnn'
-
-echo "[Command_desc] Adding dpdk-input trace"
-cmd 'sudo vpp_api_test <<< "exec trace add dpdk-input 50"'
-
-echo "[Command_desc] Adding vhost-user-input trace"
-cmd 'sudo vpp_api_test <<< "exec trace add vhost-user-input 50"'
-
-echo "[Command_desc] Adding memif-input trace"
-cmd 'sudo vpp_api_test <<< "exec trace add memif-input 50"'
index 7b75df9..bd6bb46 100644 (file)
@@ -76,7 +76,8 @@ class DUTSetup(object):
         message = 'Node {host} failed to restart service {name}'.\
             format(host=node['host'], name=service)
 
-        exec_cmd_no_error(node, command, timeout=30, sudo=True, message=message)
+        exec_cmd_no_error(
+            node, command, timeout=120, sudo=True, message=message)
 
         DUTSetup.get_service_logs(node, service)
 
@@ -110,7 +111,8 @@ class DUTSetup(object):
         message = 'Node {host} failed to start service {name}'.\
             format(host=node['host'], name=service)
 
-        exec_cmd_no_error(node, command, timeout=30, sudo=True, message=message)
+        exec_cmd_no_error(
+            node, command, timeout=120, sudo=True, message=message)
 
         DUTSetup.get_service_logs(node, service)
 
@@ -160,34 +162,6 @@ class DUTSetup(object):
             if node['type'] == NodeType.DUT:
                 DUTSetup.stop_service(node, service)
 
-    @staticmethod
-    def setup_dut(node):
-        """Run script over SSH to setup the DUT node.
-
-        :param node: DUT node to set up.
-        :type node: dict
-
-        :raises Exception: If the DUT setup fails.
-        """
-        command = 'bash {0}/{1}/dut_setup.sh'.\
-            format(Constants.REMOTE_FW_DIR, Constants.RESOURCES_LIB_SH)
-        message = 'DUT test setup script failed at node {name}'.\
-            format(name=node['host'])
-
-        exec_cmd_no_error(node, command, timeout=120, sudo=True,
-                          message=message)
-
-    @staticmethod
-    def setup_all_duts(nodes):
-        """Run script over SSH to setup all DUT nodes.
-
-        :param nodes: Topology nodes.
-        :type nodes: dict
-        """
-        for node in nodes.values():
-            if node['type'] == NodeType.DUT:
-                DUTSetup.setup_dut(node)
-
     @staticmethod
     def get_vpp_pid(node):
         """Get PID of running VPP process.
index 73d486e..a780144 100644 (file)
 | Configure IPv6 on all DUTs in topology
 | | [Documentation] | Setup IPv6 address on all DUTs
 | | [Arguments] | ${nodes} | ${nodes_addr}
-| | Configure all DUTs before test
+| | Restart Vpp Service On All Duts | ${nodes}
+| | Verify Vpp On All Duts | ${nodes}
+| | VPP Enable Traces On All Duts | ${nodes}
 | | ${interfaces}= | Nodes Set Ipv6 Addresses | ${nodes} | ${nodes_addr}
 | | :FOR | ${interface} | IN | @{interfaces}
 | | | Set Interface State | @{interface} | up | if_type=name
index 09ca17d..81ebc83 100644 (file)
 | Resource | resources/libraries/robot/vm/qemu.robot
 
 *** Keywords ***
-| Configure all DUTs before test
-| | [Documentation] | Setup all DUTs in topology before test execution.
-| | ...
-| | Setup All DUTs | ${nodes}
-
 | Configure all TGs for traffic script
 | | [Documentation] | Prepare all TGs before traffic scripts execution.
 | | ...
 | Set up functional test
 | | [Documentation] | Common test setup for functional tests.
 | | ...
-| | Configure all DUTs before test
+| | Restart Vpp Service On All Duts | ${nodes}
+| | Verify Vpp On All Duts | ${nodes}
+| | VPP Enable Traces On All Duts | ${nodes}
 | | Save VPP PIDs
 | | Configure all TGs for traffic script
 | | Update All Interface Data On All Nodes | ${nodes}
 # much
 | | [Documentation] | Common test setup for vpp-device tests.
 | | ...
-| | Configure all DUTs before test
+| | Restart Vpp Service On All Duts | ${nodes}
+| | Verify Vpp On All Duts | ${nodes}
+| | VPP Enable Traces On All Duts | ${nodes}
 | | Save VPP PIDs
 | | Configure all TGs for traffic script
 | | Update All Interface Data On All Nodes | ${nodes} | skip_tg_udev=${True}
index 89c5dc9..8fc5f20 100644 (file)
@@ -25,7 +25,9 @@
 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
 | ...
 | Suite Setup | Run Keywords | Setup Framework | ${nodes} | AND
-| ... | Setup All DUTs | ${nodes} | AND
+| ... | Restart Vpp Service On All Duts | ${nodes} | AND
+| ... | Verify Vpp On All Duts | ${nodes} | AND
+| ... | VPP Enable Traces On All Duts | ${nodes} | AND
 | ... | Update All Interface Data On All Nodes | ${nodes} | AND
 | ... | Configure all DUTs before test | AND
 | ... | Set Global Variable | ${node} | AND
index 707244c..7f1391c 100644 (file)
@@ -15,6 +15,8 @@
 | Resource | resources/libraries/robot/shared/default.robot
 | Resource | resources/libraries/robot/shared/interfaces.robot
 | Library | resources.libraries.python.SFC.SetupSFCTest
-| Suite Setup | Run Keywords | Setup NSH SFC test | ${nodes}
-| ...         | AND          | Setup All DUTs | ${nodes}
-| ...         | AND          | Update All Interface Data On All Nodes | ${nodes}
+| Suite Setup | Run Keywords | Setup NSH SFC test | ${nodes} | AND
+| ... | Restart Vpp Service On All Duts | ${nodes} | AND
+| ... | Verify Vpp On All Duts | ${nodes} | AND
+| ... | VPP Enable Traces On All Duts | ${nodes} | AND
+| ... | Update All Interface Data On All Nodes | ${nodes}
index 563d1ea..c0060ab 100644 (file)
@@ -20,7 +20,6 @@
 | ... | AND | Setup Framework | ${nodes}
 | ... | AND | Install Vpp On All Duts | ${nodes} | ${VPP_PKG_DIR}
 | ... | AND | Verify Vpp On All Duts | ${nodes}
-| ... | AND | Setup All DUTs | ${nodes}
 | ... | AND | Update All Interface Data On All Nodes | ${nodes}
 | Suite Teardown | Cleanup Framework | ${nodes}
 
index 5262fa1..1b4f8cd 100644 (file)
@@ -19,7 +19,9 @@
 | Resource | resources/libraries/robot/ip/ip4.robot
 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | HW_ENV | SKIP_VPP_PATCH
 | Suite Setup | Run Keywords
-| ... | Configure all DUTs before test | AND
+| ... | Restart Vpp Service On All Duts | ${nodes} | AND
+| ... | Verify Vpp On All Duts | ${nodes} | AND
+| ... | VPP Enable Traces On All Duts | ${nodes} | AND
 | ... | Configure all TGs for traffic script | AND
 | ... | Update All Interface Data On All Nodes | ${nodes} | AND
 | ... | Configure DUT nodes for IPv4 testing
index 37ff3a8..25ed403 100644 (file)
@@ -24,7 +24,6 @@
 | ... | AND | Install Vpp on All Duts | ${nodes} | ${packages_dir}
 | ... | AND | Verify Vpp on All Duts | ${nodes}
 | ... | AND | Verify UIO Driver on all DUTs | ${nodes}
-| ... | AND | Setup All DUTs | ${nodes}
 | ... | AND | Show Vpp Version on All Duts | ${nodes}
 | ... | AND | Get CPU Layout from All nodes | ${nodes}
 | ... | AND | Update All Interface Data on All Nodes | ${nodes}