aboutsummaryrefslogtreecommitdiffstats
path: root/tests/func/honeycomb/mgmt-cfg-pluginacl-apihc-apivat-func.robot
blob: a365f54348e688ac754da415aeb438cacad7116a (plain) @media only all and (prefers-color-scheme: dark) { .highlight .hll { background-color: #49483e } .highlight .c { color: #75715e } /* Comment */ .highlight .err { color: #960050; background-color: #1e0010 } /* Error */ .highlight .k { color: #66d9ef } /* Keyword */ .highlight .l { color: #ae81ff } /* Literal */ .highlight .n { color: #f8f8f2 } /* Name */ .highlight .o { color: #f92672 } /* Operator */ .highlight .p { color: #f8f8f2 } /* Punctuation */ .highlight .ch { color: #75715e } /* Comment.Hashbang */ .highlight .cm { color: #75715e } /* Comment.Multiline */ .highlight .cp { color: #75715e } /* Comment.Preproc */ .highlight .cpf { color: #75715e } /* Comment.PreprocFile */ .highlight .c1 { color: #75715e } /* Comment.Single */ .highlight .cs { color: #75715e } /* Comment.Special */ .highlight .gd { color: #f92672 } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gi { color: #a6e22e } /* Generic.Inserted */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #75715e } /* Generic.Subheading */ .highlight .kc { color: #66d9ef } /* Keyword.Constant */ .highlight .kd { color: #66d9ef } /* Keyword.Declaration */ .highlight .kn { color: #f92672 } /* Keyword.Namespace */ .highlight .kp { color: #66d9ef } /* Keyword.Pseudo */ .highlight .kr { color: #66d9ef } /* Keyword.Reserved */ .highlight .kt { color: #66d9ef } /* Keyword.Type */ .highlight .ld { color: #e6db74 } /* Literal.Date */ .highlight .m { color: #ae81ff } /* Literal.Number */ .highlight .s { color: #e6db74 } /* Literal.String */ .highlight .na { color: #a6e22e } /* Name.Attribute */ .highlight .nb { color: #f8f8f2 } /* Name.Builtin */ .highlight .nc { color: #a6e22e } /* Name.Class */ .highlight .no { color: #66d9ef } /* Name.Constant */ .highlight .nd { color: #a6e22e } /* Name.Decorator */ .highlight .ni { color: #f8f8f2 } /* Name.Entity */ .highlight .ne { color: #a6e22e } /* Name.Exception */ .highlight .nf { color: #a6e22e } /* Name.Function */ .highlight .nl { color: #f8f8f2 } /* Name.Label */ .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ .highlight .nx { color: #a6e22e } /* Name.Other */ .highlight .py { color: #f8f8f2 } /* Name.Property */ .highlight .nt { color: #f92672 } /* Name.Tag */ .highlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sa { color: #e6db74 } /* Literal.String.Affix */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
Descriptions of section entries:

	M: Maintainer Full name and E-mail address: Full Name <address@domain>
	   One maintainer per line.  Multiple M: lines acceptable.
	F: Files and directories with wildcard patterns.
	   A trailing slash includes all files and subdirectory files.
	   F:	drivers/net/	all files in and below drivers/net
	   F:	drivers/net/*	all files in drivers/net, but not below
	   One pattern per line.  Multiple F: lines acceptable.
	C: Single line comment related to current section.

		-----------------------------------

Build System
M:	Damjan Marion <damarion@cisco.com>
F:	Makefile
F:	src/*.ac
F:	src/*.am
F:	src/*.mk
F:	src/m4/

Build System Internal
M:	Dave Barach <dave@barachs.net>
F:	build-root/Makefile
F:	build-data/*

Doxygen
M:	Chris Luke <chrisy@flirble.org>
F:	doxygen/

Sphinx Documents
M:     John DeNisco <jdenisco@cisco.com>
M:     Ray Kinsella <raykinsella78@gmail.com>
F:     docs/

DPDK Development Packaging
M:	Damjan Marion <damarion@cisco.com>
F:	dpdk/
F:	dpdk/*

Infrastructure Library
M:	Dave Barach <dave@barachs.net>
F:	src/vppinfra/

VLIB Library
M:	Dave Barach <dave@barachs.net>
M:	Damjan Marion <damarion@cisco.com>
F:	src/vlib/

VLIB API Libraries
M:	Dave Barach <dave@barachs.net>
F:	src/vlibapi/
F:	src/vlibmemory/

VNET Bidirectonal Forwarding Detection (BFD)
M:	Klement Sekera <ksekera@cisco.com>
F:	src/vnet/bfd/

VNET Device Drivers
M:	Damjan Marion <damarion@cisco.com>
F:	src/vnet/devices/

VNET Device Drivers - DPDK Crypto
M:	Sergio Gonzalez Monroy <sergio.gonzalez.monroy@outlook.com>
M:      Radu Nicolau <radu.nicolau@intel.com>
F:	src/devices/dpdk/ipsec/

VNET Feature Arcs
M:	Dave Barach <dave@barachs.net>
M:	Damjan Marion <damarion@cisco.com>
F:	src/vnet/feature/

VNET FIB
M:	Neale Ranns <nranns@cisco.com>
F:	src/vnet/fib/
F:	src/vnet/mfib/
F:	src/vnet/dpo
F:	src/vnet/adj

VNET IPv4 and IPv6 LPM
M:	Dave Barach <dave@barachs.net>
F:	src/vnet/ip/

VNET Segment Routing (IPv6 and MPLS)
M:	Pablo Camarillo <pcamaril@cisco.com>
F:	src/vnet/srv6/
F:	src/vnet/srmpls/
F:	src/examples/srv6-sample-localsid/

VNET IPSec
M:	Matus Fabian <matfabia@cisco.com>
M:	Radu Nicolau <radu.nicolau@intel.com>
F:	src/vnet/ipsec/

VNET L2
M:	John Lo <loj@cisco.com>
F:	src/vnet/l2/

VNET Link Layer Discovery Protocol (LLDP)
M:	Klement Sekera <ksekera@cisco.com>
F:	src/vnet/lldp/

VNET LISP
M:	Florin Coras <fcoras@cisco.com>
F:	src/vnet/lisp-cp/
F:	src/vnet/lisp-gpe/

Plugin - MAP
M:	Ole Troan <ot@cisco.com>
F:	src/plugins/map

VNET MPLS
M:	Neale Ranns <nranns@cisco.com>
F:	src/vnet/mpls/

VNET Host Stack Session Layer
M:	Florin Coras <fcoras@cisco.com>
F:	src/vnet/session

VNET TCP Stack
M:	Florin Coras <fcoras@cisco.com>
F:	src/vnet/tcp

VNET SCTP Stack
M:	Marco Varlese <mvarlese@suse.de>
F:	src/vnet/sctp

VNET VXLAN
M:	John Lo <loj@cisco.com>
F:	src/vnet/vxlan/

VNET VXLAN-GPE
M:	Keith Burns <alagalah@gmail.com>
M:	Hongjun Ni <hongjun.ni@intel.com>
F:	src/vnet/vxlan-gpe/

VNET GENEVE
M:	Marco Varlese <mvarlese@suse.de>
F:	src/vnet/geneve/

VNET IPIP
M:	Ole Troan <otroan@employees.org>
F:	src/vnet/ipip/

VNET TLS and TLS engine plugins
M: 	Florin Coras <fcoras@cisco.com>
M:	Ping Yu <ping.yu@intel.com>
F:	src/vnet/tls
F:	src/plugins/tlsopenssl
F:	src/plugins/tlsmbedtls

Plugin - ACL
M:	Andrew Yourtchenko <ayourtch@gmail.com>
F:	src/plugins/acl/
F:	src/plugins/acl.am

Plugin - flowprobe
M:	Ole Troan <otroan@employees.org>
F:	src/plugins/flowprobe/
F:	src/plugins/flowprobe.am

Plugin - GTPU
M:	Hongjun Ni <hongjun.ni@intel.com>
F:	src/plugins/gtpu/
F:	src/plugins/gtpu.am

Plugin - PPPoE
M:	Hongjun Ni <hongjun.ni@intel.com>
F:	src/plugins/pppoe/
F:	src/plugins/pppoe.am

Plugin - IPv6 Segment Routing Dynamic Proxy
M:	Francois Clad <fclad@cisco.com>
F:	src/plugins/srv6-ad/
F:	src/plugins/srv6_ad.am

Plugin - IPv6 Segment Routing Masquerading Proxy
M:	Francois Clad <fclad@cisco.com>
F:	src/plugins/srv6-am/
F:	src/plugins/srv6_am.am

Plugin - IPv6 Segment Routing Static Proxy
M:	Francois Clad <fclad@cisco.com>
F:	src/plugins/srv6-as/
F:	src/plugins/srv6_as.am

Plugin - Load Balancer
M:      Pierre Pfister <ppfister@cisco.com>
M:      Hongjun Ni <hongjun.ni@intel.com>
F:      src/plugins/lb/
F:      src/plugins/lb.am

Plugin - NSH
M:      Hongjun Ni <hongjun.ni@intel.com>
M:      Keith Burns <alagalah@gmail.com>
M:      Vengada <venggovi@cisco.com>
F:      src/plugins/nsh/
F:      src/plugins/nsh.am

Test Infrastructure
M:	Klement Sekera <ksekera@cisco.com>
F:	test/

SVM Library
M:	Dave Barach <dave@barachs.net>
F:	src/svm

VPP API TEST
M:	Dave Barach <dave@barachs.net>
F:	src/vat/

VPP Executable
M:	Dave Barach <dave@barachs.net>
F:	src/vpp/

Graphical Event Viewer
M:	Dave Barach <dave@barachs.net>
F:	src/tools/g2/

Performance Tooling
M:	Dave Barach <dave@barachs.net>
F:	src/tools/perftool/

Binary API Compiler
M:	Dave Barach <dave@barachs.net>
F:	src/tools/vppapigen/

Ganglia Telemetry Module
M:	Dave Barach <dave@barachs.net>
F:	gmod/

THE REST
C:	Contact vpp-dev Mailing List <vpp-dev@fd.io>
F:	*
F:	*/
='#n452'>452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718
# 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.

*** Variables ***
| &{if_settings}= | enabled=True
# Bridge domain settings
| ${bd_name}= | bd1
| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True}
| ... | unknown-unicast-flood=${True} | arp-termination=${False}
| &{bd_if_settings}= | split_horizon_group=${0} | bvi=${False}
# Names for AC lists
| ${acl_name_macip}= | macip
| ${acl_name_l3_ip4}= | acl_l3_ip4
| ${acl_name_l3_ip6}= | acl_l3_ip6
| ${acl_name_l4}= | acl_l4
| ${acl_name_mixed}= | acl_mixed
| ${acl_name_icmp}= | acl_icmp
| ${acl_name_icmpv6}= | acl_icmpv6
| ${acl_name_reflex}= | acl_reflex

*** Settings ***
| Resource | resources/libraries/robot/default.robot
| Resource | resources/libraries/robot/honeycomb/honeycomb.robot
| Resource | resources/libraries/robot/honeycomb/interfaces.robot
| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
| Resource | resources/libraries/robot/honeycomb/access_control_lists.robot
| Resource | resources/libraries/robot/testing_path.robot
| Resource | resources/libraries/robot/traffic.robot
| Library | resources.libraries.python.honeycomb.HcAPIKwACL.ACLKeywords
| Library | resources.libraries.python.Trace
| Library | resources.libraries.python.IPv4Setup
| Library | resources.libraries.python.IPv4Util
| Library | resources.libraries.python.IPv6Util
| Library | resources.libraries.python.Routing
| ...
| Test Setup | Clear Packet Trace on All DUTs | ${nodes}
| ...
| Suite Teardown | Restart Honeycomb and VPP | ${node}
| ...
| Documentation | *Honeycomb access control lists test suite for ACL plugin.*
| ...
| Force Tags | HC_FUNC

*** Test Cases ***
| TC01: ACL MAC filtering through plugin-acl node - bridged
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
| | ... | and configure L2 MAC ACL on ingress interface.
| | ... | [Ver] Send simple TCP packets from one TG interface to the other,\
| | ... | using different MACs. Receive all packets except those with\
| | ... | MACs in the filtered ranges.
| | ...
| | [Teardown] | Bridged ACL test teardown
| | ...
| | Given Setup Interfaces And Bridge Domain For plugin-acl Test
| | ... | macip | ${acl_name_macip}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_macip} | ${acl_settings} | macip=${True}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_macip}
| | ... | ingress | macip=${True}
| | Then Send TCP or UDP packet and verify received packet | ${tg_node} | ${src_ip} | ${dst_ip}
| | ... | ${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 and verify received packet | ${tg_node} | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${classify_src}
| | ... | ${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 and verify received packet | ${tg_node} | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${classify_src2}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | TCP | ${src_port} | ${dst_port}

| TC02: ACL IPv4 filtering through plugin-acl node - bridged
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
| | ... | and configure L3 IPv4 ACL on ingress interface with src/dst IP
| | ... | and protocol number.
| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
| | ... | to the other, using different IPv4 IPs. Receive all packets except\
| | ... | those with IPs in the filtered ranges and UDP protocol payload.
| | ...
| | [Teardown] | Bridged ACL test teardown
| | ...
| | Given Setup Interfaces And Bridge Domain For plugin-acl Test
| | ... | l3_ip4 | ${acl_name_l3_ip4}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_l3_ip4} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip4} | ingress
| | Then Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | UDP | ${src_port} | ${dst_port}
| | And Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | UDP | ${src_port} | ${dst_port}

