From 0cf1f0204e326cf93e36b344e2efd3cfa2f82870 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Mon, 19 Mar 2018 21:12:03 +0100 Subject: HC Tests: move honeycomb tests out of vpp directory https://gerrit.fd.io/r/#/c/9257/ moved VPP instalation to vpp/func/__init__.robot, which is run before Honeycomb suite. Instalation process starts with removing all vpp packages, which fails because of honeycomb dependency installed by bootstrap script. This patch fixes HC func jobs by moving them to separate dir. The honeycomb/func/__init__.robot was updated to include previous content of vpp/func/__init__.robot. HC perf jobs were also moved, but they may require additional care (CSIT-1006). Change-Id: I99d94272c80a4c57c85ec5cf99cddfbeab7de663 Signed-off-by: Marek Gradzki --- tests/honeycomb/func/__init__.robot | 36 + .../func/mgmt-cfg-acl-apihc-apivat-func.robot | 169 +++++ tests/honeycomb/func/mgmt-cfg-apihcv6-func.robot | 180 +++++ tests/honeycomb/func/mgmt-cfg-bgp-apihc-func.robot | 366 ++++++++++ .../func/mgmt-cfg-dhcp-apihc-apivat-func.robot | 131 ++++ .../honeycomb/func/mgmt-cfg-int-apihcnc-func.robot | 76 ++ .../mgmt-cfg-int-subint-apihc-apivat-func.robot | 606 ++++++++++++++++ .../mgmt-cfg-intip4-intip6-apihc-apivat-func.robot | 307 +++++++++ .../func/mgmt-cfg-inttap-apihc-apivat-func.robot | 79 +++ .../func/mgmt-cfg-intvhost-apihc-apivat-func.robot | 163 +++++ .../func/mgmt-cfg-l2bd-apihc-apivat-func.robot | 116 ++++ .../func/mgmt-cfg-l2fib-apihc-apivat-func.robot | 232 +++++++ .../func/mgmt-cfg-lisp-apihc-apivat-func.robot | 310 +++++++++ .../func/mgmt-cfg-lispgpe-apihc-apivat-func.robot | 226 ++++++ .../func/mgmt-cfg-nsh-apihc-apivat-func.robot | 148 ++++ .../func/mgmt-cfg-pbb-apihc-apivat-func.robot | 86 +++ .../mgmt-cfg-pluginacl-apihc-apivat-func.robot | 765 +++++++++++++++++++++ .../func/mgmt-cfg-policer-apihc-func.robot | 142 ++++ .../func/mgmt-cfg-proxyarp-apihc-func.robot | 89 +++ .../func/mgmt-cfg-proxynd6-apihc-func.robot | 117 ++++ .../func/mgmt-cfg-routing-apihc-apivat-func.robot | 233 +++++++ .../honeycomb/func/mgmt-cfg-slaac-apihc-func.robot | 136 ++++ .../func/mgmt-cfg-snat44-apihc-apivat-func.robot | 105 +++ .../func/mgmt-cfg-spanrx-apihc-apivat-func.robot | 256 +++++++ .../func/mgmt-cfg-vxlan-apihc-apivat-func.robot | 137 ++++ .../func/mgmt-cfg-vxlangpe-apihc-apivat-func.robot | 174 +++++ tests/honeycomb/func/mgmt-notif-apihcnc-func.robot | 68 ++ .../func/mgmt-statepersist-apihc-func.robot | 166 +++++ tests/honeycomb/perf/__init__.robot | 61 ++ .../localhostp1-tcp-netconf16t-crud-read.robot | 87 +++ .../perf/localhostp1-tcp-netconf1t-crud-read.robot | 87 +++ .../perf/localhostp1-tcp-netconf8t-crud-read.robot | 97 +++ 32 files changed, 5951 insertions(+) create mode 100644 tests/honeycomb/func/__init__.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-acl-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-apihcv6-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-bgp-apihc-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-dhcp-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-int-apihcnc-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-int-subint-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-inttap-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-intvhost-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-l2bd-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-l2fib-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-lisp-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-lispgpe-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-nsh-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-pbb-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-pluginacl-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-policer-apihc-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-proxyarp-apihc-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-proxynd6-apihc-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-routing-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-slaac-apihc-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-snat44-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-spanrx-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-vxlan-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-cfg-vxlangpe-apihc-apivat-func.robot create mode 100644 tests/honeycomb/func/mgmt-notif-apihcnc-func.robot create mode 100644 tests/honeycomb/func/mgmt-statepersist-apihc-func.robot create mode 100644 tests/honeycomb/perf/__init__.robot create mode 100644 tests/honeycomb/perf/localhostp1-tcp-netconf16t-crud-read.robot create mode 100644 tests/honeycomb/perf/localhostp1-tcp-netconf1t-crud-read.robot create mode 100644 tests/honeycomb/perf/localhostp1-tcp-netconf8t-crud-read.robot (limited to 'tests/honeycomb') diff --git a/tests/honeycomb/func/__init__.robot b/tests/honeycomb/func/__init__.robot new file mode 100644 index 0000000000..cb25ee909d --- /dev/null +++ b/tests/honeycomb/func/__init__.robot @@ -0,0 +1,36 @@ +# Copyright (c) 2017 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*** +# Honeycomb node to run tests on. +| ${node}= | ${nodes['DUT1']} + +*** Settings *** +| Library | resources.libraries.python.SetupFramework +| Library | resources.libraries.python.SetupFramework.CleanupFramework +| Library | resources/libraries/python/honeycomb/HcPersistence.py +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/shared/interfaces.robot +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| ... +| Suite Setup | Run Keywords | Setup Framework | ${nodes} | AND +| ... | Setup All DUTs | ${nodes} | AND +| ... | Update All Interface Data On All Nodes | ${nodes} | AND +| ... | Configure all DUTs before test | AND +| ... | Set Global Variable | ${node} | AND +| ... | Stop Honeycomb service on DUTs | ${node} | AND +| ... | Clear Honeycomb Log | ${node} +| ... +| Suite Teardown | Run Keywords | Archive Honeycomb log file | ${node} | AND +| ... | Cleanup Framework | ${nodes} diff --git a/tests/honeycomb/func/mgmt-cfg-acl-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-acl-apihc-apivat-func.robot new file mode 100644 index 0000000000..3f209e3562 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-acl-apihc-apivat-func.robot @@ -0,0 +1,169 @@ +# Copyright (c) 2017 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 *** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/access_control_lists.robot +| Variables | resources/test_data/honeycomb/acl.py +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Documentation | *Honeycomb access control lists test suite.* +| ... +| Force Tags | HC_FUNC + +*** Test Cases *** +| TC01: Honeycomb can create ACL classify table +| | [Documentation] | Check if Honeycomb API can create an ACL table. +| | ... +| | Given ACL table from Honeycomb should not exist +| | ... | ${node} | ${hc_acl_table['name']} +| | And ACL table from VAT should not exist +| | ... | ${node} | ${table_index} +| | When Honeycomb creates ACL table +| | ... | ${node} | ${hc_acl_table} +| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} + +| TC02: Honeycomb can remove ACL table +| | [Documentation] | Check if Honeycomb API can delete an ACL table. +| | ... +| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} +| | When Honeycomb removes ACL table | ${node} | ${hc_acl_table['name']} +| | Then ACL table from Honeycomb should not exist +| | ... | ${node} | ${hc_acl_table['name']} +| | And ACL table from VAT should not exist +| | ... | ${node} | ${table_index} + +| TC03: Honeycomb manages more than one ACL table +| | [Documentation] | Check if Honeycomb API can create another ACL table. +| | ... +| | Given ACL table from Honeycomb should not exist +| | ... | ${node} | ${hc_acl_table['name']} +| | And ACL table from VAT should not exist +| | ... | ${node} | ${table_index} +| | When Honeycomb creates ACL table | ${node} | ${hc_acl_table} +| | And Honeycomb creates ACL table | ${node} | ${hc_acl_table2} +| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} +| | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2_oper} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index2} | ${vat_acl_table2} + +| TC04: Honeycomb can add ACL session to table +| | [Documentation] | Check if Honeycomb API can add an ACL session to a table. +| | ... +| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} +| | When Honeycomb adds ACL session +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} +| | Then ACL session from Honeycomb should be +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} +| | And ACL session from VAT should be +| | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session} + +| TC05: Honeycomb can remove ACL session +| | [Documentation] | Check if Honeycomb API can remove an ACL session. +| | ... +| | Given ACL session from Honeycomb should be +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} +| | And ACL session from VAT should be +| | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session} +| | When Honeycomb removes ACL session +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session['match']} +| | Then ACL session from Honeycomb should not exist +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session['match']} +| | And ACL session from VAT should not exist +| | ... | ${node} | ${table_index} | ${session_index} + +| TC06: Honeycomb manages more than one ACL session on one table +| | [Documentation] | Check if Honeycomb API can add another ACL session\ +| | ... | to a table. +| | ... +| | Given ACL session from Honeycomb should not exist +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session['match']} +| | And ACL session from VAT should not exist +| | ... | ${node} | ${table_index} | ${session_index} +| | When Honeycomb adds ACL session +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} +| | And Honeycomb adds ACL session +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2} +| | Then ACL session from Honeycomb should be +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} +| | And ACL session from VAT should be +| | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session} +| | And ACL session from Honeycomb should be +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2} +| | And ACL session from VAT should be +| | ... | ${node} | ${table_index} | ${session_index2} | ${vat_acl_session2} + +| TC07: Honeycomb enables ACL on interface +| | [Documentation] | Check if Honeycomb API can enable ACL on an interface. +| | ... +| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} +| | And ACL session from Honeycomb should be +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} +| | And ACL session from VAT should be +| | ... | ${node} | ${table_index} | ${session_index} | ${vat_acl_session} +| | When Honeycomb enables ACL on interface +| | ... | ${node} | ${interface} | ${hc_acl_table['name']} +| | Then Interface ACL configuration from Honeycomb should be +| | ... | ${node} | ${interface} | ${hc_acl_table['name']} +| | And Interface ACL configuration from VAT should be +| | ... | ${node} | ${interface} | ${table_index} + +| TC08: Honeycomb disables ACL on interface +| | [Documentation] | Check if Honeycomb API can disable ACL on an interface. +| | ... +| | Given Interface ACL configuration from Honeycomb should be +| | ... | ${node} | ${interface} | ${hc_acl_table['name']} +| | And Interface ACL configuration from VAT should be +| | ... | ${node} | ${interface} | ${table_index} +| | When Honeycomb disables ACL on interface | ${node} | ${interface} +| | Then Interface ACL configuration from Honeycomb should be empty +| | ... | ${node} | ${interface} +| | And Interface ACL configuration from VAT should be empty +| | ... | ${node} | ${interface} + +| TC09: Honeycomb can remove one out of multiple ACL tables +| | [Documentation] | Check if Honeycomb API can delete an ACL table if more\ +| | ... | than one table exists. +| | ... +| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} +| | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2_oper} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index2} | ${vat_acl_table2} +| | When Honeycomb removes ACL table | ${node} | ${hc_acl_table2['name']} +| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} +| | And ACL table from Honeycomb should not exist +| | ... | ${node} | ${hc_acl_table2['name']} +| | And ACL table from VAT should not exist +| | ... | ${node} | ${table_index2} diff --git a/tests/honeycomb/func/mgmt-cfg-apihcv6-func.robot b/tests/honeycomb/func/mgmt-cfg-apihcv6-func.robot new file mode 100644 index 0000000000..e3b43cc4a9 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-apihcv6-func.robot @@ -0,0 +1,180 @@ +# Copyright (c) 2017 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 *** +# IP addresses for IPv6 link +| ${tg_to_dut_if2_ip}= | fd00:1234::1 +| ${dut_to_tg_if2_ip}= | fd00:1234::2 +| ${ipv6_prefix}= | ${64} +# Configuration which will be set and verified during tests. +| ${bd1_name}= | bd-01 +| ${bd2_name}= | bd-02 +| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} +| ... | unknown-unicast-flood=${True} | arp-termination=${True} +| &{if_settings}= | split_horizon_group=${1} | bvi=${False} +| &{if_settings2}= | split_horizon_group=${2} | bvi=${True} +| ${vhost_interface}= | test_vhost +| &{vhost_user_server}= | socket=/tmp/soc1 | role=server +| &{vhost_user_server_edit_1}= | socket=/tmp/soc12 | role=server +| &{vhost_user_server_edit_2}= | socket=/tmp/soc12 | role=client + +*** Settings *** +| Library | resources.libraries.python.honeycomb.IPv6Management +| Library | resources.libraries.python.VPPUtil +| Resource | resources/libraries/robot/shared/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/ipv6_control.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/honeycomb/netconf.robot +| Resource | resources/libraries/robot/honeycomb/vhost_user.robot +| Variables | resources/test_data/honeycomb/netconf/triggers.py +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Run Keywords +| ... | Unconfigure IPv6 Management Interface | AND +| ... | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC | HC_REST_ONLY +| ... +| Documentation | *Honeycomb IPv6 control interface test suite.* + +*** Test Cases *** +| TC01: Honeycomb sets up l2 bridge domain +| | [Documentation] | Check if Honeycomb can create bridge domains on VPP node. +| | ... +| | [Setup] | Configure IPv6 Management Interface +| | When Honeycomb creates first l2 bridge domain +| | ... | ${tunneled_node} | ${bd1_name} | ${bd_settings} +| | Then Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${tunneled_node} | ${bd1_name} | ${bd_settings} + +| TC02: Honeycomb removes bridge domains +| | [Documentation] | Check if Honeycomb can remove bridge domains from a VPP\ +| | ... | node. +| | ... +| | Given Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${tunneled_node} | ${bd1_name} | ${bd_settings} +| | When Honeycomb removes all bridge domains | ${tunneled_node} +| | Then Honeycomb should show no bridge domains | ${tunneled_node} + +| TC03: Honeycomb creates vhost-user interface - server +| | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\ +| | ... | server. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be empty +| | ... | ${tunneled_node} | ${vhost_interface} +| | When Honeycomb creates vhost-user interface +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} + +| TC04: Honeycomb modifies vhost-user interface - server +| | [Documentation] | Check if Honeycomb can modify properties of existing\ +| | ... | vhost-user interface, role: server. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} +| | When Honeycomb configures vhost-user interface +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_1} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_1} +| | When Honeycomb configures vhost-user interface +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_2} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_2} +| | When Honeycomb configures vhost-user interface +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} + +| TC05: Honeycomb deletes vhost-user interface - server +| | [Documentation] | Check if Honeycomb can delete an existing vhost-user\ +| | ... | interface, role: server. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be +| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} +| | When Honeycomb removes vhost-user interface +| | ... | ${tunneled_node} | ${vhost_interface} +| | Then vhost-user Operational Data From Honeycomb Should Be empty +| | ... | ${tunneled_node} | ${vhost_interface} + +| TC06: Honeycomb can create and delete interfaces +| | [Documentation] | Repeatedly create and delete an interface through Netconf\ +| | ... | and check the reply for any errors. +| | ... +| | Given Netconf session should be established | ${tunneled_node} +| | And Honeycomb creates first L2 bridge domain +| | ... | ${tunneled_node} | bd_netconf | ${bd_settings} +| | :FOR | ${index} | IN RANGE | 20 +| | | When Error trigger is sent | ${trigger_105} +| | | Then Replies should not contain RPC errors + +| TC07: Honeycomb can create vlan subinterface +| | [Documentation] | Configure a Vlan sub-interface under a physical interface. +| | ... +| | Given Netconf session should be established | ${tunneled_node} +| | When Error Trigger Is Sent +| | ... | ${trigger_vlan} | interface=${interface} +| | Then Replies should not contain RPC errors + +*** Keywords *** +| Configure IPv6 Management Interface +| | [Documentation] | Change one of VPP's data-plane interfaces on DUT into\ +| | ... | a control-plane interface that Honeycomb can listen on. Setup IPv6\ +| | ... | addresses on the link. Create an IPv4 to IPv6 tunnel on TG and create\ +| | ... | suite variables. +| | ... +| | Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | Stop VPP service on DUT | ${dut_node} +| | Stop Honeycomb Service on DUTs | ${dut_node} +| | Convert data-plane interface to control-plane +| | ... | ${dut_node} | ${dut_to_tg_if2} +| | Sleep | 5sec | Wait until Linux reclaims the interface. +| | ${tg_to_dut_if2_name}= | Get Interface Name by MAC +| | ... | ${tg_node} | ${tg_to_dut_if2_mac} +| | ${dut_to_tg_if2_name}= | Get Interface Name by MAC +| | ... | ${dut_node} | ${dut_to_tg_if2_mac} +| | ${tunneled_node}= | Copy Dictionary | ${dut_node} +| | Set To Dictionary | ${tunneled_node} | host | ${tg_node['host']} +| | ${interface}= | Get Interface Name | ${dut_node} | ${dut_to_tg_if1} +| | Set Suite Variable | ${interface} +| | Set Suite Variable | ${tunneled_node} +| | Set Suite Variable | ${tg_node} +| | Set Suite Variable | ${dut_node} +| | Set Suite Variable | ${dut_to_tg_if2} +| | Set Suite Variable | ${dut_to_tg_if2_name} +| | Set Suite Variable | ${tg_to_dut_if2_name} +| | Set management interface address +| | ... | ${tg_node} | ${tg_to_dut_if2_name} +| | ... | ${tg_to_dut_if2_ip} | ${ipv6_prefix} +| | Set management interface address +| | ... | ${dut_node} | ${dut_to_tg_if2_name} +| | ... | ${dut_to_tg_if2_ip} | ${ipv6_prefix} +| | Configure Control Interface Tunnel +| | ... | ${tg_node} | ${dut_node['honeycomb']['port']} +| | ... | ${dut_to_tg_if2_ip} | ${dut_node['honeycomb']['port']} +| | Configure Control Interface Tunnel +| | ... | ${tg_node} | ${dut_node['honeycomb']['netconf_port']} +| | ... | ${dut_to_tg_if2_ip} | ${dut_node['honeycomb']['netconf_port']} +| | Start VPP service on DUT | ${dut_node} +| | Configure Honeycomb service on DUTs | ${dut_node} + +| Unconfigure IPv6 Management Interface +| | [Documentation] | Remove all IP addresses from interfaces in the IPv6 link. +| | ... +| | Clear Interface Configuration | ${tg_node} | ${tg_to_dut_if2_name} +| | Clear Interface Configuration | ${dut_node} | ${dut_to_tg_if2_name} diff --git a/tests/honeycomb/func/mgmt-cfg-bgp-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-bgp-apihc-func.robot new file mode 100644 index 0000000000..b5fed1e583 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-bgp-apihc-func.robot @@ -0,0 +1,366 @@ +# Copyright (c) 2017 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 *** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} +| ${dut1_to_tg_ip}= | 192.168.0.1 +| ${tg_to_dut1_ip}= | 192.168.0.2 +| ${dut1_to_dut2_ip}= | 192.168.1.1 +| ${dut2_to_dut1_ip}= | 192.168.1.2 +| ${bgp_port}= | ${179} +| ${bgp_as_number}= | ${37} +| ${prefix}= | ${24} + +*** Settings *** +| Library | resources.libraries.python.honeycomb.IPv6Management +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/bgp.robot +| Resource | resources/libraries/robot/honeycomb/routing.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/honeycomb/ipv6_control.robot +| Variables | resources/test_data/honeycomb/bgp.py +| ... +| Suite Setup | Run Keywords +| ... | Enable Honeycomb Feature | ${node} | BGP | AND +| ... | Configure BGP Module | ${node} | ${dut1_to_tg_ip} +| ... | ${bgp_port} | ${bgp_as_number} | AND +| ... | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Run Keywords +| ... | Tear Down Honeycomb Functional Test Suite | ${nodes['DUT1']} | AND +| ... | Stop Honeycomb service on DUTs | ${nodes['DUT2']} | AND +| ... | Unconfigure IPv4 Management Interfaces | AND +| ... | Disable Honeycomb Feature | ${node} | BGP | AND +| ... | Disable Honeycomb Feature | ${nodes['DUT2']} | BGP +| ... +# HONEYCOMB-409: BGP configuration via ODL is currently not fully supported +| Force Tags | HC_FUNC | HC_REST_ONLY +| ... +| Documentation | *Honeycomb BGP management test suite.* + +*** Test Cases *** +| TC01: Honeycomb configures BGP peer - Internal +| | [Documentation] | Check if Honeycomb can configure an internal BGP peer. +| | ... +| | When Honeycomb adds BGP peer +| | ... | ${node} | ${address_internal} | ${peer_internal} +| | Then BGP peer from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${peer_internal} + +| TC02: Honeycomb removes peer configuration +| | [Documentation] | Check if Honeycomb can remove a configured BGP peer. +| | ... +| | Given BGP peer from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${peer_internal} +| | When Honeycomb removes BGP peer | ${node} | ${address_internal} +| | Then No BGP peers should be configured | ${node} + +| TC03: Honeycomb updates existing BGP peer - Internal +| | [Documentation] | Check if Honeycomb can update an existing BGP peer. +| | ... +| | [Teardown] | Honeycomb removes BGP peer | ${node} | ${address_internal} +| | ... +| | Given No BGP peers should be configured | ${node} +| | When Honeycomb adds BGP peer +| | ... | ${node} | ${address_internal} | ${peer_internal} +| | And Honeycomb adds BGP peer +| | ... | ${node} | ${address_internal} | ${peer_internal_update} +| | Then BGP peer from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${peer_internal_update} + +| TC04: Honeycomb configures BGP peer - Application +| | [Documentation] | Check if Honeycomb can configure an application BGP peer. +| | ... +| | [Teardown] | Honeycomb removes BGP peer | ${node} | ${address_application} +| | ... +| | Given No BGP peers should be configured | ${node} +| | When Honeycomb adds BGP peer +| | ... | ${node} | ${address_application} | ${peer_application} +| | Then BGP peer from Honeycomb should be +| | ... | ${node} | ${address_application} | ${peer_application} + +| TC05: Honeycomb configures a second BGP peer +| | [Documentation] | Check if Honeycomb can configure more than one BGP peer. +| | ... +| | [Teardown] | Run Keywords +| | ... | Honeycomb removes BGP peer | ${node} | ${address_internal} | AND +| | ... | Honeycomb removes BGP peer | ${node} | ${address_internal2} +| | ... +| | Given No BGP peers should be configured | ${node} +| | When Honeycomb adds BGP peer +| | ... | ${node} | ${address_internal} | ${peer_internal} +| | And Honeycomb adds BGP peer +| | ... | ${node} | ${address_internal2} | ${peer_internal2} +| | Then BGP peer from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${peer_internal} +| | And BGP peer from Honeycomb should be +| | ... | ${node} | ${address_internal2} | ${peer_internal2} + +| TC06: Honeycomb configures IPv4 route using BGP +| | [Documentation] | Check if Honeycomb can configure a BGP route under a peer. +| | ... +| | Given Honeycomb adds BGP peer +| | ... | ${node} | ${address_internal} | ${peer_internal} +| | When Honeycomb configures BGP route +| | ... | ${node} | ${address_internal} | ${route_data_ipv4} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 +| | Then BGP Route from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${route_data_ipv4} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 + +| TC07: Honeycomb removes IPv4 route configuration +| | [Documentation] | Check if Honeycomb can remove a configured BGP route. +| | ... +| | Given BGP peer from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${peer_internal} +| | And BGP Route from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${route_data_ipv4} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 +| | When Honeycomb removes BGP route | ${node} | ${address_internal} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 +| | Then No BGP Routes Should be Configured +| | ... | ${node} | ${address_internal} | ipv4 + +| TC08: Honeycomb updates existing IPv4 route using BGP +| | [Documentation] | Check if Honeycomb can update an existing BGP route. +| | ... +| | [Teardown] | Honeycomb removes BGP route | ${node} | ${address_internal} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 +| | ... +| | Given BGP peer from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${peer_internal} +| | And No BGP Routes Should be Configured +| | ... | ${node} | ${address_internal} | ipv4 +| | When Honeycomb configures BGP route +| | ... | ${node} | ${address_internal} | ${route_data_ipv4} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 +| | And Honeycomb configures BGP route +| | ... | ${node} | ${address_internal} | ${route_data_ipv4_update} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 +| | Then BGP Route from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${route_data_ipv4_update} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 + +| TC09: Honeycomb configures a second IPv4 route +| | [Documentation] | Check if Honeycomb can configure more than one BGP route. +| | ... +| | [Teardown] | Run Keywords +| | ... | Honeycomb removes BGP route | ${node} | ${address_internal} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 | AND +| | ... | Honeycomb removes BGP route | ${node} | ${address_internal} +| | ... | ${route_address_ipv4_2} | ${route_id_ipv4_2} | ipv4 | AND +| | ... | Honeycomb removes BGP peer | ${node} | ${address_internal} +| | ... +| | Given BGP peer from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${peer_internal} +| | When Honeycomb configures BGP route +| | ... | ${node} | ${address_internal} | ${route_data_ipv4} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 +| | And Honeycomb configures BGP route +| | ... | ${node} | ${address_internal} | ${route_data_ipv4_2} +| | ... | ${route_address_ipv4_2} | ${route_id_ipv4_2} | ipv4 +| | Then BGP Route from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${route_data_ipv4} +| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 +| | And BGP Route from Honeycomb should be +| | ... | ${node} | ${address_internal} | ${route_data_ipv4_2} +| | ... | ${route_address_ipv4_2} | ${route_id_ipv4_2} | ipv4 + +| TC10: Honeycomb sends BGP OPEN messages to configured peer +| | [Documentation] +| | ... | [top] TG-DUT1-TG. +| | ... | [enc] Eth-IPv4-TCP-BGP. +| | ... | [cfg] On DUT1 give Honeycomb control over the data-plane interface +| | ... | connected to TG. Configure a BGP peer with the address of TG. +| | ... | [ver] Open a TCP listener on TG on the BGP port and listen for BGP +| | ... | OPEN message. On receive, verify message fields. +| | ... +| | [Setup] | Run Keywords +| | ... | Configure BGP Module | ${node} | ${dut1_to_dut2_ip} +| | ... | ${bgp_port} | ${bgp_as_number} | AND +| | ... | Configure IPv4 Management Interface +| | [Teardown] | Honeycomb removes BGP peer | ${dut1_node} | ${address_internal} +| | When Honeycomb adds BGP peer +| | ... | ${dut1_node} | ${address_internal} | ${peer_internal} +| | Then Receive BGP OPEN message +| | ... | ${tg_node} | ${tg_to_dut1_ip} | ${dut1_to_dut2_ip} +| | ... | ${bgp_port} | ${bgp_as_number} | ${holdtime_internal} + +| TC11: Honeycomb shows connected peer in operational data +| | [Documentation] +| | ... | [top] TG-DUT1-DUT2-TG. +| | ... | [enc] Eth-IPv4-TCP-BGP. +| | ... | [cfg] On DUT1 and DUT2 give Honeycomb control over the data-plane +| | ... | interfaces connecting DUT1 ad DUT2. Configure BGP peers on DUT1 +| | ... | and DUT2 with each other's IP address. +| | ... | [ver] Using Restconf, verify that Honeycomb on each DUT has the +| | ... | other DUT's entry in operational data. +| | ... +| | When Honeycomb adds BGP peer +| | ... | ${dut1_node} | ${dut2_to_dut1_ip} | ${dut2_peer} +| | And Honeycomb adds BGP peer +| | ... | ${dut2_node} | ${dut1_to_dut2_ip} | ${dut1_peer} +| | Sleep | 5s | Wait for BGP connection. Retry timer is 5 seconds. +| | Then Peer operational data from Honeycomb should be +| | ... | ${dut1_node} | ${dut2_to_dut1_ip} +| | And Peer operational data from Honeycomb should be +| | ... | ${dut2_node} | ${dut1_to_dut2_ip} + +| TC12: Honeycomb sends IPv4 BGP route to connected peer +| | [Documentation] +| | ... | [top] TG-DUT1-DUT2-TG. +| | ... | [enc] Eth-IPv4-TCP-BGP. +| | ... | [cfg] On DUT1 and DUT2 give Honeycomb control over the data-plane +| | ... | interfaces connecting DUT1 ad DUT2. Configure BGP peers on DUT1 +| | ... | and DUT2 with each other's IP address. On DUT2 configure a static +| | ... | IPv4 route using Honeycomb's BGP module. +| | ... | [ver] Verify that the route is present in BGP +| | ... | local RIB and VPP's routing table on each DUT. +| | ... +| | Given Peer operational data from Honeycomb should be +| | ... | ${dut1_node} | ${dut2_to_dut1_ip} +| | And Peer operational data from Honeycomb should be +| | ... | ${dut2_node} | ${dut1_to_dut2_ip} +| | When Honeycomb adds BGP peer +| | ... | ${dut2_node} | ${address_application} | ${peer_application} +| | And Honeycomb configures BGP route +| | ... | ${dut2_node} | ${address_application} | ${dut1_route} +| | ... | ${dut1_route_address} | ${dut1_route_id} | ipv4 +| | And Sleep | 5s | Wait for route advertisement. Retry timer is 5 seconds. +| | Then Routing data from Honeycomb should contain +| | ... | ${dut1_node} | learned-protocol-0 | ipv4 | ${route_operational} +| | And Routing data from Honeycomb should contain +| | ... | ${dut2_node} | learned-protocol-0 | ipv4 | ${route_operational} +| | And BGP Loc-RIB table should include | ${dut1_node} | ${rib_operational} +| | And BGP Loc-RIB table should include | ${dut2_node} | ${rib_operational} + +| TC13: Honeycomb sends IPv6 BGP route to connected peer +| | [Documentation] +| | ... | [top] TG-DUT1-DUT2-TG. +| | ... | [enc] Eth-IPv4-TCP-BGP. +| | ... | [cfg] On DUT1 and DUT2 give Honeycomb control over the data-plane +| | ... | interfaces connecting DUT1 ad DUT2. Configure BGP peers on DUT1 +| | ... | and DUT2 with each other's IP address. On DUT2 configure a static +| | ... | IPv6 route using Honeycomb's BGP module. +| | ... | [ver] Verify that the route is present in BGP +| | ... | local RIB and VPP's routing table on each DUT. +| | ... +# HONEYCOMB-403: Missing writers for IPv6 BGP route +| | [Tags] | EXPECTED_FAILING +| | Given Peer operational data from Honeycomb should be +| | ... | ${dut1_node} | ${dut2_to_dut1_ip} +| | And Peer operational data from Honeycomb should be +| | ... | ${dut2_node} | ${dut1_to_dut2_ip} +| | And Honeycomb adds BGP peer +| | ... | ${dut2_node} | ${address_application} | ${peer_application} +| | And Honeycomb configures BGP route +| | ... | ${dut2_node} | ${address_application} | ${dut1_route_ip6} +| | ... | ${dut1_route_ip6_address} | ${dut1_route_ip6_id} | ipv6 +| | And Sleep | 5s | Wait for route advertisement. Retry timer is 5 seconds. +| | Then Routing data from Honeycomb should contain +| | ... | ${dut1_node} | learned-protocol-0 | ipv6 | ${route_ip6_operational} +| | And Routing data from Honeycomb should contain +| | ... | ${dut2_node} | learned-protocol-0 | ipv6 | ${route_ip6_operational} +| | And BGP Loc-RIB table should include | ${dut1_node} | ${rib_ip6_operational} +| | And BGP Loc-RIB table should include | ${dut2_node} | ${rib_ip6_operational} + +#TODO: Add tests once implemented in HC: +# IPv6 neighbor, L2VPN, L3VPN, linkstate, route reflector, and more + +*** Keywords *** +| Configure IPv4 Management Interface +| | [Documentation] | Change one of VPP's data-plane interfaces on DUT into\ +| | ... | a control-plane interface that Honeycomb can listen on. Setup IP\ +| | ... | addresses on the link, create suite variables for traffic trests, set +| | ... | static ARP entries, then restart VPP and Honeycomb to apply changes. +| | ... +| | Configure path in 3-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | ${interface}= | Get Interface Name | ${dut1_node} | ${dut1_to_tg} +| | Set Suite Variable | ${interface} +| | Set Suite Variable | ${tg_node} +| | Set Suite Variable | ${dut1_node} +| | Set Suite Variable | ${dut2_node} +| | Set Suite Variable | ${dut1_to_tg} +| | Stop VPP service on DUT | ${dut1_node} +| | Stop VPP service on DUT | ${dut2_node} +| | Stop Honeycomb Service on DUTs | ${dut1_node} +| | Stop Honeycomb Service on DUTs | ${dut2_node} +| | Convert data-plane interface to control-plane +| | ... | ${dut1_node} | ${dut1_to_tg} +| | Convert data-plane interface to control-plane +| | ... | ${dut1_node} | ${dut1_to_dut2} +| | Convert data-plane interface to control-plane +| | ... | ${dut2_node} | ${dut2_to_dut1} +| | Sleep | 5sec | Wait until OS reclaims the interfaces. +| | ${tg_to_dut1_name}= | Get Interface Name by MAC +| | ... | ${tg_node} | ${tg_to_dut1_mac} +| | ${dut1_to_tg_name}= | Get Interface Name by MAC +| | ... | ${dut1_node} | ${dut1_to_tg_mac} +| | ${dut1_to_dut2_name}= | Get Interface Name by MAC +| | ... | ${dut1_node} | ${dut1_to_dut2_mac} +| | ${dut2_to_dut1_name}= | Get Interface Name by MAC +| | ... | ${dut2_node} | ${dut2_to_dut1_mac} +| | Set Suite Variable | ${dut1_to_tg_name} +| | Set Suite Variable | ${tg_to_dut1_name} +| | Set Suite Variable | ${dut1_to_dut2_name} +| | Set Suite Variable | ${dut2_to_dut1_name} +| | Set management interface address +| | ... | ${tg_node} | ${tg_to_dut1_name} +| | ... | ${tg_to_dut1_ip} | ${prefix} +| | Set management interface address +| | ... | ${dut1_node} | ${dut1_to_tg_name} +| | ... | ${dut1_to_tg_ip} | ${prefix} +| | Set management interface address +| | ... | ${dut1_node} | ${dut1_to_dut2_name} +| | ... | ${dut1_to_dut2_ip} | ${prefix} +| | Set management interface address +| | ... | ${dut2_node} | ${dut2_to_dut1_name} +| | ... | ${dut2_to_dut1_ip} | ${prefix} +| | Set Static ARP | ${tg_node} | ${dut1_to_tg_ip} | ${dut1_to_tg_mac} +| | Set Static ARP | ${dut1_node} | ${tg_to_dut1_ip} | ${tg_to_dut1_mac} +| | Set Static ARP | ${dut1_node} | ${dut2_to_dut1_ip} | ${dut2_to_dut1_mac} +| | Set Static ARP | ${dut2_node} | ${dut1_to_dut2_ip} | ${dut1_to_dut2_mac} +| | Enable Honeycomb Feature | ${dut2_node} | BGP +| | Configure BGP Module | ${dut1_node} | ${dut1_to_dut2_ip} +| | ... | ${bgp_port} | ${bgp_as_number} +| | Configure BGP Module | ${dut2_node} | ${dut2_to_dut1_ip} +| | ... | ${bgp_port} | ${bgp_as_number} +| | Start VPP service on DUT | ${dut1_node} +| | Start VPP service on DUT | ${dut2_node} +| | Configure Honeycomb service on DUTs | ${dut1_node} +| | Set Up Honeycomb Functional Test Suite | ${dut2_node} + +| Unconfigure IPv4 Management Interfaces +| | [Documentation] | Remove all IP addresses from the interface. +| | ... +| | Clear Interface Configuration | ${tg_node} | ${tg_to_dut1_name} +| | Clear Interface Configuration | ${dut1_node} | ${dut1_to_tg_name} +| | Clear Interface Configuration | ${dut1_node} | ${dut1_to_dut2_name} +| | Clear Interface Configuration | ${dut2_node} | ${dut2_to_dut1_name} + +| Set BGP Suite Variables +| | Configure path in 3-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} +| | Set Suite Variable | ${interface} +| | Set Suite Variable | ${tg_node} +| | Set Suite Variable | ${dut1_node} +| | Set Suite Variable | ${dut2_node} +| | Set Suite Variable | ${dut1_to_tg} +| | Set Suite Variable | ${dut1_to_tg_name} +| | Set Suite Variable | ${tg_to_dut1_name} +| | Set Suite Variable | ${dut1_to_dut2_name} +| | Set Suite Variable | ${dut2_to_dut1_name} diff --git a/tests/honeycomb/func/mgmt-cfg-dhcp-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-dhcp-apihc-apivat-func.robot new file mode 100644 index 0000000000..958b27fd32 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-dhcp-apihc-apivat-func.robot @@ -0,0 +1,131 @@ +# Copyright (c) 2017 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. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/features/dhcp_proxy.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/dhcp.robot +| Library | resources.libraries.python.Trace +| Library | resources.libraries.python.IPv4Setup +| Library | resources.libraries.python.IPv6Setup +| Library | resources.libraries.python.IPv6Util +| Library | resources.libraries.python.Routing +| Variables | resources/test_data/honeycomb/dhcp_relay.py +| ... +| ... +| Documentation | *Honeycomb DHCP relay test suite.* +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC + +*** Test Cases *** +| TC01: Honeycomb can configure DHCP relay entry +| | [Documentation] +| | ... | [Top] TG=DUT1=TG. +| | ... | [Enc] Eth-IPv4-DHCP. +| | ... | [Cfg] (Using Honeycomb API) On DUT1 configure IP addresses\ +| | ... | neighbors and configure DHCP relay. +| | ... | [Ver] Send DHCP packets from TG interface to DUT. Receive all packets\ +| | ... | on the second TG interface and verify required fields. +| | ... +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Log DHCP relay configuration from VAT | ${node} | ipv4 +| | ... +| | Given DHCP relay Operational Data From Honeycomb Should Be empty | ${node} +| | When Honeycomb configures DHCP relay | ${node} | ${relay1} | ipv4 | ${0} +| | Then DHCP relay configuration from Honeycomb should contain +| | ... | ${node} | ${relay1_oper} +| | When DHCP relay test setup +| | Then Send DHCP messages and check answer | ${tg_node} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${dhcp_server1_ip} | ${tg_to_dut_if2_mac} +| | ... | ${client_ip} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_ip} + +| TC02: Honeycomb can remove DHCP relay entry +| | [Documentation] | Remove DHCP relay configuration, and verify that\ +| | ... | it was removed. +| | ... +| | Given DHCP relay configuration from Honeycomb should contain +| | ... | ${node} | ${relay1_oper} +| | When Honeycomb clears DHCP relay configuration | ${node} +| | Then DHCP relay Operational Data From Honeycomb Should Be empty | ${node} + +| TC03: Honeycomb can configure multiple DHCP relay servers. +| | [Documentation] | Configure multiple DHCP relay servers and verify\ +| | ... | their configuration using operational data. +| | ... +| | [Teardown] | Honeycomb clears DHCP relay configuration | ${node} +| | ... +| | Given DHCP relay Operational Data From Honeycomb Should Be empty | ${node} +| | And Honeycomb configures DHCP relay | ${node} | ${relay2} | ipv4 | ${0} +| | Then DHCP relay configuration from Honeycomb should contain +| | ... | ${node} | ${relay2_oper} + +| TC04: Honeycomb can configure DHCP relay entry with ipv6 +| | [Documentation] +| | ... | [Top] TG=DUT1=TG. +| | ... | [Enc] Eth-IPv6-DHCPv6. +| | ... | [Cfg] (Using Honeycomb API) On DUT1 configure IP addresses\ +| | ... | neighbors and configure DHCP relay. +| | ... | [Ver] Send DHCPv6 packets from TG interface to DUT. Receive all\ +| | ... | packets on the second TG interface and verify required fields. +| | ... +| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} +| | ... | AND | Log DHCP relay configuration from VAT | ${node} | ipv6 +| | ... | AND | Honeycomb clears DHCP relay configuration | ${node} +| | ... +| | Given DHCP relay Operational Data From Honeycomb Should Be empty | ${node} +| | When Honeycomb configures DHCP relay | ${node} | ${relay_v6} | ipv6 | ${0} +| | Then DHCP relay configuration from Honeycomb should contain +| | ... | ${node} | ${relay_v6_oper} +| | When DHCP relay test setup IPv6 +| | Then Send DHCPv6 Messages | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${dut_to_tg_if1_ip6} | ${dut_to_tg_if1_mac} | ${dhcp_server_ip6} +| | ... | ${tg_to_dut_if2_mac} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if2_mac} + +*** Keywords *** +| DHCP relay test setup +| | Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | 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} +| | Add ARP on DUT | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server1_ip} +| | ... | ${tg_to_dut_if2_mac} +| | Add ARP on DUT | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server2_ip} +| | ... | ${tg_to_dut_if2_mac} +| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | ${NONE} | local +| | ... | ${FALSE} | ${NONE} + +| DHCP relay test setup IPv6 +| | Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up +| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up +| | And Vpp All Ra Suppress Link Layer | ${nodes} +| | Honeycomb sets interface IPv6 address | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip6} | ${prefix_length_v6} +| | Honeycomb sets interface IPv6 address | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${prefix_length_v6} +| | And Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server_ip6} +| | ... | ${tg_to_dut_if2_mac} +| | And VPP Route Add | ${dut_node} | ff02::1:2 | 128 | ${NONE} | local +| | ... | ${FALSE} | ${NONE} diff --git a/tests/honeycomb/func/mgmt-cfg-int-apihcnc-func.robot b/tests/honeycomb/func/mgmt-cfg-int-apihcnc-func.robot new file mode 100644 index 0000000000..2ba904449a --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-int-apihcnc-func.robot @@ -0,0 +1,76 @@ +# 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. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/netconf.robot +| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot +| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords +| ... | WITH NAME | InterfaceAPI +| Variables | resources/test_data/honeycomb/netconf/triggers.py +| ... +| Documentation | *Netconf test suite. Contains test cases that need to bypass\ +| ... | REST API.* +| ... +| Force Tags | HC_FUNC | HC_REST_ONLY +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... + +*** Variables *** +| ${interface}= | ${node['interfaces']['port1']['name']} +| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} +| ... | unknown-unicast-flood=${True} | arp-termination=${True} + +*** Test Cases *** +| TC01: Honeycomb can create and delete interfaces +| | [Documentation] | Repeatedly create and delete an interface through Netconf\ +| | ... | and check the reply for any errors. +| | ... +| | Given Netconf session should be established | ${node} +| | And Honeycomb creates first L2 bridge domain +| | ... | ${node} | bd_netconf | ${bd_settings} +| | :FOR | ${index} | IN RANGE | 20 +| | | When Error trigger is sent | ${trigger_105} +| | | Then Replies should not contain RPC errors + +| TC02: Transaction revert test case 1 +| | [Documentation] | Configure two conflicting VxLAN tunnels, then verify\ +| | ... | that neither tunnel exists. +| | ... +| | Given Netconf session should be established | ${node} +| | ${if_data}= | And InterfaceAPI.Get all interfaces oper data | ${node} +| | When Error trigger is sent | ${trigger_revert1} +| | ${if_data_new}= | And InterfaceAPI.Get all interfaces oper data | ${node} +| | Then Should be equal | ${if_data} | ${if_data_new} + +| TC03: Transaction revert test case 2 +| | [Documentation] | Configure two conflicting TAP interfaces, then verify\ +| | ... | that neither interface exists. +| | ... +| | Given Netconf session should be established | ${node} +| | ${if_data}= | And InterfaceAPI.Get all interfaces oper data | ${node} +| | When Error trigger is sent | ${trigger_revert1} +| | ${if_data_new}= | And InterfaceAPI.Get all interfaces oper data | ${node} +| | Then Should be equal | ${if_data} | ${if_data_new} + +| TC04: Vlan subinterface creation +| | [Documentation] | Configure a Vlan sub-interface under a physical interface. +| | ... +| | Given Netconf session should be established | ${node} +| | When Error Trigger Is Sent +| | ... | ${trigger_vlan} | interface=${interface} +| | Then Replies should not contain RPC errors diff --git a/tests/honeycomb/func/mgmt-cfg-int-subint-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-int-subint-apihc-apivat-func.robot new file mode 100644 index 0000000000..b27c7f49f7 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-int-subint-apihc-apivat-func.robot @@ -0,0 +1,606 @@ +# 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. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/sub_interface.robot +| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Variables | resources/test_data/honeycomb/sub_interfaces.py +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC +| ... +| Documentation | *Honeycomb sub-interface management test suite.* + +*** Variables *** +# Test interfaces and their sub-interface parameters: +| ${super_if}= | ${node['interfaces']['port1']['name']} +| ${super_if2}= | ${node['interfaces']['port3']['name']} +| ${sub_if_id}= | ${sub_if_1_settings['identifier']} +| ${sub_if_name}= | ${super_if}.${sub_if_id} +| ${sub_if2_name}= | ${super_if2}.${sub_if_id} + +*** Test Cases *** +| TC01: Honeycomb creates sub-interface +| | [Documentation] | Check if Honeycomb creates a sub-interface. +| | ... +| | Given Honeycomb configures interface state | ${node} | ${super_if} | down +| | And sub-interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And interface Operational Data From VAT Should Be empty +| | ... | ${node} | ${sub_if_name} +| | When Honeycomb creates sub-interface | ${node} | ${super_if} +| | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings} +| | Then Sub-interface Operational Data From Honeycomb Should Be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And Sub-interface Operational Data From VAT Should Be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} +| | And sub-interface indices from Honeycomb and VAT should correspond +| | ... | ${node} | ${super_if} | ${sub_if_id} + +| TC02: Honeycomb sets interface and sub-interface up +| | [Documentation] | Honeycomb changes the state of interface\ +| | ... | and of its sub-interface to up. +| | ... +| | Given interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | down +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | down +| | Sub-interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down +| | Sub-interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | down | down +| | When Honeycomb configures interface state +| | ... | ${node} | ${super_if} | up +| | Then interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | up +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | up +| | When Honeycomb sets the sub-interface up +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | Then Sub-interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | up | up +| | And sub-interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | up | up + +| TC03: Honeycomb sets sub-interface down while its super-interface is up +| | [Documentation] | Honeycomb sets the sub-interface down while its \ +| | ... | super-interface is up. It must be possible. +| | ... +| | [Teardown] | Set super and sub interfaces up +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given sub-interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | up | up +| | And sub-interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | up | up +| | And interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | up +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | up +| | When Honeycomb sets the sub-interface down +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | Then interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | up +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | up +| | And sub-interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | down | up +| | And sub-interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | down | up + +| TC04: Honeycomb sets interface and sub-interface down +| | [Documentation] | Honeycomb changes the state of interface down and then \ +| | ... | changes the state of its sub-interface down, in this order. +| | ... +| | [Teardown] | Set super and sub interfaces down +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | up +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | up +| | When Honeycomb configures interface state +| | ... | ${node} | ${super_if} | down +| | Then interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | down +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | down +| | Given sub-interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | up | down +| | And sub-interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | up | down +| | When Honeycomb sets the sub-interface down +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | Then sub-interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down +| | And sub-interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | down | down + +| TC05: Honeycomb fails to set sub-interface up while its super-interface is down +| | [Documentation] | Honeycomb tries to set the sub-interface up while its \ +| | ... | super-interface is down. It must not be possible. +| | ... +| | Given interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | down +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | down +| | And sub-interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down +| | And sub-interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | down | down +| | When Honeycomb fails to set sub-interface up +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | Then interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | down +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | down +| | And sub-interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down +| | And sub-interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | down | down + +| TC06: Honeycomb fails to delete sub-interface +| | [Documentation] | Check if Honeycomb can delete an existing sub-interface. +| | ... +| | [Setup] | Set super and sub interfaces down +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given sub-interface Operational Data From Honeycomb Should Be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And sub-interface Operational Data From VAT Should Be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} +| | When Honeycomb fails to remove all sub-interfaces +| | ... | ${node} | ${super_if} +| | Then sub-interface Operational Data From Honeycomb Should Be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And sub-interface Operational Data From VAT Should Be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} + +| TC07: Honeycomb adds sub-interface to new bridge domain +| | [Documentation] | Check if Honeycomb adds a sub-interface to bridge domain. +| | ... +| | [Setup] | Set super and sub interfaces down +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given sub-interface Operational Data From Honeycomb Should Be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And sub-interface Operational Data From VAT Should Be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} +| | When Honeycomb creates first L2 bridge domain +| | ... | ${node} | ${bd_name} | ${bd_settings} +| | Then bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd_name} | ${bd_settings} +| | When Honeycomb adds sub-interface to bridge domain +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings} +| | Then sub-interface bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings} +| | And sub-interface bridge domain Operational Data From VAT Should Be +| | ... | ${node} | ${sub_if_name} | ${sub_bd_settings} +| | And sub-interface Operational Data From VAT Should Be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} + +| TC08: Honeycomb enables tag-rewrite pop 1 +| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \ +| | ... | parameters correctly. Case: pop 1. +| | ... +| | [Teardown] | Honeycomb disables tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} + +| TC09: Honeycomb enables tag-rewrite push +| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \ +| | ... | parameters correctly. Case: push. +| | ... +| | [Teardown] | Honeycomb disables tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT} + +| TC10: Honeycomb enables tag-rewrite translate 1-2 +| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \ +| | ... | parameters correctly. Case: translate 1-2. +| | ... +| | [Teardown] | Honeycomb disables tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${tag_rewrite_translate_1_2_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT} + +| TC11: Honeycomb disables tag-rewrite +| | [Documentation] | Check if Honeycomb disables the tag-rewrite. +| | ... +| | [Teardown] | Honeycomb disables tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled} +| | Then rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT} + +| TC12: Honeycomb enables tag-rewrite pop 1 again +| | [Documentation] | Check if Honeycomb can enable tag-rewrite again, once it \ +| | ... | was disabled by Honeycomb. +| | ... +| | [Teardown] | Honeycomb disables tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} + +| TC13: Honeycomb modifies the tag-rewrite +| | [Documentation] | Honeycomb sets the tag-rewrite: +| | ... | 1. pop 1, then +| | ... | 2. push, then +| | ... | 3. translate 1 - 2 +| | ... | Then Honeycomb disables the tag-rewrite. +| | ... +| | [Teardown] | Honeycomb disables tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2} +| | Then rewrite tag from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${tag_rewrite_translate_1_2_oper} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT} +| | When Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled} +| | Then rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT} + +| TC14: Honeycomb fails to set wrong vlan-type in tag-rewrite +| | [Documentation] | Check that Honeycomb does not accept wrong values of \ +| | ... | vlan-type in tag-rewrite. +| | ... +| | Given rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | When Honeycomb fails to set wrong rewrite tag +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${tag_rewrite_translate_1_2_wrong} +| | Then rewrite tag from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And rewrite tag from VAT should be +| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT} + +| TC15: Honeycomb configures sub-interface ipv4 address +| | [Documentation] | Check if Honeycomb can configure an ipv4 address on the\ +| | ... | sub-interface. +| | ... +| | Given sub-interface ipv4 address from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And sub-interface ipv4 address from VAT should be empty +| | ... | ${node} | ${sub_if_name} +| | When Honeycomb sets sub-interface ipv4 address +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | Then sub-interface ipv4 address from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | And sub-interface ipv4 address from VAT should be +| | ... | ${node} | ${sub_if_name} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} + +| TC16: Honeycomb removes sub-interface ipv4 address +| | [Documentation] | Check if Honeycomb can remove configured ipv4 addresses\ +| | ... | from the sub-interface. +| | ... +| | Given sub-interface ipv4 address from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | Run Keyword And Continue On Failure +| | ... | And sub-interface ipv4 address from VAT should be +| | ... | ${node} | ${sub_if_name} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | When Honeycomb removes all sub-interface ipv4 addresses +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | Then sub-interface ipv4 address from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And sub-interface ipv4 address from VAT should be empty +| | ... | ${node} | ${sub_if_name} + +| TC17: Honeycomb modifies existing sub-interface ipv4 address +| | [Documentation] | Check if Honeycomb can modify an ipv4 address already\ +| | ... | configured on the sub-interface. +| | ... +| | [Teardown] | Honeycomb removes all sub-interface ipv4 addresses +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given sub-interface ipv4 address from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And sub-interface ipv4 address from VAT should be empty +| | ... | ${node} | ${sub_if_name} +| | When Honeycomb sets sub-interface ipv4 address +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | And Honeycomb sets sub-interface ipv4 address +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']} +| | Then sub-interface ipv4 address from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']} +| | And sub-interface ipv4 address from VAT should be +| | ... | ${node} | ${sub_if_name} +| | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']} + +| TC18: Honeycomb modifies sub-interface exact tag match +| | [Documentation] | Check if Honeycomb can modify a sub-interface with exact\ +| | ... | tag match. +| | ... +| | Given Honeycomb configures interface state | ${node} | ${super_if2} | down +| | And sub-interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${super_if2} | ${sub_if_id} +| | And interface Operational Data From VAT Should Be empty +| | ... | ${node} | ${sub_if2_name} +| | When Honeycomb creates sub-interface | ${node} | ${super_if2} +| | ... | ${sub_if_2_match} | ${sub_if_2_tags} | ${sub_if_2_settings} +| | Then Sub-interface Operational Data From Honeycomb Should Be +| | ... | ${node} | ${super_if2} | ${sub_if_id} | ${sub_if_2_oper} +| | And Sub-interface Operational Data From VAT Should Be +| | ... | ${node} | ${sub_if2_name} | ${sub_if_2_oper} +| | And sub-interface indices from Honeycomb and VAT should correspond +| | ... | ${node} | ${super_if2} | ${sub_if_id} + +| TC19: Honeycomb configures sub-interface ipv6 address +| | [Documentation] | Check if Honeycomb can configure an ipv6 address on the\ +| | ... | sub-interface. +| | ... +| | Given sub-interface ipv6 address from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And sub-interface ipv6 address from VAT should be empty +| | ... | ${node} | ${sub_if_name} +| | When Honeycomb sets sub-interface ipv6 address +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} +| | Then sub-interface IPv6 address from Honeycomb should contain +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} +| | And sub-interface IPv6 address from VAT should contain +| | ... | ${node} | ${sub_if_name} +| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} + +| TC20: Honeycomb removes sub-interface ipv6 address +| | [Documentation] | Check if Honeycomb can remove configured ipv6 addresses\ +| | ... | from the sub-interface. +| | ... +| | Given sub-interface IPv6 address from Honeycomb should contain +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} +| | Run Keyword And Continue On Failure +| | ... | And sub-interface IPv6 address from VAT should contain +| | ... | ${node} | ${sub_if_name} +| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} +| | When Honeycomb removes all sub-interface ipv6 addresses +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | Then sub-interface ipv6 address from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And sub-interface ipv6 address from VAT should be empty +| | ... | ${node} | ${sub_if_name} + +| TC21: Honeycomb modifies existing sub-interface ipv6 address +| | [Documentation] | Check if Honeycomb can modify an ipv6 address already\ +| | ... | configured on the sub-interface. +| | ... +| | [Teardown] | Honeycomb removes all sub-interface ipv6 addresses +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Given sub-interface ipv6 address from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And sub-interface ipv6 address from VAT should be empty +| | ... | ${node} | ${sub_if_name} +| | When Honeycomb sets sub-interface ipv6 address +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} +| | And Honeycomb sets sub-interface ipv6 address +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']} +| | Then sub-interface IPv6 address from Honeycomb should contain +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']} +| | And sub-interface IPv6 address from VAT should contain +| | ... | ${node} | ${sub_if_name} +| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']} + +| TC22: Honeycomb can configure unnumbered sub-interface +| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\ +| | ... | on a sub-interface, borrowing the IP address of a physical interface. +| | ... +| | Given sub-interface ipv4 address from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And sub-interface ipv4 address from VAT should be empty +| | ... | ${node} | ${sub_if_name} +| | And Honeycomb sets interface IPv4 address | ${node} +| | ... | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} +| | When Honeycomb adds unnumbered configuration to interface +| | ... | ${node} | ${super_if}.${sub_if_id} | ${super_if2} +| | Then IPv4 address from Honeycomb should be +| | ... | ${node} | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${super_if2} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']} +| | And sub-interface ipv4 address from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | And sub-interface ipv4 address from VAT should be +| | ... | ${node} | ${sub_if_name} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} + +| TC23: Honeycomb removes sub-interface unnumbered configuration +| | [Documentation] | Check if Honeycomb can remove unnumbered configuration\ +| | ... | from a sub-interface. +| | ... +| | [Teardown] | Honeycomb removes interface IPv4 addresses | ${node} +| | ... | ${super_if2} +| | ... +| | Given IPv4 address from Honeycomb should be +| | ... | ${node} | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${super_if2} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']} +| | And sub-interface ipv4 address from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | And sub-interface ipv4 address from VAT should be +| | ... | ${node} | ${sub_if_name} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | When Honeycomb removes unnumbered configuration from interface +| | ... | ${node} | ${super_if}.${sub_if_id} +| | Then IPv4 address from Honeycomb should be +| | ... | ${node} | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${super_if2} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']} +| | And sub-interface ipv4 address from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And sub-interface ipv4 address from VAT should be empty +| | ... | ${node} | ${sub_if_name} + +| TC24: Honeycomb can configure unnumbered interface using a sub-interface +| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\ +| | ... | on an interface, borrowing the IP address of a sub-interface. +| | Given IPv4 address from Honeycomb should be empty | ${node} | ${super_if2} +| | And ipv4 address from VAT should be empty | ${node} | ${super_if2} +| | And sub-interface ipv4 address from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And sub-interface ipv4 address from VAT should be empty +| | ... | ${node} | ${sub_if_name} +| | And Honeycomb sets sub-interface ipv4 address +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | When Honeycomb adds unnumbered configuration to interface +| | ... | ${node} | ${super_if2} | ${super_if}.${sub_if_id} +| | Then IPv4 address from Honeycomb should be +| | ... | ${node} | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${super_if2} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']} +| | And sub-interface ipv4 address from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} +| | And sub-interface ipv4 address from VAT should be +| | ... | ${node} | ${sub_if_name} +| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} + +*** Keywords *** +| Set super and sub interfaces up +| | [Documentation] | Honeycomb sets super-interface and sub-interface up, in \ +| | ... | this order. +| | ... +| | ... | *Arguments:* +| | ... | - node - Information about a DUT node. Type: dictionary +| | ... | - super_interface - Super interface. Type: string +| | ... | - identifier - Sub-interface identifier. Type: integer or string +| | ... +| | ... | *Example:* +| | ... | \| Set super and sub interfaces up\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| +| | ... +| | [Arguments] | ${node} | ${super_interface} | ${identifier} +| | ... +| | Honeycomb configures interface state +| | ... | ${node} | ${super_interface} | up +| | Honeycomb sets the sub-interface up +| | ... | ${node} | ${super_interface} | ${identifier} + +| Set super and sub interfaces down +| | [Documentation] | Honeycomb sets super-interface and sub-interface down, in\ +| | ... | this order. +| | ... +| | ... | *Arguments:* +| | ... | - node - Information about a DUT node. Type: dictionary +| | ... | - super_interface - Super interface. Type: string +| | ... | - identifier - Sub-interface identifier. Type: integer or string +| | ... +| | ... | *Example:* +| | ... | \| Set super and sub interfaces down\ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| +| | ... +| | [Arguments] | ${node} | ${super_interface} | ${identifier} +| | ... +| | Honeycomb configures interface state +| | ... | ${node} | ${super_interface} | down +| | Honeycomb sets the sub-interface down +| | ... | ${node} | ${super_interface} | ${identifier} + +| Honeycomb disables tag rewrite +| | [Documentation] | +| | ... +| | ... | *Arguments:* +| | ... | - node - Information about a DUT node. Type: dictionary +| | ... | - super_if - Super-interface. Type: string +| | ... | - identifier - Sub-interface ID. Type: integer or string +| | ... +| | ... | *Example:* +| | ... | \| Honeycomb disables tag rewrite \ +| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| +| | ... +| | [Arguments] | ${node} | ${super_if} | ${sub_if_id} +| | ... +| | Honeycomb configures tag rewrite +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled} diff --git a/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot new file mode 100644 index 0000000000..9565564100 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot @@ -0,0 +1,307 @@ +# 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 *** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} +| ${interface2}= | ${node['interfaces']['port3']['name']} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip6.robot +| Variables | resources/test_data/honeycomb/interface_ip.py +| ... +| Force Tags | HC_FUNC +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Documentation | *Honeycomb interface management test suite.* + +*** Test Cases *** +| TC01: Honeycomb configures and reads interface state +| | [Documentation] | Check if Honeycomb API can modify the admin state of\ +| | ... | VPP interfaces. +| | ... +| | Given Interface state from Honeycomb should be +| | ... | ${node} | ${interface} | down +| | And Interface state from VAT should be | ${node} | ${interface} | down +| | When Honeycomb configures interface state | ${node} | ${interface} | up +| | Then Interface state from Honeycomb should be +| | ... | ${node} | ${interface} | up +| | And Interface state from VAT should be | ${node} | ${interface} | up +| | When Honeycomb configures interface state | ${node} | ${interface} | down +| | Then Interface state from Honeycomb should be +| | ... | ${node} | ${interface} | down +| | And Interface state from VAT should be | ${node} | ${interface} | down + +| TC02: Honeycomb modifies interface IPv4 address with netmask +| | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\ +| | ... | with address and netmask provided. +| | ... +| | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface} +| | And ipv4 address from VAT should be empty | ${node} | ${interface} +| | When Honeycomb sets interface IPv4 address | ${node} | ${interface} +| | ... | ${ipv4_address} | ${ipv4_mask} +| | Then IPv4 address from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${interface} | ${ipv4_address} +| | ... | ${ipv4_prefix} | ${ipv4_mask} + +| TC03: Honeycomb removes IPv4 address from interface +| | [Documentation] | Check if Honeycomb API can remove configured ipv4\ +| | ... | addresses from interface. +| | ... +| | Given IPv4 address from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${interface} | ${ipv4_address} +| | ... | ${ipv4_prefix} | ${ipv4_mask} +| | When Honeycomb removes interface IPv4 addresses | ${node} | ${interface} +| | Then IPv4 address from Honeycomb should be empty | ${node} | ${interface} +| | And ipv4 address from VAT should be empty | ${node} | ${interface} + +| TC04: Honeycomb modifies interface IPv4 address with prefix +| | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\ +| | ... | with address and prefix provided. +| | ... +| | [Teardown] | Honeycomb removes interface IPv4 addresses | ${node} +| | ... | ${interface} +| | ... +| | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface} +| | And ipv4 address from VAT should be empty | ${node} | ${interface} +| | When Honeycomb sets interface IPv4 address with prefix +| | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix} +| | Then IPv4 address from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${interface} | ${ipv4_address2} +| | ... | ${ipv4_prefix} | ${ipv4_mask} + +| TC05: Honeycomb modifies IPv4 neighbor table +| | [Documentation] | Check if Honeycomb API can add and remove ARP entries. +| | ... +| | [Teardown] | Honeycomb clears all interface IPv4 neighbors +| | ... | ${node} | ${interface} +| | ... +| | Given IPv4 neighbor from Honeycomb should be empty +| | ... | ${node} | ${interface} +| | When Honeycomb adds interface IPv4 neighbor +| | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac} +| | Then IPv4 neighbor from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac} + +| TC06: Honeycomb modifies interface configuration - IPv6 +| | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6. +| | ... +| | [Teardown] | Honeycomb removes interface IPv6 addresses | ${node} +| | ... | ${interface} +| | ... +| | Given IPv6 address from Honeycomb should be empty +| | ... | ${node} | ${interface} +| | And IPv6 address from VAT should be empty +| | ... | ${node} | ${interface} +| | When Honeycomb sets interface IPv6 address +| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix} +| | Then IPv6 address from Honeycomb should contain +| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix} +| | And IPv6 address from VAT should contain +| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix} + +| TC07: Honeycomb modifies IPv6 neighbor table +| | [Documentation] | Check if Honeycomb API can add and remove ARP entries. +| | ... +| | [Teardown] | Honeycomb clears all interface IPv6 neighbors +| | ... | ${node} | ${interface} +| | ... +| | Given IPv6 neighbor from Honeycomb should be empty +| | ... | ${node} | ${interface} +| | When Honeycomb adds interface IPv6 neighbor +| | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac} +| | Then IPv6 neighbor from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac} + +| TC08: Honeycomb modifies interface configuration - MTU +| | [Documentation] | Check if Honeycomb API can configure interface\ +| | ... | MTU value. +| | ... +| | When Honeycomb sets interface ethernet configuration +| | ... | ${node} | ${interface} | ${ethernet} +| | Then Interface ethernet Operational Data From Honeycomb Should Be +| | ... | ${node} | ${interface} | ${ethernet} +| | And Interface ethernet Operational Data From VAT Should Be +| | ... | ${node} | ${interface} | ${ethernet['mtu']} + +| TC09: Honeycomb modifies interface configuration - vrf +| | [Documentation] | Check if Honeycomb API can configure interface\ +| | ... | vrf ID. +| | ... +| | [Teardown] | Honeycomb sets interface VRF ID +| | ... | ${node} | ${interface} | ${0} | ipv4 +| | ... +| | When Honeycomb sets interface VRF ID +| | ... | ${node} | ${interface} | ${1} | ipv4 +| | Then Interface VRF ID from Honeycomb should be +| | ... | ${node} | ${interface} | ${1} | ipv4 +| | And Interface VRF ID from VAT should be +| | ... | ${node} | ${interface} | ${1} + +| TC10: Honeycomb can configure multiple IP addresses on one interface +| | [Documentation] | [Top] TG=DUT1=TG. +| | ... | [Enc] Eth-IPv4-ICMP; Eth-IPv6-ICMPv6 +| | ... | [Cfg] (Using Honeycomb API) On DUT1 set two IPv4 addresses\ +| | ... | and two IPv6 addresses on first interfaces to TG and add ARP entries\ +| | ... | for each address. +| | ... | [Ver] Send ICMP packets from TG to DUT, using different sets\ +| | ... | of source and destination IP addresses. Receive an ICMP reply\ +| | ... | for every packet sent. +| | ... +| | [Teardown] | Multiple IP Address Test Teardown | ${node} | ${dut_to_tg_if1} +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | When Honeycomb sets interface IPv4 address with prefix +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address} | ${ipv4_prefix} +| | And Honeycomb adds interface IPv4 address +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address2} | ${ipv4_prefix} +| | And Honeycomb sets interface IPv6 address +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address} | ${ipv6_prefix} +| | And Honeycomb adds interface IPv6 address +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address2} | ${ipv6_prefix} +| | Then IPv4 address from Honeycomb should be +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address} | ${ipv4_prefix} +| | And IPv4 address from VAT should be +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address} +| | ... | ${ipv4_prefix} | ${ipv4_mask} +| | And IPv6 address from Honeycomb should contain +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address} | ${ipv6_prefix} +| | And IPv6 address from VAT should contain +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address} | ${ipv6_prefix} +| | And Honeycomb configures interface state +| | ... | ${dut_node} | ${dut_to_tg_if1} | up +| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${ipv4_neighbor} | ${neighbor_mac} +| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${ipv4_neighbor2} | ${neighbor_mac2} +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${ipv6_neighbor} | ${neighbor_mac} +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${ipv6_neighbor2} | ${neighbor_mac2} +| | And Suppress ICMPv6 router advertisement message | ${nodes} +| | Then Ping and Verify IP address | ${nodes['TG']} +| | ... | ${ipv4_neighbor} | ${ipv4_address} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} +| | And Ping and Verify IP address | ${nodes['TG']} +| | ... | ${ipv4_neighbor2} | ${ipv4_address2} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} +| | And Ping and Verify IP address | ${nodes['TG']} +| | ... | ${ipv6_neighbor} | ${ipv6_address} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} +| | And Ping and Verify IP address | ${nodes['TG']} +| | ... | ${ipv6_neighbor2} | ${ipv6_address2} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} + +| TC11: Honeycomb can configure unnumbered interface +| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\ +| | ... | on a physical interface, borrowing the IP address of another physical\ +| | ... | interface. +| | ... +| | Given Honeycomb sets interface IPv4 address | ${node} +| | ... | ${interface2} | ${ipv4_address} | ${ipv4_prefix} +| | When Honeycomb adds unnumbered configuration to interface +| | ... | ${node} | ${interface} | ${interface2} +| | Then Wait until Keyword succeeds | 10s | 2s +| | ... | IPv4 address from Honeycomb should be +| | ... | ${node} | ${interface2} | ${ipv4_address} | ${ipv4_prefix} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${interface2} | ${ipv4_address} +| | ... | ${ipv4_prefix} | ${ipv4_mask} +| | And IPv4 address from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${interface} | ${ipv4_address} +| | ... | ${ipv4_prefix} | ${ipv4_mask} + +| TC12: Honeycomb removes interface unnumbered configuration +| | [Documentation] | Check if Honeycomb can remove unnumbered configuration\ +| | ... | from an interface. +| | ... +| | Given IPv4 address from Honeycomb should be +| | ... | ${node} | ${interface2} | ${ipv4_address} | ${ipv4_prefix} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${interface2} | ${ipv4_address} +| | ... | ${ipv4_prefix} | ${ipv4_mask} +| | And IPv4 address from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${interface} | ${ipv4_address} +| | ... | ${ipv4_prefix} | ${ipv4_mask} +| | When Honeycomb removes unnumbered configuration from interface +| | ... | ${node} | ${interface} +| | Then Wait until Keyword succeeds | 10s | 2s +| | ... | IPv4 address from Honeycomb should be +| | ... | ${node} | ${interface2} | ${ipv4_address} | ${ipv4_prefix} +| | And IPv4 address from VAT should be +| | ... | ${node} | ${interface2} | ${ipv4_address} +| | ... | ${ipv4_prefix} | ${ipv4_mask} +| | And IPv4 address from Honeycomb should be empty | ${node} | ${interface} +| | And ipv4 address from VAT should be empty | ${node} | ${interface} + +| TC13: Honeycomb fails to configure two IPv4 addresses from the same subnet +| | [Documentation] | Check if Honeycomb can configure two IPv4 addresses in\ +| | ... | the same subnet onto a single interface. It should not be possible. +| | ... +| | [Teardown] | Honeycomb removes interface IPv4 addresses | ${node} +| | ... | ${interface} +| | ... +| | [Tags] | EXPECTED_FAILING +| | ... +# VPP API does not configure the second address, but returns success. VPP-649 +| | When Honeycomb sets interface IPv4 address with prefix +| | ... | ${node} | ${interface} | 192.168.0.1 | ${9} +| | Then Honeycomb fails to add interface IPv4 address +| | ... | ${node} | ${interface} | 192.168.0.2 | ${9} +| | And Honeycomb fails to add interface IPv4 address +| | ... | ${node} | ${interface} | 192.232.0.2 | ${9} + +| TC14: Honeycomb fails to configure two IPv6 addresses from the same subnet +| | [Documentation] | Check if Honeycomb can configure two IPv6 addresses in\ +| | ... | the same subnet onto a single interface. It should not be possible. +| | ... +| | [Tags] | EXPECTED_FAILING +| | ... +# VPP API does not configure the second address, but returns success. VPP-649 +| | [Teardown] | Honeycomb removes interface IPv6 addresses | ${node} +| | ... | ${interface} +| | When Honeycomb sets interface IPv6 address +| | ... | ${node} | ${interface} | 10::FF10 | ${64} +| | Then Honeycomb fails to add interface IPv6 address +| | ... | ${node} | ${interface} | 10::FF11 | ${64} +| | And Honeycomb fails to add interface IPv6 address +| | ... | ${node} | ${interface} | 10::FFFF | ${64} + +*** Keywords *** +| Multiple IP Address Test Teardown +| | [Arguments] | ${node} | ${interface} +| | Honeycomb removes interface IPv4 addresses | ${node} | ${interface} +| | Honeycomb removes interface IPv6 addresses | ${node} | ${interface} +| | Honeycomb clears all interface IPv4 neighbors | ${node} | ${interface} +| | Honeycomb clears all interface IPv6 neighbors | ${node} | ${interface} \ No newline at end of file diff --git a/tests/honeycomb/func/mgmt-cfg-inttap-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-inttap-apihc-apivat-func.robot new file mode 100644 index 0000000000..cffec5b246 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-inttap-apihc-apivat-func.robot @@ -0,0 +1,79 @@ +# 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 *** +# Interfaces to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} +| ${tap_interface}= | tap_test +# Configuration which will be set and verified during tests. +| &{tap_settings}= | tap-name=tap_test | mac=08:00:27:c0:5d:37 +| ... | device-instance=${1} +| &{tap_settings2}= | tap-name=tap_test | mac=08:00:27:60:26:ab +| ... | device-instance=${2} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/tap.robot +| ... +| Force Tags | HC_FUNC +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Documentation | *Honeycomb TAP management test suite.* + +*** Test Cases *** +| TC01: Honeycomb configures TAP interface +| | [Documentation] | Check if Honeycomb API can configure a TAP interface. +| | ... +| | Given TAP Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${tap_interface} +| | And TAP Operational Data From VAT Should Be empty +| | ... | ${node} | ${tap_interface} +| | When Honeycomb creates TAP interface +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | Then TAP Operational Data From Honeycomb Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | And TAP Operational Data From VAT Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings} + +| TC02: Honeycomb modifies existing TAP interface configuration +| | [Documentation] | Check if Honeycomb API can re-configure and existing TAP\ +| | ... | interface with new settings. +| | ... +| | Given TAP Operational Data From Honeycomb Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | And TAP Operational Data From VAT Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | When Honeycomb configures TAP interface +| | ... | ${node} | ${tap_interface} | ${tap_settings2} +| | Then TAP Operational Data From Honeycomb Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings2} +| | And TAP Operational Data From VAT Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings2} + +| TC03: Honeycomb removes TAP interface +| | [Documentation] | Check if Honeycomb API can remove TAP interface. +| | ... +| | Given TAP Operational Data From Honeycomb Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings2} +| | And TAP Operational Data From VAT Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings2} +| | When Honeycomb removes TAP interface | ${node} | ${tap_interface} +| | Then TAP Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${tap_interface} +| | And TAP Operational Data From VAT Should Be empty +| | ... | ${node} | ${tap_interface} diff --git a/tests/honeycomb/func/mgmt-cfg-intvhost-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-intvhost-apihc-apivat-func.robot new file mode 100644 index 0000000000..c5cbe6ea4a --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-intvhost-apihc-apivat-func.robot @@ -0,0 +1,163 @@ +# 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 *** +| ${interface}= | ${node['interfaces']['port1']['name']} +| ${vhost_interface}= | test_vhost +| &{vhost_user_server}= | socket=/tmp/soc1 | role=server +| &{vhost_user_server_edit_1}= | socket=/tmp/soc12 | role=server +| &{vhost_user_server_edit_2}= | socket=/tmp/soc12 | role=client +| &{vhost_user_client}= | socket=/tmp/soc2 | role=client +| &{vhost_user_client_edit_1}= | socket=/tmp/soc22 | role=client +| &{vhost_user_client_edit_2}= | socket=/tmp/soc22 | role=server +| &{vhost_user_wrong}= | socket=/tmp/soc2 | role=wrong + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/vhost_user.robot +| ... +| Force Tags | HC_FUNC +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Documentation | *Honeycomb vhost-user interface management test suite.* + +*** Test Cases *** +| TC01: Honeycomb creates vhost-user interface - server +| | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\ +| | ... | server. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vhost_interface} +| | When Honeycomb creates vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | And vhost-user Operational Data From VAT Should Be +| | ... | ${node} | ${vhost_user_server} + +| TC02: Honeycomb modifies vhost-user interface - server +| | [Documentation] | Check if Honeycomb can modify properties of existing\ +| | ... | vhost-user interface, role: server. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | When Honeycomb configures vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1} +| | And vhost-user Operational Data From VAT Should Be +| | ... | ${node} | ${vhost_user_server_edit_1} +| | When Honeycomb configures vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2} +| | And vhost-user Operational Data From VAT Should Be +| | ... | ${node} | ${vhost_user_server_edit_2} +| | When Honeycomb configures vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | And vhost-user Operational Data From VAT Should Be +| | ... | ${node} | ${vhost_user_server} + +| TC03: Honeycomb deletes vhost-user interface - server +| | [Documentation] | Check if Honeycomb can delete an existing vhost-user\ +| | ... | interface, role: server. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | When Honeycomb removes vhost-user interface +| | ... | ${node} | ${vhost_interface} +| | Then vhost-user Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vhost_interface} +| | And vhost-user Operational Data From VAT Should Be empty +| | ... | ${node} + +| TC04: Honeycomb creates vhost-user interface - client +| | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\ +| | ... | client. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vhost_interface} +| | When Honeycomb creates vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | And vhost-user Operational Data From VAT Should Be +| | ... | ${node} | ${vhost_user_client} + +| TC05: Honeycomb modifies vhost-user interface - client +| | [Documentation] | Check if Honeycomb can modify properties of existing\ +| | ... | vhost-user interface, role: client. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | When Honeycomb configures vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1} +| | And vhost-user Operational Data From VAT Should Be +| | ... | ${node} | ${vhost_user_client_edit_1} +| | When Honeycomb configures vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2} +| | And vhost-user Operational Data From VAT Should Be +| | ... | ${node} | ${vhost_user_client_edit_2} +| | When Honeycomb configures vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | Then vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | And vhost-user Operational Data From VAT Should Be +| | ... | ${node} | ${vhost_user_client} + +| TC06: Honeycomb deletes vhost-user interface - client +| | [Documentation] | Check if Honeycomb can delete an existing vhost-user\ +| | ... | interface, role: client. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | When Honeycomb removes vhost-user interface +| | ... | ${node} | ${vhost_interface} +| | Then vhost-user Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vhost_interface} +| | And vhost-user Operational Data From VAT Should Be empty +| | ... | ${node} + +| TC07: Honeycomb does not set vhost-user configuration on another interface type +| | [Documentation] | Check if Honeycomb refuses to set vhost-user\ +| | ... | configuration for interface which is not v3po:vhost-user type. +| | ... +| | When Honeycomb fails setting vhost-user on different interface type +| | ... | ${node} | ${interface} | ${vhost_user_server} +| | Then vhost-user Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} +| | And vhost-user Operational Data From VAT Should Be empty +| | ... | ${node} + +| TC08: Honeycomb does not set invalid vhost-user configuration +| | [Documentation] | Check if Honeycomb refuses to set invalid parameters to\ +| | ... | vhost-user interface. +| | ... +| | Given vhost-user Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vhost_interface} +| | When Honeycomb fails setting invalid vhost-user configuration +| | ... | ${node} | ${vhost_interface} | ${vhost_user_wrong} +| | Then vhost-user Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vhost_interface} +| | And vhost-user Operational Data From VAT Should Be empty +| | ... | ${node} diff --git a/tests/honeycomb/func/mgmt-cfg-l2bd-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-l2bd-apihc-apivat-func.robot new file mode 100644 index 0000000000..a869e96c11 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-l2bd-apihc-apivat-func.robot @@ -0,0 +1,116 @@ +# 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 *** +# Interfaces to run tests on. +| @{interfaces}= | ${node['interfaces']['port1']['name']} +| ... | ${node['interfaces']['port3']['name']} +# Configuration which will be set and verified during tests. +| ${bd1_name}= | bd-01 +| ${bd2_name}= | bd-02 +| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} +| ... | unknown-unicast-flood=${True} | arp-termination=${True} +| &{if_settings}= | split_horizon_group=${1} | bvi=${False} +| &{if_settings2}= | split_horizon_group=${2} | bvi=${True} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC +| ... +| Documentation | *Honeycomb bridge domain management test suite.* + +*** Test Cases *** +| TC01: Honeycomb sets up l2 bridge domain +| | [Documentation] | Check if Honeycomb can create bridge domains on VPP node. +| | ... +| | When Honeycomb creates first l2 bridge domain +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | Then Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | And Bridge domain Operational Data From VAT Should Be +| | ... | ${node} | ${0} | ${bd_settings} + +| TC02: Honeycomb manages multiple bridge domains on node +| | [Documentation] | Check if Honeycomb can manage multiple bridge domains on\ +| | ... | a single node. +| | ... +| | Given Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | When Honeycomb creates l2 bridge domain +| | ... | ${node} | ${bd2_name} | ${bd_settings} +| | Then Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | And Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd2_name} | ${bd_settings} +| | And Bridge domain Operational Data From VAT Should Be +| | ... | ${node} | ${0} | ${bd_settings} +| | And Bridge domain Operational Data From VAT Should Be +| | ... | ${node} | ${1} | ${bd_settings} + +| TC03: Honeycomb removes bridge domains +| | [Documentation] | Check if Honeycomb can remove bridge domains from a VPP\ +| | ... | node. +| | ... +| | Given Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | When Honeycomb removes all bridge domains | ${node} +| | Then Honeycomb should show no bridge domains | ${node} +| | And VAT should show no bridge domains | ${node} + +| TC04: Honeycomb assigns interfaces to bridge domain +| | [Documentation] | Check if Honeycomb can assign VPP interfaces to an\ +| | ... | existing bridge domain. +| | ... +| | Given Honeycomb creates first l2 bridge domain +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | When Honeycomb adds interfaces to bridge domain +| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings} +| | Then Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | And Bridge domain Operational Data From VAT Should Be +| | ... | ${node} | ${0} | ${bd_settings} +| | And Honeycomb should show interfaces assigned to bridge domain +| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings} +| | And VAT should show interfaces assigned to bridge domain +| | ... | ${node} | ${0} | @{interfaces} | ${if_settings} + +| TC05: Honeycomb cannot remove bridge domain with an interface assigned +| | [Documentation] | Check if Honeycomb can remove a bridge domain that has an\ +| | ... | interface assigned to it. Expect to fail with code 500. +| | ... +| | Given Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | And Bridge domain Operational Data From VAT Should Be +| | ... | ${node} | ${0} | ${bd_settings} +| | And Honeycomb should show interfaces assigned to bridge domain +| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings} +| | And VAT should show interfaces assigned to bridge domain +| | ... | ${node} | ${0} | @{interfaces} | ${if_settings} +| | When Run keyword and expect error | HoneycombError* Status code: 500. +| | ... | Honeycomb removes all bridge domains | ${node} +| | Then Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | And Bridge domain Operational Data From VAT Should Be +| | ... | ${node} | ${0} | ${bd_settings} +| | And Honeycomb should show interfaces assigned to bridge domain +| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings} +| | And VAT should show interfaces assigned to bridge domain +| | ... | ${node} | ${0} | @{interfaces} | ${if_settings} diff --git a/tests/honeycomb/func/mgmt-cfg-l2fib-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-l2fib-apihc-apivat-func.robot new file mode 100644 index 0000000000..9aae85c7ac --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-l2fib-apihc-apivat-func.robot @@ -0,0 +1,232 @@ +# 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. + +*** Settings *** +| Resource | resources/libraries/robot/shared/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/l2_fib.robot +| Variables | resources/test_data/honeycomb/l2_fib.py | ${node} | ${interface} +| ... | ${interface2} +| ... +| Documentation | *Honeycomb L2 FIB management test suite.* +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC + +*** Variables *** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} +| ${interface2}= | ${node['interfaces']['port3']['name']} + +*** Test Cases *** +| TC01: Honeycomb adds L2 FIB entry (forward) +| | [Documentation] | Honeycomb creates a bridge domain and assignes an \ +| | ... | interface to it. Then adds an L2 FIB entry (forward) to the bridge \ +| | ... | domain. +| | ... +| | [Teardown] | Honeycomb removes L2 FIB entry +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']} +| | ... +| | Given Interface state from Honeycomb should be +| | ... | ${node} | ${interface} | down +| | When Honeycomb configures interface state +| | ... | ${node} | ${interface} | up +| | Then Interface state from Honeycomb should be +| | ... | ${node} | ${interface} | up +| | When Honeycomb creates first l2 bridge domain +| | ... | ${node} | ${bd_name} | ${bd_settings} +| | Then Bridge domain Operational Data From Honeycomb Should Be +| | ... | ${node} | ${bd_name} | ${bd_settings} +| | Given Bridge domain Operational Interface Assignment should be empty +| | ... | ${node} | ${interface} +| | When Honeycomb adds interface to bridge domain +| | ... | ${node} | ${interface} | ${bd_name} | ${if_bd_settings} +| | Then Bridge domain Operational Interface Assignment should be +| | ... | ${node} | ${interface} | ${if_bd_settings} +| | Given L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} +| | When Honeycomb adds L2 FIB entry to bridge domain +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg} +| | Then L2 FIB Entry from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} +| | And L2 FIB entry from VAT should be +| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat} + +| TC02: Honeycomb adds L2 FIB entry (static, forward) +| | [Documentation] | Honeycomb adds an L2 FIB entry (static, forward) to the \ +| | ... | bridge domain. +| | ... +| | [Teardown] | Honeycomb removes L2 FIB entry +| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper['phys-address']} +| | ... +| | Given Bridge domain Operational Interface Assignment should be +| | ... | ${node} | ${interface} | ${if_bd_settings} +| | And L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} +| | When Honeycomb adds L2 FIB entry to bridge domain +| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg} +| | Then L2 FIB Entry from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper} +| | And L2 FIB entry from VAT should be +| | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat} + +| TC03: Honeycomb adds L2 FIB entry (static, filter) +| | [Documentation] | Honeycomb adds an L2 FIB entry (static, filter) to the \ +| | ... | bridge domain. +| | ... +| | [Teardown] | Honeycomb removes L2 FIB entry +| | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper['phys-address']} +| | ... +| | Given Bridge domain Operational Interface Assignment should be +| | ... | ${node} | ${interface} | ${if_bd_settings} +| | And L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} +| | When Honeycomb adds L2 FIB entry to bridge domain +| | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg} +| | Then L2 FIB Entry from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper} +| | And L2 FIB entry from VAT should be +| | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat} + +| TC04: Honeycomb adds and removes L2 FIB entry (forward) +| | [Documentation] | Honeycomb adds an L2 FIB entry (forward) to the bridge \ +| | ... | domain and then Honeycomb removes it from the bridge domain. +| | ... +| | [Teardown] | Honeycomb removes L2 FIB entry +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']} +| | ... +| | Given Bridge domain Operational Interface Assignment should be +| | ... | ${node} | ${interface} | ${if_bd_settings} +| | And L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} +| | When Honeycomb adds L2 FIB entry to bridge domain +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg} +| | Then L2 FIB Entry from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} +| | And L2 FIB entry from VAT should be +| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat} +| | When Honeycomb removes L2 FIB entry +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']} +| | Then L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} + +| TC05: Honeycomb adds more than one L2 FIB entry +| | [Documentation] | Honeycomb adds three L2 FIB entries to the bridge domain. +| | ... +| | [Teardown] | Honeycomb removes all L2 FIB entries +| | ... | ${node} | ${bd_name} +| | ... +| | Given Bridge domain Operational Interface Assignment should be +| | ... | ${node} | ${interface} | ${if_bd_settings} +| | And L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} +| | When Honeycomb adds L2 FIB entry to bridge domain +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg} +| | And Honeycomb adds L2 FIB entry to bridge domain +| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg} +| | And Honeycomb adds L2 FIB entry to bridge domain +| | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg} +| | Then L2 FIB Entry from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} +| | And L2 FIB Entry from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper} +| | And L2 FIB Entry from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper} +| | And L2 FIB entry from VAT should be +| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat} +| | And L2 FIB entry from VAT should be +| | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat} +| | And L2 FIB entry from VAT should be +| | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat} + +| TC06: Honeycomb fails to set wrong L2 FIB entry +| | [Documentation] | Honeycomb tries to add an L2 FIB entry with wrong \ +| | ... | parameters to the bridge domain. It must fail. +| | ... +| | [Teardown] | Honeycomb removes all L2 FIB entries +| | ... | ${node} | ${bd_name} +| | ... +| | Given Bridge domain Operational Interface Assignment should be +| | ... | ${node} | ${interface} | ${if_bd_settings} +| | And L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} +| | When Honeycomb fails to add wrong L2 FIB entry +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_mac} +| | Then L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} +| | When Honeycomb fails to add wrong L2 FIB entry +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_if} +| | Then L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} +| | When Honeycomb fails to add wrong L2 FIB entry +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_action} +| | Then L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} + +| TC07: Honeycomb fails to modify existing L2 FIB entry +| | [Documentation] | Honeycomb tries to modify an existing L2 FIB entry. It \ +| | ... | must fail. +| | ... +| | [Teardown] | Honeycomb removes all L2 FIB entries +| | ... | ${node} | ${bd_name} +| | ... +| | Given Bridge domain Operational Interface Assignment should be +| | ... | ${node} | ${interface} | ${if_bd_settings} +| | And L2 FIB Table from Honeycomb should be empty +| | ... | ${node} | ${bd_name} +| | And L2 FIB Table from VAT should be empty +| | ... | ${node} | ${bd_index} +| | When Honeycomb adds L2 FIB entry to bridge domain +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg} +| | Then L2 FIB Entry from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} +| | When Honeycomb fails to modify L2 FIB entry +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']} +| | ... | outgoing-interface +| | ... | ${l2_fib_forward_modified_cfg['outgoing-interface']} +| | Then L2 FIB Entry from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} +| | And L2 FIB entry from VAT should be +| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat} + +*** Keywords *** +| Set test interface down +| | [Documentation] | Set the interface used in tests down. +| | ... +| | Honeycomb configures interface state +| | ... | ${node} | ${interface} | down diff --git a/tests/honeycomb/func/mgmt-cfg-lisp-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-lisp-apihc-apivat-func.robot new file mode 100644 index 0000000000..0198e8205c --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-lisp-apihc-apivat-func.robot @@ -0,0 +1,310 @@ +# 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*** +| ${ip_address}= | 192.168.0.4 +| @{ip_addresses}= | 192.168.0.5 | 192.168.0.6 | 192.168.0.7 | 192.168.0.8 +| ${state}= | enabled +| ${interface}= | ${node['interfaces']['port1']['name']} +| ${bd_name}= | bd_lisp +| ${bd2_name}= | bd2_lisp +| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} +| ... | unknown-unicast-flood=${True} | arp-termination=${True} + +*** Settings *** +| Library | resources.libraries.python.Trace +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/shared/traffic.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/lisp.robot +| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot +| Variables | resources/test_data/honeycomb/lisp/lisp.py +| ... +| Documentation | *Honeycomb Lisp test suite.* +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC + +*** Test Cases *** +| TC01: Honeycomb enables LISP feature +| | [Documentation] | Check if Honeycomb can enable the LISP feature. +| | ... +| | Given LISP Should Not Be Configured | ${node} +| | When Honeycomb enables LISP | ${node} +| | Then LISP state from Honeycomb should be | ${node} | ${state} +| | And LISP state from VAT should be | ${node} | ${state} + +| TC02: Honeycomb adds locator set and locator +| | [Documentation] | Check if Honeycomb can configure a locator set. +| | ... +| | Given LISP state from Honeycomb should be | ${node} | ${state} +| | When Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} +| | Then Locator Set From Honeycomb Should Be +| | ... | ${node} | ${interface} | ${locator_set} + +| TC15: Honeycomb can remove configuration of LISP features +| | [Documentation] | Check if Honeycomb can disable all LISP features. +| | ... +| | Given Locator Set From Honeycomb Should Be +| | ... | ${node} | ${interface} | ${locator_set} +| | When Honeycomb disables all LISP features | ${node} +| | Then LISP Should Not Be Configured | ${node} + +| TC03: Honeycomb configures LISP - remote mapping - Bridge Domain +| | [Documentation] | Check if Honeycomb can configure a remote LISP mapping\ +| | ... | with a bridge domain. +| | ... +| | Given Honeycomb enables LISP | ${node} +| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} +| | And Honeycomb creates first l2 bridge domain +| | ... | ${node} | ${bd_name} | ${bd_settings} +| | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_remote_bd} +| | Then LISP mapping from Honeycomb should be +| | ... | ${node} | ${remote_bd_subtable} +| | And LISP mapping from VAT should be +| | ... | ${node} | ${vat_remote_bd} + +| TC04: Honeycomb can remove LISP mapping +| | [Documentation] | Check if Honeycomb can remove a configured LISP mapping. +| | ... +| | Given LISP mapping from Honeycomb should be +| | ... | ${node} | ${remote_bd_subtable} +| | And LISP mapping from VAT should be +| | ... | ${node} | ${vat_remote_bd} +| | When Honeycomb removes all LISP mappings | ${node} +| | Then LISP mappings from Honeycomb should not exist +| | ... | ${node} +| | And LISP mappings from VAT should not exist +| | ... | ${node} + +| TC05: Honeycomb configures LISP - remote mapping - VRF +| | [Documentation] | Check if Honeycomb can configure a remote LISP mapping\ +| | ... | with VRF. +| | ... +| | [Teardown] | Honeycomb removes all LISP mappings | ${node} +| | ... +| | Given LISP mappings from Honeycomb should not exist +| | ... | ${node} +| | And LISP mappings from VAT should not exist +| | ... | ${node} +| | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_remote_vrf} +| | Then LISP mapping from Honeycomb should be +| | ... | ${node} | ${remote_vrf_subtable} +| | And LISP mapping from VAT should be | ${node} | ${vat_remote_vrf} + +| TC06: Honeycomb configures LISP - local mapping - Bridge Domain +| | [Documentation] | Check if Honeycomb can configure a local LISP mapping\ +| | ... | with a bridge domain. +| | ... +| | [Teardown] | Honeycomb removes all LISP mappings | ${node} +| | ... +| | Given Locator Set From Honeycomb Should Be +| | ... | ${node} | ${interface} | ${locator_set} +| | And LISP mappings from Honeycomb should not exist +| | ... | ${node} +| | And LISP mappings from VAT should not exist +| | ... | ${node} +| | And Honeycomb creates first l2 bridge domain +| | ... | ${node} | ${bd2_name} | ${bd_settings} +| | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_local_bd} +| | Then LISP mapping from Honeycomb should be | ${node} | ${local_bd_subtable} +| | And LISP mapping from VAT should be | ${node} | ${vat_local_bd} + +| TC07: Honeycomb configures LISP - local mapping - VRF +| | [Documentation] | Check if Honeycomb can configure a local LISP mapping\ +| | ... | with VRF. +| | ... +| | [Teardown] | Honeycomb removes all LISP mappings | ${node} +| | ... +| | Given Locator Set From Honeycomb Should Be +| | ... | ${node} | ${interface} | ${locator_set} +| | And LISP mappings from Honeycomb should not exist +| | ... | ${node} +| | And LISP mappings from VAT should not exist +| | ... | ${node} +| | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_local_vrf} +| | Then LISP mapping from Honeycomb should be | ${node} | ${local_vrf_subtable} +| | And LISP mapping from VAT should be | ${node} | ${vat_local_vrf} + +| TC08: Honeycomb configures LISP mapping with adjacency +| | [Documentation] | Check if Honeycomb can configure local and remote LISP\ +| | ... | mappings with VRF, and configure adjacency. +| | ... +| | [Teardown] | Honeycomb disables all LISP features | ${node} +| | ... +| | Given Locator Set From Honeycomb Should Be +| | ... | ${node} | ${interface} | ${locator_set} +| | And LISP mappings from Honeycomb should not exist +| | ... | ${node} +| | And LISP mappings from VAT should not exist +| | ... | ${node} +| | And Honeycomb adds LISP mapping | ${node} | ${lisp_settings_both_vrf} +| | When Honeycomb adds LISP adjacency | ${node} | ${7} | remote_map_vrf +| | ... | adj01 | ${vrf_adjacency} +| | Then LISP mapping from Honeycomb should be +| | ... | ${node} | ${adj_subtable} + +| TC09: Honeycomb configures LISP Map Resolver +| | [Documentation] | Check if Honeycomb can configure a LISP Map Resolver. +| | ... +| | [Teardown] | Honeycomb disables all LISP features | ${node} +| | Given Honeycomb enables LISP | ${node} +| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} +| | And LISP state from VAT should be | ${node} | ${state} +| | When Honeycomb adds LISP Map Resolver | ${node} | ${ip_address} +| | Then Map Resolver from Honeycomb should be | ${node} | ${ip_address} +| | And Map Resolver from VAT should be | ${node} | ${ip_address} + +| TC10: Honeycomb configures LISP Map Server +| | [Documentation] | Check if Honeycomb can configure a LISP Map Server. +| | ... +| | [Teardown] | Honeycomb disables all LISP features | ${node} +| | Given Honeycomb enables LISP | ${node} +| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} +| | Given LISP state from Honeycomb should be | ${node} | ${state} +| | And LISP state from VAT should be | ${node} | ${state} +| | When Honeycomb adds LISP Map Server | ${node} | @{ip_addresses} +| | Then Map Server from Honeycomb should be | ${node} | @{ip_addresses} +| | And Map Server from VAT should be | ${node} | @{ip_addresses} + +| TC11: Honeycomb configures LISP PETR configuration +| | [Documentation] | Check if Honeycomb can configure LISP +| | ... | PETR configuration. +| | ... +| | [Teardown] | Honeycomb disables all LISP features | ${node} +| | Given Honeycomb enables LISP | ${node} +| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} +| | Given LISP state from Honeycomb should be | ${node} | ${state} +| | And LISP state from VAT should be | ${node} | ${state} +| | When Honeycomb enables LISP PETR feature | ${node} | ${ip_address} +| | Then PETR configuration from Honeycomb should be | ${node} | ${ip_address} +| | And PETR configuration from VAT should be | ${node} | enabled + +| TC12: Honeycomb configures LISP RLOC Probing +| | [Documentation] | Check if Honeycomb can configure LISP RLOC Probing. +| | ... +| | [Teardown] | Honeycomb disables all LISP features | ${node} +| | Given Honeycomb enables LISP | ${node} +| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} +| | Given LISP state from Honeycomb should be | ${node} | ${state} +| | And LISP state from VAT should be | ${node} | ${state} +| | When Honeycomb enables LISP RLOC feature | ${node} +| | Then RLOC Probing from Honeycomb should be | ${node} | ${True} +| | And RLOC Probing from VAT should be | ${node} | enabled + +| TC13: Honeycomb configures LISP Map Register +| | [Documentation] | Check if Honeycomb can configure a LISP Map Register. +| | ... +| | [Teardown] | Honeycomb disables all LISP features | ${node} +| | Given Honeycomb enables LISP | ${node} +| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} +| | Given LISP state from Honeycomb should be | ${node} | ${state} +| | And LISP state from VAT should be | ${node} | ${state} +| | When Honeycomb adds LISP Map Register | ${node} | ${True} +| | Then Map Register from Honeycomb should be | ${node} | ${True} +| | And Map Register from VAT should be | ${node} | enabled + +| TC14: Honeycomb enabled LISP PITR feature +| | [Documentation] | Check if Honeycomb can configure the LISP PITR feature. +| | ... +# HC2VPP-263 Locator set reference in operational data is incorrect +| | [Tags] | EXPECTED_FAILING +| | [Teardown] | Honeycomb disables all LISP features | ${node} +| | Given Honeycomb enables LISP | ${node} +| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} +| | When Honeycomb enables LISP PITR feature | ${node} | ${locator_set} +| | Then PITR config from Honeycomb should be | ${node} | ${locator_set} +| | And PITR config from VAT should be | ${node} | ${locator_set} + +| TC16: Honeycomb can configure LISP for traffic test - IPv4 +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv4-LISP. +| | ... | [Cfg] On DUT1 configure IPv4 LISP static adjacencies with TG. +| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces through\ +| | ... | DUT1 and verify LISP encapsulation of received packet. +| | ... | [Ref] RFC6830. +| | ... +| | [Teardown] | LISP Functional Traffic Test Teardown +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | 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 IPv4 address with prefix | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip4} | ${prefix_len4} +| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip4} | ${prefix_len4} +| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${src_ip4} | ${tg_to_dut_if1_mac} +| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${tg_to_dut_if2_ip4} | ${tg_to_dut_if2_mac} +| | When Honeycomb enables LISP | ${node} +| | And Honeycomb adds locator set | ${node} | ${dut_to_tg_if2} | ${locator_set} +| | And Honeycomb adds LISP mapping | ${node} | ${lisp_traffic_ip4} +| | Then send packet and verify LISP encap +| | ... | ${tg_node} | ${src_ip4} | ${dst_ip4} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${src_rloc4} | ${dst_rloc4} + +| TC17: Honeycomb can configure LISP for traffic test - IPv6 +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv6-LISP. +| | ... | [Cfg] On DUT1 configure IPv6 LISP static adjacencies with TG. +| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces through\ +| | ... | DUT1 and verify LISP encapsulation of received packet. +| | ... | [Ref] RFC6830. +| | ... +| | [Teardown] | LISP Functional Traffic Test Teardown +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | 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_ip6} | ${prefix_len6} +| | And Honeycomb sets interface IPv6 address | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${prefix_len6} +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${src_ip6} | ${tg_to_dut_if1_mac} +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${tg_to_dut_if2_ip6} | ${tg_to_dut_if2_mac} +| | When Honeycomb enables LISP | ${node} +| | And Honeycomb adds locator set | ${node} | ${dut_to_tg_if2} | ${locator_set} +| | And Honeycomb adds LISP mapping | ${node} | ${lisp_traffic_ip6} +| | Then send packet and verify LISP encap +| | ... | ${tg_node} | ${src_ip6} | ${dst_ip6} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${src_rloc6} | ${dst_rloc6} + +| TC18: Honeycomb configures LISP Map Request Mode +| | [Documentation] | Check if Honeycomb can configure LISP Map Request mode. +| | ... | Note: Map Request Mode cannot be removed once configured. +| | ... +| | [Teardown] | Honeycomb disables LISP | ${node} +| | ... +| | Given Honeycomb Enables LISP | ${node} +| | When Honeycomb sets LISP Map Request Mode | ${node} | ${True} +| | Then Map Request Mode from Honeycomb should be +| | ... | ${node} | source-destination +| | And Map Request Mode from VAT should be | ${node} | src-dst diff --git a/tests/honeycomb/func/mgmt-cfg-lispgpe-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-lispgpe-apihc-apivat-func.robot new file mode 100644 index 0000000000..a4d66b5581 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-lispgpe-apihc-apivat-func.robot @@ -0,0 +1,226 @@ +# Copyright (c) 2017 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*** +| ${interface}= | ${node['interfaces']['port1']['name']} + +*** Settings *** +| Library | resources.libraries.python.Trace +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/shared/traffic.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/lisp_gpe.robot +| Variables | resources/test_data/honeycomb/lisp/lisp_gpe.py +| ... +| Documentation | *Honeycomb LISP GPE test suite.* +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC + +*** Test Cases *** +| TC01: Honeycomb enables LISP GPE feature +| | [Documentation] | Check if Honeycomb can enable the LISP GPE feature. +| | ... +| | Given LISP GPE Should Not Be Configured | ${node} +| | When Honeycomb enables LISP GPE | ${node} +| | Then LISP GPE state from Honeycomb should be | ${node} | enabled +| | And LISP GPE state from VAT should be | ${node} | enabled + +| TC02: Honeycomb disable LISP GPE feature +| | [Documentation] | Check if Honeycomb can enable the LISP GPE feature. +| | ... +| | [Teardown] | Honeycomb enables LISP GPE | ${node} +| | Given LISP GPE state from Honeycomb should be | ${node} | enabled +| | And LISP GPE state from VAT should be | ${node} | enabled +| | When Honeycomb disables LISP GPE | ${node} +| | Then LISP GPE state from Honeycomb should be | ${node} | disabled +| | And LISP GPE state from VAT should be | ${node} | disabled + +| TC03: Honeycomb configures LISP GPE mapping - negative, IPv4 +| | [Documentation] | Check if Honeycomb can configure a LISP mapping\ +| | ... | with VRF. +| | ... +| | Given LISP GPE mappings from Honeycomb should not exist +| | ... | ${node} +| | When Honeycomb adds first LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip4} +| | Then LISP GPE mapping from Honeycomb should be +| | ... | ${node} | ${negative_mapping_ip4} + +| TC04: Honeycomb can remove LISP GPE mapping +| | [Documentation] | Check if Honeycomb can remove a configured LISP GPE\ +| | ... | mapping. +| | ... +| | Given LISP GPE mapping from Honeycomb should be +| | ... | ${node} | ${negative_mapping_ip4} +| | When Honeycomb removes LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip4['id']} +| | Then LISP GPE mappings from Honeycomb should not exist +| | ... | ${node} + +| TC05: Honeycomb configures LISP GPE mapping - positive, IPv4 +| | [Documentation] | Check if Honeycomb can configure a LISP mapping\ +| | ... | with VRF. +| | ... +| | [Teardown] | Honeycomb removes LISP GPE mapping +| | ... | ${node} | ${positive_mapping_ip4['id']} +| | Given LISP GPE mappings from Honeycomb should not exist +| | ... | ${node} +| | When Honeycomb adds first LISP GPE mapping +| | ... | ${node} | ${positive_mapping_ip4} +| | Then LISP GPE mapping from Honeycomb should be +| | ... | ${node} | ${positive_mapping_ip4} + +| TC06: Honeycomb configures LISP GPE mapping - negative, IPv6 +| | [Documentation] | Check if Honeycomb can configure a LISP mapping\ +| | ... | with VRF. +| | ... +| | [Teardown] | Honeycomb removes LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip6['id']} +| | Given LISP GPE mappings from Honeycomb should not exist +| | ... | ${node} +| | When Honeycomb adds first LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip6} +| | Then LISP GPE mapping from Honeycomb should be +| | ... | ${node} | ${negative_mapping_ip6} + +| TC07: Honeycomb configures LISP GPE mapping - positive, IPv6 +| | [Documentation] | Check if Honeycomb can configure a LISP mapping\ +| | ... | with VRF. +| | ... +| | [Teardown] | Honeycomb removes LISP GPE mapping +| | ... | ${node} | ${positive_mapping_ip6['id']} +| | Given LISP GPE mappings from Honeycomb should not exist +| | ... | ${node} +| | When Honeycomb adds first LISP GPE mapping +| | ... | ${node} | ${positive_mapping_ip6} +| | Then LISP GPE mapping from Honeycomb should be +| | ... | ${node} | ${positive_mapping_ip6} + +| TC08: Honeycomb can modify existing LISP GPE mappping +| | [Documentation] | Check if Honeycomb can modify and existing LISP GPE\ +| | ... | mapping. +| | ... +| | [Teardown] | Honeycomb removes LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip4_edit['id']} +| | Given LISP GPE mappings from Honeycomb should not exist +| | ... | ${node} +| | When Honeycomb adds first LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip4} +| | Then LISP GPE mapping from Honeycomb should be +| | ... | ${node} | ${negative_mapping_ip4} +| | When Honeycomb adds first LISP GPE mapping | ${node} +| | ... | ${negative_mapping_ip4_edit} +| | Then LISP GPE mapping from Honeycomb should be +| | ... | ${node} | ${negative_mapping_ip4_edit} + +| TC09: Honeycomb can configure multiple LISP GPE mapppings +| | [Documentation] | Check if Honeycomb can configure multiple LISP GPE\ +| | ... | mappings at the same time. +| | ... +| | [Teardown] | Run Keywords +| | ... | Honeycomb removes LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip4['id']} +| | ... | AND | Honeycomb removes LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip4_2['id']} +| | Given LISP GPE mappings from Honeycomb should not exist +| | ... | ${node} +| | When Honeycomb adds first LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip4} +| | And Honeycomb adds LISP GPE mapping | ${node} | ${negative_mapping_ip4_2} +| | Then LISP GPE mapping from Honeycomb should be +| | ... | ${node} | ${negative_mapping_ip4} +| | And LISP GPE mapping from Honeycomb should be +| | ... | ${node} | ${negative_mapping_ip4_2} + +| TC10: Honeycomb can disable all LISP GPE features +| | [Documentation] | Check if Honeycomb can disable all LISP GPE features. +| | ... +| | Given Honeycomb adds first LISP GPE mapping +| | ... | ${node} | ${negative_mapping_ip4} +| | When Honeycomb disables all LISP GPE features | ${node} +| | Then LISP GPE mappings from Honeycomb should not exist +| | ... | ${node} +| | And LISP GPE state from Honeycomb should be | ${node} | disabled +| | And LISP GPE state from VAT should be | ${node} | disabled + +| TC11: Honeycomb can configure LISP GPE for traffic test - IPv4 +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 +| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1. +| | ... | [Ver] Case: ip4-lispgpe-ip4 - phy2lisp +| | ... | Make TG send ICMPv4 Echo Req between its interfaces through DUT1\ +| | ... | LISP GPE tunnel verify LISP encapsulation of received packet. +| | ... | [Ref] RFC6830. +| | ... +| | [Teardown] | LISPGPE functional traffic test teardown +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | 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 IPv4 address with prefix | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip4} | ${prefix_len4} +| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip4} | ${prefix_len4} +| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${src_ip4} | ${tg_to_dut_if1_mac} +| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${tg_to_dut_if2_ip4} | ${tg_to_dut_if2_mac} +| | When Honeycomb enables LISP GPE | ${node} +| | And Honeycomb adds LISP GPE mapping | ${node} | ${lisp_traffic_ip4} +| | Then send packet and verify LISP GPE encap +| | ... | ${tg_node} | ${src_ip4} | ${dst_ip4} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${src_rloc4} | ${dst_rloc4} + +| TC12: Honeycomb can configure LISP GPE for traffic test - IPv6 +| | [Documentation] +| | ... | [Top] TG-DUT1-TG. +| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 +| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1. +| | ... | [Ver] Case: ip6-lispgpe-ip6 - phy2lisp +| | ... | Make TG send ICMPv6 Echo Req between its interfaces through DUT1\ +| | ... | LISP GPE tunnel verify LISP encapsulation of received packet. +| | ... | [Ref] RFC6830. +| | ... +| | [Teardown] | LISPGPE functional traffic test teardown +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | 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_ip6} | ${prefix_len6} +| | And Honeycomb sets interface IPv6 address | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${prefix_len6} +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${src_ip6} | ${tg_to_dut_if1_mac} +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${tg_to_dut_if2_ip6} | ${tg_to_dut_if2_mac} +| | When Honeycomb enables LISP GPE | ${node} +| | And Honeycomb adds LISP GPE mapping | ${node} | ${lisp_traffic_ip6} +| | Then send packet and verify LISP GPE encap +| | ... | ${tg_node} | ${src_ip6} | ${dst_ip6} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} +| | ... | ${src_rloc6} | ${dst_rloc6} diff --git a/tests/honeycomb/func/mgmt-cfg-nsh-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-nsh-apihc-apivat-func.robot new file mode 100644 index 0000000000..46deef1692 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-nsh-apihc-apivat-func.robot @@ -0,0 +1,148 @@ +# 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*** +| ${super_if}= | ${node['interfaces']['port1']['name']} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/nsh.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/vxlan_gpe.robot +| Variables | resources/test_data/honeycomb/nsh.py +| Variables | resources/test_data/honeycomb/vxlan_gpe.py +| ... +| Documentation | *Honeycomb NSH test suite.* +| ... +| Suite Setup | Run Keywords +| ... | Enable Honeycomb Feature | ${node} | NSH | AND +| ... | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Run Keywords +| ... | Tear Down Honeycomb Functional Test Suite | ${node} | AND +| ... | Disable Honeycomb Feature | ${node} | NSH +| ... +# NSH packages are not yet available in fd.io.stable.1710.* repos +| Force Tags | HC_FUNC | HC_NSH | EXPECTED_FAILING + +*** Test Cases *** +| TC01: Honeycomb can configure NSH entry +| | [Documentation] | Check if Honeycomb can configure an NSH entry. +| | ... +| | Given NSH Operational Data From Honeycomb Should Be empty | ${node} +| | When Honeycomb adds NSH entry | ${node} | entry1 | ${nsh_entry1} +| | Then NSH entry from Honeycomb should be +| | ... | ${node} | entry1 | ${nsh_entry1_oper} + +| TC02: Honeycomb can remove NSH entry +| | [Documentation] | Check if Honeycomb can remove an existing NSH entry. +| | ... +| | Given NSH entry from Honeycomb should be +| | ... | ${node} | entry1 | ${nsh_entry1_oper} +| | When Honeycomb removes NSH entry | ${node} | entry1 +| | Then NSH Operational Data From Honeycomb Should Be empty | ${node} + +| TC03: Honeycomb can configure new NSH entry +| | [Documentation] | Check if Honeycomb can configure an NSH antry after one\ +| | ... | has been deleted. +| | ... +| | [Teardown] | Honeycomb removes NSH entry | ${node} | entry2 +| | ... +| | Given NSH Operational Data From Honeycomb Should Be empty | ${node} +| | When Honeycomb adds NSH entry | ${node} | entry2 | ${nsh_entry2} +| | Then NSH entry from Honeycomb should be +| | ... | ${node} | entry2 | ${nsh_entry2_oper} + +| TC04: Honeycomb can configure multiple NSH entries at the same time +| | [Documentation] | Check if Honeycomb can configure an NSH entry when one\ +| | ... | already exists. +| | ... +| | [Teardown] | Honeycomb clears NSH configuration | ${node} +| | ... +| | Given NSH Operational Data From Honeycomb Should Be empty | ${node} +| | When Honeycomb adds NSH entry | ${node} | entry1 | ${nsh_entry1} +| | And Honeycomb adds NSH entry | ${node} | entry2 | ${nsh_entry2} +| | Then NSH entry from Honeycomb should be +| | ... | ${node} | entry1 | ${nsh_entry1_oper} +| | And NSH entry from Honeycomb should be +| | ... | ${node} | entry2 | ${nsh_entry2_oper} + +| TC05: Honeycomb can configure NSH map +| | [Documentation] | Check if Honeycomb can configure an NSH map. +| | ... +| | Given NSH Operational Data From Honeycomb Should Be empty | ${node} +| | And Honeycomb creates VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if1} +| | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1} +| | When Honeycomb adds NSH entry | ${node} | entry1 | ${nsh_entry1} +| | And Honeycomb adds NSH map | ${node} | map1 | ${nsh_map1} +| | Then NSH map from Honeycomb should be | ${node} | map1 | ${nsh_map1_oper} + +| TC06: Honeycomb can remove NSH map +| | [Documentation] | Check if Honeycomb can remove an existing NSH map. +| | ... +| | Given NSH entry from Honeycomb should be +| | ... | ${node} | entry1 | ${nsh_entry1_oper} +| | And VxLAN GPE Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vxlan_gpe_if1} +| | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1} +| | And NSH map from Honeycomb should be | ${node} | map1 | ${nsh_map1_oper} +| | When Honeycomb removes NSH map | ${node} | map1 +| | Then NSH map from Honeycomb should not exist | ${node} | map1 +| | And NSH entry from Honeycomb should be +| | ... | ${node} | entry1 | ${nsh_entry1_oper} + +| TC07: Honeycomb can modify existing NSH map +| | [Documentation] | Check if Honeycomb can configure an NSH map after one\ +| | ... | has been deleted. +| | ... +| | [Teardown] | Honeycomb removes NSH map | ${node} | map1_edit +| | ... +| | Given NSH map from Honeycomb should not exist | ${node} | map1_edit +| | And NSH entry from Honeycomb should be +| | ... | ${node} | entry1 | ${nsh_entry1_oper} +| | And VxLAN GPE Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vxlan_gpe_if1} +| | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1} +| | When Honeycomb adds NSH map | ${node} | map1_edit | ${nsh_map1_edit} +| | Then NSH map from Honeycomb should be +| | ... | ${node} | map1_edit | ${nsh_map1_edit_oper} +| | And NSH entry from Honeycomb should be +| | ... | ${node} | entry1 | ${nsh_entry1_oper} + +| TC08: Honeycomb can configure multiple NSH maps at the same time +| | [Documentation] | Check if Honeycomb can configure and NSH map when one\ +| | ... | already exists. +| | ... +| | [Teardown] | Run Keywords +| | ... | Honeycomb clears NSH configuration | ${node} | AND +| | ... | Honeycomb removes VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if1} | AND +| | ... | Honeycomb removes VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if2} +| | ... +| | Given NSH map from Honeycomb should not exist | ${node} | map2 +| | And NSH entry from Honeycomb should be +| | ... | ${node} | entry1 | ${nsh_entry1_oper} +| | And VxLAN GPE Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vxlan_gpe_if1} +| | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1} +| | And Honeycomb creates VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if2} +| | ... | ${vxlan_gpe_base_settings2} | ${vxlan_gpe_settings2} +| | When Honeycomb adds NSH map | ${node} | map1 | ${nsh_map1} +| | And Honeycomb adds NSH map | ${node} | map2 | ${nsh_map2} +| | Then NSH map from Honeycomb should be +| | ... | ${node} | map1 | ${nsh_map1_oper} +| | And NSH map from Honeycomb should be +| | ... | ${node} | map2 | ${nsh_map2_oper} diff --git a/tests/honeycomb/func/mgmt-cfg-pbb-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-pbb-apihc-apivat-func.robot new file mode 100644 index 0000000000..4547c0c4bf --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-pbb-apihc-apivat-func.robot @@ -0,0 +1,86 @@ +# 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*** +| ${super_if}= | ${node['interfaces']['port1']['name']} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/provider_backbone_bridge.robot +| Variables | resources/test_data/honeycomb/pbb/pbb.py +| ... +| Documentation | *Honeycomb provider backbone bridge test suite.* +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC + +*** Test Cases *** +# TODO: add verifications once operational data or VPP dump is available. +| TC01: Honeycomb sets PBB sub-interface +| | [Documentation] | Honeycomb creates a new PBB sub-interface. +| | ... +| | Honeycomb creates PBB sub-interface | ${node} | ${super_if} +| | ... | ${cfg_pbb_sub_if_1} + +| TC02: Honeycomb modifies existing PBB sub-interface +| | [Documentation] | Honeycomb modifies an existing PBB sub-interface. +| | ... +| | Honeycomb creates PBB sub-interface | ${node} | ${super_if} +| | ... | ${cfg_pbb_sub_if_1_mod} + +| TC03: Honeycomb deletes existing PBB sub-interface +| | [Documentation] | Honeycomb deletes an existing PBB sub-interface. +| | ... +| | Honeycomb removes PBB sub-interface +| | ... | ${node} | ${super_if} + +| TC04: Honeycomb fails to set wrong destination-address for new PBB sub-interface +| | [Documentation] | Honeycomb fails to create a new PBB sub-interface with\ +| | ... | wrong value of parameter destination-address, type yang:mac-address. +| | ... +| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} +| | ... | ${cfg_pbb_sub_if_wrong_dst_addr} + +| TC05: Honeycomb fails to set wrong source-address for new PBB sub-interface +| | [Documentation] | Honeycomb fails to create a new PBB sub-interface with\ +| | ... | wrong value of parameter source-address, type yang:mac-address. +| | ... +| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} +| | ... | ${cfg_pbb_sub_if_wrong_src_addr} + +| TC06: Honeycomb fails to set wrong b-vlan-tag-vlan-id for new PBB sub-interface +| | [Documentation] | Honeycomb fails to create a new PBB sub-interface with\ +| | ... | wrong value of parameter b-vlan-tag-vlan-id, type uint16, 12 bit\ +| | ... | range, range 1..4095. +| | ... +| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} +| | ... | ${cfg_pbb_sub_if_wrong_vlan_tag} + +| TC07: Honeycomb fails to set wrong i-tag-isid for new PBB sub-interface +| | [Documentation] | Honeycomb fails to create a new PBB sub-interface with\ +| | ... | wrong value of parameter i-tag-isid, type uint32, 24 bit range,\ +| | ... | range 1..16777215. +| | ... +| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} +| | ... | ${cfg_pbb_sub_if_wrong_i_tag} + +| TC08: Honeycomb fails to create new PBB sub-interface without vlan tag +| | [Documentation] | Honeycomb fails to create a new PBB sub-interface without\ +| | ... | parameter b-vlan-tag-vlan-id. +| | ... +| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} +| | ... | ${cfg_pbb_sub_if_no_vlan_tag} diff --git a/tests/honeycomb/func/mgmt-cfg-pluginacl-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-pluginacl-apihc-apivat-func.robot new file mode 100644 index 0000000000..302b22fa4e --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-pluginacl-apihc-apivat-func.robot @@ -0,0 +1,765 @@ +# 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/shared/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/shared/testing_path.robot +| Resource | resources/libraries/robot/shared/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 Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${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. +| | ... +# CSIT-863: running ODL and HC on single node may cause out of memory errors +| | [Tags] | HC_REST_ONLY +| | ... +| | [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. +| | ... +# CSIT-863: running ODL and HC on single node may cause out of memory errors +| | [Tags] | HC_REST_ONLY +| | ... +| | [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. +| | ... +# CSIT-863: running ODL and HC on single node may cause out of memory errors +| | [Tags] | HC_REST_ONLY +| | ... +| | [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 +| | ... +# CSIT-863: running ODL and HC on single node may cause out of memory errors +| | [Tags] | HC_REST_ONLY +| | ... +| | 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 +| | ... +# CSIT-863: running ODL and HC on single node may cause out of memory errors +| | [Tags] | HC_REST_ONLY +| | ... +| | 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 +| | ... +# CSIT-863: running ODL and HC on single node may cause out of memory errors +| | [Tags] | HC_REST_ONLY +| | ... +| | 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. +| | ... +# CSIT-863: running ODL and HC on single node may cause out of memory errors +| | [Tags] | HC_REST_ONLY +| | ... +| | [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. +| | ... +# CSIT-863: running ODL and HC on single node may cause out of memory errors +| | [Tags] | HC_REST_ONLY +| | ... +| | [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} diff --git a/tests/honeycomb/func/mgmt-cfg-policer-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-policer-apihc-func.robot new file mode 100644 index 0000000000..1f4d2a9021 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-policer-apihc-func.robot @@ -0,0 +1,142 @@ +# Copyright (c) 2017 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 *** +| ${interface}= | ${node['interfaces']['port1']['name']} +| ${tg_to_dut_if1_ip}= | 192.168.122.1 +| ${dut_to_tg_if1_ip}= | 192.168.122.2 +| ${dut_to_tg_if2_ip}= | 192.168.123.1 +| ${tg_to_dut_if2_ip}= | 192.168.123.2 +| ${prefix_length}= | ${24} +| ${dscp_number}= | ${20} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/policer.robot +| Resource | resources/libraries/robot/honeycomb/access_control_lists.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Library | resources.libraries.python.Trace +| Variables | resources/test_data/honeycomb/policer_variables.py +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC +| ... +| Documentation | *Honeycomb Policer management test suite.* + +*** Test Cases *** +| TC01: Honeycomb can configure Policer +| | [Documentation] | Checks if Honeycomb can configure Policer. +| | ... +| | Given Policer Operational Data From Honeycomb Should Be empty | ${node} +| | When Honeycomb configures Policer | ${node} | ${policer_data} +| | Then Policer Operational Data From Honeycomb Should Be | ${node} +| | ... | ${policer_data_oper} + +| TC02: Honeycomb can disable Policer +| | [Documentation] | Checks if Honeycomb can disable Policer. +| | ... +| | Given Policer Operational Data From Honeycomb Should Be | ${node} +| | ... | ${policer_data_oper} +| | When Honeycomb removes Policer configuration | ${node} +| | Then Policer Operational Data From Honeycomb Should Be empty | ${node} + +| TC03: Honeycomb can configure Policer with increased values of CIR (900kbps) +| | [Documentation] | Checks if Honeycomb can configure Policer\ +| | ... | with increased values of CIR. +| | ... +| | [Teardown] | Tear down policer test | ${node} +| | ... +| | Given Policer Operational Data From Honeycomb Should Be empty | ${node} +| | When Honeycomb configures Policer | ${node} | ${policer_data_2} +| | Then Policer Operational Data From Honeycomb Should Be | ${node} +| | ... | ${policer_data_oper_2} + +| TC04: Honeycomb can configure Packets-Per-Second Based Policer +| | [Documentation] | Checks if Honeycomb can configure Policer\ +| | ... | based on rate-type measured in pps. +| | ... +| | [Teardown] | Tear down policer test | ${node} +| | ... +| | Given Policer Operational Data From Honeycomb Should Be empty | ${node} +| | When Honeycomb configures Policer | ${node} | ${policer_data_3} +| | Then Policer Operational Data From Honeycomb Should Be | ${node} +| | ... | ${policer_data_oper_3} + +| TC05: Configure Policer on Interface +| | [Documentation] | Honeycomb can configure Policer on a given interface. +| | ... +| | [Teardown] | Run Keywords +| | ... | Honeycomb disables Policer on interface | ${node} | ${interface} | AND +| | ... | Honeycomb removes ACL session | ${node} +| | ... | ${acl_tables['hc_acl_table']['name']} +| | ... | ${acl_tables['hc_acl_session']['match']} | AND +| | ... | Honeycomb removes ACL table | ${node} +| | ... | ${acl_tables['hc_acl_table']['name']} | AND +| | ... | Tear down policer test | ${node} +| | ... +| | Given Honeycomb configures Policer | ${node} | ${policer_data} +| | And ACL table from Honeycomb should not exist +| | ... | ${node} | ${acl_tables['hc_acl_table']['name']} +| | When Honeycomb creates ACL table +| | ... | ${node} | ${acl_tables['hc_acl_table']} +| | And Honeycomb adds ACL session +| | ... | ${node} | ${acl_tables['hc_acl_table']['name']} +| | ... | ${acl_tables['hc_acl_session']} +| | Then Honeycomb enables policer on interface +| | ... | ${node} | ${interface} | ${acl_tables['hc_acl_table']['name']} + +| TC06: VPP policer 2R3C Color-aware marks packet +| | [Documentation] +| | ... | [Top] TG=DUT1. +| | ... | [Ref] RFC2474, RFC2698. +| | ... | [Cfg] Configure 2R3C color-aware policer on DUT1 on the first\ +| | ... | interface. +| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ +| | ... | Packet on DUT1 is marked with DSCP tag. Verifies if DUT1 sends\ +| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. +| | ... +| | [Teardown] | Show Packet Trace on All DUTs | ${nodes} +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Honeycomb configures Policer | ${dut_node} | ${policer_data_3} +| | And ACL table from Honeycomb should not exist +| | ... | ${dut_node} | ${acl_tables['hc_acl_table']['name']} +| | When Honeycomb creates ACL table +| | ... | ${dut_node} | ${acl_tables['hc_acl_table']} +| | And Honeycomb adds ACL session +| | ... | ${dut_node} | ${acl_tables['hc_acl_table']['name']} +| | ... | ${acl_tables['hc_acl_session']} +| | And Honeycomb enables policer on interface +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_tables['hc_acl_table']['name']} +| | 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 IPv4 address with prefix | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} +| | And 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 +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_to_dut_if2_ip} +| | ... | ${tg_to_dut_if2_mac} +| | And VPP Node Interfaces Ready Wait | ${dut_node} +| | Then Honeycomb Send packet and verify marking | ${tg_node} +| | ... | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp_number} diff --git a/tests/honeycomb/func/mgmt-cfg-proxyarp-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-proxyarp-apihc-func.robot new file mode 100644 index 0000000000..1404633acd --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-proxyarp-apihc-func.robot @@ -0,0 +1,89 @@ +# Copyright (c) 2017 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 *** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} +| &{proxyarp_settings_ipv4}= | vrf-id=${0} +| ... | low-addr=192.168.1.2 | high-addr=192.168.1.10 +| ${tg_to_dut_ip}= | 10.0.0.100 +| ${dut_to_tg_ip}= | 10.0.0.1 +| ${prefix_length}= | ${24} +| ${test_ip}= | 192.168.1.5 + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/proxyarp.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip4.robot +| Resource | resources/libraries/robot/shared/traffic.robot +| Library | resources.libraries.python.Trace +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC +| ... +| Documentation | *Honeycomb proxyARP management test suite.* + +*** Test Cases *** +# TODO: Add operational data and VAT dump verification if/when avaliable +| TC01: Honeycomb can configure ipv4 proxyARP +| | [Documentation] | Check if Honeycomb can configure the proxyARP feature. +| | ... +| | [Teardown] | Honeycomb removes proxyARP configuration | ${node} +| | ... +| | Honeycomb configures proxyARP | ${node} | ${proxyarp_settings_ipv4} + +| TC02: Honeycomb can enable proxyarp on an interface +| | [Documentation] | Check if Honeycomb can enable the proxyARP feature\ +| | ... | on an interface. +| | ... +| | [Teardown] | Honeycomb disables proxyARP on interface +| | ... | ${node} | ${interface} +| | ... +| | Honeycomb enables proxyARP on interface | ${node} | ${interface} + +| TC03: DUT sends ARP reply on behalf of another machine from the IP range +| | [Documentation] +| | ... | [Top] TG-DUT1. +| | ... | [Ref] RFC1027. +| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP +| | ... | for IP range, using Honeycomb API. +| | ... | [Ver] Make TG send ARP request to DUT1 interface, +| | ... | verify if DUT1 sends correct ARP reply on behalf of machine whose +| | ... | IP is in the configured range. +| | ... +| | [Teardown] | Run Keywords +| | ... | Show Packet Trace on all DUTs | ${nodes} +| | ... | AND | Honeycomb removes proxyARP configuration | ${node} +| | ... | AND | Honeycomb configures interface state +| | ... | ${dut_node} | ${dut_to_tg_if1} | down +| | ... | AND | Honeycomb removes interface IPv4 addresses +| | ... | ${node} | ${interface} +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | ${dut_to_tg_name}= | Get interface name | ${dut_node} | ${dut_to_tg_if1} +| | ${tg_to_dut_name}= | Get interface name | ${tg_node} | ${tg_to_dut_if1} +| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up +| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_ip} | ${prefix_length} +| | When Honeycomb configures proxyARP | ${dut_node} | ${proxyarp_settings_ipv4} +| | And Honeycomb enables proxyARP on interface | ${node} | ${dut_to_tg_name} +| | Then Send ARP Request | ${tg_node} | ${tg_to_dut_name} +| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} +| | ... | ${tg_to_dut_ip} | ${test_ip} diff --git a/tests/honeycomb/func/mgmt-cfg-proxynd6-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-proxynd6-apihc-func.robot new file mode 100644 index 0000000000..4425750add --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-proxynd6-apihc-func.robot @@ -0,0 +1,117 @@ +# Copyright (c) 2017 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 *** +# Interface to run configuration tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} +# IPv6 addresses to configure on DUT. +| ${dut_to_tg_if1_ip}= | 10::1 +| ${dut_to_tg_if2_ip}= | 11::1 +# IPv6 addresses used for TG interfaces. +| ${test_src_ip}= | 10::2 +| ${test_dst_ip}= | 11::2 +| ${test_dst_ip2}= | 11::3 +# IPv6 subnet prefix length +| ${prefix_length}= | 64 + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/proxyarp.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip6.robot +| Resource | resources/libraries/robot/shared/traffic.robot +| Resource | resources/libraries/robot/features/dhcp_proxy.robot +| Library | resources.libraries.python.Trace +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC +| ... +| Documentation | *Honeycomb IPv6 neighbor discovery proxy test suite.* + +*** Test Cases *** +| TC01: Honeycomb can configure IPv6 ND proxy on an interface +| | [Documentation] | Check if Honeycomb can configure the IPv6 ND proxy\ +| | ... | feature on an interface. +| | ... +| | Given IPv6 ND proxy from Honeycomb should be empty | ${node} | ${interface} +| | And Honeycomb configures interface state | ${node} | ${interface} | up +| | When Honeycomb configures IPv6 ND proxy on interface +| | ... | ${node} | ${interface} | ${test_dst_ip} +| | Then IPv6 ND proxy from Honeycomb should be +| | ... | ${node} | ${interface} | ${test_dst_ip} + +| TC02: Honeycomb can disable IPv6 ND proxy on an interface +| | [Documentation] | Check if Honeycomb can remove IPv6 ND proxy feature\ +| | ... | configuration from an interface. +| | ... +| | Given IPv6 ND proxy from Honeycomb should be +| | ... | ${node} | ${interface} | ${test_dst_ip} +| | When Honeycomb disables IPv6 ND proxy on interface | ${node} | ${interface} +| | Then IPv6 ND proxy from Honeycomb should be empty | ${node} | ${interface} + +| TC03: Honeycomb can configure multiple IPv6 ND proxies on an interface +| | [Documentation] | Check if Honeycomb can configure two ND proxies\ +| | ... | on one interface. +| | ... +| | [Teardown] | Honeycomb disables IPv6 ND proxy on interface +| | ... | ${node} | ${interface} +| | ... +| | Given IPv6 ND proxy from Honeycomb should be empty | ${node} | ${interface} +| | And Honeycomb configures interface state | ${node} | ${interface} | up +| | When Honeycomb configures IPv6 ND proxy on interface +| | ... | ${node} | ${interface} | ${test_dst_ip} | ${test_dst_ip2} +| | Then IPv6 ND proxy from Honeycomb should be +| | ... | ${node} | ${interface} | ${test_dst_ip} | ${test_dst_ip2} + +| TC04: VPP proxies valid ICMPv6 Neighbor Discovery request +| | [Documentation] | +| | ... | [Top] TG=DUT +| | ... | [Cfg] On DUT configure IPv6 addresses and neighbors, supress router\ +| | ... | advertisement and configure IPv6 Neighbor Discovery proxy. +| | ... | [Ver] Make TG send a neighbor solicitation packet to it's other\ +| | ... | interface through DUT, verify DUT responds to the packet instead\ +| | ... | of forwarding it. Then exchange ICMPv6 Echo request/reply to verify\ +| | ... | connectivity between interfaces. +| | ... | [Ref] RFC 4389 +| | ... +| | [Teardown] | Run Keywords +| | ... | Show Packet Trace on All DUTs | ${nodes} | AND +| | ... | Honeycomb disables IPv6 ND proxy on interface +| | ... | ${dut_node} | ${dut_to_tg_if2} +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | 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 IPv6 address | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} +| | 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_if1} +| | And Vpp Ra Suppress Link Layer | ${dut_node} | ${dut_to_tg_if2} +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${test_src_ip} | ${tg_to_dut_if1_mac} +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${test_dst_ip} | ${tg_to_dut_if2_mac} +| | When Honeycomb configures IPv6 ND proxy on interface +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${test_dst_ip} +| | Then Verify IPv6ND proxy | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2} +| | ... | ${test_src_ip} | ${test_dst_ip} +| | ... | ${tg_to_dut_if1_mac} | ${tg_to_dut_if2_mac} +| | ... | ${dut_to_tg_if1_mac} | ${dut_to_tg_if2_mac} diff --git a/tests/honeycomb/func/mgmt-cfg-routing-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-routing-apihc-apivat-func.robot new file mode 100644 index 0000000000..540093fe07 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-routing-apihc-apivat-func.robot @@ -0,0 +1,233 @@ +# Copyright (c) 2017 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. + +*** Settings *** +| Library | resources.libraries.python.honeycomb.Routing.RoutingKeywords +| Library | resources.libraries.python.Trace +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/ip/ip4.robot +| Resource | resources/libraries/robot/ip/ip6.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/routing.robot +| ... +| Test Setup | Clear Packet Trace on All DUTs | ${nodes} +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Test Teardown | Honeycomb routing test teardown | ${node} | ${table} +| ... +| Documentation | *Honeycomb routing test suite.* +| ... +| Force Tags | HC_FUNC + +*** Test Cases *** +| TC01: Single hop IPv4 route +| | [Documentation] +| | ... | [Top] TG=DUT1=TG. +| | ... | [Enc] Eth-IPv4-ICMP. +| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ +| | ... | interfaces and configure route with TG-if2 as next-hop. +| | ... | [Ver] Send ICMP packet from first TG interface to configured route +| | ... | destination. Receive packet on the second TG interface. +| | ... +| | ${table}= | Set Variable | table1 +| | Given Setup interfaces and neighbors for IPv4 routing test +| | When Honeycomb configures routing table +| | ... | ${node} | table1 | ipv4 | ${table1} | ${1} +| | Then Routing data from Honeycomb should contain +| | ... | ${node} | table1 | ipv4 | ${table1_oper} +| | And Verify route IPv4 | ${nodes['TG']} +| | ... | ${src_ip} | ${dst_ip} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} + +| TC02: Multi hop IPv4 route +| | [Documentation] +| | ... | [Top] TG=DUT1=TG. +| | ... | [Enc] Eth-IPv4-ICMP. +| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ +| | ... | interfaces and configure two routes through the second DUT interface. +| | ... | [Ver] Send 100 ICMP packets from first TG interface to configured +| | ... | route destination. Receive all packets on the second TG interface and\ +| | ... | verify that each destination MAC was used by exactly 50 packets. +| | ... | Receive packet on the second TG interface. +| | ... +| | ${table}= | Set Variable | table2 +| | Given Setup interfaces and neighbors for IPv4 routing test +| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${next_hop1} | ${next_hop_mac1} +| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${next_hop2} | ${next_hop_mac2} +| | When Honeycomb configures routing table +| | ... | ${node} | table2 | ipv4 | ${table2} | ${1} +| | Then Routing data from Honeycomb should contain +| | ... | ${node} | table2 | ipv4 | ${table2_oper} +| | And Verify multipath Route | ${nodes['TG']} +| | ... | ${src_ip} | ${dst_ip} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} +| | ... | ${dut_to_tg_if2_mac} | ${next_hop_mac1} | ${next_hop_mac2} + +| TC03: Special hop - blackhole IPv4 route +| | [Documentation] +| | ... | [Top] TG=DUT1=TG. +| | ... | [Enc] Eth-IPv4-ICMP. +| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ +| | ... | interfaces and configure route with special rule blackhole. +| | ... | [Ver] Send ICMP packet from first TG interface to configured route +| | ... | destination. Make sure no packet is received on the second TG\ +| | ... | interface. +| | ... +| | ${table}= | Set Variable | table3 +| | Given Setup interfaces and neighbors for IPv4 routing test +| | When Honeycomb configures routing table +| | ... | ${node} | table3 | ipv4 | ${table3} | ${1} | special=${TRUE} +| | Then Routing data from Honeycomb should contain +| | ... | ${node} | table3 | ipv4 | ${table3_oper} +| | And Run keyword and Expect Error | ICMP echo Rx timeout +| | ... | Verify route IPv4 | ${nodes['TG']} +| | ... | ${src_ip} | ${dst_ip} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} + +| TC04: Single hop IPv6 route +| | [Documentation] +| | ... | [Top] TG=DUT1=TG. +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ +| | ... | interfaces and configure route with TG-if2 as next-hop. +| | ... | [Ver] Send ICMP packet from first TG interface to configured route +| | ... | destination. Receive packet on the second TG interface. +| | ... +| | ${table}= | Set Variable | table4 +| | Given Setup interfaces and neighbors for IPv6 routing test +| | When Honeycomb configures routing table +| | ... | ${node} | table4 | ipv6 | ${table4} | ${1} +| | Then Routing data from Honeycomb should contain +| | ... | ${node} | table4 | ipv6 | ${table4_oper} +| | And Verify route IPv6 | ${nodes['TG']} +| | ... | ${src_ip} | ${next_hop} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} + +| TC05: Multi hop IPv6 route +| | [Documentation] +| | ... | [Top] TG=DUT1=TG. +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ +| | ... | interfaces and configure two routes through the second DUT interface. +| | ... | [Ver] Send 100 ICMP packets from first TG interface to configured +| | ... | route destination. Receive all packets on the second TG interface and\ +| | ... | verify that each destination MAC was used by exactly 50 packets. +| | ... | Receive packet on the second TG interface. +| | ... +| | ${table}= | Set Variable | table5 +| | Given Setup interfaces and neighbors for IPv6 routing test +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${next_hop1} | ${next_hop_mac1} +| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${next_hop2} | ${next_hop_mac2} +| | When Honeycomb configures routing table +| | ... | ${node} | table5 | ipv6 | ${table5} | ${1} +| | Then Routing data from Honeycomb should contain +| | ... | ${node} | table5 | ipv6 | ${table5_oper} +| | And Verify multipath Route | ${nodes['TG']} +| | ... | ${src_ip} | ${dst_ip} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} +| | ... | ${dut_to_tg_if2_mac} | ${next_hop_mac1} | ${next_hop_mac2} + +| TC06: Special hop - blackhole IPv6 route +| | [Documentation] +| | ... | [Top] TG=DUT1=TG. +| | ... | [Enc] Eth-IPv6-ICMPv6. +| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ +| | ... | interfaces and configure route with special rule blackhole. +| | ... | [Ver] Send ICMP packet from first TG interface to configured route +| | ... | destination. Make sure no packet is received on the second TG\ +| | ... | interface. +| | ... +# HC2VPP-254 Operational data for Blackhole IPv6 route is incorrect +| | [Tags] | EXPECTED_FAILING +| | ${table}= | Set Variable | table6 +| | Given Setup interfaces and neighbors for IPv6 routing test +| | When Honeycomb configures routing table +| | ... | ${node} | table6 | ipv6 | ${table6} | ${1} | special=${TRUE} +| | Then Routing data from Honeycomb should contain +| | ... | ${node} | table6 | ipv6 | ${table6_oper} +| | And Run keyword and Expect Error | ICMP echo Rx timeout +| | ... | Verify route IPv6 | ${nodes['TG']} +| | ... | ${src_ip} | ${dst_ip} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} + +*** Keywords *** +| Setup interfaces and neighbors for IPv4 routing test +| | Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | Import Variables | resources/test_data/honeycomb/routing.py +| | ... | ${nodes['DUT1']} | ipv4 | ${dut_to_tg_if2} +| | Setup vrf IDs | ${dut_node} | ${dut_to_tg_if1} | ${1} +| | Setup vrf IDs | ${dut_node} | ${dut_to_tg_if2} | ${1} +| | 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_len} +| | Honeycomb sets interface IPv4 address with prefix | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_len} +| | Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${src_ip} | ${tg_to_dut_if1_mac} +| | Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${next_hop} | ${tg_to_dut_if2_mac} + +| Setup interfaces and neighbors for IPv6 routing test +| | Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | Import Variables | resources/test_data/honeycomb/routing.py +| | ... | ${nodes['DUT1']} | ipv6 | ${dut_to_tg_if2} +| | Honeycomb sets interface VRF ID +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${1} | ipv6 +| | Honeycomb sets interface VRF ID +| | ... | ${dut_node} | ${dut_to_tg_if2} | ${1} | ipv6 +| | 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 IPv6 address | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_len} +| | Honeycomb sets interface IPv6 address | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_len} +| | Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${src_ip} | ${tg_to_dut_if1_mac} +| | Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${next_hop} | ${tg_to_dut_if2_mac} +| | Vpp all ra suppress link layer | ${nodes} + +| Honeycomb routing test teardown +| | ... +| | [arguments] | ${node} | ${routing_table} +| | ... +| | Show Packet Trace on All DUTs | ${nodes} +| | Log routing configuration from VAT | ${node} +| | Honeycomb removes routing configuration | ${node} | ${routing_table} + +| Setup vrf IDs +| | ... +| | [Arguments] | ${node} | ${interface} | ${vrf} +| | ... +| | Honeycomb sets interface VRF ID +| | ... | ${node} | ${interface} | ${vrf} | ipv4 +| | Honeycomb sets interface VRF ID +| | ... | ${node} | ${interface} | ${vrf} | ipv6 \ No newline at end of file diff --git a/tests/honeycomb/func/mgmt-cfg-slaac-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-slaac-apihc-func.robot new file mode 100644 index 0000000000..8a54918032 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-slaac-apihc-func.robot @@ -0,0 +1,136 @@ +# Copyright (c) 2017 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 *** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/slaac.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/shared/traffic.robot +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC +| ... +| Documentation | *Honeycomb SLAAC management test suite.* +| ... +| Variables | resources/test_data/honeycomb/slaac_variables.py + +*** Test Cases *** +| TC01: Honeycomb can configure SLAAC +| | [Documentation] | Checks if Honeycomb can configure SLAAC. +| | ... +| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} +| | ... | ${interface} +| | And Honeycomb Configures Interface State | ${node} | ${interface} | up +| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} +| | ... | ${address} | ${prefix} +| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data} +| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} +| | ... | ${interface} | ${slaac_data} + +| TC02: Honeycomb can disable SLAAC +| | [Documentation] | Checks if Honeycomb can disable SLAAC. +| | ... +| | Given SLAAC Operational Data From Honeycomb Should Be | ${node} +| | ... | ${interface} | ${slaac_data} +| | When Honeycomb removes SLAAC configuration | ${node} | ${interface} +| | Then SLAAC Operational Data From Honeycomb Should Be empty | ${node} +| | ... | ${interface} + +| TC03: Honeycomb can configure SLAAC with suppress link layer disabled +| | [Documentation] | Checks if Honeycomb can configure SLAAC. +| | ... +| | [Teardown] | SLAAC test teardown | ${node} | ${interface} +| | ... +| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} +| | ... | ${interface} +| | And Honeycomb Configures Interface State | ${node} | ${interface} | up +| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} +| | ... | ${address} | ${prefix} +| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data} +| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} +| | ... | ${interface} | ${slaac_data} + +| TC04: Honeycomb can configure SLAAC with sending RA packets disabled +| | [Documentation] | Checks if Honeycomb can configure SLAAC\ +| | ... | with given settings. +| | ... +| | [Teardown] | SLAAC test teardown | ${node} | ${interface} +| | ... +| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} +| | ... | ${interface} +| | And Honeycomb Configures Interface State | ${node} | ${interface} | up +| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} +| | ... | ${address} | ${prefix} +| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data_01} +| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} +| | ... | ${interface} | ${slaac_data_01} + +| TC05: Honeycomb can configure SLAAC with min interval values +| | [Documentation] | Checks if Honeycomb can configure SLAAC\ +| | ... | with given settings. +| | ... +| | [Teardown] | SLAAC test teardown | ${node} | ${interface} +| | ... +| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} +| | ... | ${interface} +| | And Honeycomb Configures Interface State | ${node} | ${interface} | up +| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} +| | ... | ${address} | ${prefix} +| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data_02} +| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} +| | ... | ${interface} | ${slaac_data_02} + +| TC06: Honeycomb can configure SLAAC with max interval values +| | [Documentation] | Checks if Honeycomb can configure SLAAC\ +| | ... | with given settings. +| | ... +| | [Teardown] | SLAAC test teardown | ${node} | ${interface} +| | ... +| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} +| | ... | ${interface} +| | And Honeycomb Configures Interface State | ${node} | ${interface} | up +| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} +| | ... | ${address} | ${prefix} +| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data_03} +| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} +| | ... | ${interface} | ${slaac_data_03} + +| TC07: DUT retransmits RA on IPv6 enabled interface after a set interval +| | [Documentation] +| | ... | [Top] TG-DUT1-DUT2-TG. +| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG. +| | ... | [Ver] Make TG wait for two IPv6 Router Advertisement packets\ +| | ... | to be sent by DUT1 and verify the received RA packets are correct. +| | ... +| | [Teardown] | SLAAC test teardown | ${dut_node} | ${dut_to_tg_if1} +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Honeycomb sets interface IPv6 address +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${address} | ${prefix} +| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} +| | ... | up +| | When Honeycomb configures SLAAC | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${slaac_data} +| | :FOR | ${n} | IN RANGE | ${2} +| | | Then Receive and verify router advertisement packet +| | | ... | ${tg_node} | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${20} diff --git a/tests/honeycomb/func/mgmt-cfg-snat44-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-snat44-apihc-apivat-func.robot new file mode 100644 index 0000000000..2ce02c6aa1 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-snat44-apihc-apivat-func.robot @@ -0,0 +1,105 @@ +# 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*** +| ${interface}= | ${node['interfaces']['port1']['name']} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/nat.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Variables | resources/test_data/honeycomb/nat.py | ${node} | ${interface} +| ... +| Documentation | *Honeycomb NAT test suite.* +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC + +*** Test Cases *** +| TC01: Honeycomb configures NAT entry +| | [Documentation] | Honeycomb configures a static NAT entry. +| | ... +| | Given NAT Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${nat_empty} +| | When Honeycomb Configures NAT Entry | ${node} | ${entry1} +| | Then NAT Entries From Honeycomb Should Be | ${node} | ${entry1} + +| TC02: Honeycomb removes NAT entry +| | [Documentation] | Honeycomb removes a configured static NAT entry. +| | ... +| | Given NAT Entries From Honeycomb Should Be | ${node} | ${entry1} +| | When Honeycomb Configures NAT Entry | ${node} | ${NONE} +| | Then NAT Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${nat_empty} + +| TC03: Honeycomb configures multiple NAT entries +| | [Documentation] | Honeycomb configures two static NAT entries. +| | ... +| | [Teardown] | Honeycomb Configures NAT Entry | ${node} | ${NONE} +| | ... +| | Given NAT Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${nat_empty} +| | When Honeycomb Configures NAT Entry | ${node} | ${entry1} | ${0} | ${1} +| | And Honeycomb Configures NAT Entry | ${node} | ${entry2} | ${0} | ${2} +| | Then NAT Entries From Honeycomb Should Be +| | ... | ${node} | ${entry1_2_oper} | ${0} + +| TC04: Honeycomb enables NAT on interface - inbound +| | [Documentation] | Honeycomb configures NAT on an interface\ +| | ... | in inbound direction. +| | ... +| | Given NAT Interface Operational Data From Honeycomb Should Be Empty +| | ... | ${node} | ${interface} | inbound +| | And NAT Interface Operational Data From Honeycomb Should Be Empty +| | ... | ${node} | ${interface} | outbound +| | When Honeycomb Configures NAT On Interface +| | ... | ${node} | ${interface} | inbound +| | Then NAT Interface Operational Data From Honeycomb Should Be +| | ... | ${node} | ${interface} | inbound +| | And NAT Interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} | outbound + +| TC05: Honeycomb removes NAT interface configuration +| | [Documentation] | Honeycomb removes NAT configuration from an interface. +| | ... +| | Given NAT Interface Operational Data From Honeycomb Should Be +| | ... | ${node} | ${interface} | inbound +| | And NAT Interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} | outbound +| | When Honeycomb removes NAT interface configuration +| | ... | ${node} | ${interface} | inbound +| | Then NAT Interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} | inbound +| | And NAT Interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} | outbound + +| TC06: Honeycomb enables NAT on interface - outbound +| | [Documentation] | Honeycomb configures NAT on an interface\ +| | ... | in outbound direction. +| | ... +| | [Teardown] | Honeycomb removes NAT interface configuration +| | ... | ${node} | ${interface} | outbound +| | ... +| | Given NAT Interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} | inbound +| | And NAT Interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} | outbound +| | When Honeycomb Configures NAT on Interface +| | ... | ${node} | ${interface} | outbound +| | Then NAT Interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} | inbound +| | And NAT Interface Operational Data From Honeycomb Should Be +| | ... | ${node} | ${interface} | outbound diff --git a/tests/honeycomb/func/mgmt-cfg-spanrx-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-spanrx-apihc-apivat-func.robot new file mode 100644 index 0000000000..ccb674fbd7 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-spanrx-apihc-apivat-func.robot @@ -0,0 +1,256 @@ +# 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. + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/port_mirroring.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/sub_interface.robot +| Resource | resources/libraries/robot/shared/testing_path.robot +| Resource | resources/libraries/robot/telemetry/span.robot +| Variables | resources/test_data/honeycomb/span.py +| ... | ${node['interfaces']['port1']['name']} +| ... | ${node['interfaces']['port3']['name']} +| ... | local0 +| Variables | resources/test_data/honeycomb/sub_interfaces.py +| ... +| Force Tags | HC_FUNC +| ... +| Suite Setup | Run Keywords +| ... | Set Up Honeycomb Functional Test Suite | ${node} | AND +| ... | Add Interface local0 To Topology | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Documentation | *Honeycomb port mirroring test suite.* + +*** Test Cases *** +| TC01: Honeycomb can configure SPAN on an interface - receive +| | [Documentation] | Honeycomb configures SPAN on interface and verifies +| | ... | against VPP SPAN dump in state receive. +| | ... +| | When Honeycomb configures SPAN on interface +| | ... | ${node} | ${interface1} | ${settings_receive} +| | Then Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${settings_receive} + +| TC02: Honeycomb can configure SPAN on an interface - transmit +| | [Documentation] | Honeycomb configures SPAN on interface and verifies +| | ... | against VPP SPAN dump in state transmit. +| | ... +| | When Honeycomb configures SPAN on interface +| | ... | ${node} | ${interface1} | ${settings_transmit} +| | Then Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${settings_transmit} + +| TC03: Honeycomb can configure SPAN on an interface - both +| | [Documentation] | Honeycomb configures SPAN on interface and verifies +| | ... | against VPP SPAN dump in state both. +| | ... +| | When Honeycomb configures SPAN on interface +| | ... | ${node} | ${interface1} | ${settings_both} +| | Then Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${settings_both} + +| TC04: Honeycomb can configure SPAN on an interface with two source interfaces +| | [Documentation] | Honeycomb configures SPAN on interface and verifies +| | ... | against VPP SPAN dump in state both. +| | ... +| | When Honeycomb configures SPAN on interface +| | ... | ${node} | ${interface1} | ${settings_both} | ${settings_if2} +| | Then Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${settings_both} | ${settings_if2} + +| TC05: Honeycomb can disable SPAN on interface +| | [Documentation] | Honeycomb removes existing SPAN configuration +| | ... | from interface. +| | ... +| | Given Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${settings_both} | ${settings_if2} +| | When Honeycomb removes interface SPAN configuration +| | ... | ${node} | ${interface1} +| | Then Interface SPAN Operational Data from Honeycomb should be empty +| | ... | ${node} | ${interface1} + +| TC06: Honeycomb can configure SPAN with two destination interfaces from the same source +| | [Documentation] | Honeycomb configures SPAN on two interfaces and verifies +| | ... | against VPP SPAN dump. +| | ... +| | [Teardown] | Run Keywords +| | ... | Honeycomb removes interface SPAN configuration +| | ... | ${node} | ${interface1} | AND +| | ... | Honeycomb removes interface SPAN configuration +| | ... | ${node} | ${interface2} +| | ... +| | When Honeycomb configures SPAN on interface +| | ... | ${node} | ${interface1} | ${settings_if2} +| | And Honeycomb configures SPAN on interface +| | ... | ${node} | ${interface2} | ${settings_if2} +| | Then Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${settings_if2} +| | Then Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface2} | ${settings_if2} + +| TC07: DUT mirrors IPv4 packets from one interface to another +| | [Documentation] +| | ... | [Top] TG=DUT1 +| | ... | [Cfg] (using Honeycomb) On DUT1 configure IPv4 address and set SPAN\ +| | ... | mirroring from one DUT interface to the other. +| | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\ +| | ... | then receive a copy of sent packet and of DUT's ARP reply\ +| | ... | on the second interface. +| | ... +| | [Teardown] | Run Keywords +| | ... | Show Packet Trace on All DUTs | ${nodes} | AND +| | ... | Honeycomb clears all interface IPv4 neighbors +| | ... | ${dut_node} | ${dut_to_tg_if1} | AND +| | ... | Honeycomb removes interface IPv4 addresses +| | ... | ${dut_node} | ${dut_to_tg_if1} | AND +| | ... | Honeycomb removes interface SPAN configuration +| | ... | ${node} | ${dut_to_tg_if2} +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | 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 IPv4 address with prefix | ${dut_node} +| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix} +| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if1_mac} +| | ${settings_5}= | create dictionary | state=both +| | ... | iface-ref=${dut_to_tg_if1} +| | And All Vpp Interfaces Ready Wait | ${nodes} +| | When Honeycomb configures SPAN on interface +| | ... | ${node} | ${dut_to_tg_if2} | ${settings_5} +| | Then Send Packet And Check Received Copies | ${tg_node} +| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} +| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2} +| | ... | ${tg_to_dut_if1_ip} | ${dut_to_tg_if1_ip} | ICMP + +| TC08: Honeycomb can configure SPAN on a sub-interface - receive +| | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies +| | ... | against VPP SPAN dump in state receive. +| | ... +| | Given Honeycomb creates sub-interface | ${node} | ${interface1} +| | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings} +| | When Honeycomb Configures SPAN on sub-interface +| | ... | ${node} | ${interface1} | ${1} | ${settings_receive} +| | Then sub-Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | ${settings_receive} + +| TC09: Honeycomb can configure SPAN on a sub-interface - transmit +| | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies +| | ... | against VPP SPAN dump in state transmit. +| | ... +| | Given Sub-interface state from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | down | up +| | When Honeycomb Configures SPAN on sub-interface +| | ... | ${node} | ${interface1} | ${1} | ${settings_transmit} +| | Then sub-Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | ${settings_transmit} + +| TC10: Honeycomb can configure SPAN on a sub-interface - both +| | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies +| | ... | against VPP SPAN dump in state both. +| | ... +| | Given Sub-interface state from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | down | up +| | When Honeycomb Configures SPAN on sub-interface +| | ... | ${node} | ${interface1} | ${1} | ${settings_both} +| | Then sub-Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | ${settings_both} + +| TC11: Honeycomb can configure SPAN on a sub-interface with two source interfaces +| | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies +| | ... | against VPP SPAN dump in state both. +| | ... +| | Given Sub-interface state from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | down | up +| | When Honeycomb Configures SPAN on sub-interface +| | ... | ${node} | ${interface1} | ${1} | ${settings_both} | ${settings_if2} +| | Then sub-Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | ${settings_both} | ${settings_if2} + +| TC12: Honeycomb can disable SPAN on interface +| | [Documentation] | Honeycomb removes existing SPAN configuration +| | ... | from sub-interface. +| | ... +| | Given Sub-interface state from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | down | up +| | Given sub-Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | ${settings_both} | ${settings_if2} +| | When Honeycomb removes sub-interface SPAN configuration +| | ... | ${node} | ${interface1} | ${1} +| | Then sub-Interface SPAN Operational Data from Honeycomb should be empty +| | ... | ${node} | ${interface1} | ${1} + +| TC13: Honeycomb can configure SPAN with two destination sub-interfaces from the same source +| | [Documentation] | Honeycomb configures SPAN on two sub-interfaces +| | ... | and verifies against VPP SPAN dump. +| | ... +| | [Teardown] | Run Keywords +| | ... | Honeycomb removes sub-interface SPAN configuration +| | ... | ${node} | ${interface1} | ${1} | AND +| | ... | Honeycomb removes sub-interface SPAN configuration +| | ... | ${node} | ${interface2} | ${1} +| | ... +| | Given Honeycomb creates sub-interface | ${node} | ${interface2} +| | ... | ${sub_if_2_match} | ${sub_if_2_tags} | ${sub_if_2_settings} +| | When Honeycomb Configures SPAN on sub-interface +| | ... | ${node} | ${interface1} | ${1} | ${settings_if2} +| | And Honeycomb Configures SPAN on sub-interface +| | ... | ${node} | ${interface2} | ${1} | ${settings_if2} +| | Then Sub-Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface1} | ${1} | ${settings_if2} +| | Then Sub-Interface SPAN Operational Data from Honeycomb should be +| | ... | ${node} | ${interface2} | ${1} | ${settings_if2} + +| TC14: DUT mirrors IPv4 packets from an interface to a sub-interface +| | [Documentation] +| | ... | [Top] TG=DUT1 +| | ... | [Cfg] (using Honeycomb) On DUT1 configure IPv4 address and set SPAN\ +| | ... | mirroring from one DUT interface to a sub-interface on the other\ +| | ... | interface. +| | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\ +| | ... | then receive a copy of sent packet and of DUT's ARP reply\ +| | ... | on the sub-interface. +| | ... +| | [Teardown] | Show Packet Trace on All DUTs | ${nodes} +| | ... +| | Given Configure path in 2-node circular topology +| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} +| | And Honeycomb creates sub-interface | ${dut_node} | ${dut_to_tg_if1} +| | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings} +| | 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 the sub-interface up +| | ... | ${dut_node} | ${dut_to_tg_if1} | ${1} +| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} +| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix} +| | And And Honeycomb adds interface IPv4 neighbor +| | ... | ${dut_node} | ${dut_to_tg_if2} +| | ... | ${tg_to_dut_if2_ip} | ${tg_to_dut_if2_mac} +| | ${settings_5}= | create dictionary | state=both +| | ... | iface-ref=${dut_to_tg_if2} +| | And All Vpp Interfaces Ready Wait | ${nodes} +| | When Honeycomb Configures SPAN on sub-interface +| | ... | ${node} | ${dut_to_tg_if1} | ${1} | ${settings_5} +| | Then Send Packet And Check Received Copies | ${tg_node} +| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if2_mac} +| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1} +| | ... | ${tg_to_dut_if2_ip} | ${dut_to_tg_if2_ip} | ICMP diff --git a/tests/honeycomb/func/mgmt-cfg-vxlan-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-vxlan-apihc-apivat-func.robot new file mode 100644 index 0000000000..76615264c5 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-vxlan-apihc-apivat-func.robot @@ -0,0 +1,137 @@ +# 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 *** +# Interfaces to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} +| ${vx_interface}= | vx_tunnel_test +# Configuration which will be set and verified during tests. +| &{vxlan_settings}= | src=192.168.0.2 | dst=192.168.0.3 | vni=${88} +| ... | encap-vrf-id=${0} +| &{vxlan_settings2}= | src=192.168.0.4 | dst=192.168.0.5 | vni=${47} +| ... | encap-vrf-id=${0} +| &{vxlan_settings_ipv6}= | src=10::10 | dst=10::11 | vni=${88} +| ... | encap-vrf-id=${0} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/vxlan.robot +# import additional VxLAN settings from resource file +| Variables | resources/test_data/honeycomb/vxlan.py +| ... +| Force Tags | HC_FUNC +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Documentation | *Honeycomb VxLAN management test suite.* + +*** Test Cases *** +| TC01: Honeycomb configures VxLAN tunnel +| | [Documentation] | Check if Honeycomb API can configure VxLAN settings. +| | ... +| | Given VxLAN Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vx_interface} +| | And VxLAN Operational Data From VAT Should Be empty | ${node} +| | When Honeycomb sets interface VxLAN configuration +| | ... | ${node} | ${vx_interface} | ${vxlan_settings} +| | Then VxLAN Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vx_interface} | ${vxlan_settings} +| | And VxLAN Operational Data From VAT Should Be +| | ... | ${node} | ${vxlan_settings} +| | ${vxlan_index}= | Get interface index from oper data +| | ... | ${node} | ${vx_interface} +| | Set Suite Variable | ${vxlan_index} + +| TC02: Honeycomb disables VxLAN tunnel +| | [Documentation] | Check if Honeycomb API can reset VxLAN configuration. +| | ... +| | Given VxLAN Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vx_interface} | ${vxlan_settings} +| | And Honeycomb should not show disabled interface in oper data +| | ... | ${node} | ${vxlan_index} +| | And VxLAN Operational Data From VAT Should Be +| | ... | ${node} | ${vxlan_settings} +| | When Honeycomb removes VxLAN tunnel settings | ${node} | ${vx_interface} +| | Then VxLAN Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vx_interface} +| | And Honeycomb should show disabled interface in oper data +| | ... | ${node} | ${vxlan_index} +| | And VxLAN Operational Data From VAT Should Be empty | ${node} + +| TC03: Honeycomb can configure VXLAN tunnel after one has been disabled +| | [Documentation] | Check if Honeycomb API can configure VxLAN settings again\ +| | ... | after previous settings have been removed. +| | ... +| | [Teardown] | Honeycomb removes VxLAN tunnel settings +| | ... | ${node} | ${vx_interface} +| | ... +| | Given VxLAN Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vx_interface} +| | And Honeycomb should show disabled interface in oper data +| | ... | ${node} | ${vxlan_index} +| | And VxLAN Operational Data From VAT Should Be empty | ${node} +| | When Honeycomb sets interface VxLAN configuration +| | ... | ${node} | ${vx_interface} | ${vxlan_settings2} +| | Then VxLAN Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vx_interface} | ${vxlan_settings2} +| | And Honeycomb should not show disabled interface in oper data +| | ... | ${node} | ${vxlan_index} +| | And VxLAN Operational Data From VAT Should Be +| | ... | ${node} | ${vxlan_settings2} + +| TC04: Honeycomb does not set VxLAN configuration on another interface type +| | [Documentation] | Check if Honeycomb API prevents setting VxLAN\ +| | ... | on incorrect interface. +| | ... +| | Given VxLAN Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} +| | And VxLAN Operational Data From VAT Should Be empty | ${node} +| | When Honeycomb fails setting VxLan on different interface type +| | ... | ${node} | ${interface} | ${vxlan_settings2} +| | Then VxLAN Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${interface} +| | And VxLAN Operational Data From VAT Should Be empty +| | ... | ${node} + +| TC05: Honeycomb does not set invalid VxLAN configuration +| | [Documentation] | Check if Honeycomb API prevents setting incorrect VxLAN\ +| | ... | settings. +| | ... +| | Given VxLAN Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vx_interface} +| | And VxLAN Operational Data From VAT Should Be empty | ${node} +| | When Honeycomb fails setting invalid VxLAN configuration +| | ... | ${node} | ${vx_interface} | ${vxlan_invalid} +| | Then VxLAN Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vx_interface} + +| TC06: Honeycomb configures VxLAN tunnel with ipv6 +| | [Documentation] | Check if Honeycomb API can configure VxLAN with\ +| | ... | ipv6 settings. +| | ... +| | [Teardown] | Honeycomb removes VxLAN tunnel settings +| | ... | ${node} | ${vx_interface} +| | ... +| | Given VxLAN Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vx_interface} +| | And VxLAN Operational Data From VAT Should Be empty | ${node} +| | When Honeycomb sets interface VxLAN configuration +| | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6} +| | Then VxLAN Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6} +| | And VxLAN Operational Data From VAT Should Be +| | ... | ${node} | ${vxlan_settings_ipv6} diff --git a/tests/honeycomb/func/mgmt-cfg-vxlangpe-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-vxlangpe-apihc-apivat-func.robot new file mode 100644 index 0000000000..1d7cde0fd0 --- /dev/null +++ b/tests/honeycomb/func/mgmt-cfg-vxlangpe-apihc-apivat-func.robot @@ -0,0 +1,174 @@ +# 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 *** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} + +# Parameters to be set on existing interface +| ${vxlan_gpe_existing_if}= | ${interface} +| &{vxlan_gpe_base_wrong_interface_settings}= +| ... | name=${vxlan_gpe_existing_if} +| ... | type=iana-if-type:ethernetCsmacd +| ... | description=for testing purposes +| ... | enabled=true +| ... | link-up-down-trap-enable=enabled +| &{vxlan_gpe_wrong_interface_settings}= +| ... | local=192.168.50.77 +| ... | remote=192.168.50.72 +| ... | vni=${9} +| ... | next-protocol=wrong_ipv4 +| ... | encap-vrf-id=${0} +| ... | decap-vrf-id=${0} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/vxlan_gpe.robot +# Import additional VxLAN GPE settings from resource file +| Variables | resources/test_data/honeycomb/vxlan_gpe.py +| ... +| Documentation | *Honeycomb VxLAN-GPE management test suite.* +| ... +| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} + +*** Test Cases *** +| TC01: Honeycomb creates VxLAN GPE tunnel +| | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel. +| | ... +| | [Tags] | HC_FUNC +| | Given interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vxlan_gpe_if1} +| | And interface Operational Data From VAT Should Be empty +| | ... | ${node} | ${vxlan_gpe_if1} +| | When Honeycomb creates VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if1} +| | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings} +| | Then VxLAN GPE Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vxlan_gpe_if1} +| | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings} +| | And VxLAN GPE Operational Data From VAT Should Be +| | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings} +| | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond +| | ... | ${node} | ${vxlan_gpe_if1} + +| TC02: Honeycomb removes VxLAN GPE tunnel +| | [Documentation] | Check if Honeycomb API can remove VxLAN GPE tunnel. +| | ... +| | [Tags] | HC_FUNC +| | Given VxLAN GPE Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vxlan_gpe_if1} +| | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings} +| | VxLAN GPE Operational Data From VAT Should Be +| | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings} +| | When Honeycomb removes VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if1} +| | Then VxLAN GPE Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vxlan_gpe_if1} +| | And VxLAN GPE Operational Data From VAT Should Be empty +| | ... | ${node} + +| TC03: Honeycomb sets wrong interface type while creating VxLAN GPE tunnel +| | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\ +| | ... | with a wrong interface type set. +| | ... +| | [Tags] | HC_FUNC +| | Given interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vxlan_gpe_if2} +| | And interface Operational Data From VAT Should Be empty +| | ... | ${node} | ${vxlan_gpe_if2} +| | When Honeycomb fails to create VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if2} +| | ... | ${vxlan_gpe_wrong_type_base_settings} | ${vxlan_gpe_settings} +| | Then interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vxlan_gpe_if2} +| | And interface Operational Data From VAT Should Be empty +| | ... | ${node} | ${vxlan_gpe_if2} + +| TC04: Honeycomb sets wrong protocol while creating VxLAN GPE tunnel +| | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\ +| | ... | with a wrong next-protocol set. +| | ... +| | [Tags] | HC_FUNC +| | Given interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vxlan_gpe_if3} +| | And interface Operational Data From VAT Should Be empty +| | ... | ${node} | ${vxlan_gpe_if3} +| | When Honeycomb fails to create VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if3} +| | ... | ${vxlan_gpe_wrong_protocol_base_settings} +| | ... | ${vxlan_gpe_wrong_protocol_settings} +| | Then interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vxlan_gpe_if3} +| | And interface Operational Data From VAT Should Be empty +| | ... | ${node} | ${vxlan_gpe_if3} + +| TC05: Honeycomb sets VxLAN GPE tunnel on existing interface with wrong type +| | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\ +| | ... | on existing interface with wrong type. +| | ... +| | [Tags] | HC_FUNC +| | Given VxLAN GPE Operational Data From VAT Should Be empty +| | ... | ${node} +| | When Honeycomb fails to create VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_existing_if} +| | ... | ${vxlan_gpe_base_wrong_interface_settings} +| | ... | ${vxlan_gpe_wrong_interface_settings} +| | Then VxLAN GPE Operational Data From VAT Should Be empty +| | ... | ${node} + +| TC06: Honeycomb creates VxLAN GPE tunnel with ipv6 +| | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel\ +| | ... | with IPv6 addresses. +| | ... +# Disabled due to VPP-875 +#| | [Tags] | HC_FUNC +| | Given VxLAN GPE Operational Data From VAT Should Be empty +| | ... | ${node} +| | And VxLAN GPE Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vxlan_gpe_if5} +| | When Honeycomb creates VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if5} +| | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings} +| | Then VxLAN GPE Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vxlan_gpe_if5} +| | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings} +| | And Run Keyword And Continue On Failure +| | ... | VxLAN GPE Operational Data From VAT Should Be +| | ... | ${node} | ${vxlan_gpe_if5} | ${vxlan_gpe_ipv6_settings} +| | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond +| | ... | ${node} | ${vxlan_gpe_if5} + +| TC07: Honeycomb creates a second VxLAN GPE tunnel with ipv6 +| | [Documentation] | Check if Honeycomb API can configure another VxLAN\ +| | ... | GPE tunnel with IPv6 addresses. +| | ... +# Disabled due to VPP-875 +#| | [Tags] | HC_FUNC +| | Given interface Operational Data From Honeycomb Should Be empty +| | ... | ${node} | ${vxlan_gpe_if6} +| | And interface Operational Data From VAT Should Be empty +| | ... | ${node} | ${vxlan_gpe_if6} +| | When Honeycomb creates VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if6} +| | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2} +| | Then VxLAN GPE Operational Data From Honeycomb Should Be +| | ... | ${node} | ${vxlan_gpe_if6} +| | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2} +| | And VxLAN GPE Operational Data From VAT Should Be +| | ... | ${node} | ${vxlan_gpe_if6} | ${vxlan_gpe_ipv6_settings2} +| | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond +| | ... | ${node} | ${vxlan_gpe_if6} diff --git a/tests/honeycomb/func/mgmt-notif-apihcnc-func.robot b/tests/honeycomb/func/mgmt-notif-apihcnc-func.robot new file mode 100644 index 0000000000..5320a7fcb7 --- /dev/null +++ b/tests/honeycomb/func/mgmt-notif-apihcnc-func.robot @@ -0,0 +1,68 @@ +# 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 *** +# Interfaces to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} +| ${tap_interface}= | tap_test +| &{tap_settings}= | tap-name=tap_test | mac=08:00:27:c0:5d:37 +| ... | device-instance=${1} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/tap.robot +| Resource | resources/libraries/robot/honeycomb/notifications.robot +| ... +| Documentation | *Honeycomb notifications test suite.* +| ... +| Suite Setup | Set Up Honeycomb Notifications Functional Test Suite +| ... +| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} +| ... +| Force Tags | HC_FUNC + +*** Test Cases *** +| TC01: Honeycomb sends notification on interface state change +| | [Documentation] | Check if Honeycomb sends a state-changed notification\ +| | ... | when the state of an interface is changed. +| | ... +| | Given Interface state from Honeycomb should be +| | ... | ${node} | ${interface} | down +| | And Interface state from VAT should be | ${node} | ${interface} | down +| | And Notification listener should be established | ${node} +| | When Honeycomb configures interface state | ${node} | ${interface} | up +| | Then Honeycomb should send interface state notification | ${interface} | up +| | When Honeycomb configures interface state | ${node} | ${interface} | down +| | And Honeycomb should send interface state notification | ${interface} | down + +| TC02: Honeycomb sends notification on interface deletion +| | [Documentation] | Check if Honeycomb sends an interface-deleted notification +| | ... | when an interface is deleted. +| | ... +| | Given TAP Operational Data From Honeycomb Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | And TAP Operational Data From VAT Should Be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | And Notification listener should be established | ${node} +| | When Honeycomb removes TAP interface | ${node} | ${tap_interface} +| | Then Honeycomb should send interface deleted notification | ${tap_interface} + +*** Keywords *** +| Set Up Honeycomb Notifications Functional Test Suite +| | Set Up Honeycomb Functional Test Suite | ${node} +| | Honeycomb configures interface state +| | ... | ${node} | ${interface} | down +| | Honeycomb creates TAP interface +| | ... | ${node} | ${tap_interface} | ${tap_settings} \ No newline at end of file diff --git a/tests/honeycomb/func/mgmt-statepersist-apihc-func.robot b/tests/honeycomb/func/mgmt-statepersist-apihc-func.robot new file mode 100644 index 0000000000..b7fe610b18 --- /dev/null +++ b/tests/honeycomb/func/mgmt-statepersist-apihc-func.robot @@ -0,0 +1,166 @@ +# 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*** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/honeycomb/persistence.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot +| Resource | resources/libraries/robot/honeycomb/l2_fib.robot +| ... +| Suite Setup | Run Keywords +| ... | Configure Persistence | ${node} | enable | AND +| ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| ... +| Suite Teardown | Configure Persistence | ${node} | disable +| ... +| Force Tags | HC_PERSIST | HC_REST_ONLY +| ... +| Documentation | *Honeycomb configuration persistence test suite.* + +*** Test Cases *** +# multi-feature cases +# =================== +| TC01: Honeycomb persists configuration through restart of both Honeycomb and VPP +| | [Documentation] | Checks if Honeycomb maintains configuration after both\ +| | ... | Restart Honeycomb and VPP. +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Multi-Feature Persistence test configuration | ${node} | ${interface} +| | And Multi-Feature persistence Test Verification | ${node} | ${interface} +| | And Log persisted configuration on node | ${node} +| | When Restart Honeycomb and VPP in pesistence test | ${node} +| | Then Multi-Feature persistence Test Verification | ${node} | ${interface} + +| TC02: Honeycomb reverts to defaults if persistence files are invalid +| | [Documentation] | Checks if Honeycomb reverts to default configuration when\ +| | ... | persistence files are damaged or invalid. +| | ... +| | [Tags] | HC_FUNC +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Multi-Feature Persistence test configuration | ${node} | ${interface} +| | And Multi-Feature persistence Test Verification | ${node} | ${interface} +| | When Persistence file is damaged during restart | ${node} +| | Then Honeycomb and VPP should have default configuration | ${node} + +| TC03: Honeycomb persists configuration through restart of Honeycomb +| | [Documentation] | Checks if Honeycomb maintains configuration after it\ +| | ... | is restarted. +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Multi-Feature Persistence test configuration | ${node} | ${interface} +| | And Multi-Feature persistence Test Verification | ${node} | ${interface} +| | And Log persisted configuration on node | ${node} +| | When Restart Honeycomb | ${node} +| | Then Multi-Feature persistence Test Verification | ${node} | ${interface} + +| TC04: Honeycomb persists configuration through restart of VPP +| | [Documentation] | Checks if Honeycomb updates VPP settings after VPP is\ +| | ... | restarted. +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Multi-Feature Persistence test configuration | ${node} | ${interface} +| | And Multi-Feature persistence Test Verification | ${node} | ${interface} +| | And Log persisted configuration on node | ${node} +| | When Restart VPP | ${node} +| | Then Multi-Feature persistence Test Verification | ${node} | ${interface} + +# single-feature cases +# ==================== + +| TC05: Persist configuration of IP addresses and neighbors - HC and VPP restart +| | [Documentation] | Verify persistence of interface state, IPv4 address +| | ... | and neighbor entries through restart of both Honeycomb and VPP. +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Interface Persistence Setup | ${node} +| | And Interface Persistence Check | ${node} +| | When Restart Honeycomb and VPP in pesistence test | ${node} +| | Then Interface Persistence Check | ${node} + +| TC06: Persist configuration of IP addresses and neighbors - HC restart +| | [Documentation] | Verify persistence of interface state, IPv4 address +| | ... | and neighbor entries through restart of Honeycomb. +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Interface Persistence Setup | ${node} +| | And Interface Persistence Check | ${node} +| | When Restart Honeycomb | ${node} +| | Then Interface Persistence Check | ${node} + +| TC07: Persist configuration of IP addresses and neighbors - VPP restart +| | [Documentation] | Verify persistence of interface state, IPv4 address +| | ... | and neighbor entries through restart of VPP. +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Interface Persistence Setup | ${node} +| | And Interface Persistence Check | ${node} +| | When Restart VPP | ${node} +| | Then Interface Persistence Check | ${node} + +| TC08: Honeycomb persists configuration of bridge domains - HC and VPP restart +| | [Documentation] | Verify persistence of bridge domain, L2-FIB entry +| | ... | and Bridge domain Operational Interface Assignment through restart +| | ... | of both Honeycomb and VPP. +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Bridge Domain Persistence Setup | ${node} +| | When Restart Honeycomb and VPP in pesistence test | ${node} +| | Then Bridge Domain Persistence Check | ${node} + +| TC09: Honeycomb persists configuration of bridge domains - HC restart +| | [Documentation] | Verify persistence of bridge domain, L2-FIB entry +| | ... | and Bridge domain Operational Interface Assignment through restart +| | ... | of Honeycomb. +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Bridge Domain Persistence Setup | ${node} +| | When Restart Honeycomb | ${node} +| | Then Bridge Domain Persistence Check | ${node} + +| TC10: Honeycomb persists configuration of bridge domains - VPP restart +| | [Documentation] | Verify persistence of bridge domain, L2-FIB entry +| | ... | and Bridge domain Operational Interface Assignment through restart +| | ... | of VPP. +| | ... +| | [Teardown] +| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} +| | ... +| | Given Bridge Domain Persistence Setup | ${node} +| | When Restart VPP | ${node} +| | Then Bridge Domain Persistence Check | ${node} + +#TODO: All other features diff --git a/tests/honeycomb/perf/__init__.robot b/tests/honeycomb/perf/__init__.robot new file mode 100644 index 0000000000..b984993139 --- /dev/null +++ b/tests/honeycomb/perf/__init__.robot @@ -0,0 +1,61 @@ +# Copyright (c) 2017 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*** +# Honeycomb node to run tests on. +| ${node}= | ${nodes['DUT1']} + +*** Settings *** +| Resource | resources/libraries/robot/shared/default.robot +| Resource | resources/libraries/robot/shared/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Resource | resources/libraries/robot/honeycomb/performance.robot +| Library | resources.libraries.python.SetupFramework +| Library | resources.libraries.python.CpuUtils +| Library | resources.libraries.python.honeycomb.Performance +| Suite Setup | Setup suite for Honeycomb performance tests +| Suite Teardown | Run Keywords +| ... | Stop VPP Service on DUT | ${node} +| ... | AND | Archive Honeycomb Log File | ${node} | perf=${True} +| ... | AND | Stop honeycomb service on DUTs | ${node} + +*** Keywords *** +| Setup suite for Honeycomb performance tests +| | [Documentation] | Setup variables and configure VPP and Honeycomb +| | ... | for performance testing. +| | ... +| | Set Global Variable | ${node} +| | ${cores}= | Get Length | ${node['cpuinfo']} +| | Set Global Variable | ${cores} +| | Stop VPP Service on DUT | ${node} +| | Stop Honeycomb service on DUTs | ${node} +| | Generate VPP Startup Configuration for Honeycomb Test on DUT | ${node} +| | Configure Restconf binding address | ${node} +| | Configure Log Level | ${node} | INFO +| | Configure Persistence | ${node} | disable +| | Configure jVPP timeout | ${node} | ${14} +| | Generate Honeycomb startup configuration for performance test +| | ... | ${node} | ${cores} +| | Clear Persisted Honeycomb Configuration | ${node} + +| Configure ODL Client for performance tests +| | [Documentation] | Setup ODL client for performance testing. +| | ... +| | ${use_odl_client}= | Get Variable Value | ${HC_ODL} +| | Run Keyword If | '${use_odl_client}' != '${NONE}' +| | ... | Run Keywords +| | ... | Set Global Variable | ${use_odl_client} +| | ... | AND | Copy ODL client | ${node} | ${HC_ODL} | ~ | ${install_dir} +| | ... | AND | Configure ODL Client Service On DUT | ${node} | ${install_dir} +| | ... | ELSE | Log | Variable HC_ODL is not present. Not using ODL. +| | ... | level=INFO diff --git a/tests/honeycomb/perf/localhostp1-tcp-netconf16t-crud-read.robot b/tests/honeycomb/perf/localhostp1-tcp-netconf16t-crud-read.robot new file mode 100644 index 0000000000..c13851cc62 --- /dev/null +++ b/tests/honeycomb/perf/localhostp1-tcp-netconf16t-crud-read.robot @@ -0,0 +1,87 @@ +# Copyright (c) 2017 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. + +*** Settings *** +| Resource | resources/libraries/robot/honeycomb/performance.robot +| ... +| Suite Setup | Run Keywords +| ... | Configure Honeycomb Netconf threads | ${node} | ${16} +| ... | AND | Honeycomb Performance Suite Setup Generic | ${node} +| ... +| Suite Teardown | Honeycomb Performance Suite Teardown Generic | ${node} +| ... +| Force Tags | HC_PERF +| ... +| Documentation | *Base Netconf operational read test suite with sixteen Netconf +| ... | threads.* +| ... +| ... | *[Top] Network Topologies:* DUT1 single-node topology. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP. +| ... | *[Cfg] DUT configuration:* Default +| ... | *[Ver] verification:* DUT verifies Honeycomb's response times with zero +| ... | error or loss tolerance. Test packets are generated by DUT1 on localhost +| ... | loopback interface. +| ... | Traffic profile contains flow-groups containing REST requests +| ... | for operational reads. +| ... | *[Ref] Applicable standard specifications:* RFC6241. + +*** Test Cases *** +| TC01: Base operational read with 1 TG thread +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in a single thread. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${1} +| | ${entries}= | Set Variable | ${100000} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC02: Base operational read with 2 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in two threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${2} +| | ${entries}= | Set Variable | ${50000} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC03: Base operational read with 4 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in four threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${4} +| | ${entries}= | Set Variable | ${25000} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC04: Base operational read with 8 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in eigth threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${8} +| | ${entries}= | Set Variable | ${12500} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC05: Base operational read with 16 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in sixteen threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${16} +| | ${entries}= | Set Variable | ${6250} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} diff --git a/tests/honeycomb/perf/localhostp1-tcp-netconf1t-crud-read.robot b/tests/honeycomb/perf/localhostp1-tcp-netconf1t-crud-read.robot new file mode 100644 index 0000000000..d46fdf795b --- /dev/null +++ b/tests/honeycomb/perf/localhostp1-tcp-netconf1t-crud-read.robot @@ -0,0 +1,87 @@ +# Copyright (c) 2017 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. + +*** Settings *** +| Resource | resources/libraries/robot/honeycomb/performance.robot +| ... +| Suite Setup | Run Keywords +| ... | Configure Honeycomb Netconf threads | ${node} | ${1} +| ... | AND | Honeycomb Performance Suite Setup Generic | ${node} +| ... +| Suite Teardown | Honeycomb Performance Suite Teardown Generic | ${node} +| ... +| Force Tags | HC_PERF +| ... +| Documentation | *Base Netconf operational read test suite with one Netconf +| ... | thread.* +| ... +| ... | *[Top] Network Topologies:* DUT1 single-node topology. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP. +| ... | *[Cfg] DUT configuration:* Default +| ... | *[Ver] verification:* DUT verifies Honeycomb's response times with zero +| ... | error or loss tolerance. Test packets are generated by DUT1 on localhost +| ... | loopback interface. +| ... | Traffic profile contains flow-groups containing REST requests +| ... | for operational reads. +| ... | *[Ref] Applicable standard specifications:* RFC6241. + +*** Test Cases *** +| TC01: Base operational read with 1 TG thread +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in a single thread. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${1} +| | ${entries}= | Set Variable | ${100000} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC02: Base operational read with 2 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in two threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${2} +| | ${entries}= | Set Variable | ${50000} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC03: Base operational read with 4 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in four threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${4} +| | ${entries}= | Set Variable | ${25000} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC04: Base operational read with 8 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in eigth threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${8} +| | ${entries}= | Set Variable | ${12500} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC05: Base operational read with 16 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in sixteen threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${16} +| | ${entries}= | Set Variable | ${6250} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} diff --git a/tests/honeycomb/perf/localhostp1-tcp-netconf8t-crud-read.robot b/tests/honeycomb/perf/localhostp1-tcp-netconf8t-crud-read.robot new file mode 100644 index 0000000000..9928f15f1d --- /dev/null +++ b/tests/honeycomb/perf/localhostp1-tcp-netconf8t-crud-read.robot @@ -0,0 +1,97 @@ +# Copyright (c) 2017 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. + +*** Settings *** +| Resource | resources/libraries/robot/honeycomb/performance.robot +| ... +| Suite Setup | Run Keywords +| ... | Configure Honeycomb Netconf threads | ${node} | ${8} +| ... | AND | Honeycomb Performance Suite Setup Generic | ${node} +| ... +| Suite Teardown | Honeycomb Performance Suite Teardown Generic | ${node} +| ... +| Force Tags | HC_PERF +| ... +| Documentation | *Base Netconf operational read test suite with eight Netconf +| ... | threads.* +| ... +| ... | *[Top] Network Topologies:* DUT1 single-node topology. +| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP. +| ... | *[Cfg] DUT configuration:* Default +| ... | *[Ver] verification:* DUT verifies Honeycomb's response times with zero +| ... | error or loss tolerance. Test packets are generated by DUT1 on localhost +| ... | loopback interface. +| ... | Traffic profile contains flow-groups containing REST requests +| ... | for operational reads. +| ... | *[Ref] Applicable standard specifications:* RFC6241. + +*** Test Cases *** +| TC01: Base operational read with 1 TG thread +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in a single thread. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${1} +| | ${entries}= | Set Variable | ${100000} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC02: Base operational read with 2 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in two threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${2} +| | ${entries}= | Set Variable | ${50000} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC03: Base operational read with 4 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in four threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${4} +| | ${entries}= | Set Variable | ${25000} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC04: Base operational read with 8 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in eigth threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${8} +| | ${entries}= | Set Variable | ${12500} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC05: Base operational read with 16 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in sixteen threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${16} +| | ${entries}= | Set Variable | ${6250} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} + +| TC05: Base operational read with 24 TG threads +| | [Documentation] +| | ... | [Ver] Measure response time using single trial throughput test +| | ... | with 100K requests generated in sixteen threads. +| | ${cycles}= | Set Variable | ${1} +| | ${threads}= | Set Variable | ${24} +| | ${entries}= | Set Variable | ${6250} +| | Run base operational read performance trial +| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} -- cgit 1.2.3-korg