Clean: Various libraries
[csit.git] / tests / nsh_sfc / func / classifier / eth2p-ethip4-sfc-classifier-func.robot
1 # Copyright (c) 2017 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 | Library | resources.libraries.python.NodePath
16 | Library | resources.libraries.python.Trace
17 | Resource | resources/libraries/robot/shared/default.robot
18 | Resource | resources/libraries/robot/nsh_sfc/default.robot
19 | Resource | resources/libraries/robot/shared/interfaces.robot
20 | Resource | resources/libraries/robot/ip/ip4.robot
21 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | VM_ENV | FUNCTEST
22 | Suite Setup | Run Keywords
23 | ... | Configure all DUTs before test | AND
24 | ... | Configure all TGs for traffic script | AND
25 | ... | Update All Interface Data On All Nodes | ${nodes} | AND
26 | ... | Setup DUT nodes for 'Classifier' functional testing
27 | Test Setup | Run Keywords | Save VPP PIDs | AND
28 | ... | Reset PAPI History On All DUTs | ${nodes} | AND
29 | ... | Clear Interface Counters on all DUTs | ${nodes}
30 | Test Teardown | Run Keywords
31 | ... | Show packet trace on all DUTs | ${nodes} | AND
32 | ... | Show PAPI History On All DUTs | ${nodes} | AND
33 | ... | Verify VPP PID in Teardown
34 | Documentation | *NSH SFC Classifier test cases*
35 | ...
36 | ... | Test the SFC Classifier functional. DUT run the VPP with NSH SFC Plugin
37 | ... | TG send a TCP packet to the DUT, if the packet match the SFC Classifier
38 | ... | rules, the SFC Classifier will encapsulate this packet to a VxLAN-GPE
39 | ... | and NSH packet, then the DUT will loopback the packet to the TG.
40 | ... | The TG will capture this encapsulation packet and check the packet
41 | ... | field is correct.
42
43 *** Test Cases ***
44 | TC01: NSH SFC Classifier functional test with 72B frame size
45 | | [Documentation]
46 | | ... | Make TG send 72 Bytes TCP packet to DUT ingress interface. Make TG\
47 | | ... | verify SFC Classifier encapsulation functional is correct.
48 | | ${frame_size}= | Set Variable | ${72}
49 | | Node "${tg_node}" interface "${tg_to_dut_if1}" send "${frame_size}" Bytes packet to node "${dut_node}" interface "${dut_to_tg_if1}" for "Classifier" test
50
51 | TC02: NSH SFC Classifier functional test with 128B frame size
52 | | [Documentation]
53 | | ... | Make TG send 128 Bytes TCP packet to DUT ingress interface. Make TG\
54 | | ... | verify SFC Classifier encapsulation functional is correct.
55 | | ${frame_size}= | Set Variable | ${128}
56 | | Node "${tg_node}" interface "${tg_to_dut_if1}" send "${frame_size}" Bytes packet to node "${dut_node}" interface "${dut_to_tg_if1}" for "Classifier" test
57
58 | TC03: NSH SFC Classifier functional test with 256B frame size
59 | | [Documentation]
60 | | ... | Make TG send 256 Bytes TCP packet to DUT ingress interface. Make TG\
61 | | ... | verify SFC Classifier encapsulation functional is correct.
62 | | ${frame_size}= | Set Variable | ${256}
63 | | Node "${tg_node}" interface "${tg_to_dut_if1}" send "${frame_size}" Bytes packet to node "${dut_node}" interface "${dut_to_tg_if1}" for "Classifier" test
64
65 | TC04: NSH SFC Classifier functional test with 512B frame size
66 | | [Documentation]
67 | | ... | Make TG send 512 Bytes TCP packet to DUT ingress interface. Make TG\
68 | | ... | verify SFC Classifier encapsulation functional is correct.
69 | | ${frame_size}= | Set Variable | ${512}
70 | | Node "${tg_node}" interface "${tg_to_dut_if1}" send "${frame_size}" Bytes packet to node "${dut_node}" interface "${dut_to_tg_if1}" for "Classifier" test
71
72 | TC05: NSH SFC Classifier functional test with 1024B frame size
73 | | [Documentation]
74 | | ... | Make TG send 1024 Bytes TCP packet to DUT ingress interface. Make TG\
75 | | ... | verify SFC Classifier encapsulation functional is correct.
76 | | ${frame_size}= | Set Variable | ${1024}
77 | | Node "${tg_node}" interface "${tg_to_dut_if1}" send "${frame_size}" Bytes packet to node "${dut_node}" interface "${dut_to_tg_if1}" for "Classifier" test
78
79 | TC06: NSH SFC Classifier functional test with 1280B frame size
80 | | [Documentation]
81 | | ... | Make TG send 1280 Bytes TCP packet to DUT ingress interface. Make TG\
82 | | ... | verify SFC Classifier encapsulation functional is correct.
83 | | ${frame_size}= | Set Variable | ${1280}
84 | | Node "${tg_node}" interface "${tg_to_dut_if1}" send "${frame_size}" Bytes packet to node "${dut_node}" interface "${dut_to_tg_if1}" for "Classifier" test
85
86 | TC07: NSH SFC Classifier functional test with 1518B frame size
87 | | [Documentation]
88 | | ... | Make TG send 1518 Bytes TCP packet to DUT ingress interface. Make TG\
89 | | ... | verify SFC Classifier encapsulation functional is correct.
90 | | ${frame_size}= | Set Variable | ${1518}
91 | | Node "${tg_node}" interface "${tg_to_dut_if1}" send "${frame_size}" Bytes packet to node "${dut_node}" interface "${dut_to_tg_if1}" for "Classifier" test