| TC03: ACL IPv6 filtering through plugin-acl node - bridged
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv6-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
| | ... | and configure L3 IPv6 ACL on ingress interface with src/dst IP
| | ... | and protocol number.
| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
| | ... | to the other, using different IPv6 IPs. Receive all packets except\
| | ... | those with IPs in the filtered ranges and UDP protocol payload.
| | ...
| | [Teardown] | Bridged ACL test teardown
| | ...
| | Given Setup interfaces and bridge domain for plugin-acl test
| | ... | l3_ip6 | ${acl_name_l3_ip6}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_l3_ip6} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip6} | ingress
| | Then Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | UDP | ${src_port} | ${dst_port}
| | And Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | UDP | ${src_port} | ${dst_port}

| TC04: ACL port filtering through plugin-acl node - bridged
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
| | ... | and and configure L4 port ACL on ingress interface
| | ... | with src/dst port ranges.
| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
| | ... | to the other, using different ports. Receive all packets except\
| | ... | those with ports in the filtered ranges.
| | ...
| | [Teardown] | Bridged ACL test teardown
| | ...
| | Given Setup interfaces and bridge domain for plugin-acl test
| | ... | L4 | ${acl_name_l4}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_l4} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l4} | ingress
| | Then Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | TCP | ${classify_src} | ${classify_dst}
| | And Run Keyword And Expect Error | TCP/UDP Rx timeout
| | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | TCP | ${classify_src+5} | ${classify_dst+5}

