HC Test: update plugin-ACL tests 47/5447/4
authorselias <samelias@cisco.com>
Tue, 21 Feb 2017 10:51:01 +0000 (11:51 +0100)
committerTibor Frank <tifrank@cisco.com>
Mon, 27 Feb 2017 12:11:24 +0000 (12:11 +0000)
 - improve packet trace logging after each test
 - suppress IPv6RA on VPP because it interfered with ipv6 test cases
 - do not use fictional destination MAC address, doesn't work in VIRL
 - ignore errors when logging configuration - should not fail the test

Change-Id: I16a3321670d4c2fa8f6434dc4badd243b7e4f9fc
Signed-off-by: selias <samelias@cisco.com>
resources/libraries/python/Classify.py
tests/func/honeycomb/mgmt-cfg-pluginacl-apihc-apivat-func.robot

index d0a5804..e4fa2a3 100644 (file)
@@ -375,7 +375,7 @@ class Classify(object):
         try:
             VatExecutor.cmd_from_template(
                 node, "acl_plugin/acl_dump.vat")
-        except ValueError:
+        except (ValueError, RuntimeError):
             # Fails to parse JSON data in response, but it is still logged
             pass
 
index b0f202f..cbc89ec 100644 (file)
 | Library | resources.libraries.python.IPv4Util
 | Library | resources.libraries.python.IPv6Util
 | Library | resources.libraries.python.Routing
-| Test Teardown | Run Keywords | Read plugin-ACL configuration from VAT
-| ... | ${node} | AND
-| ... | Clear plugin-acl settings | ${node} | ${dut_to_tg_if1}
-| Suite Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes} | AND
-| ... | Run Keyword If Any Tests Failed
+| Test Setup | Clear Packet Trace on All DUTs | ${nodes}
+| Test Teardown | Run Keywords | Show Packet Trace on All DUTs | ${nodes}
+| ... | AND | Read plugin-ACL configuration from VAT | ${node}
+| ... | AND | Clear plugin-acl settings | ${node} | ${dut_to_tg_if1}
+| Suite Setup | Vpp All ra suppress link layer | ${nodes}
+| Suite Teardown
 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
 | Documentation | *Honeycomb access control lists test suite for ACL plugin.*
 | Force Tags | Honeycomb_sanity
@@ -62,6 +63,7 @@
 | | ... | using different MACs. Receive all packets except those with\
 | | ... | MACs in the filtered ranges.
 | | [Teardown] | Run Keywords
+| | ... | Show Packet Trace on All DUTs | ${nodes} | AND
 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
 | | ... | Honeycomb Removes All Bridge Domains
 | | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_macip}
 | | ... | ingress | macip=${True}
 | | When Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
-| | ... | ${tg_to_dut_if1} | ${src_mac}
-| | ... | ${tg_to_dut_if2} | ${dst_mac}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
 | | ... | TCP | ${src_port} | ${dst_port}
 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
 | | ... | Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
 | | ... | ${tg_to_dut_if1} | ${classify_src}
