Introduce simple VAT history per test case 73/5073/6
authorJan Gelety <jgelety@cisco.com>
Wed, 8 Feb 2017 11:51:31 +0000 (12:51 +0100)
committerPeter Mikus <pmikus@cisco.com>
Mon, 13 Feb 2017 12:45:08 +0000 (12:45 +0000)
- print list of VAT commands executed per DUT node during the test
  case in the func test teardown

Change-Id: I18a750ebfb7560eff9f5c4f0826ef84c3f64b4a8
Signed-off-by: Jan Gelety <jgelety@cisco.com>
27 files changed:
resources/libraries/python/VatExecutor.py
resources/libraries/python/VatHistory.py [new file with mode: 0644]
resources/libraries/robot/default.robot
tests/func/fds/eth2p-dot1q-l2bdbasemaclrn-eth-4vhost-2vm-fds-provider-nets-func.robot
tests/func/fds/eth2p-ethip4vxlan-l2bdbasemaclrn--eth-4vhost-2vm-fds-tenant-nets-func.robot
tests/func/ipv4/eth2p-ethip4-ip4base-func.robot
tests/func/ipv6/eth2p-ethip6-ip6base-func.robot
tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip4base-func.robot
tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6base-func.robot
tests/func/lisp/eth2p-ethip4ipsectptlispgpe-ip6basevrf-func.robot
tests/func/lisp/eth2p-ethip4lispgpe-ip4base-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip4lispgpe-ip4base-func.robot
tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip4lispgpe-ip4basevrf-func.robot
tests/func/lisp/eth2p-ethip4lispgpe-ip6base-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip4lispgpe-ip6basevrf-func.robot
tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip4base-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip6ipsectptlispgpe-ip6base-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip6lispgpe-ip6base-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip6lispgpe-ip6base-func.robot
tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-eth-2vhost-1vm-func.robot
tests/func/lisp/eth2p-ethip6lispgpe-ip6basevrf-func.robot
tests/func/tap/eth2p-eth-l2bdbasemaclrn-eth-2tap-func.robot
tests/func/vxlan/eth2p-ethip4vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot
tests/func/vxlan/eth2p-ethip6vxlan-l2bdbasemaclrn-eth-2vhost-1vm-func.robot

index bbce83d..5f7e188 100644 (file)
@@ -19,6 +19,7 @@ from robot.api import logger
 
 from resources.libraries.python.ssh import SSH
 from resources.libraries.python.constants import Constants
+from resources.libraries.python.VatHistory import VatHistory
 
 
 __all__ = ['VatExecutor']
@@ -162,8 +163,9 @@ class VatTerminal(object):
     def __init__(self, node, json_param=True):
         json_text = ' json' if json_param else ''
         self.json = json_param
+        self._node = node
         self._ssh = SSH()