| TC05: ACL filtering with IPv4 address and TCP port in one rule - bridged
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
| | ... | and configure a mixed rule with src/dst IP, TCP protocol
| | ... | and port ranges.
| | ... | [Ver] Send simple TCP packets from one TG interface to the other,\
| | ... | using IPs and ports. Receive all packets except those with\
| | ... | both IPs and ports in the filtered ranges.
| | ...
| | [Teardown] | Bridged ACL test teardown
| | ...
| | Given Setup Interfaces And Bridge Domain For plugin-acl Test
| | ... | mixed | ${acl_name_mixed}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_mixed} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress
| | Then Send TCP or UDP packet and verify received packet | ${tg_node} | ${src_ip} | ${dst_ip}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${classify_src_ip} | ${classify_dst_ip}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${classify_src_ip} | ${classify_dst_ip}
| | ... | ${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
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-ICMP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
| | ... | and configure a ICMP protocol filtering by ICMP type and code.
| | ... | [Ver] Send ICMP packets from one TG interface\
| | ... | to the other, using different codes and types. Receive all packets\
| | ... | except those with types and codes in the filtered ranges.
| | ...
| | [Teardown] | Bridged ACL test teardown
| | ...
| | Given Setup interfaces and bridge domain for plugin-acl test
| | ... | icmp | ${acl_name_icmp}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_icmp} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmp} | ingress
| | Then Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${icmp_type} | ${icmp_code}
| | Then Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${classify_type} | ${icmp_code}
| | And Run Keyword And Expect Error | ICMP echo Rx timeout
| | ... | Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${classify_type} | ${classify_code}

