aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/honeycomb/persistence.robot
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2016-05-25 17:16:11 +0200
committerJan Gelety <jgelety@cisco.com>2016-06-07 20:19:50 +0000
commitce469c1a7d56c2be639e5cecde961c4ef6354fb5 (patch)
tree617a03045adb8426c59ac2758d5075fb3096d054 /resources/libraries/robot/honeycomb/persistence.robot
parent6000b2abc3d6b8bb8ff2941aacf005a04a33be60 (diff)
Add Honeycomb persistence tests
JIRA: CSIT-121 - add honeycomb persistence test suite - add keywords used by persistence tests - add methods for working with Honeycomb persistence files - make suite setup clear persisted data before Honeycomb startup Change-Id: Ief61c12b730d58a456566c4683c0091e08a09b56 Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/libraries/robot/honeycomb/persistence.robot')
-rw-r--r--resources/libraries/robot/honeycomb/persistence.robot226
1 files changed, 226 insertions, 0 deletions
diff --git a/resources/libraries/robot/honeycomb/persistence.robot b/resources/libraries/robot/honeycomb/persistence.robot
new file mode 100644
index 0000000000..1c23915aca
--- /dev/null
+++ b/resources/libraries/robot/honeycomb/persistence.robot
@@ -0,0 +1,226 @@
+# 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 ***
+| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
+| ... | WITH NAME | InterfaceAPI
+| Library | resources.libraries.python.honeycomb.HcPersistence
+| Resource | resources/libraries/robot/honeycomb/honeycomb.robot
+| Resource | resources/libraries/robot/honeycomb/interfaces.robot
+| Resource | resources/libraries/robot/honeycomb/vxlan.robot
+| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
+| Resource | resources/libraries/robot/honeycomb/tap.robot
+| Resource | resources/libraries/robot/honeycomb/vhost_user.robot
+| Resource | resources/libraries/robot/honeycomb/sub_interface.robot
+| Variables | tests/suites/honeycomb/resources/persistence.py | ${interface}
+| Documentation | Keywords used to test Honeycomb persistence.
+
+*** Keywords ***
+| Honeycomb is restarted
+| | [Documentation] | Restarts Honeycomb without clearing persistence data.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Honeycomb is restarted \| ${nodes['DUT1']} \|
+| | [Arguments] | ${node}
+| | Stop Honeycomb service on DUTs | ${node}
+| | Setup Honeycomb service on DUTs | ${node}
+
+| VPP is restarted
+| | [Documentation] | Restarts VPP and waits until it reconnects with Honeycomb.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| VPP is restarted \| ${nodes['DUT1']} \|
+| | [Arguments] | ${node}
+| | Setup DUT | ${node}
+| | Check VPP connection | ${node}
+
+| Check VPP connection
+| | [Documentation] | Checks if Honeycomb is connected to VPP by reading VPP\
+| | ... | version number from Honeycomb operational data.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Check VPP connection \| ${nodes['DUT1']} \|
+| | [Arguments] | ${node}
+| | Wait until keyword succeeds | 2min | 20sec
+| | ... | Check Honeycomb startup state | ${node}
+
+| Honeycomb and VPP are restarted
+| | [Documentation] | Stops Honeycomb, restarts VPP and then starts Honeycomb\
+| | ... | again.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Honeycomb and VPP are restarted \| ${nodes['DUT1']} \|
+| | [Arguments] | ${node}
+| | Stop Honeycomb service on DUTs | ${node}
+| | Setup DUT | ${node}
+| | Setup Honeycomb service on DUTs | ${node}
+
+| Honeycomb configures every setting
+| | [Documentation] | Uses Honeycomb to set basic settings for VxLAN,\
+| | ... | bridge domains, TAP, vhost-user and VLAN.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - interface - name of an interface on the specified node. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Honeycomb configures every setting \| ${nodes['DUT1']} \
+| | ... | \| GigabitEthernet0/8/0 \|
+| | [Arguments] | ${node} | ${interface}
+| | Honeycomb sets interface VxLAN configuration
+| | ... | ${node} | ${vx_interface} | ${vxlan_settings}
+| | Honeycomb creates first l2 bridge domain
+| | ... | ${node} | ${bd_name} | ${bd_settings}
+| | Honeycomb creates TAP interface
+| | ... | ${node} | ${tap_interface} | ${tap_settings}
+| | Honeycomb creates vhost-user interface
+| | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
+| | Honeycomb creates sub-interface
+| | ... | ${node} | ${interface} | ${sub_interface_id}
+| | ... | ${sub_interface_base_settings} | ${sub_interface_settings}
+| | Honeycomb sets interface state | ${node} | ${interface} | up
+| | VxLAN configuration from Honeycomb should be
+| | ... | ${node} | ${vx_interface} | ${vxlan_settings}
+| | VxLAN configuration from VAT should be
+| | ... | ${node} | ${vxlan_settings}
+| | Bridge domain configuration from Honeycomb should be
+| | ... | ${node} | ${bd_name} | ${bd_settings}
+| | Bridge domain configuration from VAT should be
+| | ... | ${node} | ${0} | ${bd_settings}
+| | TAP configuration from Honeycomb should be
+| | ... | ${node} | ${tap_interface} | ${tap_settings}
+| | TAP configuration from VAT should be
+| | ... | ${node} | ${tap_interface} | ${tap_settings}
+| | Sub-interface configuration from Honeycomb should be
+| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings}
+| | ... | ${sub_interface_settings}
+| | Sub-interface configuration from VAT should be
+| | ... | ${node} | ${sub_interface_name} | ${sub_interface_settings}
+| | Interface state from Honeycomb should be | ${node} | ${interface} | up
+| | Interface state from VAT should be | ${node} | ${interface} | up
+
+| Honeycomb and VPP should verify every setting
+| | [Documentation] | Uses Honeycomb and VAT to verify settings for VxLAN,\
+| | ... | bridge domains, TAP, vhost-user and VLAN.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ... | - interface - name of an interface on the specified node. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Honeycomb and VPP should verify every setting \| ${nodes['DUT1']} \
+| | ... | \| GigabitEthernet0/8/0 \|
+| | [Arguments] | ${node} | ${interface}
+| | VxLAN configuration from Honeycomb should be
+| | ... | ${node} | ${vx_interface} | ${vxlan_settings}
+| | VxLAN configuration from VAT should be
+| | ... | ${node} | ${vxlan_settings}
+| | Bridge domain configuration from Honeycomb should be
+| | ... | ${node} | ${bd_name} | ${bd_settings}
+| | Bridge domain configuration from VAT should be
+| | ... | ${node} | ${0} | ${bd_settings}
+| | TAP configuration from Honeycomb should be
+| | ... | ${node} | ${tap_interface} | ${tap_settings}
+| | TAP configuration from VAT should be
+| | ... | ${node} | ${tap_interface} | ${tap_settings}
+| | Vhost-user configuration from Honeycomb should be
+| | ... | ${node} | ${vhost_interface} | ${vhost_user_server}
+| | Vhost-user configuration from VAT should be
+| | ... | ${node} | ${vhost_user_server}
+| | Sub-interface configuration from Honeycomb should be
+| | ... | ${node} | ${sub_interface_name} | ${sub_interface_base_settings}
+| | ... | ${sub_interface_settings}
+| | Sub-interface configuration from VAT should be
+| | ... | ${node} | ${sub_interface_name} | ${sub_interface_settings}
+| | Interface state from Honeycomb should be | ${node} | ${interface} | up
+| | Interface state from VAT should be | ${node} | ${interface} | up
+
+| Honeycomb and VPP should have default configuration
+| | [Documentation] | Uses Honeycomb and VAT to verify settings for VxLAN,\
+| | ... | bridge domains, TAP, vhost-user and VLAN. Expects default\
+| | ... | configuration.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Honeycomb and VPP should have default configuration \|
+| | ... | ${nodes['DUT1']} \|
+| | [Arguments] | ${node}
+| | VxLAN configuration from Honeycomb should be empty
+| | ... | ${node} | ${vx_interface}
+| | VxLAN configuration from VAT should be empty | ${node}
+| | Honeycomb should show no bridge domains | ${node}
+| | VAT should show no bridge domains | ${node}
+| | TAP configuration from Honeycomb should be empty
+| | ... | ${node} | ${tap_interface}
+| | TAP configuration from VAT should be empty
+| | ... | ${node} | ${tap_interface}
+| | Vhost-user configuration from Honeycomb should be empty
+| | ... | ${node} | ${vhost_interface}
+| | Vhost-user configuration from VAT should be empty
+| | ... | ${node}
+| | Sub-interface configuration from Honeycomb should be empty
+| | ... | ${node} | ${sub_interface_name}
+| | Sub-interface configuration from VAT should be empty
+| | ... | ${node} | ${sub_interface_name}
+
+| Honeycomb should show no rogue interfaces
+| | [Documentation] | Checks if operational data contains interfaces not\
+| | ... | present in configuration and vice versa.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Honeycomb should show no rogue interfaces \| ${nodes['DUT1']} \|
+| | [Arguments] | ${node}
+| | ${data_conf}= | InterfaceAPI.Get all interfaces cfg data | ${node}
+| | ${data_oper}= | InterfaceAPI.Get all interfaces oper data | ${node}
+| | Compare interface lists | ${data_conf} | ${data_oper}
+
+| Persistence file is damaged during restart
+| | [Documentation] | Shuts down Honeycomb, modifies persistence files to\
+| | ... | simulate damage, then restarts VPP and starts up Honeycomb again.
+| | ...
+| | ... | *Arguments:*
+| | ... | - node - information about a DUT node. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Persistence file is damaged during restart \| ${nodes['DUT1']} \|
+| | [Arguments] | ${node}
+| | Stop Honeycomb service on DUTs | ${node}
+| | Modify persistence files | ${node} | { | abc
+| | Setup DUT | ${node}
+| | Setup Honeycomb service on DUTs | ${node} \ No newline at end of file