f5f96732305eb2ea593c395d720b45f4fd6e376b
[csit.git] / tests / func / honeycomb / mgmt-statepersist-apihc-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 # Interface to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17
18 *** Settings ***
19 | Resource | resources/libraries/robot/default.robot
20 | Resource | resources/libraries/robot/honeycomb/persistence.robot
21 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
22 | Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
23 | Resource | resources/libraries/robot/honeycomb/l2_fib.robot
24 | Suite Setup | Run Keywords
25 | ... | Configure Persistence | ${node} | enable | AND
26 | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
27 | Suite Teardown | Configure Persistence | ${node} | disable
28 | Force Tags | HC_PERSIST | HC_REST_ONLY
29 | Documentation | *Honeycomb configuration persistence test suite.*
30
31 *** Test Cases ***
32 # multi-feature cases
33 # ===================
34 | TC01: Honeycomb persists configuration through restart of both Honeycomb and VPP
35 | | [Documentation] | Checks if Honeycomb maintains configuration after both\
36 | | ... | Restart Honeycomb and VPP.
37 | | [Tags] | HC_FUNC
38 | | [Teardown]
39 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
40 | | Given Multi-Feature Persistence test configuration | ${node} | ${interface}
41 | | And Multi-Feature persistence Test Verification | ${node} | ${interface}
42 | | And Log persisted configuration on node | ${node}
43 | | When Restart Honeycomb and VPP | ${node}
44 | | Then Multi-Feature persistence Test Verification | ${node} | ${interface}
45
46 | TC02: Honeycomb reverts to defaults if persistence files are invalid
47 | | [Documentation] | Checks if Honeycomb reverts to default configuration when\
48 | | ... | persistence files are damaged or invalid.
49 | | [Tags] | HC_FUNC
50 | | [Teardown]
51 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
52 | | Given Multi-Feature Persistence test configuration | ${node} | ${interface}
53 | | And Multi-Feature persistence Test Verification | ${node} | ${interface}
54 | | When Persistence file is damaged during restart | ${node}
55 | | Then Honeycomb and VPP should have default configuration | ${node}
56
57 | TC03: Honeycomb persists configuration through restart of Honeycomb
58 | | [Documentation] | Checks if Honeycomb maintains configuration after it\
59 | | ... | is restarted.
60 | | [Teardown]
61 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
62 | | Given Multi-Feature Persistence test configuration | ${node} | ${interface}
63 | | And Multi-Feature persistence Test Verification | ${node} | ${interface}
64 | | And Log persisted configuration on node | ${node}
65 | | When Restart Honeycomb | ${node}
66 | | Then Multi-Feature persistence Test Verification | ${node} | ${interface}
67
68 | TC04: Honeycomb persists configuration through restart of VPP
69 | | [Documentation] | Checks if Honeycomb updates VPP settings after VPP is\
70 | | ... | restarted.
71 | | [Teardown]
72 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
73 | | Given Multi-Feature Persistence test configuration | ${node} | ${interface}
74 | | And Multi-Feature persistence Test Verification | ${node} | ${interface}
75 | | And Log persisted configuration on node | ${node}
76 | | When Restart VPP | ${node}
77 | | Then Multi-Feature persistence Test Verification | ${node} | ${interface}
78
79 # single-feature cases
80 # ====================
81
82 | TC05: Persist configuration of IP addresses and neighbors - HC and VPP restart
83 | | [Documentation] | Verify persistence of interface state, IPv4 address
84 | | ... | and neighbor entries through restart of both Honeycomb and VPP.
85 | | [Teardown]
86 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
87 | | Given Interface Persistence Setup | ${node}
88 | | And Interface Persistence Check | ${node}
89 | | When Restart Honeycomb and VPP | ${node}
90 | | Then Interface Persistence Check | ${node}
91
92 | TC06: Persist configuration of IP addresses and neighbors - HC restart
93 | | [Documentation] | Verify persistence of interface state, IPv4 address
94 | | ... | and neighbor entries through restart of Honeycomb.
95 | | [Teardown]
96 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
97 | | Given Interface Persistence Setup | ${node}
98 | | And Interface Persistence Check | ${node}
99 | | When Restart Honeycomb | ${node}
100 | | Then Interface Persistence Check | ${node}
101
102 | TC07: Persist configuration of IP addresses and neighbors - VPP restart
103 | | [Documentation] | Verify persistence of interface state, IPv4 address
104 | | ... | and neighbor entries through restart of VPP.
105 | | [Teardown]
106 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
107 | | Given Interface Persistence Setup | ${node}
108 | | And Interface Persistence Check | ${node}
109 | | When Restart VPP | ${node}
110 | | Then Interface Persistence Check | ${node}
111
112 | TC08: Honeycomb persists configuration of bridge domains - HC and VPP restart
113 | | [Documentation] | Verify persistence of bridge domain, L2-FIB entry
114 | | ... | and Bridge domain Operational Interface Assignment through restart
115 | | ... | of both Honeycomb and VPP.
116 | | [Teardown]
117 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
118 | | Given Bridge Domain Persistence Setup | ${node}
119 | | When Restart Honeycomb and VPP | ${node}
120 | | Then Bridge Domain Persistence Check | ${node}
121
122 | TC09: Honeycomb persists configuration of bridge domains - HC restart
123 | | [Documentation] | Verify persistence of bridge domain, L2-FIB entry
124 | | ... | and Bridge domain Operational Interface Assignment through restart
125 | | ... | of Honeycomb.
126 | | [Teardown]
127 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
128 | | Given Bridge Domain Persistence Setup | ${node}
129 | | When Restart Honeycomb | ${node}
130 | | Then Bridge Domain Persistence Check | ${node}
131
132 | TC10: Honeycomb persists configuration of bridge domains - VPP restart
133 | | [Documentation] | Verify persistence of bridge domain, L2-FIB entry
134 | | ... | and Bridge domain Operational Interface Assignment through restart
135 | | ... | of VPP.
136 | | [Teardown]
137 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
138 | | Given Bridge Domain Persistence Setup | ${node}
139 | | When Restart VPP | ${node}
140 | | Then Bridge Domain Persistence Check | ${node}
141
142 #TODO: All other features