-        self._ssh.connect(node)
+        self._ssh.connect(self._node)
         self._tty = self._ssh.interactive_terminal_open()
         self._ssh.interactive_terminal_exec_command(
             self._tty,
@@ -185,6 +187,7 @@ class VatTerminal(object):
         :return: Command output in python representation of JSON format or
         None if not in JSON mode.
         """
+        VatHistory.add_to_vat_history(self._node, cmd)
         logger.debug("Executing command in VAT terminal: {}".format(cmd))
         try:
             out = self._ssh.interactive_terminal_exec_command(self._tty, cmd,
@@ -217,7 +220,7 @@ class VatTerminal(object):
 
     def vat_terminal_close(self):
         """Close VAT terminal."""
-        #interactive terminal is dead, we only need to close session
+        # interactive terminal is dead, we only need to close session
         if not self._exec_failure:
             self._ssh.interactive_terminal_exec_command(self._tty,
                                                         'quit',
diff --git a/resources/libraries/python/VatHistory.py b/resources/libraries/python/VatHistory.py
new file mode 100644 (file)
index 0000000..caa3de5
--- /dev/null
@@ -0,0 +1,93 @@
+# Copyright (c) 2016 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.
+
+"""DUT VAT command history setup library."""
+
+from robot.api import logger
+
+from resources.libraries.python.topology import NodeType, DICT__nodes
+
+__all__ = ["DICT__duts_vat_history", "VatHistory"]
+
+
+def setup_vat_history(nodes):
+    duts_vat_history = {}
+    for node in nodes.values():
+        if node['type'] == NodeType.DUT:
+            duts_vat_history[node['host']] = []
+    return duts_vat_history
+
+DICT__duts_vat_history = setup_vat_history(DICT__nodes)
+
+
+class VatHistory(object):
+    """Contains methods to set up DUT VAT command history."""
+
+    @staticmethod
+    def reset_vat_history(node):
+        """Reset VAT command history for DUT node.
+
+        :param node: DUT node to reset VAT command history for.
+        :type node: dict
+        """
+        if node['type'] == NodeType.DUT:
+            DICT__duts_vat_history[node['host']] = []
+
+    @staticmethod
+    def reset_vat_history_on_all_duts(nodes):
+        """Reset VAT command history for all DUT nodes.
+
+        :param nodes: Nodes to reset VAT command history for.
+        :type nodes: dict
+        """
+        for node in nodes.values():
+            if node['type'] == NodeType.DUT:
+                VatHistory.reset_vat_history(node)
+
+    @staticmethod
+    def show_vat_history(node):
+        """Show VAT command history for DUT node.
+
+        :param node: DUT node to show VAT command history for.
+        :type node: dict
+        """
+        if node['type'] == NodeType.DUT:
+            sequence = "\nno VAT command executed"\
+                if len(DICT__duts_vat_history[node['host']]) == 0\
+                else "".join("\n{}".format(cmd)
+                             for cmd in DICT__duts_vat_history[node['host']])
+            logger.trace("{0} VAT command history:{1}\n".
+                         format(node['host'], sequence))
+
+    @staticmethod
+    def show_vat_history_on_all_duts(nodes):
+        """Show VAT command history for all DUT nodes.
+
+        :param nodes: Nodes to show VAT command history for.
+        :type nodes: dict
+        """
+        for node in nodes.values():
+            if node['type'] == NodeType.DUT:
+                VatHistory.show_vat_history(node)
+
+    @staticmethod
+    def add_to_vat_history(node, cmd):
+        """Add command to VAT command history on DUT node.
+
+        :param node: DUT node to add command to VAT command history for.
+        :param cmd: Command to be added to VAT command history.
+        :type node: dict
+        :type cmd: str
+        """
+        if node['type'] == NodeType.DUT:
+            DICT__duts_vat_history[node['host']].append(cmd)
index 29934ad..f8dda17 100644 (file)
@@ -13,7 +13,9 @@
 
 *** Settings ***
 | Variables | resources/libraries/python/topology.py
+| Variables | resources/libraries/python/VatHistory.py
 | Library | resources.libraries.python.topology.Topology
+| Library | resources.libraries.python.VatHistory
 | Library | resources.libraries.python.CpuUtils
 | Library | resources.libraries.python.DUTSetup
 | Library | resources.libraries.python.SchedUtils
 | | Save VPP PIDs
 | | Setup all TGs before traffic script
 | | Update All Interface Data On All Nodes | ${nodes}
+| | Reset VAT History On All DUTs | ${nodes}
 
 | Func Test Teardown
 | | [Documentation] | Common test teardown for functional tests.
 | | ...
 | | Show Packet Trace on All DUTs | ${nodes}
-| | Show vpp trace dump on all DUTs
+| | Show VAT History On All DUTs | ${nodes}
 | | Vpp Show Errors On All DUTs | ${nodes}
 | | Check VPP PID in Teardown
index 612825d..bc6f58c 100644 (file)
@@ -23,8 +23,9 @@
 | Test Setup | Run Keywords | Setup all DUTs before test
 | ...        | AND          | Save VPP PIDs
 | ...        | AND          | Setup all TGs before traffic script
+| ...        | AND          | Reset VAT History On All DUTs | ${nodes}
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ...           | AND          | Show vpp trace dump on all DUTs
+| ...           | AND          | Show VAT History On All DUTs | ${nodes}
 | ...           | AND          | Qemu Teardown | ${dut1_node} | ${qemu_node1}
 | ...                          | qemu_node1
 | ...           | AND          | Qemu Teardown | ${dut2_node} | ${qemu_node2}
index ba26c8b..fae1b03 100644 (file)
@@ -23,8 +23,9 @@
 | Test Setup | Run Keywords | Setup all DUTs before test
 | ...        | AND          | Save VPP PIDs
 | ...        | AND          | Setup all TGs before traffic script
+| ...        | AND          | Reset VAT History On All DUTs | ${nodes}
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ...           | AND          | Show vpp trace dump on all DUTs
+| ...           | AND          | Show VAT History On All DUTs | ${nodes}
 | ...           | AND          | Qemu Teardown | ${dut1_node} | ${qemu_node1}
 | ...                          | qemu_node1
 | ...           | AND          | Qemu Teardown | ${dut2_node} | ${qemu_node2}
index 020d1f1..158dd89 100644 (file)
 | ... | Update All Interface Data On All Nodes | ${nodes} | AND
 | ... | Setup DUT nodes for IPv4 testing
 | Test Setup | Run Keywords | Save VPP PIDs | AND
+| ... | Reset VAT History On All DUTs | ${nodes} | AND
 | ... | Clear interface counters on all vpp nodes in topology | ${nodes}
 | Test Teardown | Run Keywords
 | ... | Show packet trace on all DUTs | ${nodes} | AND
-| ... | Show vpp trace dump on all DUTs | AND
+| ... | Show VAT History On All DUTs | ${nodes} | AND
 | ... | Check VPP PID in Teardown
 | Documentation | *IPv4 routing test cases*
 | ...
index 6048daa..4eed078 100644 (file)
 | ... | Vpp nodes setup ipv6 routing | ${nodes} | ${nodes_ipv6_addr} | AND
 | ... | Setup all TGs before traffic script
 | Test Setup | Run Keywords | Save VPP PIDs | AND
+| ... | Reset VAT History On All DUTs | ${nodes} | AND
 | ... | Clear interface counters on all vpp nodes in topology | ${nodes}
 | Test Teardown | Run Keywords
 | ... | Show packet trace on all DUTs | ${nodes} | AND
-| ... | Show vpp trace dump on all DUTs | AND
+| ... | Show VAT History On All DUTs | ${nodes}  | AND
 | ... | Check VPP PID in Teardown
 | Documentation | *IPv6 routing test cases*
 | ...
index 32477c0..d3a3cda 100644 (file)
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
+| ... | AND | Stop and Clear QEMU | ${nodes['DUT1']} | ${vm_node}
 | ... | AND | Check VPP PID in Teardown
 | ...
 | Documentation | *IPv4-ip4-ipsec-lispgpe-ip4 - main fib, vrf (gpe_vni-to-vrf)*
 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830, RFC4303.
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Show VPP Settings | ${dut1_node}
-| | ... | AND | Show VPP Settings | ${dut2_node}
-| | ... | AND | Check VPP PID in Teardown
 | | ...
 | | ${encr_alg}= | Crypto Alg AES CBC 128
 | | ${auth_alg}= | Integ Alg SHA1 96
 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv4 headers on\
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830, RFC4303.
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Show VPP Settings | ${dut1_node}
-| | ... | AND | Show VPP Settings | ${dut2_node}
-| | ... | AND | Check VPP PID in Teardown
 | | ...
 | | ${encr_alg}= | Crypto Alg AES CBC 128
 | | ${auth_alg}= | Integ Alg SHA1 96
index f3af311..04067a6 100644 (file)
@@ -37,7 +37,7 @@
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
 | ... | AND | Check VPP PID in Teardown
index d8bdab7..3d3b3ce 100644 (file)
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
+| ... | AND | Stop and Clear QEMU | ${nodes['DUT1']} | ${vm_node}
 | ... | AND | Check VPP PID in Teardown
 | ...
 | Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, vrf, virt2lisp,\
 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830, RFC4303.
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
-| | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Check VPP PID in Teardown
 | | ...
 | | ${encr_alg}= | Crypto Alg AES CBC 128
 | | ${auth_alg}= | Integ Alg SHA1 96
 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830, RFC4303.
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
-| | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Check VPP PID in Teardown
 | | ...
 | | ${encr_alg}= | Crypto Alg AES CBC 128
 | | ${auth_alg}= | Integ Alg SHA1 96
index 2bc4a2c..df942c7 100644 (file)
@@ -40,7 +40,7 @@
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
 | ... | AND | Check VPP PID in Teardown
index 06b8832..4974224 100644 (file)
@@ -40,7 +40,7 @@
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
 | ... | AND | Check VPP PID in Teardown
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830, RFC4303.
 | | ...
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
-| | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
-| | ... | AND | Check VPP PID in Teardown
-| | ...
 | | ${encr_alg}= | Crypto Alg AES CBC 128
 | | ${auth_alg}= | Integ Alg SHA1 96
 | | Given Path for 3-node testing is set
index a63925b..d1eec4b 100644 (file)
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
+| ... | AND | Stop and Clear QEMU | ${nodes['DUT1']} | ${vm_node}
 | ... | AND | Check VPP PID in Teardown
 | ...
 | Documentation | *ip4-lispgpe-ip4 encapsulation test cases*
 | | ... | DUTs and LISP GPE tunnel between them; verify IPv4 headers on\
 | | ... | received packets are correct.
 | | ...
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
-| | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Check VPP PID in Teardown
-| | ...
 | | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
 | | And Interfaces in 3-node path are up
index 29e58ea..cac15ce 100644 (file)
@@ -35,7 +35,7 @@
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
 | ... | AND | Check VPP PID in Teardown
index 8241d32..7c6c6f4 100644 (file)
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
+| ... | AND | Stop and Clear QEMU | ${nodes['DUT1']} | ${vm_node}
 | ... | AND | Check VPP PID in Teardown
 | ...
 | Documentation | *ip4-lispgpe-ip4 encapsulation test cases*
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830.
 | | ...
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
-| | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Check VPP PID in Teardown
-| | ...
 | | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
 | | And Interfaces in 3-node path are up
index 0f3b34d..83c15ec 100644 (file)
@@ -35,7 +35,7 @@
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
 | ... | AND | Check VPP PID in Teardown
index 77c0df9..eb964b5 100644 (file)
 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
 | ... | VM_ENV | HW_ENV
 | Test Setup | Func Test Setup
-| Test Teardown | Func Test Teardown
+| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
+| ... | AND | Show VAT History On All DUTs | ${nodes}
+| ... | AND | Show Vpp Settings | ${nodes['DUT1']}
+| ... | AND | Show Vpp Settings | ${nodes['DUT2']}
+| ... | AND | Stop and Clear QEMU | ${nodes['DUT1']} | ${vm_node}
+| ... | AND | Check VPP PID in Teardown
 | Documentation | *LISP static adjacency test cases*
 | ...
 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
 | | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
 | | ... | received packets are correct.
 | | ...
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
-| | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Check VPP PID in Teardown
-| | ...
 | | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
 | | And Interfaces in 3-node path are up
index 41d5dcf..7d88aa0 100644 (file)
@@ -30,7 +30,9 @@
 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | 3_NODE_DOUBLE_LINK_TOPO
 | ... | VM_ENV | HW_ENV
 | Test Setup | Func Test Setup
-| Test Teardown | Func Test Teardown
+| Test Teardown | Run Keywords | Func Test Teardown
+| ... | AND | Show Vpp Settings | ${nodes['DUT1']}
+| ... | AND | Show Vpp Settings | ${nodes['DUT2']}
 | Documentation | *LISP static adjacency test cases*
 | ...
 | ... | *[Top] Network Topologies:* TG-DUT1-DUT2-TG 3-node circular topology\
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830.
 | | ...
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
-| | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
-| | ... | AND | Check VPP PID in Teardown
-| | ...
 | | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
 | | And Interfaces in 3-node path are up
index ae846ad..155dbb4 100644 (file)
@@ -23,6 +23,7 @@
 | Library | resources.libraries.python.IPv6Setup
 | Library | resources.libraries.python.VhostUser
 | Library | resources.libraries.python.QemuUtils
+| Library  | resources.libraries.python.VPPUtil
 | Library | String
 | Resource | resources/libraries/robot/traffic.robot
 | Resource | resources/libraries/robot/default.robot
 | ...
 | Test Setup | Func Test Setup
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
+| ... | AND | Stop and Clear QEMU | ${nodes['DUT1']} | ${vm_node}
 | ... | AND | Check VPP PID in Teardown
 | ...
 | Documentation | *IPv6 - ip4-ipsec-lispgpe-ip6 - main fib, virt2lisp, phy2lisp*
 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830, RFC4303.
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | VPP Show Errors | ${nodes['DUT1']}
-| | ... | AND | VPP Show Errors | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Check VPP PID in Teardown
 | | ...
 | | ${encr_alg}= | Crypto Alg AES CBC 128
 | | ${auth_alg}= | Integ Alg SHA1 96
 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830, RFC4303.
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | VPP Show Errors | ${nodes['DUT1']}
-| | ... | AND | VPP Show Errors | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Check VPP PID in Teardown
 | | ...
 | | ${encr_alg}= | Crypto Alg AES CBC 128
 | | ${auth_alg}= | Integ Alg SHA1 96
index 54091a7..29f5e49 100644 (file)
 | ...
 | Test Setup | Run Keywords | Func Test Setup
 | ...        | AND          | Vpp All Ra Suppress Link Layer | ${nodes}
-| Test Teardown | Func Test Teardown
+| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
+| ... | AND | Show VAT History On All DUTs | ${nodes}
+| ... | AND | Show Vpp Settings | ${nodes['DUT1']}
+| ... | AND | Show Vpp Settings | ${nodes['DUT2']}
+| ... | AND | Stop and Clear QEMU | ${nodes['DUT1']} | ${vm_node}
+| ... | AND | Check VPP PID in Teardown
 | ...
 | Documentation | *IPv6 - ip6-ipsec-lispgpe-ip6 - main fib,
 | ... | vrf (gpe_vni-to-vrf), phy2lisp, virt2lisp*
 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830, RFC4303.
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | VPP Show Errors | ${nodes['DUT1']}
-| | ... | AND | VPP Show Errors | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Show VPP Settings | ${dut1_node}
-| | ... | AND | Check VPP PID in Teardown
 | | ...
 | | ${encr_alg}= | Crypto Alg AES CBC 128
 | | ${auth_alg}= | Integ Alg SHA1 96
 | | ... | both DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830, RFC4303.
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | VPP Show Errors | ${nodes['DUT1']}
-| | ... | AND | VPP Show Errors | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Show VPP Settings | ${dut1_node}
-| | ... | AND | Check VPP PID in Teardown
 | | ...
 | | ${encr_alg}= | Crypto Alg AES CBC 128
 | | ${auth_alg}= | Integ Alg SHA1 96
index 1f86007..7baaeee 100644 (file)
 | Test Setup | Run Keywords | Func Test Setup
 | ... | AND | Vpp All Ra Suppress Link Layer | ${nodes}
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
+| ... | AND | Stop and Clear QEMU | ${nodes['DUT1']} | ${vm_node}
 | ... | AND | Check VPP PID in Teardown
 | ...
 | Documentation | *ip6-lispgpe-ip6 encapsulation test cases*
 | | ... | DUTs and LISP GPE tunnel between them; verify IPv6 headers on\
 | | ... | received packets are correct.
 | | ...
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
-| | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Check VPP PID in Teardown
-| | ...
 | | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
 | | And Interfaces in 3-node path are up
index d70656f..2831651 100644 (file)
@@ -34,7 +34,7 @@
 | Test Setup | Run Keywords | Func Test Setup
 | ... | AND | Vpp All Ra Suppress Link Layer | ${nodes}
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
 | ... | AND | Check VPP PID in Teardown
index 0f48e4f..d9b489e 100644 (file)
 | Test Setup | Run Keywords | Func Test Setup
 | ... | AND | Vpp All Ra Suppress Link Layer | ${nodes}
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
+| ... | AND | Stop and Clear QEMU | ${nodes['DUT1']} | ${vm_node}
 | ... | AND | Check VPP PID in Teardown
 | ...
 | Documentation | *ip6-lispgpe-ip6 encapsulation test cases*
 | | ... | received packets are correct.
 | | ... | [Ref] RFC6830.
 | | ...
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
-| | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
-| | ... | AND | Stop and Clear QEMU | ${dut1_node} | ${vm_node}
-| | ... | AND | Check VPP PID in Teardown
 | | ...
 | | Given Path for 3-node testing is set
 | | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']}
index 5517e62..500f138 100644 (file)
@@ -34,7 +34,7 @@
 | Test Setup | Run Keywords | Func Test Setup
 | ... | AND | Vpp All Ra Suppress Link Layer | ${nodes}
 | Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| ... | AND | Show vpp trace dump on all DUTs
+| ... | AND | Show VAT History On All DUTs | ${nodes}
 | ... | AND | Show Vpp Settings | ${nodes['DUT1']}
 | ... | AND | Show Vpp Settings | ${nodes['DUT2']}
 | ... | AND | Check VPP PID in Teardown
index 6c47c5c..64284e5 100644 (file)
@@ -27,7 +27,8 @@
 | Test Setup | Run Keywords | Func Test Setup
 | ...        | AND          | Clean Up Namespaces | ${nodes['DUT1']}
 | Test Teardown | Run Keywords | Func Test Teardown
-| ...           | AND          | Clean Up Namespaces | ${nodes['DUT1']}
+| ... | AND | Linux Del Bridge | ${nodes['DUT1']} | ${bid_TAP}
+| ... | AND | Clean Up Namespaces | ${nodes['DUT1']}
 | Documentation | *Tap Interface Traffic Tests*
 | ... | *[Top] Network Topologies:* TG=DUT1 2-node topology with two links
 | ... | between nodes.
 | | ... | [Ver] Packet sent from TG is passed through all L2BD and received
 | | ... | back on TG. Then src_ip, dst_ip and MAC are checked.
 | | ...
-| | [Teardown] | Run Keywords
-| | ... | Linux Del Bridge | ${dut_node} | ${bid_TAP} | AND
-| | ... | Show Packet Trace on All DUTs | ${nodes} | AND
-| | ... | Clean Up Namespaces | ${nodes['DUT1']} | AND
-| | ... | Check VPP PID in Teardown
-| | ...
 | | Given Path for 2-node testing is set | ${nodes['TG']} | ${nodes['DUT1']}
 | | ... | ${nodes['TG']}
 | | And Interfaces in 2-node path are up
index 357f339..5e277a3 100644 (file)
 | Library  | resources.libraries.python.Trace
 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV | VPP_VM_ENV
 | Test Setup | Func Test Setup
-| Test Teardown | Func Test Teardown
+| Test Teardown | Run Keywords | Func Test Teardown
+| ... | AND | Run keyword | Qemu Teardown | ${dut1_node}
+| ...                                     | ${${qemu1}} | ${qemu1}
+| ... | AND | Run keyword | Qemu Teardown | ${dut2_node}
+| ...                                     | ${${qemu2}} | ${qemu2}
 | Documentation | *L2BD with VM combined with VXLAN test cases - IPv4*
 | ...
 | ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology
 | | ...                            | ${dut2s_vxlan} | ${${dut2_vhost2}}
 | | Then Send and receive ICMPv4 bidirectionally
 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Run keyword | Qemu Teardown | ${dut1_node}
-| | ...                                     | ${${qemu1}} | ${qemu1}
-| | ... | AND | Run keyword | Qemu Teardown | ${dut2_node}
-| | ...                                     | ${${qemu2}} | ${qemu2}
-| | ... | AND | Check VPP PID in Teardown
index 1984629..25b457c 100644 (file)
 | Library  | resources.libraries.python.Trace
 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | HW_ENV
 | Test Setup | Func Test Setup
-| Test Teardown | Func Test Teardown
+| Test Teardown | Run Keywords | Func Test Teardown
+| ... | AND | Run keyword | Qemu Teardown | ${dut1_node}
+| ...                                     | ${${qemu1}} | ${qemu1}
+| ... | AND | Run keyword | Qemu Teardown | ${dut2_node}
+| ...                                     | ${${qemu2}} | ${qemu2}
 | Documentation | *L2BD with VM combined with VXLAN test cases - IPv6*
 | ...
 | ... | *[Top] Network topologies:* TG-DUT1-DUT2-TG 3-node circular topology
 | | ...                            | ${dut2s_vxlan} | ${${dut2_vhost2}}
 | | Then Send and receive ICMPv6 bidirectionally
 | | ... | ${tg_node} | ${tg_to_dut1} | ${tg_to_dut2}
-| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
-| | ... | AND | Show vpp trace dump on all DUTs
-| | ... | AND | Run keyword | Qemu Teardown | ${dut1_node}
-| | ...                                     | ${${qemu1}} | ${qemu1}
-| | ... | AND | Run keyword | Qemu Teardown | ${dut2_node}
-| | ...                                     | ${${qemu2}} | ${qemu2}
-| | ... | AND | Check VPP PID in Teardown