| TC07: ACL ICMPv6 packet filtering - bridged
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv6-ICMP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\
| | ... | and configure a ICMPv6 protocol filtering by ICMPv6 type and code.
| | ... | [Ver] Send ICMPv6 packets from one TG interface\
| | ... | to the other, using different codes and types. Receive all packets\
| | ... | except those with the filtered type and code.
| | ...
| | [Teardown] | Bridged ACL test teardown
| | ...
| | Given Setup interfaces and bridge domain for plugin-acl test
| | ... | icmpv6 | ${acl_name_icmpv6}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_icmpv6} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmpv6} | ingress
| | Then Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${icmp_type} | ${icmp_code}
| | Then Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${classify_type} | ${icmp_code}
| | And Run Keyword And Expect Error | ICMP echo Rx timeout
| | ... | Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${classify_type} | ${classify_code}

| TC08: ACL reflexive IPv4 filtering through plugin-acl node - bridged
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG,\
| | ... | configure a "drop all" ACL on ingress and reflexive ACL on egress.
| | ... | [Ver] Send a simple TCP packet to VPP interface 1 and do not receive\
| | ... | it back. Then send the packet with reversed src/dst IP address\
| | ... | to VPP interface 2 and receive it from interface 1(this should create\
| | ... | a reflexive "permit" rule) Finally, send the original packet again\
| | ... | and receive it from interface 2.
| | ...
| | [Teardown] | Bridged ACL test teardown
| | ...
| | Given Setup Interfaces And Bridge Domain For plugin-acl Test
| | ... | reflex | ${acl_name_reflex}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_reflex} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_reflex} | egress
| | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
| | ... | block_all | block_all
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | block_all | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | block_all | ingress
| | And Run Keyword And Expect Error | TCP/UDP Rx timeout
| | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | TCP | ${src_port} | ${dst_port}
| | And Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_dst} | ${classify_src}
| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if2_mac}
| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if2_mac}
| | ... | TCP | ${dst_port} | ${src_port}
| | And Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | TCP | ${src_port} | ${dst_port}