-| | ... | ${tg_to_dut_if2} | ${dst_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
 | | ... | TCP | ${src_port} | ${dst_port}
 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
 | | ... | Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
 | | ... | ${tg_to_dut_if1} | ${classify_src2}
-| | ... | ${tg_to_dut_if2} | ${dst_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
 | | ... | TCP | ${src_port} | ${dst_port}
 
 | TC02: ACL IPv4 filtering through plugin-acl node - bridged
 | | ... | to the other, using different IPv4 IPs. Receive all packets except\
 | | ... | those with IPs in the filtered ranges and UDP protocol payload.
 | | [Teardown] | Run Keywords
+| | ... | Show Packet Trace on All DUTs | ${nodes} | AND
 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
 | | ... | Honeycomb Removes All Bridge Domains
 | | ... | to the other, using different IPv6 IPs. Receive all packets except\
 | | ... | those with IPs in the filtered ranges and UDP protocol payload.
 | | [Teardown] | Run Keywords
+| | ... | Show Packet Trace on All DUTs | ${nodes} | AND
 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
 | | ... | Honeycomb Removes All Bridge Domains
 | | ... | to the other, using different ports. Receive all packets except\
 | | ... | those with ports in the filtered ranges.
 | | [Teardown] | Run Keywords
+| | ... | Show Packet Trace on All DUTs | ${nodes} | AND
 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
 | | ... | Honeycomb Removes All Bridge Domains
 | | ... | using IPs and ports. Receive all packets except those with\
 | | ... | both IPs and ports in the filtered ranges.
 | | [Teardown] | Run Keywords
+| | ... | Show Packet Trace on All DUTs | ${nodes} | AND
 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
 | | ... | Honeycomb Removes All Bridge Domains
 | | And Honeycomb Assigns plugin-acl Chain To Interface
 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress
 | | Then Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
-| | ... | ${tg_to_dut_if1} | ${src_mac}
-| | ... | ${tg_to_dut_if2} | ${dst_mac}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
 | | ... | TCP | ${src_port} | ${dst_port}
 | | Then Send TCP Or UDP Packet | ${tg_node}
 | | ... | ${classify_src_ip} | ${classify_dst_ip}
-| | ... | ${tg_to_dut_if1} | ${src_mac}
-| | ... | ${tg_to_dut_if2} | ${dst_mac}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
 | | ... | TCP | ${src_port} | ${dst_port}
 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
 | | ... | Send TCP Or UDP Packet | ${tg_node}
 | | ... | ${classify_src_ip} | ${classify_dst_ip}
-| | ... | ${tg_to_dut_if1} | ${src_mac}
-| | ... | ${tg_to_dut_if2} | ${dst_mac}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
 | | ... | TCP | ${classify_src_port} | ${classify_dst_port}
 
 | TC06: ACL ICMP packet filtering - bridged
 | | [Tags] | EXPECTED_FAILING
 # Bug VPP-624, ICMP type/code values are not matched
 | | [Teardown] | Run Keywords
+| | ... | Show Packet Trace on All DUTs | ${nodes} | AND
 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
 | | ... | Honeycomb Removes All Bridge Domains
 | | [Tags] | EXPECTED_FAILING
 # Bug VPP-624, ICMP type/code values are not matched
 | | [Teardown] | Run Keywords
+| | ... | Show Packet Trace on All DUTs | ${nodes} | AND
 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
 | | ... | Honeycomb Removes All Bridge Domains
 | | [Tags] | EXPCETED_FAILING
 # Bug VPP-633, VPP crashes when any packet hits a reflexive rule
 | | [Teardown] | Run Keywords
+| | ... | Show Packet Trace on All DUTs | ${nodes} | AND
 | | ... | Read plugin-ACL configuration from VAT | ${node} | AND
 | | ... | Clear plugin-acl Settings | ${node} | ${dut_to_tg_if1} | AND
 | | ... | Honeycomb Removes All Bridge Domains
 | | And Honeycomb Assigns plugin-acl Chain To Interface
 | | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress
 | | Then Send TCP Or UDP Packet | ${tg_node} | ${src_ip} | ${dst_ip}
-| | ... | ${tg_to_dut_if1} | ${src_mac}
-| | ... | ${tg_to_dut_if2} | ${dst_mac}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
 | | ... | TCP | ${src_port} | ${dst_port}
 | | Then Send TCP Or UDP Packet | ${tg_node}
 | | ... | ${classify_src_ip} | ${classify_dst_ip}
-| | ... | ${tg_to_dut_if1} | ${src_mac}
-| | ... | ${tg_to_dut_if2} | ${dst_mac}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
+| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
 | | ... | TCP | ${src_port} | ${dst_port}
 | | And Run Keyword And Expect Error | TCP/UDP Rx timeout
 | | ... | Send TCP Or UDP Packet | ${tg_node}
 | | ... | ${classify_src_ip} | ${classify_dst_ip}
-| | ... | ${tg_to_dut_if1} | ${src_mac}
+| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
 | | ... | ${tg_to_dut_if2} | ${dst_mac}
 | | ... | TCP | ${classify_src_port} | ${classify_dst_port}