f7e262234a3ffb58c7cb1ce6db243cf31b088d6f
[csit.git] / tests / func / honeycomb / mgmt-cfg-nsh-apihc-apivat-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 *** Variables***
15 | ${super_if}= | ${node['interfaces']['port1']['name']}
16
17 *** Settings ***
18 | Resource | resources/libraries/robot/default.robot
19 | Resource | resources/libraries/robot/honeycomb/nsh.robot
20 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
21 | Resource | resources/libraries/robot/honeycomb/vxlan_gpe.robot
22 | Variables | resources/test_data/honeycomb/nsh.py
23 | Variables | resources/test_data/honeycomb/vxlan_gpe.py
24 | Documentation | *Honeycomb NSH test suite.*
25 | Suite Teardown | Run Keyword If Any Tests Failed
26 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
27 | Force Tags | honeycomb_sanity
28
29 *** Test Cases ***
30 | TC01: Honeycomb can configure NSH entry
31 | | [Documentation] | Check if Honeycomb can configure an NSH entry.
32 | | Given NSH configuration from Honeycomb should be empty | ${node}
33 | | When Honeycomb adds NSH entry | ${node} | entry1 | ${nsh_entry1}
34 | | Then NSH entry from Honeycomb should be
35 | | ... | ${node} | entry1 | ${nsh_entry1_oper}
36
37 | TC02: Honeycomb can remove NSH entry
38 | | [Documentation] | Check if Honeycomb can remove an existing NSH entry.
39 | | Given NSH entry from Honeycomb should be
40 | | ... | ${node} | entry1 | ${nsh_entry1_oper}
41 | | When Honeycomb removes NSH entry | ${node} | entry1
42 | | Then NSH configuration from Honeycomb should be empty | ${node}
43
44 | TC03: Honeycomb can configure new NSH entry
45 | | [Documentation] | Check if Honeycomb can configure an NSH antry after one\
46 | | ... | has been deleted.
47 | | [Teardown] | Honeycomb removes NSH entry | ${node} | entry2
48 | | Given NSH configuration from Honeycomb should be empty | ${node}
49 | | When Honeycomb adds NSH entry | ${node} | entry2 | ${nsh_entry2}
50 | | Then NSH entry from Honeycomb should be
51 | | ... | ${node} | entry2 | ${nsh_entry2_oper}
52
53 | TC04: Honeycomb can configure multiple NSH entries at the same time
54 | | [Documentation] | Check if Honeycomb can configure an NSH entry when one\
55 | | ... | already exists.
56 | | [Teardown] | Honeycomb clears NSH configuration | ${node}
57 | | Given NSH configuration from Honeycomb should be empty | ${node}
58 | | When Honeycomb adds NSH entry | ${node} | entry1 | ${nsh_entry1}
59 | | And Honeycomb adds NSH entry | ${node} | entry2 | ${nsh_entry2}
60 | | Then NSH entry from Honeycomb should be
61 | | ... | ${node} | entry1 | ${nsh_entry1_oper}
62 | | And NSH entry from Honeycomb should be
63 | | ... | ${node} | entry2 | ${nsh_entry2_oper}
64
65 | TC05: Honeycomb can configure NSH map
66 | | [Documentation] | Check if Honeycomb can configure an NSH map.
67 | | Given NSH configuration from Honeycomb should be empty | ${node}
68 | | And Honeycomb creates VxLAN GPE interface
69 | | ... | ${node} | ${vxlan_gpe_if1}
70 | | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1}
71 | | When Honeycomb adds NSH entry | ${node} | entry1 | ${nsh_entry1}
72 | | And Honeycomb adds NSH map | ${node} | map1 | ${nsh_map1}
73 | | Then NSH map from Honeycomb should be | ${node} | map1 | ${nsh_map1_oper}
74
75 | TC06: Honeycomb can remove NSH map
76 | | [Documentation] | Check if Honeycomb can remove an existing NSH map.
77 | | Given NSH entry from Honeycomb should be
78 | | ... | ${node} | entry1 | ${nsh_entry1_oper}
79 | | And VxLAN GPE configuration from Honeycomb should be
80 | | ... | ${node} | ${vxlan_gpe_if1}
81 | | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1}
82 | | And NSH map from Honeycomb should be | ${node} | map1 | ${nsh_map1_oper}
83 | | When Honeycomb removes NSH map | ${node} | map1
84 | | Then NSH map from Honeycomb should not exist | ${node} | map1
85 | | And NSH entry from Honeycomb should be
86 | | ... | ${node} | entry1 | ${nsh_entry1_oper}
87
88 | TC07: Honeycomb can modify existing NSH map
89 | | [Documentation] | Check if Honeycomb can configure an NSH map after one\
90 | | ... | has been deleted.
91 | | [Teardown] | Honeycomb removes NSH map | ${node} | map1_edit
92 | | Given NSH map from Honeycomb should not exist | ${node} | map1_edit
93 | | And NSH entry from Honeycomb should be
94 | | ... | ${node} | entry1 | ${nsh_entry1_oper}
95 | | And VxLAN GPE configuration from Honeycomb should be
96 | | ... | ${node} | ${vxlan_gpe_if1}
97 | | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1}
98 | | When Honeycomb adds NSH map | ${node} | map1_edit | ${nsh_map1_edit}
99 | | Then NSH map from Honeycomb should be
100 | | ... | ${node} | map1_edit | ${nsh_map1_edit_oper}
101 | | And NSH entry from Honeycomb should be
102 | | ... | ${node} | entry1 | ${nsh_entry1_oper}
103
104 | TC08: Honeycomb can configure multiple NSH maps at the same time
105 | | [Documentation] | Check if Honeycomb can configure and NSH map when one\
106 | | ... | already exists.
107 | | [Teardown] | Run Keywords
108 | | ... | Honeycomb clears NSH configuration | ${node} | AND
109 | | ... | Honeycomb removes VxLAN GPE interface
110 | | ... | ${node} | ${vxlan_gpe_if1} | AND
111 | | ... | Honeycomb removes VxLAN GPE interface
112 | | ... | ${node} | ${vxlan_gpe_if2}
113 | | Given NSH map from Honeycomb should not exist | ${node} | map2
114 | | And NSH entry from Honeycomb should be
115 | | ... | ${node} | entry1 | ${nsh_entry1_oper}
116 | | And VxLAN GPE configuration from Honeycomb should be
117 | | ... | ${node} | ${vxlan_gpe_if1}
118 | | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1}
119 | | And Honeycomb creates VxLAN GPE interface
120 | | ... | ${node} | ${vxlan_gpe_if2}
121 | | ... | ${vxlan_gpe_base_settings2} | ${vxlan_gpe_settings2}
122 | | When Honeycomb adds NSH map | ${node} | map1 | ${nsh_map1}
123 | | And Honeycomb adds NSH map | ${node} | map2 | ${nsh_map2}
124 | | Then NSH map from Honeycomb should be
125 | | ... | ${node} | map1 | ${nsh_map1_oper}
126 | | And NSH map from Honeycomb should be
127 | | ... | ${node} | map2 | ${nsh_map2_oper}