# Routing section
# ===============

| TC09: ACL IPv4 filtering through plugin-acl node - routed
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
| | ... | interfaces to TG, add ARP entry and routes, and configure L3 IPv4 ACL\
| | ... | on ingress interface with src/dst IP and protocol.
| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
| | ... | to the other, using different IPv4 IPs. Receive all packets except\
| | ... | those with IPs in the filtered ranges and UDP protocol payload.
| | ...
| | [Teardown] | Routed ACL test teardown - ipv4
| | ...
| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
| | ... | l3_ip4 | ${acl_name_l3_ip4}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_l3_ip4} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip4} | ingress
| | Then Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | UDP | ${src_port} | ${dst_port}
| | And Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | UDP | ${src_port} | ${dst_port}

| TC10: ACL IPv6 filtering through plugin-acl node - routed
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv6-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv6 addresses on both\
| | ... | interfaces to TG, add IP neighbor entry and routes, and configure\
| | ... | L3 IPv6 ACL on ingress interface with src/dst IP and next-header.
| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
| | ... | to the other, using different IPv6 IPs. Receive all packets except\
| | ... | those with IPs in the filtered ranges and UDP protocol payload.
| | ...
| | [Teardown] | Routed ACL test teardown - ipv6
| | ...
| | Given Configure path in 2-node circular topology
| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
| | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
| | ... | L3_IP6 | ${acl_name_l3_ip6}
| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up
| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up
| | And Honeycomb sets interface IPv6 address | ${dut_node}
| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
| | And Honeycomb sets interface IPv6 address | ${dut_node}
| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
| | And VPP RA suppress link layer | ${dut_node} | ${dut_to_tg_if2}
| | And Honeycomb adds interface IPv6 neighbor
| | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac}
| | And VPP Route Add | ${node} | ${dst_net} | ${prefix_length}
| | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
| | And VPP Route Add | ${node} | ${classify_dst_net} | ${prefix_length}
| | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_l3_ip6} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip6} | ingress
| | Then Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | UDP | ${src_port} | ${dst_port}
| | And Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | UDP | ${src_port} | ${dst_port}

