HC Test: improve functional suite setup and teardown
[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 Setup | Set Up Honeycomb Functional Test Suite | ${node}
33 | ...
34 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
35 | ...
36 | Documentation | *Honeycomb TAP management test suite.*
37
38 *** Test Cases ***
39 | TC01: Honeycomb configures TAP interface
40 | | [Documentation] | Check if Honeycomb API can configure a TAP interface.
41 | | ...
42 | | Given TAP Operational Data From Honeycomb Should Be empty
43 | | ... | ${node} | ${tap_interface}
44 | | And TAP Operational Data From VAT Should Be empty
45 | | ... | ${node} | ${tap_interface}
46 | | When Honeycomb creates TAP interface
47 | | ... | ${node} | ${tap_interface} | ${tap_settings}
48 | | Then TAP Operational Data From Honeycomb Should Be
49 | | ... | ${node} | ${tap_interface} | ${tap_settings}
50 | | And TAP Operational Data From VAT Should Be
51 | | ... | ${node} | ${tap_interface} | ${tap_settings}
52
53 | TC02: Honeycomb modifies existing TAP interface configuration
54 | | [Documentation] | Check if Honeycomb API can re-configure and existing TAP\
55 | | ... | interface with new settings.
56 | | ...
57 | | Given TAP Operational Data From Honeycomb Should Be
58 | | ... | ${node} | ${tap_interface} | ${tap_settings}
59 | | And TAP Operational Data From VAT Should Be
60 | | ... | ${node} | ${tap_interface} | ${tap_settings}
61 | | When Honeycomb configures TAP interface
62 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
63 | | Then TAP Operational Data From Honeycomb Should Be
64 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
65 | | And TAP Operational Data From VAT Should Be
66 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
67
68 | TC03: Honeycomb removes TAP interface
69 | | [Documentation] | Check if Honeycomb API can remove TAP interface.
70 | | ...
71 | | Given TAP Operational Data From Honeycomb Should Be
72 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
73 | | And TAP Operational Data From VAT Should Be
74 | | ... | ${node} | ${tap_interface} | ${tap_settings2}
75 | | When Honeycomb removes TAP interface | ${node} | ${tap_interface}
76 | | Then TAP Operational Data From Honeycomb Should Be empty
77 | | ... | ${node} | ${tap_interface}
78 | | And TAP Operational Data From VAT Should Be empty
79 | | ... | ${node} | ${tap_interface}