521d59a24472a6c1091e44c62587a026ab8cd681
[csit.git] / tests / func / honeycomb / 120_port_mirroring.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/port_mirroring.robot
17 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
18 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
19 | Force Tags | honeycomb_sanity
20 | Suite Setup | Add Interface local0 To Topology | ${node}
21 | Suite Teardown | Run Keyword If Any Tests Failed
22 | | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node}
23 | Documentation | *Honeycomb port mirroring test suite.*
24 | ...
25 | ... | Test suite uses the first interface of the first DUT node.
26
27 *** Variables ***
28 | ${interface1}= | ${node['interfaces']['port1']['name']}
29 | ${interface2}= | ${node['interfaces']['port3']['name']}
30 | ${interface3}= | local0
31
32 *** Test Cases ***
33 # TODO: Add verification once operational data is available (HONEYCOMB-306)
34 | Honeycomb can configure SPAN on an interface
35 | | [Documentation] | Honeycomb configures SPAN on interface and verifies/
36 | | ... | against VPP SPAN dump.
37 | | Given SPAN configuration from VAT should not exist
38 | | ... | ${node}
39 | | When Honeycomb Configures SPAN on interface
40 | | ... | ${node} | ${interface1} | ${interface2}
41 | | Then Interface SPAN configuration from VAT should be
42 | | ... | ${node} | ${interface1} | ${interface2}
43
44 | Honeycomb can disable SPAN on interface
45 | | [Documentation] | Honeycomb removes existing SPAN configuration\
46 | | ... | on interface and verifies against VPP SPAN dump.
47 | | Given Interface SPAN configuration from VAT should be
48 | | ... | ${node} | ${interface1} | ${interface2}
49 | | When Honeycomb removes interface SPAN configuration
50 | | ... | ${node} | ${interface1}
51 | | Then SPAN configuration from VAT should not exist
52 | | ... | ${node}
53
54 | Honeycomb can configure SPAN on one interface to mirror two interfaces
55 | | [Documentation] | Honeycomb configures SPAN on interface, mirroring\
56 | | ... | two interfaces at the same time. Then verifies against VPP SPAN dump.
57 | | [Teardown] | Honeycomb removes interface SPAN configuration
58 | | ... | ${node} | ${interface1}
59 | | Given SPAN configuration from VAT should not exist
60 | | ... | ${node}
61 | | When Honeycomb Configures SPAN on interface
62 | | ... | ${node} | ${interface1} | ${interface2} | ${interface3}
63 | | Then Interface SPAN configuration from VAT should be
64 | | ... | ${node} | ${interface1} | ${interface2} | ${interface3}