| TC11: ACL port filtering through plugin-acl node - routed
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
| | ... | interfaces to TG, add ARP entry and routes, and configure L4 port ACL\
| | ... | on ingress interface with src/dst port ranges.
| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\
| | ... | to the other, using different ports. Receive all packets except\
| | ... | those with ports in the filtered ranges.
| | ...
| | [Teardown] | Routed ACL test teardown - ipv4
| | ...
| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
| | ... | L4 | ${acl_name_l4}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_l4} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l4} | ingress
| | Then Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | TCP | ${classify_src} | ${classify_dst}
| | And Run Keyword And Expect Error | TCP/UDP Rx timeout
| | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | TCP | ${classify_src+5} | ${classify_dst+5}

| TC12: ACL filtering with IPv4 address and TCP port in one rule - routed
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
| | ... | interfaces to TG, add ARP entry and routes and configure a mixed
| | ... | rule with src/dst IP, TCP protocol and port ranges.
| | ... | [Ver] Send simple TCP packets from one TG interface to the other,\
| | ... | using IPs and ports. Receive all packets except those with\
| | ... | both IPs and ports in the filtered ranges.
| | ...
| | [Teardown] | Routed ACL test teardown - ipv4
| | ...
| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
| | ... | mixed | ${acl_name_mixed}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_mixed} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress
| | Then Send TCP or UDP packet and verify received packet | ${tg_node} | ${src_ip} | ${dst_ip}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${classify_src_ip} | ${classify_dst_ip}
| | ... | ${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 and verify received packet | ${tg_node}
| | ... | ${classify_src_ip} | ${classify_dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dst_mac}
| | ... | TCP | ${classify_src_port} | ${classify_dst_port}

| TC13: ACL ICMP packet filtering - routed
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
| | ... | interfaces to TG, add ARP entry and routes, and configure ICMP ACL\
| | ... | on ingress interface with ICMP type and code.
| | ... | [Ver] Send ICMP packets from one TG interface\
| | ... | to the other, using different codes and types. Receive all packets\
| | ... | except those with the filtered type and code.
| | ...
| | [Teardown] | Routed ACL test teardown - ipv4
| | ...
| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
| | ... | icmp | ${acl_name_icmp}
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_icmp} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmp} | ingress
| | Then Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${icmp_type} | ${icmp_code}
| | Then Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${classify_type} | ${icmp_code}
| | And Run Keyword And Expect Error | ICMP echo Rx timeout
| | ... | Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${classify_type} | ${classify_code}

