CSIT-664: Refactor setups and teardowns
[csit.git] / tests / func / honeycomb / mgmt-cfg-inttap-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 # Interfaces to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17 | ${tap_interface}= | tap_test
18 # Configuration which will be set and verified during tests.
19 | &{tap_settings}= | tap-name=tap_test | mac=08:00:27:c0:5d:37
20 | ... | device-instance=${1}
21 | &{tap_settings2}= | tap-name=tap_test | mac=08:00:27:60:26:ab
22 | ... | device-instance=${2}
23
24 *** Settings ***
25 | Resource | resources/libraries/robot/default.robot
26 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
27 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
28 | Resource | resources/libraries/robot/honeycomb/tap.robot
29 | ...
30 | Force Tags | HC_FUNC
31 | ...
32 | Suite Teardown | Run Keyword If Any Tests Failed
33 | ... | Restart Honeycomb and VPP | ${node}
34 | ...
35 | Documentation | *Honeycomb TAP management test suite.*
36
37 *** Test Cases ***
38 | TC01: Honeycomb configures TAP interface
39 | | [Documentation] | Check if Honeycomb API can configure a TAP interface.
40 | | ...
41 | | Given TAP Operational Data From Honeycomb Should Be empty
42 | | ... | ${node} | ${tap_interface}
43 | | And TAP Operational Data From VAT Should Be empty
44 | | ... | ${node} | ${tap_interface}
45 | | When Honeycomb creates TAP interface
46 | | ... | ${node} | ${tap_interface} | ${tap_settings}
47 | | Then TAP Operational Data From Honeycomb Should Be
48 | | ... | ${node} | ${tap_interface} | ${tap_settings}
49 | | And TAP Operational Data From VAT Should Be
50 | | ... | ${node} | ${tap_interface} | ${tap_settings}
51
52 | TC02: Honeycomb modifies existing TAP interface configuration
53 | | [Documentation] | Check if Honeycomb API can re-configure and existing TAP\
54 | | ... | interface with new settings.
55 | | ...
56 | | Given TAP Operational Data From Honeycomb Should Be
57 | | ... | ${node} | ${tap_interface} | ${tap_settings}
58 | | And TAP Operational Data From VAT Should Be
59 | | ... | ${node} | ${tap_interface} | ${tap_settings}
60 | | When Honeycomb configures TAP interface
61 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
62 | | Then TAP Operational Data From Honeycomb Should Be
63 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
64 | | And TAP Operational Data From VAT Should Be
65 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
66
67 | TC03: Honeycomb removes TAP interface
68 | | [Documentation] | Check if Honeycomb API can remove TAP interface.
69 | | ...
70 | | Given TAP Operational Data From Honeycomb Should Be
71 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
72 | | And TAP Operational Data From VAT Should Be
73 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
74 | | When Honeycomb removes TAP interface | ${node} | ${tap_interface}
75 | | Then TAP Operational Data From Honeycomb Should Be empty
76 | | ... | ${node} | ${tap_interface}
77 | | And TAP Operational Data From VAT Should Be empty
78 | | ... | ${node} | ${tap_interface}