CSIT-425: HC Test: NSH-SFC test suite
[csit.git] / tests / func / honeycomb / 070_netconf.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 | honeycomb_sanity
25 | Suite Teardown | Run Keyword If Any Tests Failed
26 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
27
28 *** Variables ***
29 | &{bd_settings}= | flood=${True} | forward=${True} | learn=${True}
30 | ... | unknown-unicast-flood=${True} | arp-termination=${True}
31
32 *** Test Cases ***
33 | Honeycomb can create and delete interfaces
34 | | [Documentation] | Repeatedly create and delete an interface through Netconf\
35 | | ... | and check the reply for any errors.
36 | | Given Netconf session is established | ${node}
37 | | And Honeycomb creates first L2 bridge domain
38 | | ... | ${node} | bd_netconf | ${bd_settings}
39 | | :FOR | ${index} | IN RANGE | 20
40 | | | When Error trigger is sent | ${trigger_105}
41 | | | Then Replies should not contain RPC errors
42
43 | Transaction revert test case 1
44 | | [Documentation] | Configure two conflicting VxLAN tunnels, then verify\
45 | | ... | that neither tunnel exists.
46 | | Given Netconf session is established | ${node}
47 | | ${if_data}= | And InterfaceAPI.Get all interfaces oper data | ${node}
48 | | When Error trigger is sent | ${trigger_revert1}
49 | | ${if_data_new}= | And InterfaceAPI.Get all interfaces oper data | ${node}
50 | | Then Should be equal | ${if_data} | ${if_data_new}
51
52 | Transaction revert test case 2
53 | | [Documentation] | Configure two conflicting TAP interfaces, then verify\
54 | | ... | that neither interface exists.
55 | | Given Netconf session is established | ${node}
56 | | ${if_data}= | And InterfaceAPI.Get all interfaces oper data | ${node}
57 | | When Error trigger is sent | ${trigger_revert1}
58 | | ${if_data_new}= | And InterfaceAPI.Get all interfaces oper data | ${node}
59 | | Then Should be equal | ${if_data} | ${if_data_new}