| TC14: ACL ICMPv6 packet filtering - routed
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv6 addresses on both\
| | ... | interfaces to TG, add ARP entry and routes, and configure ICMP ACL\
| | ... | on ingress interface with ICMPv6 type and code.
| | ... | [Ver] Send ICMPv6 packets from one TG interface\
| | ... | to the other, using different codes and types. Receive all packets\
| | ... | except those with the filtered type and code.
| | ...
| | [Teardown] | Routed ACL test teardown - ipv6
| | ...
| | Given Configure path in 2-node circular topology
| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
| | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
| | ... | icmpv6 | ${acl_name_icmpv6}
| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up
| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up
| | And Honeycomb sets interface IPv6 address | ${dut_node}
| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
| | And Honeycomb sets interface IPv6 address | ${dut_node}
| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
| | And Honeycomb adds interface IPv6 neighbor
| | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac}
| | And VPP RA suppress link layer | ${dut_node} | ${dut_to_tg_if2}
| | And VPP Route Add | ${node} | ${dst_net} | ${prefix_length}
| | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
| | And VPP Route Add | ${node} | ${classify_dst_net} | ${prefix_length}
| | ... | ${gateway} | interface=${dut_to_tg_if2} | use_sw_index=False
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_icmpv6} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmpv6} | ingress
| | Then Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${icmp_type} | ${icmp_code}
| | Then Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${classify_type} | ${icmp_code}
| | And Run Keyword And Expect Error | ICMP echo Rx timeout
| | ... | Send ICMP packet with type and code and verify received packet | ${tg_node}
| | ... | ${src_ip} | ${dst_ip}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | ${classify_type} | ${classify_code}

| TC15: ACL reflexive IPv4 filtering through plugin-acl node - routed
| | [Documentation]
| | ... | [Top] TG=DUT1=TG.
| | ... | [Enc] Eth-IPv4-TCP.
| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\
| | ... | interfaces to TG, add ARP entries and routes,\
| | ... | configure a "drop all" ACL on ingress and reflexive ACL on egress.
| | ... | [Ver] Send a simple TCP packet to VPP interface 1 and do not receive\
| | ... | it back. Then send the packet with reversed src/dst IP address\
| | ... | to VPP interface 2 and receive it from interface 1(this should create\
| | ... | a reflexive "permit" rule) Finally, send the original packet again\
| | ... | and receive it from interface 2.
| | ...
| | [Teardown] | Routed ACL test teardown - ipv4
| | ...
| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test
| | ... | reflex | ${acl_name_reflex}
| | And Add ARP on DUT
| | ... | ${node} | ${dut_to_tg_if1} | ${gateway2} | ${tg_to_dut_if1_mac}
| | And VPP Route Add
| | ... | ${node} | ${src_net} | ${prefix_length} | ${gateway2}
| | ... | interface=${dut_to_tg_if1} | use_sw_index=False
| | And VPP Route Add
| | ... | ${node} | ${classify_src_net} | ${prefix_length} | ${gateway2}
| | ... | interface=${dut_to_tg_if1} | use_sw_index=False
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | ${acl_name_reflex} | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_reflex} | egress
| | And Import Variables | resources/test_data/honeycomb/plugin_acl.py
| | ... | block_all | block_all
| | When Honeycomb Creates ACL Chain Through ACL plugin
| | ... | ${dut_node} | block_all | ${acl_settings}
| | And Honeycomb Assigns plugin-acl Chain To Interface
| | ... | ${dut_node} | ${dut_to_tg_if1} | block_all | ingress
| | And Run Keyword And Expect Error | TCP/UDP Rx timeout
| | ... | Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | TCP | ${src_port} | ${dst_port}
| | And Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_dst} | ${classify_src}
| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if2_mac}
| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if2_mac}
| | ... | TCP | ${dst_port} | ${src_port}
| | And Send TCP or UDP packet and verify received packet | ${tg_node}
| | ... | ${classify_src} | ${classify_dst}
| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac}
| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac}
| | ... | TCP | ${src_port} | ${dst_port}

