CSIT-576 HC Test: Improve SPAN test coverage
[csit.git] / tests / func / honeycomb / mgmt-cfg-int-apihcnc-func.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
17 | Resource | resources/libraries/robot/honeycomb/netconf.robot
18 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
19 | Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords
20 | ...     | WITH NAME | InterfaceAPI
21 | Variables | resources/test_data/honeycomb/netconf/triggers.py
22 | Documentation | *Netconf test suite. Contains test cases that need to bypass\
23 | ... | REST API.*
24 | Force Tags | HC_FUNC | HC_REST_ONLY
25 | Suite Teardown
26 | ... | Restart Honeycomb and VPP | ${node}
27
28 *** Variables ***
29 | ${interface}= | ${node['interfaces']['port1']['name']}
30 | &{bd_settings}= | flood=${True} | forward=${True} | learn=${True}
31 | ... | unknown-unicast-flood=${True} | arp-termination=${True}
32
33 *** Test Cases ***
34 | TC01: Honeycomb can create and delete interfaces
35 | | [Documentation] | Repeatedly create and delete an interface through Netconf\
36 | | ... | and check the reply for any errors.
37 | | Given Netconf session is established | ${node}
38 | | And Honeycomb creates first L2 bridge domain
39 | | ... | ${node} | bd_netconf | ${bd_settings}
40 | | :FOR | ${index} | IN RANGE | 20
41 | | | When Error trigger is sent | ${trigger_105}
42 | | | Then Replies should not contain RPC errors
43
44 | TC02: Transaction revert test case 1
45 | | [Documentation] | Configure two conflicting VxLAN tunnels, then verify\
46 | | ... | that neither tunnel exists.
47 | | Given Netconf session is established | ${node}
48 | | ${if_data}= | And InterfaceAPI.Get all interfaces oper data | ${node}
49 | | When Error trigger is sent | ${trigger_revert1}
50 | | ${if_data_new}= | And InterfaceAPI.Get all interfaces oper data | ${node}
51 | | Then Should be equal | ${if_data} | ${if_data_new}
52
53 | TC03: Transaction revert test case 2
54 | | [Documentation] | Configure two conflicting TAP interfaces, then verify\
55 | | ... | that neither interface exists.
56 | | Given Netconf session is established | ${node}
57 | | ${if_data}= | And InterfaceAPI.Get all interfaces oper data | ${node}
58 | | When Error trigger is sent | ${trigger_revert1}
59 | | ${if_data_new}= | And InterfaceAPI.Get all interfaces oper data | ${node}
60 | | Then Should be equal | ${if_data} | ${if_data_new}
61
62 | TC04: Vlan subinterface creation
63 | | [Documentation] | Configure a Vlan sub-interface under a physical interface.
64 | | Given Netconf session is established | ${node}
65 | | When Error Trigger Is Sent
66 | | ... | ${trigger_vlan} | interface=${interface}
67 | | Then Replies should not contain RPC errors