From 70cbaaee0e6210682ce6d278ea645b8bea153b67 Mon Sep 17 00:00:00 2001 From: Matej Klotton Date: Fri, 22 Jul 2016 09:34:25 +0200 Subject: CSIT-220: Rename directories in tests directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move performance directory one level up and rename it to “perf” - Rename “suites” directory to “func” - Create __init__.py in “perf” directory - Rename fds_related_tests to fds Change-Id: I59f06afe1c5b95dd8a48417b8fbfd1fca8797097 Signed-off-by: Matej Klotton --- .../func/honeycomb/010_interface_management.robot | 116 ++++++ tests/func/honeycomb/020_bridge_domain.robot | 105 +++++ tests/func/honeycomb/021_l2_fib.robot | 228 +++++++++++ tests/func/honeycomb/030_vxlan.robot | 115 ++++++ tests/func/honeycomb/031_vxlan_gpe.robot | 174 ++++++++ tests/func/honeycomb/040_tap.robot | 71 ++++ .../func/honeycomb/050_interface_vhost_user.robot | 159 ++++++++ tests/func/honeycomb/060_sub_interface.robot | 445 +++++++++++++++++++++ tests/func/honeycomb/070_netconf.robot | 29 ++ tests/func/honeycomb/071_notification.robot | 56 +++ .../func/honeycomb/080_access_control_lists.robot | 146 +++++++ tests/func/honeycomb/900_persistence.robot | 76 ++++ tests/func/honeycomb/__init__.robot | 26 ++ 13 files changed, 1746 insertions(+) create mode 100644 tests/func/honeycomb/010_interface_management.robot create mode 100644 tests/func/honeycomb/020_bridge_domain.robot create mode 100644 tests/func/honeycomb/021_l2_fib.robot create mode 100644 tests/func/honeycomb/030_vxlan.robot create mode 100644 tests/func/honeycomb/031_vxlan_gpe.robot create mode 100644 tests/func/honeycomb/040_tap.robot create mode 100644 tests/func/honeycomb/050_interface_vhost_user.robot create mode 100644 tests/func/honeycomb/060_sub_interface.robot create mode 100644 tests/func/honeycomb/070_netconf.robot create mode 100644 tests/func/honeycomb/071_notification.robot create mode 100644 tests/func/honeycomb/080_access_control_lists.robot create mode 100644 tests/func/honeycomb/900_persistence.robot create mode 100644 tests/func/honeycomb/__init__.robot (limited to 'tests/func/honeycomb') diff --git a/tests/func/honeycomb/010_interface_management.robot b/tests/func/honeycomb/010_interface_management.robot new file mode 100644 index 0000000000..e9798167c7 --- /dev/null +++ b/tests/func/honeycomb/010_interface_management.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 *** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} +# Configuration which will be set and verified during tests. +| ${ipv4_address}= | 192.168.0.2 +| ${ipv4_address2}= | 192.168.0.3 +| ${ipv4_mask}= | 255.255.255.0 +| ${ipv4_prefix}= | ${24} +| @{ipv4_neighbor}= | 192.168.0.4 | 08:00:27:c0:5d:37 +| &{ipv4_settings}= | enabled=${True} | forwarding=${True} | mtu=${9000} +| @{ipv6_address}= | 10::10 | ${64} +| @{ipv6_neighbor}= | 10::11 | 08:00:27:c0:5d:37 +| &{ipv6_settings}= | enabled=${True} | forwarding=${True} | mtu=${9000} +| ... | dup-addr-detect-transmits=${5} +| &{ethernet}= | mtu=${9000} +| &{routing}= | vrf-id=${27} +| &{vxlan_settings}= | src=10.0.1.20 | dst=10.0.3.20 | vni=${1000} +| ... | encap-vrf-id=${1000} + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Force Tags | honeycomb_sanity +| Documentation | *Honeycomb interface management test suite.* +| ... +| ... | Test suite uses the first interface of the first DUT node. + +*** Test Cases *** +| Honeycomb configures and reads interface state +| | [Documentation] | Check if Honeycomb API can modify the admin state of\ +| | ... | VPP interfaces. +| | Given Interface state is | ${node} | ${interface} | down +| | When Honeycomb sets 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 sets 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 + +| Honeycomb modifies interface configuration - ipv4 (netmask) +| | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\ +| | ... | with address and netmask provided. +| | When Honeycomb sets interface ipv4 address | ${node} | ${interface} +| | ... | ${ipv4_address} | ${ipv4_mask} | ${ipv4_settings} +| | And Honeycomb adds interface ipv4 neighbor +| | ... | ${node} | ${interface} | @{ipv4_neighbor} +| | Then IPv4 config from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} +| | ... | @{ipv4_neighbor} | ${ipv4_settings} +| | And IPv4 config from VAT should be +| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} + +| Honeycomb removes ipv4 address from interface +| | [Documentation] | Check if Honeycomb API can remove configured ipv4\ +| | ... | addresses from interface. +| | Given IPv4 config from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} +| | ... | @{ipv4_neighbor} | ${ipv4_settings} +| | And IPv4 config from VAT should be +| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} +| | 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} + +| Honeycomb modifies interface configuration - ipv4 (prefix) +| | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\ +| | ... | with address and prefix provided. +| | [Teardown] | Honeycomb removes interface ipv4 addresses | ${node} +| | ... | ${interface} +| | When Honeycomb sets interface ipv4 address with prefix +| | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix} +| | ... | ${ipv4_settings} +| | And Honeycomb adds interface ipv4 neighbor +| | ... | ${node} | ${interface} | @{ipv4_neighbor} +| | Then IPv4 config from Honeycomb should be +| | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix} +| | ... | @{ipv4_neighbor} +| | ... | ${ipv4_settings} +| | And IPv4 config from VAT should be +| | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix} + +| Honeycomb modifies interface configuration - ipv6 +| | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6. +| | When Honeycomb sets interface ipv6 configuration +| | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor} +| | ... | ${ipv6_settings} +| | Then IPv6 config from Honeycomb should be +| | ... | ${node} | ${interface} | @{ipv6_address} | @{ipv6_neighbor} +| | ... | ${ipv6_settings} +| | And IPv6 config from VAT should be +| | ... | ${node} | ${interface} | @{ipv6_address} + +| Honeycomb modifies interface configuration - ethernet,routing +| | [Documentation] | Check if Honeycomb API can configure interface ethernet\ +| | ... | and routing settings. +| | When Honeycomb sets interface ethernet and routing configuration +| | ... | ${node} | ${interface} | ${ethernet} | ${routing} +| | Then Interface ethernet and routing configuration from Honeycomb should be +| | ... | ${node} | ${interface} | ${ethernet} | ${routing} +| | And Interface ethernet and routing configuration from VAT should be +| | ... | ${node} | ${interface} | ${ethernet['mtu']} | ${routing['vrf-id']} diff --git a/tests/func/honeycomb/020_bridge_domain.robot b/tests/func/honeycomb/020_bridge_domain.robot new file mode 100644 index 0000000000..0bd4463ea0 --- /dev/null +++ b/tests/func/honeycomb/020_bridge_domain.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 *** +# 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/default.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot +| Suite Teardown | Honeycomb removes all bridge domains | ${node} +| Force Tags | honeycomb_sanity +| Documentation | *Honeycomb bridge domain management test suite.* +| ... +| ... | Test suite uses the first two interfaces on the first DUT node. + +*** Test Cases *** +| 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 configuration from Honeycomb should be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | And Bridge domain configuration from VAT should be +| | ... | ${node} | ${0} | ${bd_settings} + +| Honeycomb manages multiple bridge domains on node +| | [Documentation] | Check if Honeycomb can manage multiple bridge domains on\ +| | ... | a single node. +| | Given Bridge domain configuration from Honeycomb should be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | When Honeycomb creates l2 bridge domain +| | ... | ${node} | ${bd2_name} | ${bd_settings} +| | Then Bridge domain configuration from Honeycomb should be +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | And Bridge domain configuration from Honeycomb should be +| | ... | ${node} | ${bd2_name} | ${bd_settings} +| | And Bridge domain configuration from VAT should be +| | ... | ${node} | ${0} | ${bd_settings} +| | And Bridge domain configuration from VAT should be +| | ... | ${node} | ${1} | ${bd_settings} + +| Honeycomb removes bridge domains +| | [Documentation] | Check if Honeycomb can remove bridge domains from a VPP\ +| | ... | node. +| | Given Bridge domain configuration 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} + +| 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 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} + +| Honeycomb removes bridge domain with an interface assigned +| | [Documentation] | Check if Honeycomb can remove a bridge domain that has an\ +| | ... | interface assigned to it. +| | Given 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 Honeycomb removes all bridge domains | ${node} +| | Then Honeycomb should show no bridge domains | ${node} +| | And VAT should show no bridge domains | ${node} + +| Honeycomb does not assign two bridged virtual interfaces to one bridge domain. +| | [Documentation] | Check if Honeycomb can assign two bridged virtual\ +| | ... | interfaces to a single bridge domain, and expect to fail. +| | [Teardown] | Honeycomb removes all bridge domains | ${node} +| | Given Honeycomb creates first l2 bridge domain +| | ... | ${node} | ${bd1_name} | ${bd_settings} +| | When Honeycomb fails to add interfaces to bridge domain +| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings2} +| | Then Honeycomb should not show interfaces assigned to bridge domain +| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings2} +| | And VAT should not show interfaces assigned to bridge domain +| | ... | ${node} | ${0} | @{interfaces} | ${if_settings2} diff --git a/tests/func/honeycomb/021_l2_fib.robot b/tests/func/honeycomb/021_l2_fib.robot new file mode 100644 index 0000000000..ec07e104ad --- /dev/null +++ b/tests/func/honeycomb/021_l2_fib.robot @@ -0,0 +1,228 @@ +# 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/default.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 +| Documentation | *Honeycomb L2 FIB management test suite.* +| Suite Setup | Run keywords +| ... | Set test interface down +| ... | AND +| ... | Honeycomb removes all bridge domains | ${node} +| Suite Teardown | Honeycomb removes all bridge domains | ${node} +| Force tags | honeycomb_sanity + +*** Variables *** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} + +*** Test Cases *** +| 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 sets 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 configuration from Honeycomb should be +| | ... | ${node} | ${bd_name} | ${bd_settings} +| | Given Bridge domain configuration in interface operational data should be empty +| | ... | ${node} | ${interface} +| | When Honeycomb adds interface to bridge domain +| | ... | ${node} | ${interface} | ${bd_name} | ${if_bd_settings} +| | Then Bridge domain configuration in interface operational data 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} + +| 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 configuration in interface operational data 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} + +| 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 configuration in interface operational data 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} + +| 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 configuration in interface operational data 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} + +| 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 configuration in interface operational data 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} + +| 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 configuration in interface operational data 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} + +| 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 configuration in interface operational data 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 sets interface state +| | ... | ${node} | ${interface} | down diff --git a/tests/func/honeycomb/030_vxlan.robot b/tests/func/honeycomb/030_vxlan.robot new file mode 100644 index 0000000000..7e192cea47 --- /dev/null +++ b/tests/func/honeycomb/030_vxlan.robot @@ -0,0 +1,115 @@ +# 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} +| &{vxlan_settings_ipv6_long}= | src=10:0:0:0:0:0:0:10 | dst=10:0:0:0:0:0:0:11 +| ... | vni=${88} | encap-vrf-id=${0} + +*** Settings *** +| Resource | resources/libraries/robot/default.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 | honeycomb_sanity +| Documentation | *Honeycomb VxLAN management test suite.* +| ... +| ... | Test suite uses the first interface of the first DUT node. + +*** Test Cases *** +| Honeycomb configures VxLAN tunnel +| | [Documentation] | Check if Honeycomb API can configure VxLAN settings. +| | Given VxLAN configuration from Honeycomb should be empty +| | ... | ${node} | ${vx_interface} +| | And VxLAN configuration from VAT should be empty | ${node} +| | When Honeycomb sets interface VxLAN configuration +| | ... | ${node} | ${vx_interface} | ${vxlan_settings} +| | Then VxLAN configuration from Honeycomb should be +| | ... | ${node} | ${vx_interface} | ${vxlan_settings} +| | And VxLAN configuration from VAT should be +| | ... | ${node} | ${vxlan_settings} + +| Honeycomb disables VxLAN tunnel +| | [Documentation] | Check if Honeycomb API can reset VxLAN configuration. +| | Given VxLAN configuration from Honeycomb should be +| | ... | ${node} | ${vx_interface} | ${vxlan_settings} +| | And VxLAN configuration from VAT should be +| | ... | ${node} | ${vxlan_settings} +| | When Honeycomb removes VxLAN tunnel settings | ${node} | ${vx_interface} +| | Then VxLAN configuration from Honeycomb should be empty +| | ... | ${node} | ${vx_interface} +| | And VxLAN configuration from VAT should be empty | ${node} + +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 configuration from Honeycomb should be empty +| | ... | ${node} | ${vx_interface} +| | And VxLAN configuration from VAT should be empty | ${node} +| | When Honeycomb sets interface VxLAN configuration +| | ... | ${node} | ${vx_interface} | ${vxlan_settings2} +| | Then VxLAN configuration from Honeycomb should be +| | ... | ${node} | ${vx_interface} | ${vxlan_settings2} +| | And VxLAN configuration from VAT should be +| | ... | ${node} | ${vxlan_settings2} + +| Honeycomb does not set VxLAN configuration on another interface type +| | [Documentation] | Check if Honeycomb API prevents setting VxLAN\ +| | ... | on incorrect interface. +| | Given VxLAN configuration from Honeycomb should be empty +| | ... | ${node} | ${interface} +| | And VxLAN configuration from VAT should be empty | ${node} +| | When Honeycomb fails setting VxLan on different interface type +| | ... | ${node} | ${interface} | ${vxlan_settings2} +| | Then VxLAN configuration from Honeycomb should be empty +| | ... | ${node} | ${interface} +| | And VxLAN configuration from VAT should be empty +| | ... | ${node} + +| Honeycomb does not set invalid VxLAN configuration +| | [Documentation] | Check if Honeycomb API prevents setting incorrect VxLAN\ +| | ... | settings. +| | Given VxLAN configuration from Honeycomb should be empty +| | ... | ${node} | ${vx_interface} +| | And VxLAN configuration from VAT should be empty | ${node} +| | When Honeycomb fails setting invalid VxLAN configuration +| | ... | ${node} | ${vx_interface} | ${vxlan_invalid} +| | Then VxLAN configuration from Honeycomb should be empty +| | ... | ${node} | ${vx_interface} + +| 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 configuration from Honeycomb should be empty +| | ... | ${node} | ${vx_interface} +| | And VxLAN configuration from VAT should be empty | ${node} +| | When Honeycomb sets interface VxLAN configuration +| | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6} +| | Then VxLAN configuration from Honeycomb should be +| | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6_long} +| | And VxLAN configuration from VAT should be +| | ... | ${node} | ${vxlan_settings_ipv6} diff --git a/tests/func/honeycomb/031_vxlan_gpe.robot b/tests/func/honeycomb/031_vxlan_gpe.robot new file mode 100644 index 0000000000..5c51319070 --- /dev/null +++ b/tests/func/honeycomb/031_vxlan_gpe.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/default.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.* +| Force Tags | honeycomb_sanity + +*** Test Cases *** +| Honeycomb creates VxLAN GPE tunnel +| | [Documentation] | Check if Honeycomb API can configure VxLAN GPE tunnel. +| | ... +| | Given interface configuration from Honeycomb should be empty +| | ... | ${node} | ${vxlan_gpe_if1} +| | And interface configuration 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 run keyword and continue on failure +| | ... | VxLAN GPE configuration from Honeycomb should be +| | ... | ${node} | ${vxlan_gpe_if1} +| | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings} +| | And run keyword and continue on failure +| | ... | VxLAN GPE configuration from VAT should be +| | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings} +| | And run keyword and continue on failure +| | ... | VxLAN GPE Interface indices from Honeycomb and VAT should correspond +| | ... | ${node} | ${vxlan_gpe_if1} + +| Honeycomb removes VxLAN GPE tunnel +| | [Documentation] | Check if Honeycomb API can remove VxLAN GPE tunnel. +| | ... +# Disabled beacuse of bug in Honeycomb. +# TODO: Enable when fixed. +#| | Given VxLAN GPE configuration from Honeycomb should be +#| | ... | ${node} | ${vxlan_gpe_if1} +#| | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings} +#| | And VxLAN GPE configuration from VAT should be +#| | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings} +| | When Honeycomb removes VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if1} +| | Then VxLAN GPE configuration from VAT should be empty +| | ... | ${node} +| | And VxLAN GPE configuration from Honeycomb should be +| | ... | ${node} | ${vxlan_gpe_if1} +| | ... | ${vxlan_gpe_disabled_base_settings} | ${vxlan_gpe_settings} + +| 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. +| | ... +| | Given interface configuration from Honeycomb should be empty +| | ... | ${node} | ${vxlan_gpe_if2} +| | And interface configuration 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 configuration from Honeycomb should be empty +| | ... | ${node} | ${vxlan_gpe_if2} +| | And interface configuration from VAT should be empty +| | ... | ${node} | ${vxlan_gpe_if2} + +| 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. +| | ... +| | Given interface configuration from Honeycomb should be empty +| | ... | ${node} | ${vxlan_gpe_if3} +| | And interface configuration 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 configuration from Honeycomb should be empty +| | ... | ${node} | ${vxlan_gpe_if3} +| | And interface configuration from VAT should be empty +| | ... | ${node} | ${vxlan_gpe_if3} + +| 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. +| | ... +| | Given VxLAN GPE configuration 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 configuration from VAT should be empty +| | ... | ${node} + +| Honeycomb creates VxLAN GPE tunnel with ipv6 +| | [Documentation] | Check if Honeycomb API can configure VxLAN GPE tunnel\ +| | ... | with IPv6 addresses. +| | ... +| | Given VxLAN GPE configuration from VAT should be empty +| | ... | ${node} +# Disabled beacuse of bug in Honeycomb +# TODO: Enable when fixed. +#| | And VxLAN GPE configuration from Honeycomb should be +#| | ... | ${node} | ${vxlan_gpe_if5} +#| | ... | ${vxlan_gpe_disabled_base_settings} | ${vxlan_gpe_settings} +| | When Honeycomb creates VxLAN GPE interface +| | ... | ${node} | ${vxlan_gpe_if5} +| | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings} +| | Then run keyword and continue on failure +| | ... | VxLAN GPE configuration 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 configuration from VAT should be +| | ... | ${node} | ${vxlan_gpe_if5} | ${vxlan_gpe_ipv6_settings} +| | And run keyword and continue on failure +| | ... | VxLAN GPE Interface indices from Honeycomb and VAT should correspond +| | ... | ${node} | ${vxlan_gpe_if5} + +| Honeycomb creates the second VxLAN GPE tunnel with ipv6 +| | [Documentation] | Check if Honeycomb API can configure another one VxLAN\ +| | ... | GPE tunnel with IPv6 addresses. +| | ... +| | Given interface configuration from Honeycomb should be empty +| | ... | ${node} | ${vxlan_gpe_if6} +| | And interface configuration 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 run keyword and continue on failure +| | ... | VxLAN GPE configuration from Honeycomb should be +| | ... | ${node} | ${vxlan_gpe_if6} +| | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2} +| | And run keyword and continue on failure +| | ... | VxLAN GPE configuration from VAT should be +| | ... | ${node} | ${vxlan_gpe_if6} | ${vxlan_gpe_ipv6_settings2} +| | And run keyword and continue on failure +| | ... | VxLAN GPE Interface indices from Honeycomb and VAT should correspond +| | ... | ${node} | ${vxlan_gpe_if6} diff --git a/tests/func/honeycomb/040_tap.robot b/tests/func/honeycomb/040_tap.robot new file mode 100644 index 0000000000..329ca8a3c1 --- /dev/null +++ b/tests/func/honeycomb/040_tap.robot @@ -0,0 +1,71 @@ +# 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/default.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/tap.robot +| Force Tags | honeycomb_sanity +| Documentation | *Honeycomb TAP management test suite.* +| ... +| ... | Test suite uses the first interface of the first DUT node. + +*** Test Cases *** +| Honeycomb configures TAP interface +| | [Documentation] | Check if Honeycomb API can configure a TAP interface. +| | Given TAP configuration from Honeycomb should be empty +| | ... | ${node} | ${tap_interface} +| | And TAP configuration from VAT should be empty +| | ... | ${node} | ${tap_interface} +| | When Honeycomb creates TAP interface +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | Then TAP configuration from Honeycomb should be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | And TAP configuration from VAT should be +| | ... | ${node} | ${tap_interface} | ${tap_settings} + +| Honeycomb modifies existing TAP interface configuration +| | [Documentation] | Check if Honeycomb API can re-configure and existing TAP\ +| | ... | interface with new settings. +| | Given TAP configuration from Honeycomb should be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | And TAP configuration from VAT should be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | When Honeycomb configures TAP interface +| | ... | ${node} | ${tap_interface} | ${tap_settings2} +| | Then TAP configuration from Honeycomb should be +| | ... | ${node} | ${tap_interface} | ${tap_settings2} +| | And TAP configuration from VAT should be +| | ... | ${node} | ${tap_interface} | ${tap_settings2} + +| Honeycomb removes TAP interface +| | [Documentation] | Check if Honeycomb API can remove TAP interface. +| | Given TAP configuration from Honeycomb should be +| | ... | ${node} | ${tap_interface} | ${tap_settings2} +| | And TAP configuration from VAT should be +| | ... | ${node} | ${tap_interface} | ${tap_settings2} +| | When Honeycomb removes TAP interface | ${node} | ${tap_interface} +| | Then TAP configuration from Honeycomb should be empty +| | ... | ${node} | ${tap_interface} +| | And TAP configuration from VAT should be empty +| | ... | ${node} | ${tap_interface} diff --git a/tests/func/honeycomb/050_interface_vhost_user.robot b/tests/func/honeycomb/050_interface_vhost_user.robot new file mode 100644 index 0000000000..2c2a5ae91a --- /dev/null +++ b/tests/func/honeycomb/050_interface_vhost_user.robot @@ -0,0 +1,159 @@ +# 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=soc1 | role=server +| &{vhost_user_server_edit_1}= | socket=soc12 | role=server +| &{vhost_user_server_edit_2}= | socket=soc12 | role=client +| &{vhost_user_client}= | socket=soc2 | role=client +| &{vhost_user_client_edit_1}= | socket=soc22 | role=client +| &{vhost_user_client_edit_2}= | socket=soc22 | role=server +| &{vhost_user_wrong}= | socket=soc2 | role=wrong + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/honeycomb/vhost_user.robot +| Force Tags | honeycomb_sanity +| Documentation | *Honeycomb vhost-user interface management test suite.* +| ... +| ... | This test suite tests if it is posible to create, modify and\ +| ... | delete a vhost-user interface. + +*** Test Cases *** +| Honycomb creates vhost-user interface - server +| | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\ +| | ... | server. +| | ... +| | Given vhost-user configuration from Honeycomb should be empty +| | ... | ${node} | ${vhost_interface} +| | When Honeycomb creates vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | Then vhost-user configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | And vhost-user configuration from VAT should be +| | ... | ${node} | ${vhost_user_server} + +| Honycomb modifies vhost-user interface - server +| | [Documentation] | Check if Honeycomb can modify properties of existing\ +| | ... | vhost-user interface, role: server. +| | ... +| | Given vhost-user configuration 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 configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1} +| | And vhost-user configuration 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 configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2} +| | And vhost-user configuration 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 configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | And vhost-user configuration from VAT should be +| | ... | ${node} | ${vhost_user_server} + +| Honycomb deletes vhost-user interface - server +| | [Documentation] | Check if Honeycomb can delete an existing vhost-user\ +| | ... | interface, role: server. +| | ... +| | Given vhost-user configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} +| | When Honeycomb removes vhost-user interface +| | ... | ${node} | ${vhost_interface} +| | Then vhost-user configuration from Honeycomb should be empty +| | ... | ${node} | ${vhost_interface} +| | And vhost-user configuration from VAT should be empty +| | ... | ${node} + +| Honycomb creates vhost-user interface - client +| | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\ +| | ... | client. +| | ... +| | Given vhost-user configuration from Honeycomb should be empty +| | ... | ${node} | ${vhost_interface} +| | When Honeycomb creates vhost-user interface +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | Then vhost-user configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | And vhost-user configuration from VAT should be +| | ... | ${node} | ${vhost_user_client} + +| Honycomb modifies vhost-user interface - client +| | [Documentation] | Check if Honeycomb can modify properties of existing\ +| | ... | vhost-user interface, role: client. +| | ... +| | Given vhost-user configuration 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 configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1} +| | And vhost-user configuration 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 configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2} +| | And vhost-user configuration 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 configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | And vhost-user configuration from VAT should be +| | ... | ${node} | ${vhost_user_client} + +| Honycomb deletes vhost-user interface - client +| | [Documentation] | Check if Honeycomb can delete an existing vhost-user\ +| | ... | interface, role: client. +| | ... +| | Given vhost-user configuration from Honeycomb should be +| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} +| | When Honeycomb removes vhost-user interface +| | ... | ${node} | ${vhost_interface} +| | Then vhost-user configuration from Honeycomb should be empty +| | ... | ${node} | ${vhost_interface} +| | And vhost-user configuration from VAT should be empty +| | ... | ${node} + +| 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 configuration from Honeycomb should be empty +| | ... | ${node} | ${interface} +| | And vhost-user configuration from VAT should be empty +| | ... | ${node} + +| Honeycomb does not set invalid vhost-user configuration +| | [Documentation] | Check if Honeycomb refuses to set invalid parameters to\ +| | ... | vhost-user interface. +| | ... +| | Given vhost-user configuration 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 configuration from Honeycomb should be empty +| | ... | ${node} | ${vhost_interface} +| | And vhost-user configuration from VAT should be empty +| | ... | ${node} diff --git a/tests/func/honeycomb/060_sub_interface.robot b/tests/func/honeycomb/060_sub_interface.robot new file mode 100644 index 0000000000..e67638ab97 --- /dev/null +++ b/tests/func/honeycomb/060_sub_interface.robot @@ -0,0 +1,445 @@ +# 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/default.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 Teardown | Honeycomb removes all bridge domains | ${node} +| Force Tags | honeycomb_sanity +| Documentation | *Honeycomb sub-interface management test suite.* +| ... +| ... | This test suite tests if it is posible to create, modify and \ +| ... | delete a sub-interface. + +*** Variables *** +# Test interface 1 and its sub-interface parameters: +| ${super_if}= | ${node['interfaces']['port1']['name']} +| ${sub_if_id}= | ${sub_if_1_settings['identifier']} +| ${sub_if_name}= | ${super_if}.${sub_if_id} + +*** Test Cases *** +| Honycomb creates sub-interface +| | [Documentation] | Check if Honeycomb creates a sub-interface. +| | ... +| | Given interface state is | ${node} | ${super_if} | down +| | And sub-interface configuration from Honeycomb should be empty +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | And interface configuration 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 run keyword and continue on failure +| | ... | Sub-interface configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And run keyword and continue on failure +| | ... | Sub-interface configuration 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} + +| Honeycomb sets interface and sub-interface up +| | [Documentation] | Honeycomb changes the state of interface up and then \ +| | ... | changes the state of its sub-interface up, in this order. +| | ... +| | Given interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | down +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | down +| | When Honeycomb sets 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 +| | Given run keyword and continue on failure +| | ... | Sub-interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down +| | And run keyword and continue on failure +| | ... | Sub-interface state from VAT should be +| | ... | ${node} | ${sub_if_name} | down | down +| | When Honeycomb sets the sub-interface up +| | ... | ${node} | ${super_if} | ${sub_if_id} +| | Then run keyword and continue on failure +| | ... | 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 + +| 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 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 +| | And interface state from Honeycomb should be +| | ... | ${node} | ${super_if} | up +| | And interface state from VAT should be +| | ... | ${node} | ${super_if} | up + +| 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 sets 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 + +| 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 + +| 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 configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And sub-interface configuration 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 configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And sub-interface configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} + +| 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 configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} +| | And sub-interface configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} +| | When Honeycomb creates L2 bridge domain +| | ... | ${node} | ${bd_name} | ${bd_settings} +| | Then bridge domain configuration 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 configuration from Honeycomb should be +| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings} +| | And sub-interface bridge domain configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_bd_settings} +| | And sub-interface configuration from VAT should be +| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} + +| 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} + +| 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} + +| 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} + +| 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} + +| 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} + +| 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} + +| 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} + +| 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']} + +| 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']} +| | 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} + +| 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']} + +*** 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 sets 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 sets 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/func/honeycomb/070_netconf.robot b/tests/func/honeycomb/070_netconf.robot new file mode 100644 index 0000000000..9925dee15f --- /dev/null +++ b/tests/func/honeycomb/070_netconf.robot @@ -0,0 +1,29 @@ +# 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/default.robot +| Resource | resources/libraries/robot/honeycomb/netconf.robot +| Variables | resources/test_data/honeycomb/netconf/triggers.py +| Documentation | *Netconf test suite. Contains test cases that need to bypass\ +| ... | REST API.* +| Force Tags | honeycomb_sanity + +*** Test Cases *** +| 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 is established | ${node} +| | :FOR | ${index} | IN RANGE | 20 +| | | When Error trigger is sent | ${trigger_105} +| | | Then Replies should not contain RPC errors diff --git a/tests/func/honeycomb/071_notification.robot b/tests/func/honeycomb/071_notification.robot new file mode 100644 index 0000000000..117f024b21 --- /dev/null +++ b/tests/func/honeycomb/071_notification.robot @@ -0,0 +1,56 @@ +# 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/default.robot +| Resource | resources/libraries/robot/honeycomb/interfaces.robot +| Resource | resources/libraries/robot/honeycomb/tap.robot +| Resource | resources/libraries/robot/honeycomb/notifications.robot +| Suite Setup | Run keywords +| ... | Honeycomb sets interface state +| ... | ${node} | ${interface} | down | AND +| ... | Honeycomb creates TAP interface +| ... | ${node} | ${tap_interface} | ${tap_settings} +| Documentation | *Honeycomb notifications test suite.* +| Force Tags | honeycomb_sanity + +*** Test Cases *** +| 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 is established | ${node} +| | When Honeycomb sets interface state | ${node} | ${interface} | up +| | Then Honeycomb should send interface state notification | ${interface} | up +| | When Honeycomb sets interface state | ${node} | ${interface} | down +| | And Honeycomb should send interface state notification | ${interface} | down + +| Honeycomb sends notification on interface deletion +| | [Documentation] | Check if Honeycomb sends an interface-deleted notification +| | ... | when an interface is deleted. +| | Given TAP configuration from Honeycomb should be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | And TAP configuration from VAT should be +| | ... | ${node} | ${tap_interface} | ${tap_settings} +| | And Notification listener is established | ${node} +| | When Honeycomb removes TAP interface | ${node} | ${tap_interface} +| | Then Honeycomb should send interface deleted notification | ${tap_interface} diff --git a/tests/func/honeycomb/080_access_control_lists.robot b/tests/func/honeycomb/080_access_control_lists.robot new file mode 100644 index 0000000000..146a02edd3 --- /dev/null +++ b/tests/func/honeycomb/080_access_control_lists.robot @@ -0,0 +1,146 @@ +# 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/default.robot +| Resource | resources/libraries/robot/honeycomb/access_control_lists.robot +| Variables | resources/test_data/honeycomb/acl.py +| Suite Teardown | Clear all ACL settings | ${node} +| Documentation | *Honeycomb access control lists test suite.* +| Force Tags | Honeycomb_sanity + +*** Test Cases *** +| 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} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} + +| Honeycomb manages more than one ACL table +| | [Documentation] | Check if Honeycomb API can create another ACL table. +| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} +| | And Honeycomb creates ACL table | ${node} | ${hc_acl_table2} +| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} +| | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index2} | ${vat_acl_table2} + +| 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} +| | 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} + +| 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 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 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} + +| 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} +| | 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 settings from Honeycomb should be +| | ... | ${node} | ${interface} | ${hc_acl_table['name']} +| | And Interface ACL settings from VAT should be +| | ... | ${node} | ${interface} | ${table_index} + +| Honeycomb disables ACL on interface +| | [Documentation] | Check if Honeycomb API can disable ACL on an interface. +| | Given Interface ACL settings from Honeycomb should be +| | ... | ${node} | ${interface} | ${hc_acl_table['name']} +| | And Interface ACL settings from VAT should be +| | ... | ${node} | ${interface} | ${table_index} +| | When Honeycomb disables ACL on interface | ${node} | ${interface} +| | Then Interface ACL settings from Honeycomb should be empty +| | ... | ${node} | ${interface} +| | And Interface ACL settings from VAT should be empty +| | ... | ${node} | ${interface} + +| 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} +| | 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} +| | When Honeycomb removes ACL session +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2['match']} +| | 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 not exist +| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2['match']} +| | And ACL session from VAT should not exist +| | ... | ${node} | ${table_index} | ${session_index2} + +| 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} +| | And ACL table from VAT should be +| | ... | ${node} | ${table_index} | ${vat_acl_table} +| | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2} +| | 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} +| | 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/func/honeycomb/900_persistence.robot b/tests/func/honeycomb/900_persistence.robot new file mode 100644 index 0000000000..e3f68ccc33 --- /dev/null +++ b/tests/func/honeycomb/900_persistence.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. + +*** Variables*** +# Interface to run tests on. +| ${interface}= | ${node['interfaces']['port1']['name']} + +*** Settings *** +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/honeycomb/persistence.robot +| Suite Setup | Restart Honeycomb and VPP and clear persisted configuration +| ... | ${node} +| Force Tags | honeycomb_persistence +| Documentation | *Honeycomb configuration persistence test suite.* + +*** Test Cases *** +| Honeycomb persists configuration through restart of both Honeycomb and VPP +| | [Documentation] | Checks if Honeycomb maintains configuration after both\ +| | ... | Honeycomb and VPP are restarted. +| | Given Honeycomb configures every setting | ${node} | ${interface} +| | And Honeycomb and VPP should verify every setting | ${node} | ${interface} +| | When Honeycomb and VPP are restarted | ${node} +| | Then Honeycomb and VPP should verify every setting | ${node} | ${interface} +| | And Honeycomb should show no rogue interfaces | ${node} + +| Honeycomb persists configuration through restart of Honeycomb +| | [Documentation] | Checks if Honeycomb maintains configuration after it\ +| | ... | is restarted. +| | Given Honeycomb and VPP should verify every setting | ${node} | ${interface} +| | When Honeycomb is restarted | ${node} +| | Then Honeycomb and VPP should verify every setting | ${node} | ${interface} +| | And Honeycomb should show no rogue interfaces | ${node} + +| Honeycomb persists configuration through restart of VPP +| | [Documentation] | Checks if Honeycomb updates VPP settings after VPP is\ +| | ... | restarted. +| | Given Honeycomb and VPP should verify every setting | ${node} | ${interface} +| | When VPP is restarted | ${node} +| | Then Honeycomb and VPP should verify every setting | ${node} | ${interface} +| | And Honeycomb should show no rogue interfaces | ${node} + +| Honeycomb reverts to defaults if persistence files are invalid +| | [Documentation] | Checks if Honeycomb reverts to default configuration when\ +| | ... | persistence files are damaged or invalid. +| | [Teardown] | Run keyword if test failed +| | ... | Restart both systems and clear persisted configuration | ${node} +| | Given Honeycomb and VPP should not have default configuration | ${node} +| | When Persistence file is damaged during restart | ${node} +| | Then Honeycomb and VPP should have default configuration | ${node} + +*** Keywords *** +| Restart Honeycomb and VPP and clear persisted configuration +| | [Documentation] | Restarts Honeycomb and VPP with default configuration. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... +| | ... | *Example:* +| | ... +| | ... | Restart both systems and clear persisted configuration \ +| | ... | \| ${nodes['DUT1']} \| +| | [Arguments] | ${node} +| | Stop Honeycomb service on DUTs | ${node} +| | Clear persisted Honeycomb configuration | ${node} +| | Setup DUT | ${node} +| | Setup Honeycomb service on DUTs | ${node} \ No newline at end of file diff --git a/tests/func/honeycomb/__init__.robot b/tests/func/honeycomb/__init__.robot new file mode 100644 index 0000000000..d38852a090 --- /dev/null +++ b/tests/func/honeycomb/__init__.robot @@ -0,0 +1,26 @@ +# 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*** +# Honeycomb node to run tests on. +| ${node}= | ${nodes['DUT1']} + +*** Settings *** +| Library | resources.libraries.python.honeycomb.HcPersistence +| Resource | resources/libraries/robot/default.robot +| Resource | resources/libraries/robot/honeycomb/honeycomb.robot +| Suite Setup | Run keywords | Setup all DUTs before test | AND +| ... | Clear persisted Honeycomb configuration | ${node} | AND +| ... | Setup Honeycomb service on DUTs | ${node} | AND +| ... | Set Global Variable | ${node} +| Suite Teardown | Stop Honeycomb service on DUTs | ${node} -- cgit 1.2.3-korg