*** Keywords ***
| Setup interface IPs and routes for IPv4 plugin-acl test
| | [Documentation] | Import test variables, set interfaces up,
| | ... | configure IPv4 addresses, add neighbor entry and routes.
| | ...
| | [Arguments] | ${test_data_id} | ${acl_name}
| | ...
| | Configure path in 2-node circular topology
| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
| | Import Variables | resources/test_data/honeycomb/plugin_acl.py
| | ... | ${test_data_id} | ${acl_name}
| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up
| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up
| | Honeycomb sets interface IPv4 address with prefix | ${dut_node}
| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length}
| | Honeycomb sets interface IPv4 address with prefix | ${dut_node}
| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length}
| | And Honeycomb adds interface IPv4 neighbor
| | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac}
| | VPP Route Add
| | ... | ${node} | ${dst_net} | ${prefix_length} | ${gateway}
| | ... | interface=${dut_to_tg_if2} | use_sw_index=False
| | VPP Route Add
| | ... | ${node} | ${classify_dst_net} | ${prefix_length} | ${gateway}
| | ... | interface=${dut_to_tg_if2} | use_sw_index=False

| Setup interfaces and bridge domain for plugin-acl test
| | [Documentation] | Import test variables, set interfaces up and bridge them.
| | ...
| | [Arguments] | ${test_data_id} | ${acl_name}
| | ...
| | Configure path in 2-node circular topology
| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
| | Import Variables | resources/test_data/honeycomb/plugin_acl.py
| | ... | ${test_data_id} | ${acl_name}
| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up
| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up
| | Honeycomb Creates first L2 Bridge Domain
| | ... | ${dut_node} | ${bd_name} | ${bd_settings}
| | Honeycomb Adds Interfaces To Bridge Domain
| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}
| | ... | ${bd_name} | ${bd_if_settings}

| Bridged ACL test teardown
| | [Documentation] | Log packet trace and ACL settings,
| | ... | then clean up bridge domains.
| | ...
| | Show Packet Trace on All DUTs | ${nodes}
| | Read plugin-ACL configuration from VAT | ${node}
| | Clear plugin-ACL configuration | ${node} | ${dut_to_tg_if1}
| | Honeycomb Removes All Bridge Domains
| | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2}

| Routed ACL test teardown - ipv4
| | [Documentation] | Log packet trace and ACL settings,
| | ... | then clean up IPv4 addresses and neighbors.
| | ...
| | Show Packet Trace on All DUTs | ${nodes}
| | Read plugin-ACL configuration from VAT | ${node}
| | Clear plugin-ACL configuration | ${node} | ${dut_to_tg_if1}
| | Honeycomb removes interface IPv4 addresses | ${node} | ${dut_to_tg_if1}
| | Honeycomb clears all interface IPv4 neighbors | ${node} | ${dut_to_tg_if1}

| Routed ACL test teardown - ipv6
| | [Documentation] | Log packet trace and ACL settings,
| | ... | then clean up IPv6 addresses and neighbors.
| | ...
| | Show Packet Trace on All DUTs | ${nodes}
| | Clear plugin-ACL configuration | ${node} | ${dut_to_tg_if1}
| | Read plugin-ACL configuration from VAT | ${node}
| | Honeycomb removes interface IPv6 addresses | ${node} | ${dut_to_tg_if1}
| | Honeycomb clears all interface IPv6 neighbors | ${node} | ${dut_to_tg_if1}